@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
@@ -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 { useCustomComponent as l, classNames as f, useMouse as d, IconWrap as g } from "@progress/kendo-react-common";
11
10
  import { useLocalization as I } from "@progress/kendo-react-intl";
@@ -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 te=require("react"),p=require("@progress/kendo-react-form"),C=require("@progress/kendo-react-labels"),oe=require("@progress/kendo-react-intl"),E=require("@progress/kendo-react-common"),v=require("./AxesEditor.js"),ne=require("./FieldsEditor.js"),o=require("../messages/index.js"),d=require("../hooks/usePivotConfiguratorEditor.js"),se=require("../shared/PivotGridConfiguratorEditorEventsContext.js"),re=require("../shared/PivotGridConfiguratorEditorStateContext.js");function ae(r){const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const c in r)if(c!=="default"){const A=Object.getOwnPropertyDescriptor(r,c);Object.defineProperty(x,c,A.get?A:{enumerable:!0,get:()=>r[c]})}}return x.default=r,Object.freeze(x)}const e=ae(te),w=e.forwardRef((r,x)=>{const{onFieldsEditorFieldCheck:c,onFieldsEditorFieldCheckAction:A=a.onFieldsEditorFieldCheckAction,onFieldsEditorFieldExpand:b,onFieldsEditorFieldExpandAction:R=a.onFieldsEditorFieldExpandAction,onAxisFilterFieldExpand:I,onAxisFilterFieldsExpandChange:N}=r,n={onFieldsEditorFieldCheck:c,onFieldsEditorFieldCheckAction:A,horizontal:a.horizontal,axesEditor:a.axesEditor,...r},[k,G]=E.useCustomComponent(n.fieldsLabel||a.fieldsLabel),[_,S]=E.useCustomComponent(n.fieldsEditor||a.fieldsEditor),[q,z]=E.useCustomComponent(n.columnAxesLabel||a.columnAxesLabel),[D,U]=E.useCustomComponent(n.columnAxesEditor||a.columnAxesEditor),[V,Z]=E.useCustomComponent(n.rowAxesLabel||a.rowAxesLabel),[j,B]=E.useCustomComponent(n.rowAxesEditor||a.rowAxesEditor),[H,K]=E.useCustomComponent(n.measureAxesLabel||a.measureAxesLabel),[J,Q]=E.useCustomComponent(n.measureAxesEditor||a.measureAxesEditor),W=e.useRef(null),u=e.useRef(null),g=oe.useLocalization(),[s,i]=d.usePivotConfiguratorEditor(n,u);e.useImperativeHandle(u,()=>({element:W.current,props:n,state:s})),e.useImperativeHandle(x,()=>u.current);const F=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:"columnAxes"})},L=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:null})},h=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:"rowAxes"})},y=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:null})},M=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:"measureAxes"})},T=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:null})},X=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};if(R){const l=R(m,n,s);l&&(Array.isArray(l)?l.filter(Boolean).map(f=>f&&i({...f},t.syntheticEvent)):i({...l},t.syntheticEvent))}b&&b({target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent})},Y=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};if(A){const l=A(m,n,s);l&&(Array.isArray(l)?l.filter(Boolean).map(f=>f&&i({...f},t.syntheticEvent)):i({...l},t.syntheticEvent))}c&&c(m)},$=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};I&&I(m)},ee=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};N&&N(m)},O=n.horizontal?"div":e.Fragment,P=n.horizontal?{className:"k-form-field-wrapper"}:{};return e.createElement(se.PivotGridConfiguratorEditorEventsContext.Provider,{value:{onAxisFilterFieldExpand:$,onAxisFilterFieldsExpandChange:ee}},e.createElement(re.PivotGridConfiguratorEditorStateContext.Provider,{value:[s,i]},e.createElement(O,{...P},e.createElement("div",{className:"k-form-field"},e.createElement(k,{name:"",component:C.Label,...G},g.toLanguageString(o.configuratorEditorSearchTitle,o.messages[o.configuratorEditorSearchTitle]))),e.createElement("div",{className:"k-form-field"},e.createElement("div",{className:"k-fields-list-wrapper"},e.createElement(_,{data:n.data,onExpand:X,onCheck:Y,columnAxes:s.columnAxes,rowAxes:s.rowAxes,measureAxes:s.measureAxes,...S})))),e.createElement(O,{...P},e.createElement("div",{className:"k-form-field",onMouseEnter:F,onMouseLeave:L},e.createElement(p.Field,{name:"columnAxes",field:"columnAxes",component:q,...z},g.toLanguageString(o.configuratorColumnsTitle,o.messages[o.configuratorColumnsTitle]))),n.valueGetter("columnAxes").length?e.createElement(p.Field,{name:"columnAxes",field:"columnAxes",component:D,onMouseEnter:F,onMouseLeave:L,className:"k-column-fields",...U}):e.createElement("div",{className:"k-settings-description",onMouseEnter:F,onMouseLeave:L},g.toLanguageString(o.configuratorMissingFields,o.messages[o.configuratorMissingFields])),e.createElement("div",{className:"k-form-field",onMouseEnter:h,onMouseLeave:y},e.createElement(p.Field,{name:"rowAxes",field:"rowAxes",component:V,...Z},g.toLanguageString(o.configuratorRowsTitle,o.messages[o.configuratorRowsTitle]))),n.valueGetter("rowAxes").length?e.createElement(p.Field,{name:"rowAxes",field:"rowAxes",component:j,onMouseEnter:h,onMouseLeave:y,className:"k-column-fields",...B}):e.createElement("div",{className:"k-settings-description",onMouseEnter:h,onMouseLeave:y},g.toLanguageString(o.configuratorMissingFields,o.messages[o.configuratorMissingFields]))),e.createElement(O,{...P},e.createElement("div",{className:"k-form-field",onMouseEnter:M,onMouseLeave:T},e.createElement(p.Field,{name:"measureAxes",field:"measureAxes",component:H,...K},g.toLanguageString(o.configuratorMeasuresTitle,o.messages[o.configuratorMeasuresTitle]))),n.valueGetter("measureAxes").length?e.createElement(p.Field,{name:"measureAxes",field:"measureAxes",component:J,onMouseEnter:M,onMouseLeave:T,className:"k-column-fields",...Q}):e.createElement("div",{className:"k-settings-description",onMouseEnter:M,onMouseLeave:T},g.toLanguageString(o.configuratorMissingFields,o.messages[o.configuratorMissingFields])))))}),a={data:[],horizontal:!1,fieldsLabel:C.Label,fieldsEditor:ne.PivotGridFieldsEditor,columnAxesLabel:C.Label,columnAxesEditor:v.PivotGridAxesEditor,rowAxesLabel:C.Label,rowAxesEditor:v.PivotGridAxesEditor,measureAxesLabel:C.Label,measureAxesEditor:v.PivotGridAxesEditor,axesEditor:v.PivotGridAxesEditor,onFieldsEditorFieldCheckAction:r=>({type:d.PIVOT_CONFIGURATOR_ACTION.toggleSelection,payload:r.value}),onFieldsEditorFieldExpandAction:r=>({type:d.PIVOT_CONFIGURATOR_ACTION.toggleExpansion,payload:r.value})};w.displayName="KendoReactPivotGridConfiguratorEditor";exports.PivotGridConfiguratorEditor=w;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const te=require("react"),p=require("@progress/kendo-react-form"),C=require("@progress/kendo-react-labels"),oe=require("@progress/kendo-react-intl"),E=require("@progress/kendo-react-common"),v=require("./AxesEditor.js"),ne=require("./FieldsEditor.js"),o=require("../messages/index.js"),d=require("../hooks/usePivotConfiguratorEditor.js"),se=require("../shared/PivotGridConfiguratorEditorEventsContext.js"),re=require("../shared/PivotGridConfiguratorEditorStateContext.js");function ae(r){const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const c in r)if(c!=="default"){const A=Object.getOwnPropertyDescriptor(r,c);Object.defineProperty(x,c,A.get?A:{enumerable:!0,get:()=>r[c]})}}return x.default=r,Object.freeze(x)}const e=ae(te),w=e.forwardRef((r,x)=>{const{onFieldsEditorFieldCheck:c,onFieldsEditorFieldCheckAction:A=a.onFieldsEditorFieldCheckAction,onFieldsEditorFieldExpand:b,onFieldsEditorFieldExpandAction:R=a.onFieldsEditorFieldExpandAction,onAxisFilterFieldExpand:I,onAxisFilterFieldsExpandChange:N}=r,n={onFieldsEditorFieldCheck:c,onFieldsEditorFieldCheckAction:A,horizontal:a.horizontal,axesEditor:a.axesEditor,...r},[k,G]=E.useCustomComponent(n.fieldsLabel||a.fieldsLabel),[_,S]=E.useCustomComponent(n.fieldsEditor||a.fieldsEditor),[q,z]=E.useCustomComponent(n.columnAxesLabel||a.columnAxesLabel),[D,U]=E.useCustomComponent(n.columnAxesEditor||a.columnAxesEditor),[V,Z]=E.useCustomComponent(n.rowAxesLabel||a.rowAxesLabel),[j,B]=E.useCustomComponent(n.rowAxesEditor||a.rowAxesEditor),[H,K]=E.useCustomComponent(n.measureAxesLabel||a.measureAxesLabel),[J,Q]=E.useCustomComponent(n.measureAxesEditor||a.measureAxesEditor),W=e.useRef(null),u=e.useRef(null),g=oe.useLocalization(),[s,i]=d.usePivotConfiguratorEditor(n,u);e.useImperativeHandle(u,()=>({element:W.current,props:n,state:s})),e.useImperativeHandle(x,()=>u.current);const F=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:"columnAxes"})},L=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:null})},h=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:"rowAxes"})},y=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:null})},M=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:"measureAxes"})},T=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:null})},X=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};if(R){const l=R(m,n,s);l&&(Array.isArray(l)?l.filter(Boolean).map(f=>f&&i({...f},t.syntheticEvent)):i({...l},t.syntheticEvent))}b&&b({target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent})},Y=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};if(A){const l=A(m,n,s);l&&(Array.isArray(l)?l.filter(Boolean).map(f=>f&&i({...f},t.syntheticEvent)):i({...l},t.syntheticEvent))}c&&c(m)},$=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};I&&I(m)},ee=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};N&&N(m)},O=n.horizontal?"div":e.Fragment,P=n.horizontal?{className:"k-form-field-wrapper"}:{};return e.createElement(se.PivotGridConfiguratorEditorEventsContext.Provider,{value:{onAxisFilterFieldExpand:$,onAxisFilterFieldsExpandChange:ee}},e.createElement(re.PivotGridConfiguratorEditorStateContext.Provider,{value:[s,i]},e.createElement(O,{...P},e.createElement("div",{className:"k-form-field"},e.createElement(k,{name:"",component:C.Label,...G},g.toLanguageString(o.configuratorEditorSearchTitle,o.messages[o.configuratorEditorSearchTitle]))),e.createElement("div",{className:"k-form-field"},e.createElement("div",{className:"k-fields-list-wrapper"},e.createElement(_,{data:n.data,onExpand:X,onCheck:Y,columnAxes:s.columnAxes,rowAxes:s.rowAxes,measureAxes:s.measureAxes,...S})))),e.createElement(O,{...P},e.createElement("div",{className:"k-form-field",onMouseEnter:F,onMouseLeave:L},e.createElement(p.Field,{name:"columnAxes",field:"columnAxes",component:q,...z},g.toLanguageString(o.configuratorColumnsTitle,o.messages[o.configuratorColumnsTitle]))),n.valueGetter("columnAxes").length?e.createElement(p.Field,{name:"columnAxes",field:"columnAxes",component:D,onMouseEnter:F,onMouseLeave:L,className:"k-column-fields",...U}):e.createElement("div",{className:"k-settings-description",onMouseEnter:F,onMouseLeave:L},g.toLanguageString(o.configuratorMissingFields,o.messages[o.configuratorMissingFields])),e.createElement("div",{className:"k-form-field",onMouseEnter:h,onMouseLeave:y},e.createElement(p.Field,{name:"rowAxes",field:"rowAxes",component:V,...Z},g.toLanguageString(o.configuratorRowsTitle,o.messages[o.configuratorRowsTitle]))),n.valueGetter("rowAxes").length?e.createElement(p.Field,{name:"rowAxes",field:"rowAxes",component:j,onMouseEnter:h,onMouseLeave:y,className:"k-column-fields",...B}):e.createElement("div",{className:"k-settings-description",onMouseEnter:h,onMouseLeave:y},g.toLanguageString(o.configuratorMissingFields,o.messages[o.configuratorMissingFields]))),e.createElement(O,{...P},e.createElement("div",{className:"k-form-field",onMouseEnter:M,onMouseLeave:T},e.createElement(p.Field,{name:"measureAxes",field:"measureAxes",component:H,...K},g.toLanguageString(o.configuratorMeasuresTitle,o.messages[o.configuratorMeasuresTitle]))),n.valueGetter("measureAxes").length?e.createElement(p.Field,{name:"measureAxes",field:"measureAxes",component:J,onMouseEnter:M,onMouseLeave:T,className:"k-column-fields",...Q}):e.createElement("div",{className:"k-settings-description",onMouseEnter:M,onMouseLeave:T},g.toLanguageString(o.configuratorMissingFields,o.messages[o.configuratorMissingFields])))))}),a={data:[],horizontal:!1,fieldsLabel:C.Label,fieldsEditor:ne.PivotGridFieldsEditor,columnAxesLabel:C.Label,columnAxesEditor:v.PivotGridAxesEditor,rowAxesLabel:C.Label,rowAxesEditor:v.PivotGridAxesEditor,measureAxesLabel:C.Label,measureAxesEditor:v.PivotGridAxesEditor,axesEditor:v.PivotGridAxesEditor,onFieldsEditorFieldCheckAction:r=>({type:d.PIVOT_CONFIGURATOR_ACTION.toggleSelection,payload:r.value}),onFieldsEditorFieldExpandAction:r=>({type:d.PIVOT_CONFIGURATOR_ACTION.toggleExpansion,payload:r.value})};w.displayName="KendoReactPivotGridConfiguratorEditor";exports.PivotGridConfiguratorEditor=w;
@@ -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 { Field as p } from "@progress/kendo-react-form";
11
10
  import { Label as g } from "@progress/kendo-react-labels";
@@ -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 d=require("react"),m=require("@progress/kendo-react-common");function g(e){const n=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(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=g(d),c=r.forwardRef((e,n)=>{const t=r.useRef(null),o=r.useRef(null);r.useImperativeHandle(o,()=>({props:e,element:t.current})),r.useImperativeHandle(n,()=>o.current);const{id:i,style:l,tabIndex:s,configuratorPosition:a,className:u,children:f}={...p,...e};return r.createElement("div",{ref:t,id:i,style:l,tabIndex:s,className:m.classNames("k-d-flex k-pos-relative",{"k-flex-row":a==="right","k-flex-row-reverse":a==="left","k-flex-column":a==="bottom","k-flex-column-reverse":a==="top"},u)},f)}),p={configuratorPosition:"right"};c.displayName="KendoReactPivotGridContainer";exports.PivotGridContainer=c;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),m=require("@progress/kendo-react-common");function g(e){const n=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(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=g(d),c=r.forwardRef((e,n)=>{const t=r.useRef(null),o=r.useRef(null);r.useImperativeHandle(o,()=>({props:e,element:t.current})),r.useImperativeHandle(n,()=>o.current);const{id:i,style:l,tabIndex:s,configuratorPosition:a,className:u,children:f}={...p,...e};return r.createElement("div",{ref:t,id:i,style:l,tabIndex:s,className:m.classNames("k-d-flex k-pos-relative",{"k-flex-row":a==="right","k-flex-row-reverse":a==="left","k-flex-column":a==="bottom","k-flex-column-reverse":a==="top"},u)},f)}),p={configuratorPosition:"right"};c.displayName="KendoReactPivotGridContainer";exports.PivotGridContainer=c;
@@ -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 e from "react";
10
9
  import { classNames as m } from "@progress/kendo-react-common";
11
10
  const u = e.forwardRef(
12
- (r, l) => {
11
+ (r, a) => {
13
12
  const o = e.useRef(null), n = e.useRef(null);
14
13
  e.useImperativeHandle(n, () => ({ props: r, element: o.current })), e.useImperativeHandle(
15
- l,
14
+ a,
16
15
  () => n.current
17
16
  );
18
- const { id: a, style: s, tabIndex: i, configuratorPosition: t, className: c, children: f } = { ...d, ...r };
17
+ const { id: l, style: s, tabIndex: i, configuratorPosition: t, className: c, children: f } = { ...d, ...r };
19
18
  return /* @__PURE__ */ e.createElement(
20
19
  "div",
21
20
  {
22
21
  ref: o,
23
- id: a,
22
+ id: l,
24
23
  style: s,
25
24
  tabIndex: i,
26
25
  className: m(
@@ -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 n=require("react");function c(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const i=c(n),a=i.createContext({axes:null});exports.PivotGridConfiguratorEditorAxesContext=a;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react");function c(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const i=c(n),a=i.createContext({axes:null});exports.PivotGridConfiguratorEditorAxesContext=a;
@@ -5,9 +5,8 @@
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
- const e = t.createContext({ axes: null });
9
+ const o = t.createContext({ axes: null });
11
10
  export {
12
- e as PivotGridConfiguratorEditorAxesContext
11
+ o as PivotGridConfiguratorEditorAxesContext
13
12
  };
@@ -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 H=require("react"),x=require("@progress/kendo-react-treeview"),l=require("@progress/kendo-react-common"),i=require("../utils/index.js"),R=require("../shared/PivotGridConfiguratorEditorStateContext.js");function A(t){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(c,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return c.default=t,Object.freeze(c)}const a=A(H),g=a.forwardRef((t,c)=>{const{data:n,rowAxes:o,columnAxes:v,measureAxes:C,onExpand:h,onCheck:f}={...m,...t},d=a.useRef(null),s=a.useRef(null),[p,y]=l.useCustomComponent(t.treeView||m.treeView),[E,q]=l.useCustomComponent(t.noData||m.noData);a.useImperativeHandle(s,()=>({props:t,element:d.current&&d.current.element})),a.useImperativeHandle(c,()=>s.current);const[w]=a.useContext(R.PivotGridConfiguratorEditorStateContext),N=i.extractDefaultFields(v),P=i.extractDefaultFields(o),k=i.extractDefaultFields(C),b=i.flatMap(n).filter(e=>[...N,...P,...k].some(r=>r===e.uniqueName||r===e.defaultHierarchy)),I={caption:e=>e.dataItem.caption,id:e=>e.dataItem.uniqueName,value:e=>e.dataItem.defaultHierarchy||e.dataItem.uniqueName,expanded:e=>w.expanded.some(r=>r.uniqueName===e.dataItem.uniqueName),hasChildren:e=>!("hierarchyUniqueName"in e.dataItem)&&!("aggregator"in e.dataItem),selectable:e=>!(!e.hasChildren&&!e.dataItem.aggregator&&!e.dataItem.measure||e.dataItem.type===2||e.dataItem.uniqueName==="[KPIs]"),children:e=>i.recursiveMap(e.dataItem.children,I,e),checked:e=>b.some(r=>e.dataItem.defaultHierarchy?r.defaultHierarchy===e.dataItem.defaultHierarchy:r.uniqueName===e.dataItem.uniqueName)||e.children.length&&e.children.every(r=>r.checked)},F=e=>{h&&h({value:e.item.dataItem,target:s.current,syntheticEvent:e.syntheticEvent})},D=e=>{f&&f({value:e.item.dataItem,target:s.current,syntheticEvent:e.syntheticEvent})},u=i.recursiveMap(t.data,I);return a.createElement(x.TreeViewItemPropsContext.Provider,{value:e=>({...e,checkboxes:e.item.selectable})},u&&u.length?a.createElement(p,{ref:l.canUseRef(p)?d:void 0,data:u,checkboxes:!0,onExpandChange:F,onCheckChange:D,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...y}):a.createElement(E,{...q}))}),m={data:[],rowAxes:[],columnAxes:[],measureAxes:[],treeView:x.TreeView,noData:()=>a.createElement("div",null,"NO DATA")};g.displayName="KendoReactPivotGridFieldsEditor";exports.PivotGridFieldsEditor=g;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("react"),x=require("@progress/kendo-react-treeview"),l=require("@progress/kendo-react-common"),i=require("../utils/index.js"),R=require("../shared/PivotGridConfiguratorEditorStateContext.js");function A(t){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(c,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return c.default=t,Object.freeze(c)}const a=A(H),g=a.forwardRef((t,c)=>{const{data:n,rowAxes:o,columnAxes:v,measureAxes:C,onExpand:h,onCheck:f}={...m,...t},s=a.useRef(null),d=a.useRef(null),[p,y]=l.useCustomComponent(t.treeView||m.treeView),[E,q]=l.useCustomComponent(t.noData||m.noData);a.useImperativeHandle(d,()=>({props:t,element:s.current&&s.current.element})),a.useImperativeHandle(c,()=>d.current);const[w]=a.useContext(R.PivotGridConfiguratorEditorStateContext),N=i.extractDefaultFields(v),P=i.extractDefaultFields(o),k=i.extractDefaultFields(C),b=i.flatMap(n).filter(e=>[...N,...P,...k].some(r=>r===e.uniqueName||r===e.defaultHierarchy)),I={caption:e=>e.dataItem.caption,id:e=>e.dataItem.uniqueName,value:e=>e.dataItem.defaultHierarchy||e.dataItem.uniqueName,expanded:e=>w.expanded.some(r=>r.uniqueName===e.dataItem.uniqueName),hasChildren:e=>!("hierarchyUniqueName"in e.dataItem)&&!("aggregator"in e.dataItem),selectable:e=>!(!e.hasChildren&&!e.dataItem.aggregator&&!e.dataItem.measure||e.dataItem.type===2||e.dataItem.uniqueName==="[KPIs]"),children:e=>i.recursiveMap(e.dataItem.children,I,e),checked:e=>b.some(r=>e.dataItem.defaultHierarchy?r.defaultHierarchy===e.dataItem.defaultHierarchy:r.uniqueName===e.dataItem.uniqueName)||e.children.length&&e.children.every(r=>r.checked)},F=e=>{h&&h({value:e.item.dataItem,target:d.current,syntheticEvent:e.syntheticEvent})},D=e=>{f&&f({value:e.item.dataItem,target:d.current,syntheticEvent:e.syntheticEvent})},u=i.recursiveMap(t.data,I);return a.createElement(x.TreeViewItemPropsContext.Provider,{value:e=>({...e,checkboxes:e.item.selectable})},u&&u.length?a.createElement(p,{ref:l.canUseRef(p)?s:void 0,data:u,checkboxes:!0,onExpandChange:F,onCheckChange:D,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...y}):a.createElement(E,{...q}))}),m={data:[],rowAxes:[],columnAxes:[],measureAxes:[],treeView:x.TreeView,noData:()=>a.createElement("div",null,"NO DATA")};g.displayName="KendoReactPivotGridFieldsEditor";exports.PivotGridFieldsEditor=g;
@@ -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 { TreeViewItemPropsContext as A, TreeView as V } from "@progress/kendo-react-treeview";
11
10
  import { useCustomComponent as h, canUseRef as D } 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"),o=require("@progress/kendo-react-common"),l=require("@progress/kendo-svg-icons");function v(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const c=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(a,n,c.get?c:{enumerable:!0,get:()=>e[n]})}}return a.default=e,Object.freeze(a)}const t=v(f),i=t.forwardRef((e,a)=>{const n=t.useRef(null),c=t.useRef(null);t.useImperativeHandle(n,()=>({element:c.current,props:e})),t.useImperativeHandle(a,()=>n.current);const[r,d]=o.useCustomComponent(e.icon||g.icon),u=o.useMouse(e,n),s=m=>{e.onIconClick&&e.onIconClick.call(void 0,{syntheticEvent:m.syntheticEvent,target:n.current})};return t.createElement("th",{ref:c,...u,colSpan:e.colSpan,rowSpan:e.rowSpan,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,...e.expandable?{"aria-expanded":e.expanded}:{},className:o.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total,"k-pivotgrid-header-root":e.root,"k-pivotgrid-expanded":e.expanded,"k-first":e.first},e.className)},e.expandable&&t.createElement(r,{...d,onClick:s,name:`chevron-${e.expanded?"up":"down"}`,"aria-hidden":!0,icon:e.expanded?l.chevronUpIcon:l.chevronDownIcon}),e.children)}),g={icon:o.IconWrap};i.displayName="KendoReactPivotGridHeaderCell";exports.PivotGridHeaderCell=i;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),o=require("@progress/kendo-react-common"),l=require("@progress/kendo-svg-icons");function v(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const c=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(a,n,c.get?c:{enumerable:!0,get:()=>e[n]})}}return a.default=e,Object.freeze(a)}const t=v(f),r=t.forwardRef((e,a)=>{const n=t.useRef(null),c=t.useRef(null);t.useImperativeHandle(n,()=>({element:c.current,props:e})),t.useImperativeHandle(a,()=>n.current);const[d,i]=o.useCustomComponent(e.icon||g.icon),u=o.useMouse(e,n),s=m=>{e.onIconClick&&e.onIconClick.call(void 0,{syntheticEvent:m.syntheticEvent,target:n.current})};return t.createElement("th",{ref:c,...u,colSpan:e.colSpan,rowSpan:e.rowSpan,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,...e.expandable?{"aria-expanded":e.expanded}:{},className:o.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total,"k-pivotgrid-header-root":e.root,"k-pivotgrid-expanded":e.expanded,"k-first":e.first},e.className)},e.expandable&&t.createElement(d,{...i,onClick:s,name:`chevron-${e.expanded?"up":"down"}`,"aria-hidden":!0,icon:e.expanded?l.chevronUpIcon:l.chevronDownIcon}),e.children)}),g={icon:o.IconWrap};r.displayName="KendoReactPivotGridHeaderCell";exports.PivotGridHeaderCell=r;
@@ -5,21 +5,20 @@
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 n from "react";
10
- import { useCustomComponent as m, useMouse as u, classNames as s, IconWrap as v } from "@progress/kendo-react-common";
9
+ import { useCustomComponent as m, useMouse as u, classNames as v, IconWrap as s } from "@progress/kendo-react-common";
11
10
  import { chevronUpIcon as f, chevronDownIcon as I } from "@progress/kendo-svg-icons";
12
11
  const h = n.forwardRef(
13
- (e, c) => {
12
+ (e, o) => {
14
13
  const t = n.useRef(null), a = n.useRef(null);
15
14
  n.useImperativeHandle(t, () => ({
16
15
  element: a.current,
17
16
  props: e
18
17
  })), n.useImperativeHandle(
19
- c,
18
+ o,
20
19
  () => t.current
21
20
  );
22
- const [o, d] = m(e.icon || x.icon), l = u(
21
+ const [c, d] = m(e.icon || x.icon), l = u(
23
22
  e,
24
23
  t
25
24
  ), i = (r) => {
@@ -40,7 +39,7 @@ const h = n.forwardRef(
40
39
  tabIndex: e.tabIndex,
41
40
  role: e.role,
42
41
  ...e.expandable ? { "aria-expanded": e.expanded } : {},
43
- className: s(
42
+ className: v(
44
43
  "k-pivotgrid-cell",
45
44
  {
46
45
  "k-pivotgrid-header-total": e.total,
@@ -52,7 +51,7 @@ const h = n.forwardRef(
52
51
  )
53
52
  },
54
53
  e.expandable && /* @__PURE__ */ n.createElement(
55
- o,
54
+ c,
56
55
  {
57
56
  ...d,
58
57
  onClick: i,
@@ -65,7 +64,7 @@ const h = n.forwardRef(
65
64
  );
66
65
  }
67
66
  ), x = {
68
- icon: v
67
+ icon: s
69
68
  };
70
69
  h.displayName = "KendoReactPivotGridHeaderCell";
71
70
  export {
package/components/Row.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 i=require("react"),c=require("@progress/kendo-react-common");function s(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=s(i),o=n.forwardRef((e,r)=>{const t=n.useRef(null),a=n.useRef(null);n.useImperativeHandle(t,()=>({element:a.current,props:e})),n.useImperativeHandle(r,()=>t.current);const l=c.useMouse(e,t);return n.createElement("tr",{ref:a,...l,id:e.id,style:e.style,tabIndex:e.tabIndex,children:e.children,role:e.role,"aria-owns":e.ariaOwns,className:c.classNames("k-pivotgrid-row",e.className)})});o.displayName="KendoReactPivotGridRow";exports.PivotGridRow=o;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),o=require("@progress/kendo-react-common");function s(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=s(i),c=n.forwardRef((e,r)=>{const t=n.useRef(null),a=n.useRef(null);n.useImperativeHandle(t,()=>({element:a.current,props:e})),n.useImperativeHandle(r,()=>t.current);const l=o.useMouse(e,t);return n.createElement("tr",{ref:a,...l,id:e.id,style:e.style,tabIndex:e.tabIndex,children:e.children,role:e.role,"aria-owns":e.ariaOwns,className:o.classNames("k-pivotgrid-row",e.className)})});c.displayName="KendoReactPivotGridRow";exports.PivotGridRow=c;
@@ -5,20 +5,19 @@
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 i, classNames as s } from "@progress/kendo-react-common";
11
- const c = t.forwardRef((e, r) => {
12
- const a = t.useRef(null), n = t.useRef(null);
10
+ const o = t.forwardRef((e, n) => {
11
+ const a = t.useRef(null), r = t.useRef(null);
13
12
  t.useImperativeHandle(a, () => ({
14
- element: n.current,
13
+ element: r.current,
15
14
  props: e
16
- })), t.useImperativeHandle(r, () => a.current);
15
+ })), t.useImperativeHandle(n, () => a.current);
17
16
  const l = i(e, a);
18
17
  return /* @__PURE__ */ t.createElement(
19
18
  "tr",
20
19
  {
21
- ref: n,
20
+ ref: r,
22
21
  ...l,
23
22
  id: e.id,
24
23
  style: e.style,
@@ -30,7 +29,7 @@ const c = t.forwardRef((e, r) => {
30
29
  }
31
30
  );
32
31
  });
33
- c.displayName = "KendoReactPivotGridRow";
32
+ o.displayName = "KendoReactPivotGridRow";
34
33
  export {
35
- c as PivotGridRow
34
+ o as PivotGridRow
36
35
  };
@@ -12,4 +12,4 @@
12
12
  * Licensed under commercial license. See LICENSE.md in the package root for more information
13
13
  *-------------------------------------------------------------------------------------------
14
14
  */
15
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@progress/kendo-react-common"),require("@progress/kendo-react-intl"),require("@progress/kendo-pivotgrid-common"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-form"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-data-tools"),require("@progress/kendo-react-treeview"),require("@progress/kendo-react-indicators")):"function"==typeof define&&define.amd?define(["exports","react","@progress/kendo-react-common","@progress/kendo-react-intl","@progress/kendo-pivotgrid-common","@progress/kendo-svg-icons","@progress/kendo-react-buttons","@progress/kendo-react-form","@progress/kendo-react-labels","@progress/kendo-react-data-tools","@progress/kendo-react-treeview","@progress/kendo-react-indicators"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactPivotgrid={},e.React,e.KendoReactCommon,e.KendoReactIntl,e.KendoPivotgridCommon,e.KendoSvgIcons,e.KendoReactButtons,e.KendoReactForm,e.KendoReactLabels,e.KendoReactDataTools,e.KendoReactTreeview,e.KendoReactIndicators)}(this,(function(e,t,r,n,a,o,l,s,i,c,u,d){"use strict";function m(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var p=m(t);const g={name:"@progress/kendo-react-pivotgrid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"$VERSION",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},v="pivotgrid.emptyCellAriaLabel",f="pivotgrid.fieldMenuReset",h="pivotgrid.fieldMenuApply",x="pivotgrid.configuratorTitle",E="pivotgrid.configuratorCancel",y="pivotgrid.configuratorApply",A="pivotgrid.configuratorColumnsTitle",C="pivotgrid.configuratorRowsTitle",w="pivotgrid.configuratorMeasuresTitle",b="pivotgrid.configuratorEditorSearchTitle",I="pivotgrid.configuratorMissingFields",N="pivotgrid.configuratorButtonLabel",k={[v]:"PivotGrid component. Use the arrow keys to navigate.",[f]:"Reset",[h]:"Apply",[E]:"Cancel",[y]:"Apply",[x]:"Settings",[b]:"Fields","pivotgrid.configuratorEditorSearchPlaceholder":"Search...",[A]:"Columns",[C]:"Rows",[w]:"Values",[N]:"Change settings",[I]:"Select some fields to begin setup"},R=p.forwardRef(((e,t)=>{const n=p.useRef(null),a=p.useRef(null);p.useImperativeHandle(n,(()=>({element:a.current,props:e}))),p.useImperativeHandle(t,(()=>n.current));const o=r.useMouse(e,n);return p.createElement("tr",{ref:a,...o,id:e.id,style:e.style,tabIndex:e.tabIndex,children:e.children,role:e.role,"aria-owns":e.ariaOwns,className:r.classNames("k-pivotgrid-row",e.className)})}));R.displayName="KendoReactPivotGridRow";const F=p.forwardRef(((e,t)=>{const n=p.useRef(null),a=p.useRef(null);p.useImperativeHandle(n,(()=>({element:a.current,props:e}))),p.useImperativeHandle(t,(()=>n.current));const o=r.useMouse(e,n);return p.createElement("td",{ref:a,...o,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)}));F.displayName="KendoReactPivotGridCell";const S=(e,t,r)=>[e,(n,o)=>{const l=a.headersReducer(e,{...n,tree:t});r&&r(l,o)}],P=p.forwardRef(((e,t)=>{const n=p.useRef(null),a=p.useRef(null);p.useImperativeHandle(n,(()=>({element:a.current,props:e}))),p.useImperativeHandle(t,(()=>n.current));const[l,s]=r.useCustomComponent(e.icon||L.icon),i=r.useMouse(e,n);return p.createElement("th",{ref:a,...i,colSpan:e.colSpan,rowSpan:e.rowSpan,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,...e.expandable?{"aria-expanded":e.expanded}:{},className:r.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total,"k-pivotgrid-header-root":e.root,"k-pivotgrid-expanded":e.expanded,"k-first":e.first},e.className)},e.expandable&&p.createElement(l,{...s,onClick:t=>{e.onIconClick&&e.onIconClick.call(void 0,{syntheticEvent:t.syntheticEvent,target:n.current})},name:"chevron-"+(e.expanded?"up":"down"),"aria-hidden":!0,icon:e.expanded?o.chevronUpIcon:o.chevronDownIcon}),e.children)})),L={icon:r.IconWrap};P.displayName="KendoReactPivotGridHeaderCell";const T=p.forwardRef(((e,t)=>{const n=p.useRef(null),a=p.useRef(null),{id:o,style:l,tabIndex:s,children:i,className:c,path:u=D.path}=e;p.useImperativeHandle(n,(()=>({element:a.current,props:{path:u,...e}}))),p.useImperativeHandle(t,(()=>n.current));const d=r.useMouse(e,n);return p.createElement("col",{ref:a,...d,id:o,style:l,tabIndex:s,children:i,className:c})})),D={path:[]};T.displayName="KendoReactPivotGridColumn";const M=(e=[],t={},r=null)=>e.map((e=>{const n={dataItem:e};return Object.keys(t).forEach((e=>{n[e]=t[e](n,r)})),n})),O=(e=[])=>{let t=[...e];return(e||[]).forEach((e=>{t=t.concat(O(e.children))})),t},H=(e=[])=>{const t=new Set;return e.forEach((e=>{t.add(String(e.name))})),Array.from(t)},q=(e=[])=>`${e.join(",")}`,G=(e,t,r)=>{if(!e)return[];let n=0;const a=[],o=e.length;let l;for(;n<o;n++)l=e[n].operator,(!r&&"in"!==l||l===r)&&e[n].field===t&&a.push(e[n]);return a},K=(e,t)=>e.uniqueName===t.uniqueName,z=p.forwardRef(((e,t)=>{r.validatePackage(g);const{rows:o,rowAxes:l,columns:s,columnAxes:i,data:c}={...U,...e},u=p.useRef(null),d=p.useRef(null),m=p.useRef(null),f=p.useRef(null),h=p.useRef(null),x=p.useRef(null),E=p.useRef(null),y=n.useLocalization(),A=a.toTree((o||[]).slice()),[,C]=S((l||[]).slice(),A,((t,r)=>{e.onRowAxesChange&&e.onRowAxesChange({value:t,target:d.current,syntheticEvent:r})})),[w,b,I,N]=a.toRows(A),R=a.toTree((s||[]).slice()),[,F]=S((i||[]).slice(),R,((t,r)=>{e.onColumnAxesChange&&e.onColumnAxesChange({value:t,target:d.current,syntheticEvent:r})})),[P,L,,T]=a.toColumns(R),D=a.toData((c||[]).slice(),L,b,T,I);p.useImperativeHandle(d,(()=>({props:e,element:u.current,columnHeaderRows:P,rowHeaderRows:w,dataCells:D,rowHeaderBreadth:N,columnHeaderBreadth:T}))),p.useImperativeHandle(t,(()=>d.current));const M=[],O=[],H=[],[G,K]=r.useCustomComponent(e.row||U.row),[z,B]=r.useCustomComponent(e.column||U.column),[j,V]=r.useCustomComponent(e.cell||U.cell),[X,Z]=r.useCustomComponent(e.headerCell||U.headerCell),_=e.columnHeadersRow||G,$=e.columnHeadersColumn||z,J=e.columnHeadersCell||X,W=e.rowHeadersRow||G,Y=e.rowHeadersColumn||z,Q=e.rowHeadersCell||X,ee=e.dataRow||G,te=e.dataColumn||z;for(let e=0;e<L.length;e++)M.push(p.createElement(te,{key:String(L[e].path),...B,path:L[e].path})),H.push(p.createElement($,{key:String(L[e].path),...B,path:L[e].path}));for(let e=0;e<N;e++)O.push(p.createElement(Y,{key:e,...B}));const re=e=>{e.target.props.expandable&&F({type:a.HEADERS_ACTION.toggle,payload:e.target.props.dataItem.path},e.syntheticEvent)},ne=e=>{e.target.props.expandable&&C({type:a.HEADERS_ACTION.toggle,payload:e.target.props.dataItem.path},e.syntheticEvent)},ae=((...e)=>{const t=p.useRef();return r=>{void 0!==t.current&&window.cancelAnimationFrame(t.current);const n=r.currentTarget,a=n.scrollLeft;e.forEach((e=>{const r=e.current;r&&r!==n&&(t.current=window.requestAnimationFrame((()=>{r.scrollLeft=Math.round(a)})))}))}})(E,x),oe=((...e)=>{const t=p.useRef();return r=>{void 0!==t.current&&window.cancelAnimationFrame(t.current);const n=r.currentTarget,a=n.scrollTop;e.forEach((e=>{const r=e.current;r&&r!==n&&(t.current=window.requestAnimationFrame((()=>{r.scrollTop=Math.round(a)})))}))}})(E,h),le=p.useCallback((()=>{u.current&&f.current&&(u.current.style.gridTemplateRows="",u.current.style.gridTemplateRows=`${f.current.offsetHeight}px 1fr`)}),[]),se=p.useCallback((()=>{u.current&&m.current&&(u.current.style.gridTemplateColumns="",u.current.style.gridTemplateColumns=`${m.current.offsetWidth}px 1fr`)}),[]),ie=p.useRef(new a.PivotGridNavigation({tabIndex:e.tabIndex||0}));p.useEffect((()=>{if(u.current){const t=e.tabIndex||0;if(ie.current.stop(),ie.current.tabIndex=t,e.navigatable){ie.current.start(u.current);const e=ie.current.first;e&&e.setAttribute("tabindex",String(t))}}return()=>{ie.current.stop()}}),[e.tabIndex,e.navigatable]),p.useEffect((()=>{ie.current.update()})),p.useEffect((()=>{if(f.current){const e=new window.ResizeObserver(le);return e.observe(f.current),()=>{e.disconnect()}}}),[le]),p.useEffect((()=>{if(m.current){const e=new window.ResizeObserver(se);return e.observe(m.current),()=>{e.disconnect()}}}),[se]),r.useIsomorphicLayoutEffect((()=>{if(r.setScrollbarWidth(),m.current){const e=new window.ResizeObserver((()=>r.setScrollbarWidth()));return e.observe(m.current),()=>{e.disconnect()}}}),[]);const ce=new Array(P.length).fill([]).map((()=>new Array(L.length)));P.forEach(((e,t)=>{let r=0;Array.from(e.cells).forEach((e=>{const n=!!(e&&e.children&&e.children.length),a=(e?q(e.normalizedPath)+(e.total?"|[TOTAL]":"")+(n?"|[EXPANDED]":""):"").replace(/\s/g,"-");if(e)for(let n=0;n<(e.colSpan||1);n++){for(let n=0;n<(e.rowSpan||1);n++){const e=ce[t+n].findIndex(((e,t)=>t>=r&&!e));ce[t+n][e]=a}r++}}))}));const ue=D.map((e=>e.cells.map((e=>((e,t)=>`${q(e.map((e=>e.name)))}|${q(t.map((e=>e.name)))}`)(e.rowTuple.members,e.columnTuple.members).replace(/\s/g,"-")))));return p.createElement("div",{ref:u,id:e.id,style:e.style,tabIndex:e.navigatable?void 0:e.tabIndex,className:r.classNames("k-pivotgrid",e.className),role:"grid"},p.createElement("span",{className:"k-pivotgrid-empty-cell"},p.createElement("span",{className:"k-sr-only"},y.toLanguageString(v,k[v]))),p.createElement("div",{ref:x,className:"k-pivotgrid-column-headers",onScroll:ae},p.createElement("table",{ref:f,className:"k-pivotgrid-table",role:"none"},p.createElement("colgroup",null,H),p.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},P.map(((e,t)=>{let r=!1;return p.createElement(_,{key:e.name,role:"row",...K},e.cells.map(((e,n)=>{const a=0!==n&&!r;e&&(r=!0);const o=e&&!(!e.children||!e.children.length),l=e&&e.hasChildren&&(!e.total||e.total&&e.parent.total);return e?p.createElement(J,{...Z,key:ce[t][n],"data-key":ce[t][n],id:ce[t][n],columnPath:e.normalizedPath,rowSpan:e.rowSpan||void 0,colSpan:e.colSpan||void 0,onIconClick:re,dataItem:e,expanded:o,expandable:l,total:e.total,first:a,root:0===e.levelNum,role:"columnheader"},e.caption):null})))}))))),p.createElement("div",{ref:h,className:"k-pivotgrid-row-headers"},p.createElement("table",{ref:m,className:"k-pivotgrid-table",role:"none"},p.createElement("colgroup",null,O),p.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},w.map(((e,t)=>p.createElement(W,{key:q(b[t].path),...K,path:b[t].path,role:"row",ariaOwns:ue[t].join(" ")},e.cells.filter(Boolean).map((e=>e?p.createElement(Q,{...Z,key:q(e.normalizedPath)+(e.total?"|[TOTAL]":"")+(e.children&&e.children.length?"|[EXPANDED]":""),"data-key":q(e.normalizedPath)+(e.total?"|[TOTAL]":"")+(e.children&&e.children.length?"|[EXPANDED]":""),rowPath:e.normalizedPath,rowSpan:e.rowSpan||void 0,colSpan:e.colSpan||void 0,dataItem:e,expanded:!(!e.children||!e.children.length),expandable:e.hasChildren&&!e.total,total:e.total,onIconClick:ne,root:0===e.levelNum,role:"rowheader"},e.caption):null)))))))),p.createElement("div",{ref:E,className:"k-pivotgrid-values",onScroll:e=>{ae(e),oe(e)}},p.createElement("table",{className:"k-pivotgrid-table",role:"none"},p.createElement("colgroup",null,M),p.createElement("tbody",{className:"k-pivotgrid-tbody",role:"none"},D.map(((e,t)=>p.createElement(ee,{key:q(b[t].path),...K,path:b[t].path,role:"none"},e.cells.map(((e,r)=>p.createElement(j,{key:ue[t][r],"data-key":ue[t][r],id:ue[t][r],...V,rowPath:e.rowTuple.members.map((e=>e.name)),columnPath:e.columnTuple.members.map((e=>e.name)),dataItem:e,total:b[t].total||L[r].total,role:"gridcell",ariaDescribedby:ce.map((e=>e[r])).join(" ")},e&&e.data&&e.data.fmtValue?e.data.fmtValue:" "))))))))))})),U={rowAxes:[],columnAxes:[],data:[],row:R,column:T,cell:F,headerCell:P};z.displayName="KendoReactPivotGrid";const B=p.forwardRef(((e,t)=>{const n=p.useRef(null),a=p.useRef(null);p.useImperativeHandle(a,(()=>({props:e,element:n.current}))),p.useImperativeHandle(t,(()=>a.current));const{id:o,style:l,tabIndex:s,configuratorPosition:i,className:c,children:u}={...j,...e};return p.createElement("div",{ref:n,id:o,style:l,tabIndex:s,className:r.classNames("k-d-flex k-pos-relative",{"k-flex-row":"right"===i,"k-flex-row-reverse":"left"===i,"k-flex-column":"bottom"===i,"k-flex-column-reverse":"top"===i},c)},u)})),j={configuratorPosition:"right"};B.displayName="KendoReactPivotGridContainer";const V=p.createContext({axes:null}),X=p.createContext({}),Z=p.createContext([{expanded:[],rowAxes:[],columnAxes:[],measureAxes:[],dragItem:null,dropZone:null,dropDirection:null,dropTarget:null},r.noop]);var _=(e=>(e.toggle="EXPAND_TOGGLE",e.expand="EXPAND_EXPAND",e.collapse="EXPAND_COLLAPSE",e))(_||{});const $=(e=[],t,r,n=((e,t)=>e===t))=>{const[a,o]=p.useState(e);return[a,(e,t)=>{const r=((e,t,r)=>{switch(t.type){case"EXPAND_TOGGLE":return Array.isArray(e)?e.find((e=>r(e,t.payload)))?[...e.filter((e=>!r(e,t.payload)))]:[...e,t.payload]:r(e,t.payload)?null:t.payload;case"EXPAND_EXPAND":if(Array.isArray(e)){if(!e.find((e=>r(e,t.payload))))return[...e,t.payload]}else if(!r(e,t.payload))return t.payload;break;case"EXPAND_COLLAPSE":if(Array.isArray(e)){if(e.find((e=>r(e,t.payload))))return[...e.filter((e=>!r(e,t.payload)))]}else r(e,t.payload);break;default:return e}})(a,e,n);o(r)}]};var J=(e=>(e.toggleExpansion="PIVOT_CONFIGURATOR_ACTION_TOGGLE_EXPANSION",e))(J||{});const W={...a.PIVOT_CONFIGURATOR_ACTION,...J},Y=(e,t)=>{const r=e.valueGetter("rowAxes"),n=e.valueGetter("columnAxes"),o=e.valueGetter("measureAxes"),l=e.valueGetter("sort"),s=e.valueGetter("filter"),[i,c]=$([],0,0,K),[u,d]=p.useState(null),[m,g]=p.useState(null),[v,f]=p.useState(null),[h,x]=p.useState(null);return[{dragItem:u,dropTarget:v,dropZone:m,dropDirection:h,columnAxes:n,rowAxes:r,measureAxes:o,sort:l,filter:s,expanded:i},(t,i)=>{if(t.type===W.toggleExpansion)c({type:_.toggle,payload:t.payload},i);else{const i=a.configuratorReducer({filter:t.override&&void 0!==t.override.filter?t.override.filter:s,sort:t.override&&void 0!==t.override.sort?t.override.sort:l,rowAxes:t.override&&void 0!==t.override.rowAxes?t.override.rowAxes:r,columnAxes:t.override&&void 0!==t.override.columnAxes?t.override.columnAxes:n,measureAxes:t.override&&void 0!==t.override.measureAxes?t.override.measureAxes:o,dragItem:t.override&&void 0!==t.override.dragItem?t.override.dragItem:u,dropDirection:t.override&&void 0!==t.override.dropDirection?t.override.dropDirection:h,dropTarget:t.override&&void 0!==t.override.dropTarget?t.override.dropTarget:v,dropZone:t.override&&void 0!==t.override.dropZone?t.override.dropZone:m},t);void 0!==i.columnAxes&&e.onChange("columnAxes",{value:i.columnAxes}),void 0!==i.rowAxes&&e.onChange("rowAxes",{value:i.rowAxes}),void 0!==i.measureAxes&&e.onChange("measureAxes",{value:i.measureAxes}),void 0!==i.sort&&e.onChange("sort",{value:i.sort}),void 0!==i.filter&&e.onChange("filter",{value:i.filter}),void 0!==i.dropDirection&&x(i.dropDirection),void 0!==i.dropTarget&&f(i.dropTarget),void 0!==i.dropZone&&g(i.dropZone),void 0!==i.dragItem&&d(i.dragItem)}}]},Q=p.forwardRef(((e,t)=>{const{data:a,dataItem:l,defaultFilter:s}={...ee,...e},i=p.useRef(null),c=p.useRef(null),u=n.useLocalization(),[d,m]=r.useCustomComponent(e.columnMenuItem||ee.columnMenuItem),[g,v]=r.useCustomComponent(e.columnMenuForm||ee.columnMenuForm),[x,E]=r.useCustomComponent(e.resetButton||ee.resetButton),[y,A]=r.useCustomComponent(e.applyButton||ee.applyButton),[C,w]=r.useCustomComponent(e.treeView||ee.treeView),[b,I]=r.useCustomComponent(e.noData||ee.noData);p.useImperativeHandle(c,(()=>({props:e,element:i.current}))),p.useImperativeHandle(t,(()=>c.current));const[N,R]=p.useState(!1),{onAxisFilterFieldsExpandChange:F,onAxisFilterFieldExpand:S}=p.useContext(X),[,P]=p.useContext(Z),[L,T]=p.useState(s),D=L?L.value.split(","):[],[H,q]=$([],0,0,K),G={caption:e=>e.dataItem.caption,id:e=>e.dataItem.uniqueName,parent:(e,t)=>t&&t.value,value:e=>e.dataItem.defaultHierarchy||e.dataItem.uniqueName,expanded:e=>H.some((t=>t.uniqueName===e.id)),checked:e=>!D.length||(D||[]).some((t=>t===e.dataItem.uniqueName)),hasChildren:e=>parseInt(e.dataItem.childrenCardinality,10)>0,children:e=>M(e.dataItem.children,G,e),checkIndeterminate:e=>{const t=(e.children||[]).length&&e.children.every((e=>e.checked));return t&&(e.checked=!0),(e.children||[]).some((e=>e.checked))&&!t}},z=M(a,G),U=O(z);return p.createElement("div",{ref:i,id:e.id,tabIndex:e.tabIndex,style:e.style,className:r.classNames("k-columnmenu-item-wrapper",e.className)},p.createElement(d,{...m,title:"Include Fields",iconClass:"k-i-grid-layout",svgIcon:o.gridLayoutIcon,onClick:e=>{R(!N),F&&F({value:!N,target:c.current,syntheticEvent:e})}}),p.createElement(g,{show:N,actions:p.createElement(p.Fragment,null,p.createElement(x,{type:"reset",onClick:e=>{R(!1),L&&P({type:W.removeFilter,payload:L},e)},...E},u.toLanguageString(f,k[f])),p.createElement(y,{themeColor:"primary",onClick:e=>{R(!1),L&&P({type:s?W.changeFilter:W.addFilter,payload:L},e)},...A},u.toLanguageString(h,k[h]))),...v},z&&z.length?p.createElement(C,{data:z,checkboxes:!0,onExpandChange:e=>{q({type:_.toggle,payload:e.item.dataItem},e.syntheticEvent),S&&S({value:e.item.dataItem,target:c.current,syntheticEvent:e.syntheticEvent})},onCheckChange:e=>{let t;t=e.item.checked?{field:String(l.name),operator:"in",value:U.filter((e=>e.checked)).map((e=>String(e.value))).filter((t=>t!==e.item.value&&t!==e.item.parent)).join(",")}:{field:String(l.name),operator:"in",value:U.filter((e=>e.checked)).map((e=>String(e.value))).concat([e.item.value]).join(",")},T(t)},textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...w}):p.createElement(b,{...I})))})),ee={data:[],resetButton:l.Button,applyButton:l.Button,treeView:u.TreeView,noData:()=>p.createElement(d.Skeleton,{shape:"rectangle",style:{height:"20px",width:"calc(100% - 16px)",margin:8}}),columnMenuItem:c.ColumnMenuItem,columnMenuForm:c.ColumnMenuForm};Q.displayName="KendoReactPivotGridAxisFilterFieldsEditor";const te=p.forwardRef(((e,t)=>{const n=p.useRef(0),o=p.useRef(0),l=p.useRef(null),s=p.useRef(null),i=p.useRef(null),{axes:u}=p.useContext(V),[d,m]=p.useState(!1),[g,v]=p.useContext(Z);p.useImperativeHandle(s,(()=>l.current&&l.current.element)),p.useImperativeHandle(i,(()=>({props:e,element:s.current}))),p.useImperativeHandle(t,(()=>i.current));const[f,h]=r.useCustomComponent(e.chip||re.chip),[x,E]=r.useCustomComponent(e.dropClue||re.dropClue),[y,A]=r.useCustomComponent(e.columnMenuTextColumn||re.columnMenuTextColumn),[C,w]=r.useCustomComponent(e.filterFieldsEditor||re.filterFieldsEditor),b=G(g.filter,String(e.value),"in"),I=G(g.filter,String(e.value));return r.useDraggable(s,{onPress:e=>{n.current=e.clientX,o.current=e.clientY},onDrag:t=>{Math.abs(n.current-t.clientX)<10&&Math.abs(o.current-t.clientY)<10||(s.current&&(s.current.style.transform=`translate(${t.clientX-n.current}px, ${t.clientY-o.current}px)`),m(!0),v({type:W.setDragItem,payload:e.dataItem}))},onRelease:()=>{m(!1),g.dragItem&&(s.current&&(s.current.style.transform=""),v({type:W.drop,payload:e.dataItem}))}}),p.createElement(p.Fragment,null,g.dropTarget&&a.compareAxes(g.dropTarget,e.dataItem)&&"before"===g.dropDirection&&p.createElement(x,{...E}),p.createElement(f,{ref:r.canUseRef(f)?l:void 0,...e,removable:!0,onRemove:t=>{v({type:W.remove,payload:e.dataItem},t.syntheticEvent)},onMouseEnter:t=>{g.dragItem&&(v({type:W.setDropTarget,payload:e.dataItem},t.syntheticEvent),v({type:W.setDropZone,payload:u},t.syntheticEvent))},onMouseMove:e=>{if(g.dragItem&&!d&&s.current){const t=s.current.getBoundingClientRect(),r=e.syntheticEvent.clientX-t.left<t.width/2?"before":"after";v({type:W.setDropDirection,payload:r},e.syntheticEvent)}},style:{pointerEvents:d?"none":void 0},rounded:"full",...h},e.text,"measureAxes"!==u&&p.createElement(y,{field:String(e.value),itemsRender:t=>{const r=t.slice(),n=((e,t,r)=>{if(!e)return;let n,a=0;const o=e.length;let l;for(;a<o;a++)l=e[a].operator,l===r&&e[a].field===t&&(n=e[a]);return n})(g.filter,String(e.dataItem.name),"in");return r.splice(1,0,p.createElement(C,{key:"axis-filter-fields-editor",defaultFilter:n,dataItem:e.dataItem,data:e.dataItem.fields,axes:u,...w})),r},sort:g.sort,onSortChange:(e,t)=>{v({type:W.setSort,payload:t},e)},filter:I&&I.length?[{logic:"and",filters:I}]:void 0,onFilterChange:(e,t)=>{t.length?v({type:W.setFilter,payload:[...b||[],...t.reduce(((e,t)=>[...e,...t.filters.filter((e=>e.value))]),[])]},e):v({type:W.setFilter,payload:b},e)},filterContent:[c.ColumnMenuTextFilter],...A})),g.dropTarget&&a.compareAxes(g.dropTarget,e.dataItem)&&"after"===g.dropDirection&&p.createElement(x,{...E}))})),re={chip:l.Chip,columnMenuTextColumn:c.ColumnMenuTextColumn,filterFieldsEditor:Q,dropClue:e=>p.createElement("div",{className:"k-grouping-dropclue",style:{position:"relative",zIndex:1e4},...e})};te.defaultProps=re,te.displayName="KendoReactPivotGridAxisEditor";const ne=p.forwardRef(((e,t)=>{const{value:n,field:a}={...ae,...e},o=p.useRef(null),l=p.useRef(null),s=p.useRef(null),[i,c]=r.useCustomComponent(e.chipList||ae.chipList);p.useImperativeHandle(l,(()=>o.current&&o.current.element)),p.useImperativeHandle(s,(()=>({props:e,element:l.current}))),p.useImperativeHandle(t,(()=>s.current));const u=n.filter((e=>1===e.name.length&&e.name.every((e=>-1===e.indexOf("&"))))).map((e=>({...e,text:String(e.name)})));return p.createElement(V.Provider,{value:{axes:a}},p.createElement(i,{ref:r.canUseRef(i)?o:void 0,textField:"text",valueField:"name",data:u,chip:te,style:{position:"relative"},className:e.className,selection:"none",...c}))})),ae={value:[],chipList:l.ChipList};ne.defaultProps=ae,ne.displayName="KendoReactPivotGridAxesEditor";const oe=p.forwardRef(((e,t)=>{const{data:n,rowAxes:a,columnAxes:o,measureAxes:l,onExpand:s,onCheck:i}={...le,...e},c=p.useRef(null),d=p.useRef(null),[m,g]=r.useCustomComponent(e.treeView||le.treeView),[v,f]=r.useCustomComponent(e.noData||le.noData);p.useImperativeHandle(d,(()=>({props:e,element:c.current&&c.current.element}))),p.useImperativeHandle(t,(()=>d.current));const[h]=p.useContext(Z),x=H(o),E=H(a),y=H(l),A=O(n).filter((e=>[...x,...E,...y].some((t=>t===e.uniqueName||t===e.defaultHierarchy)))),C={caption:e=>e.dataItem.caption,id:e=>e.dataItem.uniqueName,value:e=>e.dataItem.defaultHierarchy||e.dataItem.uniqueName,expanded:e=>h.expanded.some((t=>t.uniqueName===e.dataItem.uniqueName)),hasChildren:e=>!("hierarchyUniqueName"in e.dataItem)&&!("aggregator"in e.dataItem),selectable:e=>!(!e.hasChildren&&!e.dataItem.aggregator&&!e.dataItem.measure||2===e.dataItem.type||"[KPIs]"===e.dataItem.uniqueName),children:e=>M(e.dataItem.children,C,e),checked:e=>A.some((t=>e.dataItem.defaultHierarchy?t.defaultHierarchy===e.dataItem.defaultHierarchy:t.uniqueName===e.dataItem.uniqueName))||e.children.length&&e.children.every((e=>e.checked))},w=M(e.data,C);return p.createElement(u.TreeViewItemPropsContext.Provider,{value:e=>({...e,checkboxes:e.item.selectable})},w&&w.length?p.createElement(m,{ref:r.canUseRef(m)?c:void 0,data:w,checkboxes:!0,onExpandChange:e=>{s&&s({value:e.item.dataItem,target:d.current,syntheticEvent:e.syntheticEvent})},onCheckChange:e=>{i&&i({value:e.item.dataItem,target:d.current,syntheticEvent:e.syntheticEvent})},textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...g}):p.createElement(v,{...f}))})),le={data:[],rowAxes:[],columnAxes:[],measureAxes:[],treeView:u.TreeView,noData:()=>p.createElement("div",null,"NO DATA")};oe.displayName="KendoReactPivotGridFieldsEditor";const se=p.forwardRef(((e,t)=>{const{onFieldsEditorFieldCheck:a,onFieldsEditorFieldCheckAction:o=ie.onFieldsEditorFieldCheckAction,onFieldsEditorFieldExpand:l,onFieldsEditorFieldExpandAction:c=ie.onFieldsEditorFieldExpandAction,onAxisFilterFieldExpand:u,onAxisFilterFieldsExpandChange:d}=e,m={onFieldsEditorFieldCheck:a,onFieldsEditorFieldCheckAction:o,horizontal:ie.horizontal,axesEditor:ie.axesEditor,...e},[g,v]=r.useCustomComponent(m.fieldsLabel||ie.fieldsLabel),[f,h]=r.useCustomComponent(m.fieldsEditor||ie.fieldsEditor),[x,E]=r.useCustomComponent(m.columnAxesLabel||ie.columnAxesLabel),[y,N]=r.useCustomComponent(m.columnAxesEditor||ie.columnAxesEditor),[R,F]=r.useCustomComponent(m.rowAxesLabel||ie.rowAxesLabel),[S,P]=r.useCustomComponent(m.rowAxesEditor||ie.rowAxesEditor),[L,T]=r.useCustomComponent(m.measureAxesLabel||ie.measureAxesLabel),[D,M]=r.useCustomComponent(m.measureAxesEditor||ie.measureAxesEditor),O=p.useRef(null),H=p.useRef(null),q=n.useLocalization(),[G,K]=Y(m);p.useImperativeHandle(H,(()=>({element:O.current,props:m,state:G}))),p.useImperativeHandle(t,(()=>H.current));const z=()=>{G.dragItem&&K({type:W.setDropZone,payload:"columnAxes"})},U=()=>{G.dragItem&&K({type:W.setDropZone,payload:null})},B=()=>{G.dragItem&&K({type:W.setDropZone,payload:"rowAxes"})},j=()=>{G.dragItem&&K({type:W.setDropZone,payload:null})},V=()=>{G.dragItem&&K({type:W.setDropZone,payload:"measureAxes"})},_=()=>{G.dragItem&&K({type:W.setDropZone,payload:null})},$=m.horizontal?"div":p.Fragment,J=m.horizontal?{className:"k-form-field-wrapper"}:{};return p.createElement(X.Provider,{value:{onAxisFilterFieldExpand:e=>{const t={target:e.target,currentTarget:H.current,value:e.value,syntheticEvent:e.syntheticEvent};u&&u(t)},onAxisFilterFieldsExpandChange:e=>{const t={target:e.target,currentTarget:H.current,value:e.value,syntheticEvent:e.syntheticEvent};d&&d(t)}}},p.createElement(Z.Provider,{value:[G,K]},p.createElement($,{...J},p.createElement("div",{className:"k-form-field"},p.createElement(g,{name:"",component:i.Label,...v},q.toLanguageString(b,k[b]))),p.createElement("div",{className:"k-form-field"},p.createElement("div",{className:"k-fields-list-wrapper"},p.createElement(f,{data:m.data,onExpand:e=>{const t={target:e.target,currentTarget:H.current,value:e.value,syntheticEvent:e.syntheticEvent};if(c){const r=c(t,m,G);r&&(Array.isArray(r)?r.filter(Boolean).map((t=>t&&K({...t},e.syntheticEvent))):K({...r},e.syntheticEvent))}l&&l({target:e.target,currentTarget:H.current,value:e.value,syntheticEvent:e.syntheticEvent})},onCheck:e=>{const t={target:e.target,currentTarget:H.current,value:e.value,syntheticEvent:e.syntheticEvent};if(o){const r=o(t,m,G);r&&(Array.isArray(r)?r.filter(Boolean).map((t=>t&&K({...t},e.syntheticEvent))):K({...r},e.syntheticEvent))}a&&a(t)},columnAxes:G.columnAxes,rowAxes:G.rowAxes,measureAxes:G.measureAxes,...h})))),p.createElement($,{...J},p.createElement("div",{className:"k-form-field",onMouseEnter:z,onMouseLeave:U},p.createElement(s.Field,{name:"columnAxes",field:"columnAxes",component:x,...E},q.toLanguageString(A,k[A]))),m.valueGetter("columnAxes").length?p.createElement(s.Field,{name:"columnAxes",field:"columnAxes",component:y,onMouseEnter:z,onMouseLeave:U,className:"k-column-fields",...N}):p.createElement("div",{className:"k-settings-description",onMouseEnter:z,onMouseLeave:U},q.toLanguageString(I,k[I])),p.createElement("div",{className:"k-form-field",onMouseEnter:B,onMouseLeave:j},p.createElement(s.Field,{name:"rowAxes",field:"rowAxes",component:R,...F},q.toLanguageString(C,k[C]))),m.valueGetter("rowAxes").length?p.createElement(s.Field,{name:"rowAxes",field:"rowAxes",component:S,onMouseEnter:B,onMouseLeave:j,className:"k-column-fields",...P}):p.createElement("div",{className:"k-settings-description",onMouseEnter:B,onMouseLeave:j},q.toLanguageString(I,k[I]))),p.createElement($,{...J},p.createElement("div",{className:"k-form-field",onMouseEnter:V,onMouseLeave:_},p.createElement(s.Field,{name:"measureAxes",field:"measureAxes",component:L,...T},q.toLanguageString(w,k[w]))),m.valueGetter("measureAxes").length?p.createElement(s.Field,{name:"measureAxes",field:"measureAxes",component:D,onMouseEnter:V,onMouseLeave:_,className:"k-column-fields",...M}):p.createElement("div",{className:"k-settings-description",onMouseEnter:V,onMouseLeave:_},q.toLanguageString(I,k[I])))))})),ie={data:[],horizontal:!1,fieldsLabel:i.Label,fieldsEditor:oe,columnAxesLabel:i.Label,columnAxesEditor:ne,rowAxesLabel:i.Label,rowAxesEditor:ne,measureAxesLabel:i.Label,measureAxesEditor:ne,axesEditor:ne,onFieldsEditorFieldCheckAction:e=>({type:W.toggleSelection,payload:e.value}),onFieldsEditorFieldExpandAction:e=>({type:W.toggleExpansion,payload:e.value})};se.displayName="KendoReactPivotGridConfiguratorEditor";const ce=p.forwardRef(((e,t)=>{const{horizontal:a,data:o,rowAxes:s,columnAxes:i,measureAxes:c}={...ue,...e},u=p.useRef(null),d=p.useRef(null),m=p.useRef(null),g=n.useLocalization(),[v,f]=r.useCustomComponent(e.editor||ue.editor),[h,A]=r.useCustomComponent(e.form||ue.form),[C,w]=r.useCustomComponent(e.formElement||ue.formElement);p.useImperativeHandle(d,(()=>({props:e,element:u.current}))),p.useImperativeHandle(t,(()=>d.current));const b={rowAxes:s,columnAxes:i,measureAxes:c,sort:e.sort,filter:e.filter};return p.useEffect((()=>{m.current&&m.current.onChange("rowAxes",{value:s})}),[s]),p.useEffect((()=>{m.current&&m.current.onChange("columnAxes",{value:i})}),[i]),p.useEffect((()=>{m.current&&m.current.onChange("measureAxes",{value:c})}),[c]),p.useEffect((()=>{m.current&&m.current.onChange("sort",{value:e.sort})}),[e.sort]),p.useEffect((()=>{m.current&&m.current.onChange("filter",{value:e.filter})}),[e.filter]),p.createElement("div",{ref:u,id:e.id,tabIndex:e.tabIndex,style:e.style,className:r.classNames("k-pivotgrid-configurator",e.className)},p.createElement("div",{className:r.classNames("k-pivotgrid-configurator-panel","k-pivotgrid-configurator-push",{"k-pivotgrid-configurator-horizontal":a,"k-pivotgrid-configurator-vertical":!a})},p.createElement("div",{className:"k-pivotgrid-configurator-header"},p.createElement("div",{className:"k-pivotgrid-configurator-header-text"},g.toLanguageString(x,k[x]))),p.createElement(h,{ref:r.canUseRef(h)?m:void 0,initialValues:b,onSubmit:(t,r)=>{e.onRowAxesChange&&e.onRowAxesChange({target:d.current,value:t.rowAxes,syntheticEvent:r}),e.onColumnAxesChange&&e.onColumnAxesChange({target:d.current,value:t.columnAxes,syntheticEvent:r}),e.onMeasureAxesChange&&e.onMeasureAxesChange({target:d.current,value:t.measureAxes,syntheticEvent:r}),e.onSortChange&&e.onSortChange({target:d.current,value:t.sort,syntheticEvent:r}),e.onFilterChange&&e.onFilterChange({target:d.current,value:t.filter,syntheticEvent:r})},render:t=>p.createElement(p.Fragment,null,p.createElement("div",{className:"k-pivotgrid-configurator-content"},p.createElement(C,{horizontal:a,...w},p.createElement(v,{...t,horizontal:e.horizontal,onFieldsEditorFieldExpand:e.onFieldsEditorFieldExpand,onFieldsEditorFieldCheck:e.onFieldsEditorFieldCheck,onAxisFilterFieldExpand:e.onAxisFilterFieldExpand,onAxisFilterFieldsExpandChange:e.onAxisFilterFieldsExpandChange,data:o,...f}))),p.createElement("div",{className:"k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end"},p.createElement(l.Button,{type:"submit",onClick:t.onFormReset},g.toLanguageString(E,k[E])),p.createElement(l.Button,{themeColor:"primary",type:"submit",onClick:t.onSubmit},g.toLanguageString(y,k[y])))),...A})))})),ue={form:s.Form,formElement:s.FormElement,editor:se,horizontal:!1,data:[],columnAxes:[],rowAxes:[],measureAxes:[]};ce.displayName="KendoReactPivotGridConfigurator";const de=p.forwardRef(((e,t)=>{const a=p.useRef(null),l=p.useRef(null),s=n.useLocalization();p.useImperativeHandle(a,(()=>({props:e,element:l.current}))),p.useImperativeHandle(t,(()=>a.current));const[i,c]=r.useCustomComponent(e.icon||me.icon),u=p.useMemo((()=>r.classNames("k-pivotgrid-configurator-button",e.className)),[e.className]),d=r.useMouse(e,a);return p.createElement("div",{ref:l,id:e.id,className:u,tabIndex:e.tabIndex,...d},p.createElement("span",null,s.toLanguageString(N,k[N]),p.createElement(i,{name:"gear",icon:o.gearIcon,...c})))})),me={icon:r.IconWrap};de.displayName="KendoReactPivotGridConfiguratorButton";const pe=e=>{const[t,n]=p.useState(!0),[o,l]=p.useState({data:[],columns:[],rows:[]}),[s,i]=p.useState([]),[c,u]=p.useState(e.defaultColumnAxes||[]),[d,m]=p.useState(e.defaultRowAxes||[]),[g,v]=p.useState(e.defaultMeasureAxes||[]),[f,h]=p.useState(e.defaultSort||[]),[x,E]=p.useState(e.defaultFilter||[]),y=e=>{m(e.value)},A=e=>{u(e.value)};p.useEffect((()=>{n(!0);const t={connection:{catalog:e.catalog,cube:e.cube},columnAxes:c.slice(),rowAxes:d.slice(),measureAxes:g,sort:f,filter:x};setTimeout((()=>{a.fetchData({url:e.url},r.clone(t)).then(a.createDataState).then((e=>{l(e),n(!1)}))}))}),[c,d,g,x,f,e.cube,e.catalog,e.url]),p.useEffect((()=>{n(!0);const t={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube},command:"schemaDimensions"};a.fetchDiscover({url:e.url},t).then((e=>{a.addKPI(e),i(e),n(!1)}))}),[e.catalog,e.cube,e.url]);const C=(e=[],t)=>{for(let r=0;r<e.length;r++){const n=e[r];if(String(n.name)===String(t.name))return n}return null},w=(e=[],t)=>{for(let r=0;r<e.length;r++){const n=e[r];if(n.uniqueName===t.uniqueName)return n;const a=w(n.children,t);if(null!==a)return a}return null};return{pivotProps:{rowAxes:d,columnAxes:c,data:o.data,rows:o.rows,columns:o.columns,onRowAxesChange:y,onColumnAxesChange:A},configuratorProps:{sort:f,onSortChange:e=>{h(e.value)},filter:x,onFilterChange:e=>{E(e.value)},data:s,rowAxes:d,columnAxes:c,measureAxes:g,onRowAxesChange:y,onColumnAxesChange:A,onMeasureAxesChange:e=>{v(e.value)},onFieldsEditorFieldExpand:async t=>{const r=s.slice(),n=w(r,t.value);if(n&&"[KPIs]"===n.uniqueName){const t=ge(await(async()=>{const t={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube},command:"schemaKPIs"};return a.fetchDiscover({url:e.url},t)})());n.children=t}else if(n&&"kpi"===n.type)n.children=a.buildKPIMeasures(n);else if(n&&!n.children){const t=await(async t=>{let r,n,o;2===t.type?r="schemaMeasures":t.dimensionUniqueName?(r="schemaLevels",o=t.uniqueName):(r="schemaHierarchies",n=t.uniqueName);const l={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:o,dimensionUniqueName:n,levelUniqueName:void 0,memberUniqueName:void 0,treeOp:void 0},command:r};return a.fetchDiscover({url:e.url},l)})(n);n.children=t}i(r)},onAxisFilterFieldExpand:async t=>{if(!t)return;const r={rowAxes:[d,m],columnAxes:[c,u],measureAxes:[g,v]},[n,o]=r[t.target.props.axes],l=n.slice(),s=C(l,t.target.props.dataItem);if(s){const r=(s.fields||[]).slice(),n=w(r,t.value);if(n&&(!n.children||!n.children.length)){const t=await(async t=>{let r,n,o;t.uniqueName&&(r="schemaMembers",n=t.uniqueName.replace(/\&/g,"&amp;"),o=1);const l={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:void 0,dimensionUniqueName:void 0,levelUniqueName:void 0,memberUniqueName:n,treeOp:o},command:r};return a.fetchDiscover({url:e.url},l)})(n);n.children=t,s.fields=r,o(l)}}},onAxisFilterFieldsExpandChange:async t=>{if(!t)return;const r={rowAxes:[d,m],columnAxes:[c,u],measureAxes:[g,v]},[n,o]=r[t.target.props.axes],l=n.slice(),s=C(l,t.target.props.dataItem);if(s&&!s.fields){const t=await(async t=>{let r,n;t.name&&(r="schemaMembers",n=`${String(t.name)}.[(ALL)]`);const o={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:void 0,dimensionUniqueName:void 0,levelUniqueName:n,memberUniqueName:void 0,treeOp:void 0},command:r};return a.fetchDiscover({url:e.url},o)})(s);s.fields=t,o(l)}}},state:{loading:t}}},ge=e=>{for(let t=0,r=e.length;t<r;t++)e[t].uniqueName=e[t].name,e[t].type="kpi";return e},ve={dataField:"aggregate",columnsData:"columns"},fe="&",he=e=>{const[t,r]=p.useState(!0),[n,o]=p.useState(e.defaultColumnAxes||[]),[l,s]=p.useState(e.defaultRowAxes||[]),[i,c]=p.useState(e.defaultMeasureAxes||[]),[u,d]=p.useState(e.defaultSort||[]),[m,g]=p.useState(e.defaultFilter||[]),[v,f]=p.useState(new Map),h=p.useCallback((e=>{s(e.value)}),[]),x=p.useCallback((e=>{o(e.value)}),[]),E=p.useMemo((()=>Array.from(a.rootFields(n).keys()).join(fe)),[n]),y=p.useMemo((()=>Array.from(a.rootFields(l).keys()).join(fe)),[l]),A=p.useCallback((t=>({key:t,...e.dimensions[t]})),[e.dimensions]),C=p.useMemo((()=>E?E.split(fe).map(A):[]),[E,A]),w=p.useMemo((()=>y?y.split(fe).map(A):[]),[y,A]),b=p.useMemo((()=>i.map((t=>e.measures.find((e=>String(e.name)===String(t.name))))).filter(Boolean)),[i,e.measures]);p.useEffect((()=>{r(!0),setTimeout((()=>{const t=a.createDataTree(e.data,w,C,b,ve,m);f(t),r(!1)}),0)}),[e.data,w,C,b,m]);const I=p.useMemo((()=>a.createFlatSchemaDimensions(e.dimensions,e.measures)),[e.dimensions,e.measures]),N=p.useMemo((()=>a.createLocalDataState({dataTree:v,rowSettings:w,columnSettings:C,rowAxes:l,columnAxes:n,measures:b,sort:u,fields:ve})),[n,C,v,l,w,u]);return{pivotProps:{rowAxes:l,columnAxes:n,data:N.data,rows:N.rows,columns:N.columns,onRowAxesChange:h,onColumnAxesChange:x},configuratorProps:{sort:u,onSortChange:e=>{d(e.value)},filter:m,onFilterChange:e=>{g(e.value)},data:I,rowAxes:l,columnAxes:n,measureAxes:i,onRowAxesChange:h,onColumnAxesChange:x,onMeasureAxesChange:e=>{c(e.value)}},state:{loading:t}}};Object.defineProperty(e,"averageAggregate",{enumerable:!0,get:function(){return a.averageAggregate}}),Object.defineProperty(e,"maxAggregate",{enumerable:!0,get:function(){return a.maxAggregate}}),Object.defineProperty(e,"minAggregate",{enumerable:!0,get:function(){return a.minAggregate}}),Object.defineProperty(e,"sumAggregate",{enumerable:!0,get:function(){return a.sumAggregate}}),e.PivotGrid=z,e.PivotGridAxesEditor=ne,e.PivotGridAxisEditor=te,e.PivotGridAxisFilterFieldsEditor=Q,e.PivotGridCell=F,e.PivotGridColumn=T,e.PivotGridConfigurator=ce,e.PivotGridConfiguratorButton=de,e.PivotGridConfiguratorEditor=se,e.PivotGridContainer=B,e.PivotGridFieldsEditor=oe,e.PivotGridHeaderCell=P,e.PivotGridRow=R,e.PivotLocalDataService=e=>{const t=he(e);return e.children(t)},e.PivotOLAPService=e=>{const t=pe(e);return e.children(t)},e.dataCells=(e,t,r)=>{const n=JSON.parse(JSON.stringify(e||[])),o=JSON.parse(JSON.stringify(t||[])),l=JSON.parse(JSON.stringify(r||[])),s=a.toTree(n),[,i,c]=a.toRows(s),u=a.toTree(o),[,d,,m]=a.toColumns(u);return a.toData(l,d,i,m,c)},e.usePivotLocalDataService=he,e.usePivotOLAPService=pe}));
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@progress/kendo-react-common"),require("@progress/kendo-react-intl"),require("@progress/kendo-pivotgrid-common"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-form"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-data-tools"),require("@progress/kendo-react-treeview"),require("@progress/kendo-react-indicators")):"function"==typeof define&&define.amd?define(["exports","react","@progress/kendo-react-common","@progress/kendo-react-intl","@progress/kendo-pivotgrid-common","@progress/kendo-svg-icons","@progress/kendo-react-buttons","@progress/kendo-react-form","@progress/kendo-react-labels","@progress/kendo-react-data-tools","@progress/kendo-react-treeview","@progress/kendo-react-indicators"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactPivotgrid={},e.React,e.KendoReactCommon,e.KendoReactIntl,e.KendoPivotgridCommon,e.KendoSvgIcons,e.KendoReactButtons,e.KendoReactForm,e.KendoReactLabels,e.KendoReactDataTools,e.KendoReactTreeview,e.KendoReactIndicators)}(this,(function(e,t,r,n,a,o,l,s,i,c,u,d){"use strict";function m(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var p=m(t);const g={name:"@progress/kendo-react-pivotgrid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"$VERSION",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},v="pivotgrid.emptyCellAriaLabel",f="pivotgrid.fieldMenuReset",h="pivotgrid.fieldMenuApply",x="pivotgrid.configuratorTitle",E="pivotgrid.configuratorCancel",y="pivotgrid.configuratorApply",A="pivotgrid.configuratorColumnsTitle",C="pivotgrid.configuratorRowsTitle",w="pivotgrid.configuratorMeasuresTitle",b="pivotgrid.configuratorEditorSearchTitle",I="pivotgrid.configuratorMissingFields",N="pivotgrid.configuratorButtonLabel",k={[v]:"PivotGrid component. Use the arrow keys to navigate.",[f]:"Reset",[h]:"Apply",[E]:"Cancel",[y]:"Apply",[x]:"Settings",[b]:"Fields","pivotgrid.configuratorEditorSearchPlaceholder":"Search...",[A]:"Columns",[C]:"Rows",[w]:"Values",[N]:"Change settings",[I]:"Select some fields to begin setup"},R=p.forwardRef(((e,t)=>{const n=p.useRef(null),a=p.useRef(null);p.useImperativeHandle(n,(()=>({element:a.current,props:e}))),p.useImperativeHandle(t,(()=>n.current));const o=r.useMouse(e,n);return p.createElement("tr",{ref:a,...o,id:e.id,style:e.style,tabIndex:e.tabIndex,children:e.children,role:e.role,"aria-owns":e.ariaOwns,className:r.classNames("k-pivotgrid-row",e.className)})}));R.displayName="KendoReactPivotGridRow";const F=p.forwardRef(((e,t)=>{const n=p.useRef(null),a=p.useRef(null);p.useImperativeHandle(n,(()=>({element:a.current,props:e}))),p.useImperativeHandle(t,(()=>n.current));const o=r.useMouse(e,n);return p.createElement("td",{ref:a,...o,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)}));F.displayName="KendoReactPivotGridCell";const S=(e,t,r)=>[e,(n,o)=>{const l=a.headersReducer(e,{...n,tree:t});r&&r(l,o)}],P=p.forwardRef(((e,t)=>{const n=p.useRef(null),a=p.useRef(null);p.useImperativeHandle(n,(()=>({element:a.current,props:e}))),p.useImperativeHandle(t,(()=>n.current));const[l,s]=r.useCustomComponent(e.icon||L.icon),i=r.useMouse(e,n);return p.createElement("th",{ref:a,...i,colSpan:e.colSpan,rowSpan:e.rowSpan,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,...e.expandable?{"aria-expanded":e.expanded}:{},className:r.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total,"k-pivotgrid-header-root":e.root,"k-pivotgrid-expanded":e.expanded,"k-first":e.first},e.className)},e.expandable&&p.createElement(l,{...s,onClick:t=>{e.onIconClick&&e.onIconClick.call(void 0,{syntheticEvent:t.syntheticEvent,target:n.current})},name:"chevron-"+(e.expanded?"up":"down"),"aria-hidden":!0,icon:e.expanded?o.chevronUpIcon:o.chevronDownIcon}),e.children)})),L={icon:r.IconWrap};P.displayName="KendoReactPivotGridHeaderCell";const T=p.forwardRef(((e,t)=>{const n=p.useRef(null),a=p.useRef(null),{id:o,style:l,tabIndex:s,children:i,className:c,path:u=D.path}=e;p.useImperativeHandle(n,(()=>({element:a.current,props:{path:u,...e}}))),p.useImperativeHandle(t,(()=>n.current));const d=r.useMouse(e,n);return p.createElement("col",{ref:a,...d,id:o,style:l,tabIndex:s,children:i,className:c})})),D={path:[]};T.displayName="KendoReactPivotGridColumn";const M=(e=[],t={},r=null)=>e.map((e=>{const n={dataItem:e};return Object.keys(t).forEach((e=>{n[e]=t[e](n,r)})),n})),q=(e=[])=>{let t=[...e];return(e||[]).forEach((e=>{t=t.concat(q(e.children))})),t},O=(e=[])=>{const t=new Set;return e.forEach((e=>{t.add(String(e.name))})),Array.from(t)},H=(e=[])=>`${e.join(",")}`,G=(e,t,r)=>{if(!e)return[];let n=0;const a=[],o=e.length;let l;for(;n<o;n++)l=e[n].operator,(!r&&"in"!==l||l===r)&&e[n].field===t&&a.push(e[n]);return a},K=(e,t)=>e.uniqueName===t.uniqueName,z=p.forwardRef(((e,t)=>{r.validatePackage(g);const{rows:o,rowAxes:l,columns:s,columnAxes:i,data:c}={...U,...e},u=p.useRef(null),d=p.useRef(null),m=p.useRef(null),f=p.useRef(null),h=p.useRef(null),x=p.useRef(null),E=p.useRef(null),y=n.useLocalization(),A=a.toTree((o||[]).slice()),[,C]=S((l||[]).slice(),A,((t,r)=>{e.onRowAxesChange&&e.onRowAxesChange({value:t,target:d.current,syntheticEvent:r})})),[w,b,I,N]=a.toRows(A),R=a.toTree((s||[]).slice()),[,F]=S((i||[]).slice(),R,((t,r)=>{e.onColumnAxesChange&&e.onColumnAxesChange({value:t,target:d.current,syntheticEvent:r})})),[P,L,,T]=a.toColumns(R),D=a.toData((c||[]).slice(),L,b,T,I);p.useImperativeHandle(d,(()=>({props:e,element:u.current,columnHeaderRows:P,rowHeaderRows:w,dataCells:D,rowHeaderBreadth:N,columnHeaderBreadth:T}))),p.useImperativeHandle(t,(()=>d.current));const M=[],q=[],O=[],[G,K]=r.useCustomComponent(e.row||U.row),[z,B]=r.useCustomComponent(e.column||U.column),[j,V]=r.useCustomComponent(e.cell||U.cell),[X,Z]=r.useCustomComponent(e.headerCell||U.headerCell),_=e.columnHeadersRow||G,$=e.columnHeadersColumn||z,J=e.columnHeadersCell||X,W=e.rowHeadersRow||G,Y=e.rowHeadersColumn||z,Q=e.rowHeadersCell||X,ee=e.dataRow||G,te=e.dataColumn||z;for(let e=0;e<L.length;e++)M.push(p.createElement(te,{key:String(L[e].path),...B,path:L[e].path})),O.push(p.createElement($,{key:String(L[e].path),...B,path:L[e].path}));for(let e=0;e<N;e++)q.push(p.createElement(Y,{key:e,...B}));const re=e=>{e.target.props.expandable&&F({type:a.HEADERS_ACTION.toggle,payload:e.target.props.dataItem.path},e.syntheticEvent)},ne=e=>{e.target.props.expandable&&C({type:a.HEADERS_ACTION.toggle,payload:e.target.props.dataItem.path},e.syntheticEvent)},ae=((...e)=>{const t=p.useRef();return r=>{void 0!==t.current&&window.cancelAnimationFrame(t.current);const n=r.currentTarget,a=n.scrollLeft;e.forEach((e=>{const r=e.current;r&&r!==n&&(t.current=window.requestAnimationFrame((()=>{r.scrollLeft=Math.round(a)})))}))}})(E,x),oe=((...e)=>{const t=p.useRef();return r=>{void 0!==t.current&&window.cancelAnimationFrame(t.current);const n=r.currentTarget,a=n.scrollTop;e.forEach((e=>{const r=e.current;r&&r!==n&&(t.current=window.requestAnimationFrame((()=>{r.scrollTop=Math.round(a)})))}))}})(E,h),le=p.useCallback((()=>{u.current&&f.current&&(u.current.style.gridTemplateRows="",u.current.style.gridTemplateRows=`${f.current.offsetHeight}px 1fr`)}),[]),se=p.useCallback((()=>{u.current&&m.current&&(u.current.style.gridTemplateColumns="",u.current.style.gridTemplateColumns=`${m.current.offsetWidth}px 1fr`)}),[]),ie=p.useRef(new a.PivotGridNavigation({tabIndex:e.tabIndex||0}));p.useEffect((()=>{if(u.current){const t=e.tabIndex||0;if(ie.current.stop(),ie.current.tabIndex=t,e.navigatable){ie.current.start(u.current);const e=ie.current.first;e&&e.setAttribute("tabindex",String(t))}}return()=>{ie.current.stop()}}),[e.tabIndex,e.navigatable]),p.useEffect((()=>{ie.current.update()})),p.useEffect((()=>{if(f.current){const e=new window.ResizeObserver((()=>{window.requestAnimationFrame((()=>{le()}))}));return e.observe(f.current),()=>{e.disconnect()}}}),[le]),p.useEffect((()=>{if(m.current){const e=new window.ResizeObserver((()=>{window.requestAnimationFrame((()=>{se()}))}));return e.observe(m.current),()=>{e.disconnect()}}}),[se]),r.useIsomorphicLayoutEffect((()=>{if(r.setScrollbarWidth(),m.current){const e=new window.ResizeObserver((()=>window.requestAnimationFrame((()=>{r.setScrollbarWidth()}))));return e.observe(m.current),()=>{e.disconnect()}}}),[]);const ce=new Array(P.length).fill([]).map((()=>new Array(L.length)));P.forEach(((e,t)=>{let r=0;Array.from(e.cells).forEach((e=>{const n=!!(e&&e.children&&e.children.length),a=(e?H(e.normalizedPath)+(e.total?"|[TOTAL]":"")+(n?"|[EXPANDED]":""):"").replace(/\s/g,"-");if(e)for(let n=0;n<(e.colSpan||1);n++){for(let n=0;n<(e.rowSpan||1);n++){const e=ce[t+n].findIndex(((e,t)=>t>=r&&!e));ce[t+n][e]=a}r++}}))}));const ue=D.map((e=>e.cells.map((e=>((e,t)=>`${H(e.map((e=>e.name)))}|${H(t.map((e=>e.name)))}`)(e.rowTuple.members,e.columnTuple.members).replace(/\s/g,"-")))));return p.createElement("div",{ref:u,id:e.id,style:e.style,tabIndex:e.navigatable?void 0:e.tabIndex,className:r.classNames("k-pivotgrid",e.className),role:"grid"},p.createElement("span",{className:"k-pivotgrid-empty-cell"},p.createElement("span",{className:"k-sr-only"},y.toLanguageString(v,k[v]))),p.createElement("div",{ref:x,className:"k-pivotgrid-column-headers",onScroll:ae},p.createElement("table",{ref:f,className:"k-pivotgrid-table",role:"none"},p.createElement("colgroup",null,O),p.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},P.map(((e,t)=>{let r=!1;return p.createElement(_,{key:e.name,role:"row",...K},e.cells.map(((e,n)=>{const a=0!==n&&!r;e&&(r=!0);const o=e&&!(!e.children||!e.children.length),l=e&&e.hasChildren&&(!e.total||e.total&&e.parent.total);return e?p.createElement(J,{...Z,key:ce[t][n],"data-key":ce[t][n],id:ce[t][n],columnPath:e.normalizedPath,rowSpan:e.rowSpan||void 0,colSpan:e.colSpan||void 0,onIconClick:re,dataItem:e,expanded:o,expandable:l,total:e.total,first:a,root:0===e.levelNum,role:"columnheader"},e.caption):null})))}))))),p.createElement("div",{ref:h,className:"k-pivotgrid-row-headers"},p.createElement("table",{ref:m,className:"k-pivotgrid-table",role:"none"},p.createElement("colgroup",null,q),p.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},w.map(((e,t)=>p.createElement(W,{key:H(b[t].path),...K,path:b[t].path,role:"row",ariaOwns:ue[t].join(" ")},e.cells.filter(Boolean).map((e=>e?p.createElement(Q,{...Z,key:H(e.normalizedPath)+(e.total?"|[TOTAL]":"")+(e.children&&e.children.length?"|[EXPANDED]":""),"data-key":H(e.normalizedPath)+(e.total?"|[TOTAL]":"")+(e.children&&e.children.length?"|[EXPANDED]":""),rowPath:e.normalizedPath,rowSpan:e.rowSpan||void 0,colSpan:e.colSpan||void 0,dataItem:e,expanded:!(!e.children||!e.children.length),expandable:e.hasChildren&&!e.total,total:e.total,onIconClick:ne,root:0===e.levelNum,role:"rowheader"},e.caption):null)))))))),p.createElement("div",{ref:E,className:"k-pivotgrid-values",onScroll:e=>{ae(e),oe(e)}},p.createElement("table",{className:"k-pivotgrid-table",role:"none"},p.createElement("colgroup",null,M),p.createElement("tbody",{className:"k-pivotgrid-tbody",role:"none"},D.map(((e,t)=>p.createElement(ee,{key:H(b[t].path),...K,path:b[t].path,role:"none"},e.cells.map(((e,r)=>p.createElement(j,{key:ue[t][r],"data-key":ue[t][r],id:ue[t][r],...V,rowPath:e.rowTuple.members.map((e=>e.name)),columnPath:e.columnTuple.members.map((e=>e.name)),dataItem:e,total:b[t].total||L[r].total,role:"gridcell",ariaDescribedby:ce.map((e=>e[r])).join(" ")},e&&e.data&&e.data.fmtValue?e.data.fmtValue:" "))))))))))})),U={rowAxes:[],columnAxes:[],data:[],row:R,column:T,cell:F,headerCell:P};z.displayName="KendoReactPivotGrid";const B=p.forwardRef(((e,t)=>{const n=p.useRef(null),a=p.useRef(null);p.useImperativeHandle(a,(()=>({props:e,element:n.current}))),p.useImperativeHandle(t,(()=>a.current));const{id:o,style:l,tabIndex:s,configuratorPosition:i,className:c,children:u}={...j,...e};return p.createElement("div",{ref:n,id:o,style:l,tabIndex:s,className:r.classNames("k-d-flex k-pos-relative",{"k-flex-row":"right"===i,"k-flex-row-reverse":"left"===i,"k-flex-column":"bottom"===i,"k-flex-column-reverse":"top"===i},c)},u)})),j={configuratorPosition:"right"};B.displayName="KendoReactPivotGridContainer";const V=p.createContext({axes:null}),X=p.createContext({}),Z=p.createContext([{expanded:[],rowAxes:[],columnAxes:[],measureAxes:[],dragItem:null,dropZone:null,dropDirection:null,dropTarget:null},r.noop]);var _=(e=>(e.toggle="EXPAND_TOGGLE",e.expand="EXPAND_EXPAND",e.collapse="EXPAND_COLLAPSE",e))(_||{});const $=(e=[],t,r,n=((e,t)=>e===t))=>{const[a,o]=p.useState(e);return[a,(e,t)=>{const r=((e,t,r)=>{switch(t.type){case"EXPAND_TOGGLE":return Array.isArray(e)?e.find((e=>r(e,t.payload)))?[...e.filter((e=>!r(e,t.payload)))]:[...e,t.payload]:r(e,t.payload)?null:t.payload;case"EXPAND_EXPAND":if(Array.isArray(e)){if(!e.find((e=>r(e,t.payload))))return[...e,t.payload]}else if(!r(e,t.payload))return t.payload;break;case"EXPAND_COLLAPSE":if(Array.isArray(e)){if(e.find((e=>r(e,t.payload))))return[...e.filter((e=>!r(e,t.payload)))]}else r(e,t.payload);break;default:return e}})(a,e,n);o(r)}]};var J=(e=>(e.toggleExpansion="PIVOT_CONFIGURATOR_ACTION_TOGGLE_EXPANSION",e))(J||{});const W={...a.PIVOT_CONFIGURATOR_ACTION,...J},Y=(e,t)=>{const r=e.valueGetter("rowAxes"),n=e.valueGetter("columnAxes"),o=e.valueGetter("measureAxes"),l=e.valueGetter("sort"),s=e.valueGetter("filter"),[i,c]=$([],0,0,K),[u,d]=p.useState(null),[m,g]=p.useState(null),[v,f]=p.useState(null),[h,x]=p.useState(null);return[{dragItem:u,dropTarget:v,dropZone:m,dropDirection:h,columnAxes:n,rowAxes:r,measureAxes:o,sort:l,filter:s,expanded:i},(t,i)=>{if(t.type===W.toggleExpansion)c({type:_.toggle,payload:t.payload},i);else{const i=a.configuratorReducer({filter:t.override&&void 0!==t.override.filter?t.override.filter:s,sort:t.override&&void 0!==t.override.sort?t.override.sort:l,rowAxes:t.override&&void 0!==t.override.rowAxes?t.override.rowAxes:r,columnAxes:t.override&&void 0!==t.override.columnAxes?t.override.columnAxes:n,measureAxes:t.override&&void 0!==t.override.measureAxes?t.override.measureAxes:o,dragItem:t.override&&void 0!==t.override.dragItem?t.override.dragItem:u,dropDirection:t.override&&void 0!==t.override.dropDirection?t.override.dropDirection:h,dropTarget:t.override&&void 0!==t.override.dropTarget?t.override.dropTarget:v,dropZone:t.override&&void 0!==t.override.dropZone?t.override.dropZone:m},t);void 0!==i.columnAxes&&e.onChange("columnAxes",{value:i.columnAxes}),void 0!==i.rowAxes&&e.onChange("rowAxes",{value:i.rowAxes}),void 0!==i.measureAxes&&e.onChange("measureAxes",{value:i.measureAxes}),void 0!==i.sort&&e.onChange("sort",{value:i.sort}),void 0!==i.filter&&e.onChange("filter",{value:i.filter}),void 0!==i.dropDirection&&x(i.dropDirection),void 0!==i.dropTarget&&f(i.dropTarget),void 0!==i.dropZone&&g(i.dropZone),void 0!==i.dragItem&&d(i.dragItem)}}]},Q=p.forwardRef(((e,t)=>{const{data:a,dataItem:l,defaultFilter:s}={...ee,...e},i=p.useRef(null),c=p.useRef(null),u=n.useLocalization(),[d,m]=r.useCustomComponent(e.columnMenuItem||ee.columnMenuItem),[g,v]=r.useCustomComponent(e.columnMenuForm||ee.columnMenuForm),[x,E]=r.useCustomComponent(e.resetButton||ee.resetButton),[y,A]=r.useCustomComponent(e.applyButton||ee.applyButton),[C,w]=r.useCustomComponent(e.treeView||ee.treeView),[b,I]=r.useCustomComponent(e.noData||ee.noData);p.useImperativeHandle(c,(()=>({props:e,element:i.current}))),p.useImperativeHandle(t,(()=>c.current));const[N,R]=p.useState(!1),{onAxisFilterFieldsExpandChange:F,onAxisFilterFieldExpand:S}=p.useContext(X),[,P]=p.useContext(Z),[L,T]=p.useState(s),D=L?L.value.split(","):[],[O,H]=$([],0,0,K),G={caption:e=>e.dataItem.caption,id:e=>e.dataItem.uniqueName,parent:(e,t)=>t&&t.value,value:e=>e.dataItem.defaultHierarchy||e.dataItem.uniqueName,expanded:e=>O.some((t=>t.uniqueName===e.id)),checked:e=>!D.length||(D||[]).some((t=>t===e.dataItem.uniqueName)),hasChildren:e=>parseInt(e.dataItem.childrenCardinality,10)>0,children:e=>M(e.dataItem.children,G,e),checkIndeterminate:e=>{const t=(e.children||[]).length&&e.children.every((e=>e.checked));return t&&(e.checked=!0),(e.children||[]).some((e=>e.checked))&&!t}},z=M(a,G),U=q(z);return p.createElement("div",{ref:i,id:e.id,tabIndex:e.tabIndex,style:e.style,className:r.classNames("k-columnmenu-item-wrapper",e.className)},p.createElement(d,{...m,title:"Include Fields",iconClass:"k-i-grid-layout",svgIcon:o.gridLayoutIcon,onClick:e=>{R(!N),F&&F({value:!N,target:c.current,syntheticEvent:e})}}),p.createElement(g,{show:N,actions:p.createElement(p.Fragment,null,p.createElement(x,{type:"reset",onClick:e=>{R(!1),L&&P({type:W.removeFilter,payload:L},e)},...E},u.toLanguageString(f,k[f])),p.createElement(y,{themeColor:"primary",onClick:e=>{R(!1),L&&P({type:s?W.changeFilter:W.addFilter,payload:L},e)},...A},u.toLanguageString(h,k[h]))),...v},z&&z.length?p.createElement(C,{data:z,checkboxes:!0,onExpandChange:e=>{H({type:_.toggle,payload:e.item.dataItem},e.syntheticEvent),S&&S({value:e.item.dataItem,target:c.current,syntheticEvent:e.syntheticEvent})},onCheckChange:e=>{let t;t=e.item.checked?{field:String(l.name),operator:"in",value:U.filter((e=>e.checked)).map((e=>String(e.value))).filter((t=>t!==e.item.value&&t!==e.item.parent)).join(",")}:{field:String(l.name),operator:"in",value:U.filter((e=>e.checked)).map((e=>String(e.value))).concat([e.item.value]).join(",")},T(t)},textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...w}):p.createElement(b,{...I})))})),ee={data:[],resetButton:l.Button,applyButton:l.Button,treeView:u.TreeView,noData:()=>p.createElement(d.Skeleton,{shape:"rectangle",style:{height:"20px",width:"calc(100% - 16px)",margin:8}}),columnMenuItem:c.ColumnMenuItem,columnMenuForm:c.ColumnMenuForm};Q.displayName="KendoReactPivotGridAxisFilterFieldsEditor";const te=p.forwardRef(((e,t)=>{const n=p.useRef(0),o=p.useRef(0),l=p.useRef(null),s=p.useRef(null),i=p.useRef(null),{axes:u}=p.useContext(V),[d,m]=p.useState(!1),[g,v]=p.useContext(Z);p.useImperativeHandle(s,(()=>l.current&&l.current.element)),p.useImperativeHandle(i,(()=>({props:e,element:s.current}))),p.useImperativeHandle(t,(()=>i.current));const[f,h]=r.useCustomComponent(e.chip||re.chip),[x,E]=r.useCustomComponent(e.dropClue||re.dropClue),[y,A]=r.useCustomComponent(e.columnMenuTextColumn||re.columnMenuTextColumn),[C,w]=r.useCustomComponent(e.filterFieldsEditor||re.filterFieldsEditor),b=G(g.filter,String(e.value),"in"),I=G(g.filter,String(e.value));return r.useDraggable(s,{onPress:e=>{n.current=e.clientX,o.current=e.clientY},onDrag:t=>{Math.abs(n.current-t.clientX)<10&&Math.abs(o.current-t.clientY)<10||(s.current&&(s.current.style.transform=`translate(${t.clientX-n.current}px, ${t.clientY-o.current}px)`),m(!0),v({type:W.setDragItem,payload:e.dataItem}))},onRelease:()=>{m(!1),g.dragItem&&(s.current&&(s.current.style.transform=""),v({type:W.drop,payload:e.dataItem}))}}),p.createElement(p.Fragment,null,g.dropTarget&&a.compareAxes(g.dropTarget,e.dataItem)&&"before"===g.dropDirection&&p.createElement(x,{...E}),p.createElement(f,{ref:r.canUseRef(f)?l:void 0,...e,removable:!0,onRemove:t=>{v({type:W.remove,payload:e.dataItem},t.syntheticEvent)},onMouseEnter:t=>{g.dragItem&&(v({type:W.setDropTarget,payload:e.dataItem},t.syntheticEvent),v({type:W.setDropZone,payload:u},t.syntheticEvent))},onMouseMove:e=>{if(g.dragItem&&!d&&s.current){const t=s.current.getBoundingClientRect(),r=e.syntheticEvent.clientX-t.left<t.width/2?"before":"after";v({type:W.setDropDirection,payload:r},e.syntheticEvent)}},style:{pointerEvents:d?"none":void 0},rounded:"full",...h},e.text,"measureAxes"!==u&&p.createElement(y,{field:String(e.value),itemsRender:t=>{const r=t.slice(),n=((e,t,r)=>{if(!e)return;let n,a=0;const o=e.length;let l;for(;a<o;a++)l=e[a].operator,l===r&&e[a].field===t&&(n=e[a]);return n})(g.filter,String(e.dataItem.name),"in");return r.splice(1,0,p.createElement(C,{key:"axis-filter-fields-editor",defaultFilter:n,dataItem:e.dataItem,data:e.dataItem.fields,axes:u,...w})),r},sort:g.sort,onSortChange:(e,t)=>{v({type:W.setSort,payload:t},e)},filter:I&&I.length?[{logic:"and",filters:I}]:void 0,onFilterChange:(e,t)=>{t.length?v({type:W.setFilter,payload:[...b||[],...t.reduce(((e,t)=>[...e,...t.filters.filter((e=>e.value))]),[])]},e):v({type:W.setFilter,payload:b},e)},filterContent:[c.ColumnMenuTextFilter],...A})),g.dropTarget&&a.compareAxes(g.dropTarget,e.dataItem)&&"after"===g.dropDirection&&p.createElement(x,{...E}))})),re={chip:l.Chip,columnMenuTextColumn:c.ColumnMenuTextColumn,filterFieldsEditor:Q,dropClue:e=>p.createElement("div",{className:"k-grouping-dropclue",style:{position:"relative",zIndex:1e4},...e})};te.defaultProps=re,te.displayName="KendoReactPivotGridAxisEditor";const ne=p.forwardRef(((e,t)=>{const{value:n,field:a}={...ae,...e},o=p.useRef(null),l=p.useRef(null),s=p.useRef(null),[i,c]=r.useCustomComponent(e.chipList||ae.chipList);p.useImperativeHandle(l,(()=>o.current&&o.current.element)),p.useImperativeHandle(s,(()=>({props:e,element:l.current}))),p.useImperativeHandle(t,(()=>s.current));const u=n.filter((e=>1===e.name.length&&e.name.every((e=>-1===e.indexOf("&"))))).map((e=>({...e,text:String(e.name)})));return p.createElement(V.Provider,{value:{axes:a}},p.createElement(i,{ref:r.canUseRef(i)?o:void 0,textField:"text",valueField:"name",data:u,chip:te,style:{position:"relative"},className:e.className,selection:"none",...c}))})),ae={value:[],chipList:l.ChipList};ne.defaultProps=ae,ne.displayName="KendoReactPivotGridAxesEditor";const oe=p.forwardRef(((e,t)=>{const{data:n,rowAxes:a,columnAxes:o,measureAxes:l,onExpand:s,onCheck:i}={...le,...e},c=p.useRef(null),d=p.useRef(null),[m,g]=r.useCustomComponent(e.treeView||le.treeView),[v,f]=r.useCustomComponent(e.noData||le.noData);p.useImperativeHandle(d,(()=>({props:e,element:c.current&&c.current.element}))),p.useImperativeHandle(t,(()=>d.current));const[h]=p.useContext(Z),x=O(o),E=O(a),y=O(l),A=q(n).filter((e=>[...x,...E,...y].some((t=>t===e.uniqueName||t===e.defaultHierarchy)))),C={caption:e=>e.dataItem.caption,id:e=>e.dataItem.uniqueName,value:e=>e.dataItem.defaultHierarchy||e.dataItem.uniqueName,expanded:e=>h.expanded.some((t=>t.uniqueName===e.dataItem.uniqueName)),hasChildren:e=>!("hierarchyUniqueName"in e.dataItem)&&!("aggregator"in e.dataItem),selectable:e=>!(!e.hasChildren&&!e.dataItem.aggregator&&!e.dataItem.measure||2===e.dataItem.type||"[KPIs]"===e.dataItem.uniqueName),children:e=>M(e.dataItem.children,C,e),checked:e=>A.some((t=>e.dataItem.defaultHierarchy?t.defaultHierarchy===e.dataItem.defaultHierarchy:t.uniqueName===e.dataItem.uniqueName))||e.children.length&&e.children.every((e=>e.checked))},w=M(e.data,C);return p.createElement(u.TreeViewItemPropsContext.Provider,{value:e=>({...e,checkboxes:e.item.selectable})},w&&w.length?p.createElement(m,{ref:r.canUseRef(m)?c:void 0,data:w,checkboxes:!0,onExpandChange:e=>{s&&s({value:e.item.dataItem,target:d.current,syntheticEvent:e.syntheticEvent})},onCheckChange:e=>{i&&i({value:e.item.dataItem,target:d.current,syntheticEvent:e.syntheticEvent})},textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...g}):p.createElement(v,{...f}))})),le={data:[],rowAxes:[],columnAxes:[],measureAxes:[],treeView:u.TreeView,noData:()=>p.createElement("div",null,"NO DATA")};oe.displayName="KendoReactPivotGridFieldsEditor";const se=p.forwardRef(((e,t)=>{const{onFieldsEditorFieldCheck:a,onFieldsEditorFieldCheckAction:o=ie.onFieldsEditorFieldCheckAction,onFieldsEditorFieldExpand:l,onFieldsEditorFieldExpandAction:c=ie.onFieldsEditorFieldExpandAction,onAxisFilterFieldExpand:u,onAxisFilterFieldsExpandChange:d}=e,m={onFieldsEditorFieldCheck:a,onFieldsEditorFieldCheckAction:o,horizontal:ie.horizontal,axesEditor:ie.axesEditor,...e},[g,v]=r.useCustomComponent(m.fieldsLabel||ie.fieldsLabel),[f,h]=r.useCustomComponent(m.fieldsEditor||ie.fieldsEditor),[x,E]=r.useCustomComponent(m.columnAxesLabel||ie.columnAxesLabel),[y,N]=r.useCustomComponent(m.columnAxesEditor||ie.columnAxesEditor),[R,F]=r.useCustomComponent(m.rowAxesLabel||ie.rowAxesLabel),[S,P]=r.useCustomComponent(m.rowAxesEditor||ie.rowAxesEditor),[L,T]=r.useCustomComponent(m.measureAxesLabel||ie.measureAxesLabel),[D,M]=r.useCustomComponent(m.measureAxesEditor||ie.measureAxesEditor),q=p.useRef(null),O=p.useRef(null),H=n.useLocalization(),[G,K]=Y(m);p.useImperativeHandle(O,(()=>({element:q.current,props:m,state:G}))),p.useImperativeHandle(t,(()=>O.current));const z=()=>{G.dragItem&&K({type:W.setDropZone,payload:"columnAxes"})},U=()=>{G.dragItem&&K({type:W.setDropZone,payload:null})},B=()=>{G.dragItem&&K({type:W.setDropZone,payload:"rowAxes"})},j=()=>{G.dragItem&&K({type:W.setDropZone,payload:null})},V=()=>{G.dragItem&&K({type:W.setDropZone,payload:"measureAxes"})},_=()=>{G.dragItem&&K({type:W.setDropZone,payload:null})},$=m.horizontal?"div":p.Fragment,J=m.horizontal?{className:"k-form-field-wrapper"}:{};return p.createElement(X.Provider,{value:{onAxisFilterFieldExpand:e=>{const t={target:e.target,currentTarget:O.current,value:e.value,syntheticEvent:e.syntheticEvent};u&&u(t)},onAxisFilterFieldsExpandChange:e=>{const t={target:e.target,currentTarget:O.current,value:e.value,syntheticEvent:e.syntheticEvent};d&&d(t)}}},p.createElement(Z.Provider,{value:[G,K]},p.createElement($,{...J},p.createElement("div",{className:"k-form-field"},p.createElement(g,{name:"",component:i.Label,...v},H.toLanguageString(b,k[b]))),p.createElement("div",{className:"k-form-field"},p.createElement("div",{className:"k-fields-list-wrapper"},p.createElement(f,{data:m.data,onExpand:e=>{const t={target:e.target,currentTarget:O.current,value:e.value,syntheticEvent:e.syntheticEvent};if(c){const r=c(t,m,G);r&&(Array.isArray(r)?r.filter(Boolean).map((t=>t&&K({...t},e.syntheticEvent))):K({...r},e.syntheticEvent))}l&&l({target:e.target,currentTarget:O.current,value:e.value,syntheticEvent:e.syntheticEvent})},onCheck:e=>{const t={target:e.target,currentTarget:O.current,value:e.value,syntheticEvent:e.syntheticEvent};if(o){const r=o(t,m,G);r&&(Array.isArray(r)?r.filter(Boolean).map((t=>t&&K({...t},e.syntheticEvent))):K({...r},e.syntheticEvent))}a&&a(t)},columnAxes:G.columnAxes,rowAxes:G.rowAxes,measureAxes:G.measureAxes,...h})))),p.createElement($,{...J},p.createElement("div",{className:"k-form-field",onMouseEnter:z,onMouseLeave:U},p.createElement(s.Field,{name:"columnAxes",field:"columnAxes",component:x,...E},H.toLanguageString(A,k[A]))),m.valueGetter("columnAxes").length?p.createElement(s.Field,{name:"columnAxes",field:"columnAxes",component:y,onMouseEnter:z,onMouseLeave:U,className:"k-column-fields",...N}):p.createElement("div",{className:"k-settings-description",onMouseEnter:z,onMouseLeave:U},H.toLanguageString(I,k[I])),p.createElement("div",{className:"k-form-field",onMouseEnter:B,onMouseLeave:j},p.createElement(s.Field,{name:"rowAxes",field:"rowAxes",component:R,...F},H.toLanguageString(C,k[C]))),m.valueGetter("rowAxes").length?p.createElement(s.Field,{name:"rowAxes",field:"rowAxes",component:S,onMouseEnter:B,onMouseLeave:j,className:"k-column-fields",...P}):p.createElement("div",{className:"k-settings-description",onMouseEnter:B,onMouseLeave:j},H.toLanguageString(I,k[I]))),p.createElement($,{...J},p.createElement("div",{className:"k-form-field",onMouseEnter:V,onMouseLeave:_},p.createElement(s.Field,{name:"measureAxes",field:"measureAxes",component:L,...T},H.toLanguageString(w,k[w]))),m.valueGetter("measureAxes").length?p.createElement(s.Field,{name:"measureAxes",field:"measureAxes",component:D,onMouseEnter:V,onMouseLeave:_,className:"k-column-fields",...M}):p.createElement("div",{className:"k-settings-description",onMouseEnter:V,onMouseLeave:_},H.toLanguageString(I,k[I])))))})),ie={data:[],horizontal:!1,fieldsLabel:i.Label,fieldsEditor:oe,columnAxesLabel:i.Label,columnAxesEditor:ne,rowAxesLabel:i.Label,rowAxesEditor:ne,measureAxesLabel:i.Label,measureAxesEditor:ne,axesEditor:ne,onFieldsEditorFieldCheckAction:e=>({type:W.toggleSelection,payload:e.value}),onFieldsEditorFieldExpandAction:e=>({type:W.toggleExpansion,payload:e.value})};se.displayName="KendoReactPivotGridConfiguratorEditor";const ce=p.forwardRef(((e,t)=>{const{horizontal:a,data:o,rowAxes:s,columnAxes:i,measureAxes:c}={...ue,...e},u=p.useRef(null),d=p.useRef(null),m=p.useRef(null),g=n.useLocalization(),[v,f]=r.useCustomComponent(e.editor||ue.editor),[h,A]=r.useCustomComponent(e.form||ue.form),[C,w]=r.useCustomComponent(e.formElement||ue.formElement);p.useImperativeHandle(d,(()=>({props:e,element:u.current}))),p.useImperativeHandle(t,(()=>d.current));const b={rowAxes:s,columnAxes:i,measureAxes:c,sort:e.sort,filter:e.filter};return p.useEffect((()=>{m.current&&m.current.onChange("rowAxes",{value:s})}),[s]),p.useEffect((()=>{m.current&&m.current.onChange("columnAxes",{value:i})}),[i]),p.useEffect((()=>{m.current&&m.current.onChange("measureAxes",{value:c})}),[c]),p.useEffect((()=>{m.current&&m.current.onChange("sort",{value:e.sort})}),[e.sort]),p.useEffect((()=>{m.current&&m.current.onChange("filter",{value:e.filter})}),[e.filter]),p.createElement("div",{ref:u,id:e.id,tabIndex:e.tabIndex,style:e.style,className:r.classNames("k-pivotgrid-configurator",e.className)},p.createElement("div",{className:r.classNames("k-pivotgrid-configurator-panel","k-pivotgrid-configurator-push",{"k-pivotgrid-configurator-horizontal":a,"k-pivotgrid-configurator-vertical":!a})},p.createElement("div",{className:"k-pivotgrid-configurator-header"},p.createElement("div",{className:"k-pivotgrid-configurator-header-text"},g.toLanguageString(x,k[x]))),p.createElement(h,{ref:r.canUseRef(h)?m:void 0,initialValues:b,onSubmit:(t,r)=>{e.onRowAxesChange&&e.onRowAxesChange({target:d.current,value:t.rowAxes,syntheticEvent:r}),e.onColumnAxesChange&&e.onColumnAxesChange({target:d.current,value:t.columnAxes,syntheticEvent:r}),e.onMeasureAxesChange&&e.onMeasureAxesChange({target:d.current,value:t.measureAxes,syntheticEvent:r}),e.onSortChange&&e.onSortChange({target:d.current,value:t.sort,syntheticEvent:r}),e.onFilterChange&&e.onFilterChange({target:d.current,value:t.filter,syntheticEvent:r})},render:t=>p.createElement(p.Fragment,null,p.createElement("div",{className:"k-pivotgrid-configurator-content"},p.createElement(C,{horizontal:a,...w},p.createElement(v,{...t,horizontal:e.horizontal,onFieldsEditorFieldExpand:e.onFieldsEditorFieldExpand,onFieldsEditorFieldCheck:e.onFieldsEditorFieldCheck,onAxisFilterFieldExpand:e.onAxisFilterFieldExpand,onAxisFilterFieldsExpandChange:e.onAxisFilterFieldsExpandChange,data:o,...f}))),p.createElement("div",{className:"k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end"},p.createElement(l.Button,{type:"submit",onClick:t.onFormReset},g.toLanguageString(E,k[E])),p.createElement(l.Button,{themeColor:"primary",type:"submit",onClick:t.onSubmit},g.toLanguageString(y,k[y])))),...A})))})),ue={form:s.Form,formElement:s.FormElement,editor:se,horizontal:!1,data:[],columnAxes:[],rowAxes:[],measureAxes:[]};ce.displayName="KendoReactPivotGridConfigurator";const de=p.forwardRef(((e,t)=>{const a=p.useRef(null),l=p.useRef(null),s=n.useLocalization();p.useImperativeHandle(a,(()=>({props:e,element:l.current}))),p.useImperativeHandle(t,(()=>a.current));const[i,c]=r.useCustomComponent(e.icon||me.icon),u=p.useMemo((()=>r.classNames("k-pivotgrid-configurator-button",e.className)),[e.className]),d=r.useMouse(e,a);return p.createElement("div",{ref:l,id:e.id,className:u,tabIndex:e.tabIndex,...d},p.createElement("span",null,s.toLanguageString(N,k[N]),p.createElement(i,{name:"gear",icon:o.gearIcon,...c})))})),me={icon:r.IconWrap};de.displayName="KendoReactPivotGridConfiguratorButton";const pe=e=>{const[t,n]=p.useState(!0),[o,l]=p.useState({data:[],columns:[],rows:[]}),[s,i]=p.useState([]),[c,u]=p.useState(e.defaultColumnAxes||[]),[d,m]=p.useState(e.defaultRowAxes||[]),[g,v]=p.useState(e.defaultMeasureAxes||[]),[f,h]=p.useState(e.defaultSort||[]),[x,E]=p.useState(e.defaultFilter||[]),y=e=>{m(e.value)},A=e=>{u(e.value)};p.useEffect((()=>{n(!0);const t={connection:{catalog:e.catalog,cube:e.cube},columnAxes:c.slice(),rowAxes:d.slice(),measureAxes:g,sort:f,filter:x};setTimeout((()=>{a.fetchData({url:e.url},r.clone(t)).then(a.createDataState).then((e=>{l(e),n(!1)}))}))}),[c,d,g,x,f,e.cube,e.catalog,e.url]),p.useEffect((()=>{n(!0);const t={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube},command:"schemaDimensions"};a.fetchDiscover({url:e.url},t).then((e=>{a.addKPI(e),i(e),n(!1)}))}),[e.catalog,e.cube,e.url]);const C=(e=[],t)=>{for(let r=0;r<e.length;r++){const n=e[r];if(String(n.name)===String(t.name))return n}return null},w=(e=[],t)=>{for(let r=0;r<e.length;r++){const n=e[r];if(n.uniqueName===t.uniqueName)return n;const a=w(n.children,t);if(null!==a)return a}return null};return{pivotProps:{rowAxes:d,columnAxes:c,data:o.data,rows:o.rows,columns:o.columns,onRowAxesChange:y,onColumnAxesChange:A},configuratorProps:{sort:f,onSortChange:e=>{h(e.value)},filter:x,onFilterChange:e=>{E(e.value)},data:s,rowAxes:d,columnAxes:c,measureAxes:g,onRowAxesChange:y,onColumnAxesChange:A,onMeasureAxesChange:e=>{v(e.value)},onFieldsEditorFieldExpand:async t=>{const r=s.slice(),n=w(r,t.value);if(n&&"[KPIs]"===n.uniqueName){const t=ge(await(async()=>{const t={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube},command:"schemaKPIs"};return a.fetchDiscover({url:e.url},t)})());n.children=t}else if(n&&"kpi"===n.type)n.children=a.buildKPIMeasures(n);else if(n&&!n.children){const t=await(async t=>{let r,n,o;2===t.type?r="schemaMeasures":t.dimensionUniqueName?(r="schemaLevels",o=t.uniqueName):(r="schemaHierarchies",n=t.uniqueName);const l={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:o,dimensionUniqueName:n,levelUniqueName:void 0,memberUniqueName:void 0,treeOp:void 0},command:r};return a.fetchDiscover({url:e.url},l)})(n);n.children=t}i(r)},onAxisFilterFieldExpand:async t=>{if(!t)return;const r={rowAxes:[d,m],columnAxes:[c,u],measureAxes:[g,v]},[n,o]=r[t.target.props.axes],l=n.slice(),s=C(l,t.target.props.dataItem);if(s){const r=(s.fields||[]).slice(),n=w(r,t.value);if(n&&(!n.children||!n.children.length)){const t=await(async t=>{let r,n,o;t.uniqueName&&(r="schemaMembers",n=t.uniqueName.replace(/\&/g,"&amp;"),o=1);const l={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:void 0,dimensionUniqueName:void 0,levelUniqueName:void 0,memberUniqueName:n,treeOp:o},command:r};return a.fetchDiscover({url:e.url},l)})(n);n.children=t,s.fields=r,o(l)}}},onAxisFilterFieldsExpandChange:async t=>{if(!t)return;const r={rowAxes:[d,m],columnAxes:[c,u],measureAxes:[g,v]},[n,o]=r[t.target.props.axes],l=n.slice(),s=C(l,t.target.props.dataItem);if(s&&!s.fields){const t=await(async t=>{let r,n;t.name&&(r="schemaMembers",n=`${String(t.name)}.[(ALL)]`);const o={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:void 0,dimensionUniqueName:void 0,levelUniqueName:n,memberUniqueName:void 0,treeOp:void 0},command:r};return a.fetchDiscover({url:e.url},o)})(s);s.fields=t,o(l)}}},state:{loading:t}}},ge=e=>{for(let t=0,r=e.length;t<r;t++)e[t].uniqueName=e[t].name,e[t].type="kpi";return e},ve={dataField:"aggregate",columnsData:"columns"},fe="&",he=e=>{const[t,r]=p.useState(!0),[n,o]=p.useState(e.defaultColumnAxes||[]),[l,s]=p.useState(e.defaultRowAxes||[]),[i,c]=p.useState(e.defaultMeasureAxes||[]),[u,d]=p.useState(e.defaultSort||[]),[m,g]=p.useState(e.defaultFilter||[]),[v,f]=p.useState(new Map),h=p.useCallback((e=>{s(e.value)}),[]),x=p.useCallback((e=>{o(e.value)}),[]),E=p.useMemo((()=>Array.from(a.rootFields(n).keys()).join(fe)),[n]),y=p.useMemo((()=>Array.from(a.rootFields(l).keys()).join(fe)),[l]),A=p.useCallback((t=>({key:t,...e.dimensions[t]})),[e.dimensions]),C=p.useMemo((()=>E?E.split(fe).map(A):[]),[E,A]),w=p.useMemo((()=>y?y.split(fe).map(A):[]),[y,A]),b=p.useMemo((()=>i.map((t=>e.measures.find((e=>String(e.name)===String(t.name))))).filter(Boolean)),[i,e.measures]);p.useEffect((()=>{r(!0),setTimeout((()=>{const t=a.createDataTree(e.data,w,C,b,ve,m);f(t),r(!1)}),0)}),[e.data,w,C,b,m]);const I=p.useMemo((()=>a.createFlatSchemaDimensions(e.dimensions,e.measures)),[e.dimensions,e.measures]),N=p.useMemo((()=>a.createLocalDataState({dataTree:v,rowSettings:w,columnSettings:C,rowAxes:l,columnAxes:n,measures:b,sort:u,fields:ve})),[n,C,v,l,w,u]);return{pivotProps:{rowAxes:l,columnAxes:n,data:N.data,rows:N.rows,columns:N.columns,onRowAxesChange:h,onColumnAxesChange:x},configuratorProps:{sort:u,onSortChange:e=>{d(e.value)},filter:m,onFilterChange:e=>{g(e.value)},data:I,rowAxes:l,columnAxes:n,measureAxes:i,onRowAxesChange:h,onColumnAxesChange:x,onMeasureAxesChange:e=>{c(e.value)}},state:{loading:t}}};Object.defineProperty(e,"averageAggregate",{enumerable:!0,get:function(){return a.averageAggregate}}),Object.defineProperty(e,"maxAggregate",{enumerable:!0,get:function(){return a.maxAggregate}}),Object.defineProperty(e,"minAggregate",{enumerable:!0,get:function(){return a.minAggregate}}),Object.defineProperty(e,"sumAggregate",{enumerable:!0,get:function(){return a.sumAggregate}}),e.PivotGrid=z,e.PivotGridAxesEditor=ne,e.PivotGridAxisEditor=te,e.PivotGridAxisFilterFieldsEditor=Q,e.PivotGridCell=F,e.PivotGridColumn=T,e.PivotGridConfigurator=ce,e.PivotGridConfiguratorButton=de,e.PivotGridConfiguratorEditor=se,e.PivotGridContainer=B,e.PivotGridFieldsEditor=oe,e.PivotGridHeaderCell=P,e.PivotGridRow=R,e.PivotLocalDataService=e=>{const t=he(e);return e.children(t)},e.PivotOLAPService=e=>{const t=pe(e);return e.children(t)},e.dataCells=(e,t,r)=>{const n=JSON.parse(JSON.stringify(e||[])),o=JSON.parse(JSON.stringify(t||[])),l=JSON.parse(JSON.stringify(r||[])),s=a.toTree(n),[,i,c]=a.toRows(s),u=a.toTree(o),[,d,,m]=a.toColumns(u);return a.toData(l,d,i,m,c)},e.usePivotLocalDataService=he,e.usePivotOLAPService=pe}));
@@ -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 i=require("react");function y(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,l.get?l:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const o=y(i);var u=(e=>(e.toggle="EXPAND_TOGGLE",e.expand="EXPAND_EXPAND",e.collapse="EXPAND_COLLAPSE",e))(u||{});const p=(e,r,n)=>{switch(r.type){case"EXPAND_TOGGLE":return Array.isArray(e)?e.find(l=>n(l,r.payload))?[...e.filter(l=>!n(l,r.payload))]:[...e,r.payload]:n(e,r.payload)?null:r.payload;case"EXPAND_EXPAND":if(Array.isArray(e)){if(!e.find(l=>n(l,r.payload)))return[...e,r.payload]}else if(!n(e,r.payload))return r.payload;break;case"EXPAND_COLLAPSE":if(Array.isArray(e)){if(e.find(l=>n(l,r.payload)))return[...e.filter(l=>!n(l,r.payload))]}else n(e,r.payload);break;default:return e}},s=(e=[],r,n,l=(a,d)=>a===d)=>{const[a,d]=o.useState(e);return[a,(t,c)=>{const f=p(a,t,l);d(f)}]};exports.EXPANSION_ACTION=u;exports.useExpansion=s;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react");function i(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,l.get?l:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const o=i(y);var u=(e=>(e.toggle="EXPAND_TOGGLE",e.expand="EXPAND_EXPAND",e.collapse="EXPAND_COLLAPSE",e))(u||{});const p=(e,r,n)=>{switch(r.type){case"EXPAND_TOGGLE":return Array.isArray(e)?e.find(l=>n(l,r.payload))?[...e.filter(l=>!n(l,r.payload))]:[...e,r.payload]:n(e,r.payload)?null:r.payload;case"EXPAND_EXPAND":if(Array.isArray(e)){if(!e.find(l=>n(l,r.payload)))return[...e,r.payload]}else if(!n(e,r.payload))return r.payload;break;case"EXPAND_COLLAPSE":if(Array.isArray(e)){if(e.find(l=>n(l,r.payload)))return[...e.filter(l=>!n(l,r.payload))]}else n(e,r.payload);break;default:return e}},s=(e=[],r,n,l=(a,d)=>a===d)=>{const[a,d]=o.useState(e);return[a,(t,A)=>{const f=p(a,t,l);d(f)}]};exports.EXPANSION_ACTION=u;exports.useExpansion=s;
@@ -5,31 +5,30 @@
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 p from "react";
10
9
  var u = /* @__PURE__ */ ((r) => (r.toggle = "EXPAND_TOGGLE", r.expand = "EXPAND_EXPAND", r.collapse = "EXPAND_COLLAPSE", r))(u || {});
11
- const E = (r, e, d) => {
12
- switch (e.type) {
10
+ const E = (r, d, e) => {
11
+ switch (d.type) {
13
12
  case "EXPAND_TOGGLE":
14
- return Array.isArray(r) ? r.find((l) => d(l, e.payload)) ? [...r.filter((l) => !d(l, e.payload))] : [...r, e.payload] : d(r, e.payload) ? null : e.payload;
13
+ return Array.isArray(r) ? r.find((l) => e(l, d.payload)) ? [...r.filter((l) => !e(l, d.payload))] : [...r, d.payload] : e(r, d.payload) ? null : d.payload;
15
14
  case "EXPAND_EXPAND":
16
15
  if (Array.isArray(r)) {
17
- if (!r.find((l) => d(l, e.payload)))
18
- return [...r, e.payload];
19
- } else if (!d(r, e.payload))
20
- return e.payload;
16
+ if (!r.find((l) => e(l, d.payload)))
17
+ return [...r, d.payload];
18
+ } else if (!e(r, d.payload))
19
+ return d.payload;
21
20
  break;
22
21
  case "EXPAND_COLLAPSE":
23
22
  if (Array.isArray(r)) {
24
- if (r.find((l) => d(l, e.payload)))
25
- return [...r.filter((l) => !d(l, e.payload))];
23
+ if (r.find((l) => e(l, d.payload)))
24
+ return [...r.filter((l) => !e(l, d.payload))];
26
25
  } else
27
- d(r, e.payload);
26
+ e(r, d.payload);
28
27
  break;
29
28
  default:
30
29
  return r;
31
30
  }
32
- }, s = (r = [], e, d, l = (n, a) => n === a) => {
31
+ }, s = (r = [], d, e, l = (n, a) => n === a) => {
33
32
  const [n, a] = p.useState(r);
34
33
  return [n, (y, i) => {
35
34
  const f = E(n, y, l);
@@ -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 t=require("@progress/kendo-pivotgrid-common"),c=(e,n,r)=>[e,(s,d)=>{const o=t.headersReducer(e,{...s,tree:n});r&&r(o,d)}];Object.defineProperty(exports,"HEADERS_ACTION",{enumerable:!0,get:()=>t.HEADERS_ACTION});exports.useHeaders=c;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@progress/kendo-pivotgrid-common"),a=(e,d,r)=>[e,(n,s)=>{const o=t.headersReducer(e,{...n,tree:d});r&&r(o,s)}];Object.defineProperty(exports,"HEADERS_ACTION",{enumerable:!0,get:()=>t.HEADERS_ACTION});exports.useHeaders=a;
@@ -5,14 +5,13 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
- import { headersReducer as o } from "@progress/kendo-pivotgrid-common";
10
- import { HEADERS_ACTION as A } from "@progress/kendo-pivotgrid-common";
11
- const i = (e, s, r) => [e, (t, d) => {
12
- const n = o(e, { ...t, tree: s });
13
- r && r(n, d);
8
+ import { headersReducer as n } from "@progress/kendo-pivotgrid-common";
9
+ import { HEADERS_ACTION as f } from "@progress/kendo-pivotgrid-common";
10
+ const H = (e, s, r) => [e, (t, d) => {
11
+ const o = n(e, { ...t, tree: s });
12
+ r && r(o, d);
14
13
  }];
15
14
  export {
16
- A as HEADERS_ACTION,
17
- i as useHeaders
15
+ f as HEADERS_ACTION,
16
+ H as useHeaders
18
17
  };
@@ -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 u=require("react");function i(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const s=i(u),f=(...e)=>{const t=s.useRef();return n=>{t.current!==void 0&&window.cancelAnimationFrame(t.current);const o=n.currentTarget,l=o.scrollLeft;e.forEach(a=>{const c=a.current;c&&c!==o&&(t.current=window.requestAnimationFrame(()=>{c.scrollLeft=Math.round(l)}))})}};exports.useHorizontalScrollSync=f;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react");function i(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const s=i(u),f=(...e)=>{const t=s.useRef();return n=>{t.current!==void 0&&window.cancelAnimationFrame(t.current);const c=n.currentTarget,l=c.scrollLeft;e.forEach(a=>{const o=a.current;o&&o!==c&&(t.current=window.requestAnimationFrame(()=>{o.scrollLeft=Math.round(l)}))})}};exports.useHorizontalScrollSync=f;
@@ -5,17 +5,16 @@
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 a from "react";
10
9
  const i = (...n) => {
11
10
  const r = a.useRef();
12
11
  return (o) => {
13
12
  r.current !== void 0 && window.cancelAnimationFrame(r.current);
14
- const t = o.currentTarget, c = t.scrollLeft;
13
+ const e = o.currentTarget, c = e.scrollLeft;
15
14
  n.forEach((l) => {
16
- const e = l.current;
17
- e && e !== t && (r.current = window.requestAnimationFrame(() => {
18
- e.scrollLeft = Math.round(c);
15
+ const t = l.current;
16
+ t && t !== e && (r.current = window.requestAnimationFrame(() => {
17
+ t.scrollLeft = Math.round(c);
19
18
  }));
20
19
  });
21
20
  };
@@ -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 _=require("react"),f=require("./useExpansion.js"),D=require("../utils/index.js"),m=require("@progress/kendo-pivotgrid-common");function E(r){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(d,t,i.get?i:{enumerable:!0,get:()=>r[t]})}}return d.default=r,Object.freeze(d)}const s=E(_);var x=(r=>(r.toggleExpansion="PIVOT_CONFIGURATOR_ACTION_TOGGLE_EXPANSION",r))(x||{});const c={...m.PIVOT_CONFIGURATOR_ACTION,...x},w=(r,d)=>{const t=r.valueGetter("rowAxes"),i=r.valueGetter("columnAxes"),n=r.valueGetter("measureAxes"),u=r.valueGetter("sort"),v=r.valueGetter("filter"),[O,T]=f.useExpansion([],void 0,d,D.compareFields),[l,p]=s.useState(null),[a,I]=s.useState(null),[g,C]=s.useState(null),[A,N]=s.useState(null);return[{dragItem:l,dropTarget:g,dropZone:a,dropDirection:A,columnAxes:i,rowAxes:t,measureAxes:n,sort:u,filter:v,expanded:O},(e,P)=>{switch(e.type){case c.toggleExpansion:{T({type:f.EXPANSION_ACTION.toggle,payload:e.payload},P);break}default:const o=m.configuratorReducer({filter:e.override&&e.override.filter!==void 0?e.override.filter:v,sort:e.override&&e.override.sort!==void 0?e.override.sort:u,rowAxes:e.override&&e.override.rowAxes!==void 0?e.override.rowAxes:t,columnAxes:e.override&&e.override.columnAxes!==void 0?e.override.columnAxes:i,measureAxes:e.override&&e.override.measureAxes!==void 0?e.override.measureAxes:n,dragItem:e.override&&e.override.dragItem!==void 0?e.override.dragItem:l,dropDirection:e.override&&e.override.dropDirection!==void 0?e.override.dropDirection:A,dropTarget:e.override&&e.override.dropTarget!==void 0?e.override.dropTarget:g,dropZone:e.override&&e.override.dropZone!==void 0?e.override.dropZone:a},e);o.columnAxes!==void 0&&r.onChange("columnAxes",{value:o.columnAxes}),o.rowAxes!==void 0&&r.onChange("rowAxes",{value:o.rowAxes}),o.measureAxes!==void 0&&r.onChange("measureAxes",{value:o.measureAxes}),o.sort!==void 0&&r.onChange("sort",{value:o.sort}),o.filter!==void 0&&r.onChange("filter",{value:o.filter}),o.dropDirection!==void 0&&N(o.dropDirection),o.dropTarget!==void 0&&C(o.dropTarget),o.dropZone!==void 0&&I(o.dropZone),o.dragItem!==void 0&&p(o.dragItem);break}}]};exports.PIVOT_CONFIGURATOR_ACTION=c;exports.usePivotConfiguratorEditor=w;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react"),f=require("./useExpansion.js"),D=require("../utils/index.js"),m=require("@progress/kendo-pivotgrid-common");function E(r){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(d,t,i.get?i:{enumerable:!0,get:()=>r[t]})}}return d.default=r,Object.freeze(d)}const s=E(_);var x=(r=>(r.toggleExpansion="PIVOT_CONFIGURATOR_ACTION_TOGGLE_EXPANSION",r))(x||{});const c={...m.PIVOT_CONFIGURATOR_ACTION,...x},w=(r,d)=>{const t=r.valueGetter("rowAxes"),i=r.valueGetter("columnAxes"),n=r.valueGetter("measureAxes"),u=r.valueGetter("sort"),v=r.valueGetter("filter"),[O,T]=f.useExpansion([],void 0,d,D.compareFields),[l,p]=s.useState(null),[a,I]=s.useState(null),[g,C]=s.useState(null),[A,N]=s.useState(null);return[{dragItem:l,dropTarget:g,dropZone:a,dropDirection:A,columnAxes:i,rowAxes:t,measureAxes:n,sort:u,filter:v,expanded:O},(e,P)=>{switch(e.type){case c.toggleExpansion:{T({type:f.EXPANSION_ACTION.toggle,payload:e.payload},P);break}default:const o=m.configuratorReducer({filter:e.override&&e.override.filter!==void 0?e.override.filter:v,sort:e.override&&e.override.sort!==void 0?e.override.sort:u,rowAxes:e.override&&e.override.rowAxes!==void 0?e.override.rowAxes:t,columnAxes:e.override&&e.override.columnAxes!==void 0?e.override.columnAxes:i,measureAxes:e.override&&e.override.measureAxes!==void 0?e.override.measureAxes:n,dragItem:e.override&&e.override.dragItem!==void 0?e.override.dragItem:l,dropDirection:e.override&&e.override.dropDirection!==void 0?e.override.dropDirection:A,dropTarget:e.override&&e.override.dropTarget!==void 0?e.override.dropTarget:g,dropZone:e.override&&e.override.dropZone!==void 0?e.override.dropZone:a},e);o.columnAxes!==void 0&&r.onChange("columnAxes",{value:o.columnAxes}),o.rowAxes!==void 0&&r.onChange("rowAxes",{value:o.rowAxes}),o.measureAxes!==void 0&&r.onChange("measureAxes",{value:o.measureAxes}),o.sort!==void 0&&r.onChange("sort",{value:o.sort}),o.filter!==void 0&&r.onChange("filter",{value:o.filter}),o.dropDirection!==void 0&&N(o.dropDirection),o.dropTarget!==void 0&&C(o.dropTarget),o.dropZone!==void 0&&I(o.dropZone),o.dragItem!==void 0&&p(o.dragItem);break}}]};exports.PIVOT_CONFIGURATOR_ACTION=c;exports.usePivotConfiguratorEditor=w;