@progress/kendo-react-pivotgrid 10.2.0-develop.1 → 10.2.0-develop.11

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.
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),P=require("@progress/kendo-react-buttons"),m=require("@progress/kendo-react-common"),g=require("./EditorContext.js"),C=require("./AxisEditor.js");function R(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const t=R(x),c=t.forwardRef((e,r)=>{const{value:n,field:o}={...a,...e},s=t.useRef(null),l=t.useRef(null),u=t.useRef(null),[d,f]=m.useCustomComponent(e.chipList||a.chipList);t.useImperativeHandle(l,()=>s.current&&s.current.element),t.useImperativeHandle(u,()=>({props:e,element:l.current})),t.useImperativeHandle(r,()=>u.current);const p=n.filter(i=>i.name.length===1&&i.name.every(v=>v.indexOf("&")===-1)).map(i=>({...i,text:String(i.name)}));return t.createElement(g.PivotGridConfiguratorEditorAxesContext.Provider,{value:{axes:o}},t.createElement(d,{ref:m.canUseRef(d)?s:void 0,textField:"text",valueField:"name",data:p,chip:C.PivotGridAxisEditor,style:{position:"relative"},className:e.className,selection:"none",...f}))}),a={value:[],chipList:P.ChipList};c.defaultProps=a;c.displayName="KendoReactPivotGridAxesEditor";exports.PivotGridAxesEditor=c;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),g=require("@progress/kendo-react-buttons"),u=require("@progress/kendo-react-common"),P=require("./EditorContext.js"),C=require("./AxisEditor.js");function R(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const t=R(x),m=t.forwardRef((e,r)=>{const{value:n=d.value,field:o}=e,s=t.useRef(null),a=t.useRef(null),c=t.useRef(null),[l,f]=u.useCustomComponent(e.chipList||d.chipList);t.useImperativeHandle(a,()=>s.current&&s.current.element),t.useImperativeHandle(c,()=>({props:e,element:a.current})),t.useImperativeHandle(r,()=>c.current);const p=n.filter(i=>i.name.length===1&&i.name.every(v=>v.indexOf("&")===-1)).map(i=>({...i,text:String(i.name)}));return t.createElement(P.PivotGridConfiguratorEditorAxesContext.Provider,{value:{axes:o}},t.createElement(l,{ref:u.canUseRef(l)?s:void 0,textField:"text",valueField:"name",data:p,chip:C.PivotGridAxisEditor,style:{position:"relative"},className:e.className,selection:"none",...f}))}),d={value:[],chipList:g.ChipList};m.displayName="KendoReactPivotGridAxesEditor";exports.PivotGridAxesEditor=m;
@@ -6,31 +6,31 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as e from "react";
9
- import { ChipList as v } from "@progress/kendo-react-buttons";
10
- import { useCustomComponent as x, canUseRef as h } from "@progress/kendo-react-common";
11
- import { PivotGridConfiguratorEditorAxesContext as C } from "./EditorContext.mjs";
12
- import { PivotGridAxisEditor as P } from "./AxisEditor.mjs";
13
- const l = e.forwardRef(
14
- (i, m) => {
15
- const { value: c, field: d } = { ...n, ...i }, r = e.useRef(null), o = e.useRef(null), s = e.useRef(null), [a, u] = x(
16
- i.chipList || n.chipList
9
+ import { ChipList as f } from "@progress/kendo-react-buttons";
10
+ import { useCustomComponent as v, canUseRef as x } from "@progress/kendo-react-common";
11
+ import { PivotGridConfiguratorEditorAxesContext as h } from "./EditorContext.mjs";
12
+ import { PivotGridAxisEditor as C } from "./AxisEditor.mjs";
13
+ const L = e.forwardRef(
14
+ (i, l) => {
15
+ const { value: m = a.value, field: c } = i, r = e.useRef(null), n = e.useRef(null), o = e.useRef(null), [s, u] = v(
16
+ i.chipList || a.chipList
17
17
  );
18
18
  e.useImperativeHandle(
19
- o,
19
+ n,
20
20
  () => r.current && r.current.element
21
- ), e.useImperativeHandle(s, () => ({ props: i, element: o.current })), e.useImperativeHandle(
22
- m,
23
- () => s.current
21
+ ), e.useImperativeHandle(o, () => ({ props: i, element: n.current })), e.useImperativeHandle(
22
+ l,
23
+ () => o.current
24
24
  );
25
- const p = c.filter((t) => t.name.length === 1 && t.name.every((f) => f.indexOf("&") === -1)).map((t) => ({ ...t, text: String(t.name) }));
26
- return /* @__PURE__ */ e.createElement(C.Provider, { value: { axes: d } }, /* @__PURE__ */ e.createElement(
27
- a,
25
+ const d = m.filter((t) => t.name.length === 1 && t.name.every((p) => p.indexOf("&") === -1)).map((t) => ({ ...t, text: String(t.name) }));
26
+ return /* @__PURE__ */ e.createElement(h.Provider, { value: { axes: c } }, /* @__PURE__ */ e.createElement(
27
+ s,
28
28
  {
29
- ref: h(a) ? r : void 0,
29
+ ref: x(s) ? r : void 0,
30
30
  textField: "text",
31
31
  valueField: "name",
32
- data: p,
33
- chip: P,
32
+ data: d,
33
+ chip: C,
34
34
  style: { position: "relative" },
35
35
  className: i.className,
36
36
  selection: "none",
@@ -38,12 +38,11 @@ const l = e.forwardRef(
38
38
  }
39
39
  ));
40
40
  }
41
- ), n = {
41
+ ), a = {
42
42
  value: [],
43
- chipList: v
43
+ chipList: f
44
44
  };
45
- l.defaultProps = n;
46
- l.displayName = "KendoReactPivotGridAxesEditor";
45
+ L.displayName = "KendoReactPivotGridAxesEditor";
47
46
  export {
48
- l as PivotGridAxesEditor
47
+ L as PivotGridAxesEditor
49
48
  };
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),v=require("@progress/kendo-pivotgrid-common"),u=require("@progress/kendo-react-common"),A=require("@progress/kendo-react-data-tools"),H=require("@progress/kendo-react-buttons"),T=require("../utils/index.js"),B=require("./EditorContext.js"),$=require("./AxisFilterFieldsEditor.js"),K=require("../shared/PivotGridConfiguratorEditorStateContext.js"),l=require("../hooks/usePivotConfiguratorEditor.js");function Z(e){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const c=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(d,s,c.get?c:{enumerable:!0,get:()=>e[s]})}}return d.default=e,Object.freeze(d)}const n=Z(z),p=n.forwardRef((e,d)=>{const s=n.useRef(0),c=n.useRef(0),f=n.useRef(null),i=n.useRef(null),R=n.useRef(null),{axes:I}=n.useContext(B.PivotGridConfiguratorEditorAxesContext),[y,x]=n.useState(!1),[r,a]=n.useContext(K.PivotGridConfiguratorEditorStateContext);n.useImperativeHandle(i,()=>f.current&&f.current.element),n.useImperativeHandle(R,()=>({props:e,element:i.current})),n.useImperativeHandle(d,()=>R.current);const[F,N]=u.useCustomComponent(e.chip||m.chip),[h,E]=u.useCustomComponent(e.dropClue||m.dropClue),[_,M]=u.useCustomComponent(e.columnMenuTextColumn||m.columnMenuTextColumn),[D,G]=u.useCustomComponent(e.filterFieldsEditor||m.filterFieldsEditor),P=T.findFilters(r.filter,String(e.value),"in"),g=T.findFilters(r.filter,String(e.value)),S=(t,o)=>{a({type:l.PIVOT_CONFIGURATOR_ACTION.setSort,payload:o},t)},b=(t,o)=>{o.length?a({type:l.PIVOT_CONFIGURATOR_ACTION.setFilter,payload:[...P||[],...o.reduce((C,O)=>[...C,...O.filters.filter(w=>w.value)],[])]},t):a({type:l.PIVOT_CONFIGURATOR_ACTION.setFilter,payload:P},t)},q=t=>{a({type:l.PIVOT_CONFIGURATOR_ACTION.remove,payload:e.dataItem},t.syntheticEvent)},U=t=>{const o=t.slice(),C=T.findFilter(r.filter,String(e.dataItem.name),"in");return o.splice(1,0,n.createElement(D,{key:"axis-filter-fields-editor",defaultFilter:C,dataItem:e.dataItem,data:e.dataItem.fields,axes:I,...G})),o},V=t=>{s.current=t.clientX,c.current=t.clientY},k=t=>{Math.abs(s.current-t.clientX)<10&&Math.abs(c.current-t.clientY)<10||(i.current&&(i.current.style.transform=`translate(${t.clientX-s.current}px, ${t.clientY-c.current}px)`),x(!0),a({type:l.PIVOT_CONFIGURATOR_ACTION.setDragItem,payload:e.dataItem}))},j=()=>{x(!1),r.dragItem&&(i.current&&(i.current.style.transform=""),a({type:l.PIVOT_CONFIGURATOR_ACTION.drop,payload:e.dataItem}))},X=t=>{r.dragItem&&(a({type:l.PIVOT_CONFIGURATOR_ACTION.setDropTarget,payload:e.dataItem},t.syntheticEvent),a({type:l.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:I},t.syntheticEvent))},Y=t=>{if(r.dragItem&&!y&&i.current){const o=i.current.getBoundingClientRect(),O=t.syntheticEvent.clientX-o.left<o.width/2?"before":"after";a({type:l.PIVOT_CONFIGURATOR_ACTION.setDropDirection,payload:O},t.syntheticEvent)}};return u.useDraggable(i,{onPress:V,onDrag:k,onRelease:j}),n.createElement(n.Fragment,null,r.dropTarget&&v.compareAxes(r.dropTarget,e.dataItem)&&r.dropDirection==="before"&&n.createElement(h,{...E}),n.createElement(F,{ref:u.canUseRef(F)?f:void 0,...e,removable:!0,onRemove:q,onMouseEnter:X,onMouseMove:Y,style:{pointerEvents:y?"none":void 0},rounded:"full",...N},e.text,I!=="measureAxes"&&n.createElement(_,{field:String(e.value),itemsRender:U,sort:r.sort,onSortChange:S,filter:g&&g.length?[{logic:"and",filters:g}]:void 0,onFilterChange:b,filterContent:[A.ColumnMenuTextFilter],...M})),r.dropTarget&&v.compareAxes(r.dropTarget,e.dataItem)&&r.dropDirection==="after"&&n.createElement(h,{...E}))}),m={chip:H.Chip,columnMenuTextColumn:A.ColumnMenuTextColumn,filterFieldsEditor:$.PivotGridAxisFilterFieldsEditor,dropClue:e=>n.createElement("div",{className:"k-grouping-dropclue",style:{position:"relative",zIndex:1e4},...e})};p.defaultProps=m;p.displayName="KendoReactPivotGridAxisEditor";exports.PivotGridAxisEditor=p;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),v=require("@progress/kendo-pivotgrid-common"),u=require("@progress/kendo-react-common"),P=require("@progress/kendo-react-data-tools"),H=require("@progress/kendo-react-buttons"),T=require("../utils/index.js"),B=require("./EditorContext.js"),$=require("./AxisFilterFieldsEditor.js"),K=require("../shared/PivotGridConfiguratorEditorStateContext.js"),l=require("../hooks/usePivotConfiguratorEditor.js");function Z(e){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const c=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(d,s,c.get?c:{enumerable:!0,get:()=>e[s]})}}return d.default=e,Object.freeze(d)}const n=Z(z),A=n.forwardRef((e,d)=>{const s=n.useRef(0),c=n.useRef(0),f=n.useRef(null),i=n.useRef(null),p=n.useRef(null),{axes:I}=n.useContext(B.PivotGridConfiguratorEditorAxesContext),[R,y]=n.useState(!1),[r,a]=n.useContext(K.PivotGridConfiguratorEditorStateContext);n.useImperativeHandle(i,()=>f.current&&f.current.element),n.useImperativeHandle(p,()=>({props:e,element:i.current})),n.useImperativeHandle(d,()=>p.current);const[x,N]=u.useCustomComponent(e.chip||C.chip),[F,h]=u.useCustomComponent(e.dropClue||C.dropClue),[_,M]=u.useCustomComponent(e.columnMenuTextColumn||C.columnMenuTextColumn),[D,G]=u.useCustomComponent(e.filterFieldsEditor||C.filterFieldsEditor),E=T.findFilters(r.filter,String(e.value),"in"),g=T.findFilters(r.filter,String(e.value)),S=(t,o)=>{a({type:l.PIVOT_CONFIGURATOR_ACTION.setSort,payload:o},t)},b=(t,o)=>{o.length?a({type:l.PIVOT_CONFIGURATOR_ACTION.setFilter,payload:[...E||[],...o.reduce((m,O)=>[...m,...O.filters.filter(w=>w.value)],[])]},t):a({type:l.PIVOT_CONFIGURATOR_ACTION.setFilter,payload:E},t)},q=t=>{a({type:l.PIVOT_CONFIGURATOR_ACTION.remove,payload:e.dataItem},t.syntheticEvent)},U=t=>{const o=t.slice(),m=T.findFilter(r.filter,String(e.dataItem.name),"in");return o.splice(1,0,n.createElement(D,{key:"axis-filter-fields-editor",defaultFilter:m,dataItem:e.dataItem,data:e.dataItem.fields,axes:I,...G})),o},V=t=>{s.current=t.clientX,c.current=t.clientY},k=t=>{Math.abs(s.current-t.clientX)<10&&Math.abs(c.current-t.clientY)<10||(i.current&&(i.current.style.transform=`translate(${t.clientX-s.current}px, ${t.clientY-c.current}px)`),y(!0),a({type:l.PIVOT_CONFIGURATOR_ACTION.setDragItem,payload:e.dataItem}))},j=()=>{y(!1),r.dragItem&&(i.current&&(i.current.style.transform=""),a({type:l.PIVOT_CONFIGURATOR_ACTION.drop,payload:e.dataItem}))},X=t=>{r.dragItem&&(a({type:l.PIVOT_CONFIGURATOR_ACTION.setDropTarget,payload:e.dataItem},t.syntheticEvent),a({type:l.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:I},t.syntheticEvent))},Y=t=>{if(r.dragItem&&!R&&i.current){const o=i.current.getBoundingClientRect(),O=t.syntheticEvent.clientX-o.left<o.width/2?"before":"after";a({type:l.PIVOT_CONFIGURATOR_ACTION.setDropDirection,payload:O},t.syntheticEvent)}};return u.useDraggable(i,{onPress:V,onDrag:k,onRelease:j}),n.createElement(n.Fragment,null,r.dropTarget&&v.compareAxes(r.dropTarget,e.dataItem)&&r.dropDirection==="before"&&n.createElement(F,{...h}),n.createElement(x,{ref:u.canUseRef(x)?f:void 0,...e,removable:!0,onRemove:q,onMouseEnter:X,onMouseMove:Y,style:{pointerEvents:R?"none":void 0},rounded:"full",...N},e.text,I!=="measureAxes"&&n.createElement(_,{field:String(e.value),itemsRender:U,sort:r.sort,onSortChange:S,filter:g&&g.length?[{logic:"and",filters:g}]:void 0,onFilterChange:b,filterContent:[P.ColumnMenuTextFilter],...M})),r.dropTarget&&v.compareAxes(r.dropTarget,e.dataItem)&&r.dropDirection==="after"&&n.createElement(F,{...h}))}),C={chip:H.Chip,columnMenuTextColumn:P.ColumnMenuTextColumn,filterFieldsEditor:$.PivotGridAxisFilterFieldsEditor,dropClue:e=>n.createElement("div",{className:"k-grouping-dropclue",style:{position:"relative",zIndex:1e4},...e})};A.displayName="KendoReactPivotGridAxisEditor";exports.PivotGridAxisEditor=A;
@@ -7,78 +7,78 @@
7
7
  */
8
8
  import * as r from "react";
9
9
  import { compareAxes as R } from "@progress/kendo-pivotgrid-common";
10
- import { useCustomComponent as c, useDraggable as $, canUseRef as B } from "@progress/kendo-react-common";
11
- import { ColumnMenuTextFilter as K, ColumnMenuTextColumn as V } from "@progress/kendo-react-data-tools";
12
- import { Chip as Z } from "@progress/kendo-react-buttons";
13
- import { findFilters as M, findFilter as j } from "../utils/index.mjs";
14
- import { PivotGridConfiguratorEditorAxesContext as q } from "./EditorContext.mjs";
15
- import { PivotGridAxisFilterFieldsEditor as J } from "./AxisFilterFieldsEditor.mjs";
16
- import { PivotGridConfiguratorEditorStateContext as L } from "../shared/PivotGridConfiguratorEditorStateContext.mjs";
10
+ import { useCustomComponent as d, useDraggable as _, canUseRef as $ } from "@progress/kendo-react-common";
11
+ import { ColumnMenuTextFilter as B, ColumnMenuTextColumn as K } from "@progress/kendo-react-data-tools";
12
+ import { Chip as V } from "@progress/kendo-react-buttons";
13
+ import { findFilters as M, findFilter as Z } from "../utils/index.mjs";
14
+ import { PivotGridConfiguratorEditorAxesContext as j } from "./EditorContext.mjs";
15
+ import { PivotGridAxisFilterFieldsEditor as q } from "./AxisFilterFieldsEditor.mjs";
16
+ import { PivotGridConfiguratorEditorStateContext as J } from "../shared/PivotGridConfiguratorEditorStateContext.mjs";
17
17
  import { PIVOT_CONFIGURATOR_ACTION as a } from "../hooks/usePivotConfiguratorEditor.mjs";
18
- const T = r.forwardRef(
19
- (t, P) => {
20
- const u = r.useRef(0), m = r.useRef(0), f = r.useRef(null), i = r.useRef(null), h = r.useRef(null), { axes: p } = r.useContext(q), [y, x] = r.useState(!1), [n, l] = r.useContext(L);
18
+ const L = r.forwardRef(
19
+ (t, T) => {
20
+ const u = r.useRef(0), m = r.useRef(0), f = r.useRef(null), i = r.useRef(null), h = r.useRef(null), { axes: C } = r.useContext(j), [y, x] = r.useState(!1), [n, l] = r.useContext(J);
21
21
  r.useImperativeHandle(
22
22
  i,
23
23
  () => f.current && f.current.element
24
24
  ), r.useImperativeHandle(h, () => ({ props: t, element: i.current })), r.useImperativeHandle(
25
- P,
25
+ T,
26
26
  () => h.current
27
27
  );
28
- const [E, D] = c(t.chip || s.chip), [v, F] = c(t.dropClue || s.dropClue), [S, A] = c(
29
- t.columnMenuTextColumn || s.columnMenuTextColumn
30
- ), [b, G] = c(
31
- t.filterFieldsEditor || s.filterFieldsEditor
32
- ), I = M(n.filter, String(t.value), "in"), C = M(n.filter, String(t.value)), X = (e, o) => {
28
+ const [E, D] = d(t.chip || c.chip), [v, F] = d(t.dropClue || c.dropClue), [P, S] = d(
29
+ t.columnMenuTextColumn || c.columnMenuTextColumn
30
+ ), [A, b] = d(
31
+ t.filterFieldsEditor || c.filterFieldsEditor
32
+ ), I = M(n.filter, String(t.value), "in"), p = M(n.filter, String(t.value)), G = (e, o) => {
33
33
  l({ type: a.setSort, payload: o }, e);
34
- }, N = (e, o) => {
34
+ }, X = (e, o) => {
35
35
  o.length ? l(
36
36
  {
37
37
  type: a.setFilter,
38
38
  payload: [
39
39
  ...I || [],
40
40
  ...o.reduce(
41
- (d, g) => [...d, ...g.filters.filter((_) => _.value)],
41
+ (s, g) => [...s, ...g.filters.filter((U) => U.value)],
42
42
  []
43
43
  )
44
44
  ]
45
45
  },
46
46
  e
47
47
  ) : l({ type: a.setFilter, payload: I }, e);
48
- }, O = (e) => {
48
+ }, N = (e) => {
49
49
  l({ type: a.remove, payload: t.dataItem }, e.syntheticEvent);
50
- }, Y = (e) => {
51
- const o = e.slice(), d = j(n.filter, String(t.dataItem.name), "in");
50
+ }, O = (e) => {
51
+ const o = e.slice(), s = Z(n.filter, String(t.dataItem.name), "in");
52
52
  return o.splice(
53
53
  1,
54
54
  0,
55
55
  /* @__PURE__ */ r.createElement(
56
- b,
56
+ A,
57
57
  {
58
58
  key: "axis-filter-fields-editor",
59
- defaultFilter: d,
59
+ defaultFilter: s,
60
60
  dataItem: t.dataItem,
61
61
  data: t.dataItem.fields,
62
- axes: p,
63
- ...G
62
+ axes: C,
63
+ ...b
64
64
  }
65
65
  )
66
66
  ), o;
67
- }, H = (e) => {
67
+ }, Y = (e) => {
68
68
  u.current = e.clientX, m.current = e.clientY;
69
- }, k = (e) => {
69
+ }, H = (e) => {
70
70
  Math.abs(u.current - e.clientX) < 10 && Math.abs(m.current - e.clientY) < 10 || (i.current && (i.current.style.transform = `translate(${e.clientX - u.current}px, ${e.clientY - m.current}px)`), x(!0), l({ type: a.setDragItem, payload: t.dataItem }));
71
- }, w = () => {
71
+ }, k = () => {
72
72
  x(!1), n.dragItem && (i.current && (i.current.style.transform = ""), l({ type: a.drop, payload: t.dataItem }));
73
- }, z = (e) => {
73
+ }, w = (e) => {
74
74
  n.dragItem && (l(
75
75
  { type: a.setDropTarget, payload: t.dataItem },
76
76
  e.syntheticEvent
77
77
  ), l(
78
- { type: a.setDropZone, payload: p },
78
+ { type: a.setDropZone, payload: C },
79
79
  e.syntheticEvent
80
80
  ));
81
- }, U = (e) => {
81
+ }, z = (e) => {
82
82
  if (n.dragItem && !y && i.current) {
83
83
  const o = i.current.getBoundingClientRect(), g = e.syntheticEvent.clientX - o.left < o.width / 2 ? "before" : "after";
84
84
  l(
@@ -87,47 +87,46 @@ const T = r.forwardRef(
87
87
  );
88
88
  }
89
89
  };
90
- return $(i, {
91
- onPress: H,
92
- onDrag: k,
93
- onRelease: w
90
+ return _(i, {
91
+ onPress: Y,
92
+ onDrag: H,
93
+ onRelease: k
94
94
  }), /* @__PURE__ */ r.createElement(r.Fragment, null, n.dropTarget && R(n.dropTarget, t.dataItem) && n.dropDirection === "before" && /* @__PURE__ */ r.createElement(v, { ...F }), /* @__PURE__ */ r.createElement(
95
95
  E,
96
96
  {
97
- ref: B(E) ? f : void 0,
97
+ ref: $(E) ? f : void 0,
98
98
  ...t,
99
99
  removable: !0,
100
- onRemove: O,
101
- onMouseEnter: z,
102
- onMouseMove: U,
100
+ onRemove: N,
101
+ onMouseEnter: w,
102
+ onMouseMove: z,
103
103
  style: { pointerEvents: y ? "none" : void 0 },
104
104
  rounded: "full",
105
105
  ...D
106
106
  },
107
107
  t.text,
108
- p !== "measureAxes" && /* @__PURE__ */ r.createElement(
109
- S,
108
+ C !== "measureAxes" && /* @__PURE__ */ r.createElement(
109
+ P,
110
110
  {
111
111
  field: String(t.value),
112
- itemsRender: Y,
112
+ itemsRender: O,
113
113
  sort: n.sort,
114
- onSortChange: X,
115
- filter: C && C.length ? [{ logic: "and", filters: C }] : void 0,
116
- onFilterChange: N,
117
- filterContent: [K],
118
- ...A
114
+ onSortChange: G,
115
+ filter: p && p.length ? [{ logic: "and", filters: p }] : void 0,
116
+ onFilterChange: X,
117
+ filterContent: [B],
118
+ ...S
119
119
  }
120
120
  )
121
121
  ), n.dropTarget && R(n.dropTarget, t.dataItem) && n.dropDirection === "after" && /* @__PURE__ */ r.createElement(v, { ...F }));
122
122
  }
123
- ), s = {
124
- chip: Z,
125
- columnMenuTextColumn: V,
126
- filterFieldsEditor: J,
123
+ ), c = {
124
+ chip: V,
125
+ columnMenuTextColumn: K,
126
+ filterFieldsEditor: q,
127
127
  dropClue: (t) => /* @__PURE__ */ r.createElement("div", { className: "k-grouping-dropclue", style: { position: "relative", zIndex: 1e4 }, ...t })
128
128
  };
129
- T.defaultProps = s;
130
- T.displayName = "KendoReactPivotGridAxisEditor";
129
+ L.displayName = "KendoReactPivotGridAxisEditor";
131
130
  export {
132
- T as PivotGridAxisEditor
131
+ L as PivotGridAxisEditor
133
132
  };
@@ -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:"10.2.0-develop.1",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)=>{const o=!r.validatePackage(g,{component:"PivotGrid"}),{rows:l,rowAxes:s,columns:i,columnAxes:c,data:u}={...U,...e},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=p.useRef(null),A=n.useLocalization(),C=a.toTree((l||[]).slice()),[,w]=S((s||[]).slice(),C,((t,r)=>{e.onRowAxesChange&&e.onRowAxesChange({value:t,target:m.current,syntheticEvent:r})})),[b,I,N,R]=a.toRows(C),F=a.toTree((i||[]).slice()),[,P]=S((c||[]).slice(),F,((t,r)=>{e.onColumnAxesChange&&e.onColumnAxesChange({value:t,target:m.current,syntheticEvent:r})})),[L,T,,D]=a.toColumns(F),M=a.toData((u||[]).slice(),T,I,D,N);p.useImperativeHandle(m,(()=>({props:e,element:d.current,columnHeaderRows:L,rowHeaderRows:b,dataCells:M,rowHeaderBreadth:R,columnHeaderBreadth:D}))),p.useImperativeHandle(t,(()=>m.current));const q=[],O=[],G=[],[K,z]=r.useCustomComponent(e.row||U.row),[B,j]=r.useCustomComponent(e.column||U.column),[V,X]=r.useCustomComponent(e.cell||U.cell),[Z,_]=r.useCustomComponent(e.headerCell||U.headerCell),$=e.columnHeadersRow||K,J=e.columnHeadersColumn||B,W=e.columnHeadersCell||Z,Y=e.rowHeadersRow||K,Q=e.rowHeadersColumn||B,ee=e.rowHeadersCell||Z,te=e.dataRow||K,re=e.dataColumn||B;for(let e=0;e<T.length;e++)q.push(p.createElement(re,{key:String(T[e].path),...j,path:T[e].path})),G.push(p.createElement(J,{key:String(T[e].path),...j,path:T[e].path}));for(let e=0;e<R;e++)O.push(p.createElement(Q,{key:e,...j}));const ne=e=>{e.target.props.expandable&&P({type:a.HEADERS_ACTION.toggle,payload:e.target.props.dataItem.path},e.syntheticEvent)},ae=e=>{e.target.props.expandable&&w({type:a.HEADERS_ACTION.toggle,payload:e.target.props.dataItem.path},e.syntheticEvent)},oe=((...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)})))}))}})(y,E),le=((...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)})))}))}})(y,x),se=p.useCallback((()=>{d.current&&h.current&&(d.current.style.gridTemplateRows="",d.current.style.gridTemplateRows=`${h.current.offsetHeight}px 1fr`)}),[]),ie=p.useCallback((()=>{d.current&&f.current&&(d.current.style.gridTemplateColumns="",d.current.style.gridTemplateColumns=`${f.current.offsetWidth}px 1fr`)}),[]),ce=p.useRef(new a.PivotGridNavigation({tabIndex:e.tabIndex||0}));p.useEffect((()=>{if(d.current){const t=e.tabIndex||0;if(ce.current.stop(),ce.current.tabIndex=t,e.navigatable){ce.current.start(d.current);const e=ce.current.first;e&&e.setAttribute("tabindex",String(t))}}return()=>{ce.current.stop()}}),[e.tabIndex,e.navigatable]),p.useEffect((()=>{ce.current.update()})),p.useEffect((()=>{if(h.current){const e=new window.ResizeObserver((()=>{window.requestAnimationFrame((()=>{se()}))}));return e.observe(h.current),()=>{e.disconnect()}}}),[se]),p.useEffect((()=>{if(f.current){const e=new window.ResizeObserver((()=>{window.requestAnimationFrame((()=>{ie()}))}));return e.observe(f.current),()=>{e.disconnect()}}}),[ie]),r.useIsomorphicLayoutEffect((()=>{if(r.setScrollbarWidth(),f.current){const e=new window.ResizeObserver((()=>window.requestAnimationFrame((()=>{r.setScrollbarWidth()}))));return e.observe(f.current),()=>{e.disconnect()}}}),[]);const ue=new Array(L.length).fill([]).map((()=>new Array(T.length)));L.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=ue[t+n].findIndex(((e,t)=>t>=r&&!e));ue[t+n][e]=a}r++}}))}));const de=M.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:d,id:e.id,style:e.style,tabIndex:e.navigatable?void 0:e.tabIndex,className:r.classNames("k-pivotgrid",e.className),role:"grid"},o&&p.createElement(r.WatermarkOverlay,null),p.createElement("span",{className:"k-pivotgrid-empty-cell"},p.createElement("span",{className:"k-sr-only"},A.toLanguageString(v,k[v]))),p.createElement("div",{ref:E,className:"k-pivotgrid-column-headers",onScroll:oe},p.createElement("table",{ref:h,className:"k-pivotgrid-table",role:"none"},p.createElement("colgroup",null,G),p.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},L.map(((e,t)=>{let r=!1;return p.createElement($,{key:e.name,role:"row",...z},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(W,{..._,key:ue[t][n],"data-key":ue[t][n],id:ue[t][n],columnPath:e.normalizedPath,rowSpan:e.rowSpan||void 0,colSpan:e.colSpan||void 0,onIconClick:ne,dataItem:e,expanded:o,expandable:l,total:e.total,first:a,root:0===e.levelNum,role:"columnheader"},e.caption):null})))}))))),p.createElement("div",{ref:x,className:"k-pivotgrid-row-headers"},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"},b.map(((e,t)=>p.createElement(Y,{key:H(I[t].path),...z,path:I[t].path,role:"row",ariaOwns:de[t].join(" ")},e.cells.filter(Boolean).map((e=>e?p.createElement(ee,{..._,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:ae,root:0===e.levelNum,role:"rowheader"},e.caption):null)))))))),p.createElement("div",{ref:y,className:"k-pivotgrid-values",onScroll:e=>{oe(e),le(e)}},p.createElement("table",{className:"k-pivotgrid-table",role:"none"},p.createElement("colgroup",null,q),p.createElement("tbody",{className:"k-pivotgrid-tbody",role:"none"},M.map(((e,t)=>p.createElement(te,{key:H(I[t].path),...z,path:I[t].path,role:"none"},e.cells.map(((e,r)=>p.createElement(V,{key:de[t][r],"data-key":de[t][r],id:de[t][r],...X,rowPath:e.rowTuple.members.map((e=>e.name)),columnPath:e.columnTuple.members.map((e=>e.name)),dataItem:e,total:I[t].total||T[r].total,role:"gridcell",ariaDescribedby:ue.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}));
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:"10.2.0-develop.11",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)=>{const o=!r.validatePackage(g,{component:"PivotGrid"}),{rows:l,rowAxes:s,columns:i,columnAxes:c,data:u}={...U,...e},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=p.useRef(null),A=n.useLocalization(),C=a.toTree((l||[]).slice()),[,w]=S((s||[]).slice(),C,((t,r)=>{e.onRowAxesChange&&e.onRowAxesChange({value:t,target:m.current,syntheticEvent:r})})),[b,I,N,R]=a.toRows(C),F=a.toTree((i||[]).slice()),[,P]=S((c||[]).slice(),F,((t,r)=>{e.onColumnAxesChange&&e.onColumnAxesChange({value:t,target:m.current,syntheticEvent:r})})),[L,T,,D]=a.toColumns(F),M=a.toData((u||[]).slice(),T,I,D,N);p.useImperativeHandle(m,(()=>({props:e,element:d.current,columnHeaderRows:L,rowHeaderRows:b,dataCells:M,rowHeaderBreadth:R,columnHeaderBreadth:D}))),p.useImperativeHandle(t,(()=>m.current));const q=[],O=[],G=[],[K,z]=r.useCustomComponent(e.row||U.row),[B,j]=r.useCustomComponent(e.column||U.column),[V,X]=r.useCustomComponent(e.cell||U.cell),[Z,_]=r.useCustomComponent(e.headerCell||U.headerCell),$=e.columnHeadersRow||K,J=e.columnHeadersColumn||B,W=e.columnHeadersCell||Z,Y=e.rowHeadersRow||K,Q=e.rowHeadersColumn||B,ee=e.rowHeadersCell||Z,te=e.dataRow||K,re=e.dataColumn||B;for(let e=0;e<T.length;e++)q.push(p.createElement(re,{key:String(T[e].path),...j,path:T[e].path})),G.push(p.createElement(J,{key:String(T[e].path),...j,path:T[e].path}));for(let e=0;e<R;e++)O.push(p.createElement(Q,{key:e,...j}));const ne=e=>{e.target.props.expandable&&P({type:a.HEADERS_ACTION.toggle,payload:e.target.props.dataItem.path},e.syntheticEvent)},ae=e=>{e.target.props.expandable&&w({type:a.HEADERS_ACTION.toggle,payload:e.target.props.dataItem.path},e.syntheticEvent)},oe=((...e)=>{const t=p.useRef(void 0);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)})))}))}})(y,E),le=((...e)=>{const t=p.useRef(void 0);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)})))}))}})(y,x),se=p.useCallback((()=>{d.current&&h.current&&(d.current.style.gridTemplateRows="",d.current.style.gridTemplateRows=`${h.current.offsetHeight}px 1fr`)}),[]),ie=p.useCallback((()=>{d.current&&f.current&&(d.current.style.gridTemplateColumns="",d.current.style.gridTemplateColumns=`${f.current.offsetWidth}px 1fr`)}),[]),ce=p.useRef(new a.PivotGridNavigation({tabIndex:e.tabIndex||0}));p.useEffect((()=>{if(d.current){const t=e.tabIndex||0;if(ce.current.stop(),ce.current.tabIndex=t,e.navigatable){ce.current.start(d.current);const e=ce.current.first;e&&e.setAttribute("tabindex",String(t))}}return()=>{ce.current.stop()}}),[e.tabIndex,e.navigatable]),p.useEffect((()=>{ce.current.update()})),p.useEffect((()=>{if(h.current){const e=new window.ResizeObserver((()=>{window.requestAnimationFrame((()=>{se()}))}));return e.observe(h.current),()=>{e.disconnect()}}}),[se]),p.useEffect((()=>{if(f.current){const e=new window.ResizeObserver((()=>{window.requestAnimationFrame((()=>{ie()}))}));return e.observe(f.current),()=>{e.disconnect()}}}),[ie]),r.useIsomorphicLayoutEffect((()=>{if(r.setScrollbarWidth(),f.current){const e=new window.ResizeObserver((()=>window.requestAnimationFrame((()=>{r.setScrollbarWidth()}))));return e.observe(f.current),()=>{e.disconnect()}}}),[]);const ue=new Array(L.length).fill([]).map((()=>new Array(T.length)));L.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=ue[t+n].findIndex(((e,t)=>t>=r&&!e));ue[t+n][e]=a}r++}}))}));const de=M.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:d,id:e.id,style:e.style,tabIndex:e.navigatable?void 0:e.tabIndex,className:r.classNames("k-pivotgrid",e.className),role:"grid"},o&&p.createElement(r.WatermarkOverlay,null),p.createElement("span",{className:"k-pivotgrid-empty-cell"},p.createElement("span",{className:"k-sr-only"},A.toLanguageString(v,k[v]))),p.createElement("div",{ref:E,className:"k-pivotgrid-column-headers",onScroll:oe},p.createElement("table",{ref:h,className:"k-pivotgrid-table",role:"none"},p.createElement("colgroup",null,G),p.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},L.map(((e,t)=>{let r=!1;return p.createElement($,{key:e.name,role:"row",...z},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(W,{..._,key:ue[t][n],"data-key":ue[t][n],id:ue[t][n],columnPath:e.normalizedPath,rowSpan:e.rowSpan||void 0,colSpan:e.colSpan||void 0,onIconClick:ne,dataItem:e,expanded:o,expandable:l,total:e.total,first:a,root:0===e.levelNum,role:"columnheader"},e.caption):null})))}))))),p.createElement("div",{ref:x,className:"k-pivotgrid-row-headers"},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"},b.map(((e,t)=>p.createElement(Y,{key:H(I[t].path),...z,path:I[t].path,role:"row",ariaOwns:de[t].join(" ")},e.cells.filter(Boolean).map((e=>e?p.createElement(ee,{..._,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:ae,root:0===e.levelNum,role:"rowheader"},e.caption):null)))))))),p.createElement("div",{ref:y,className:"k-pivotgrid-values",onScroll:e=>{oe(e),le(e)}},p.createElement("table",{className:"k-pivotgrid-table",role:"none"},p.createElement("colgroup",null,q),p.createElement("tbody",{className:"k-pivotgrid-tbody",role:"none"},M.map(((e,t)=>p.createElement(te,{key:H(I[t].path),...z,path:I[t].path,role:"none"},e.cells.map(((e,r)=>p.createElement(V,{key:de[t][r],"data-key":de[t][r],id:de[t][r],...X,rowPath:e.rowTuple.members.map((e=>e.name)),columnPath:e.columnTuple.members.map((e=>e.name)),dataItem:e,total:I[t].total||T[r].total,role:"gridcell",ariaDescribedby:ue.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.displayName="KendoReactPivotGridAxisEditor";const ne=p.forwardRef(((e,t)=>{const{value:n=ae.value,field:a}=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.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 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;
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(void 0);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;
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import * as a from "react";
9
9
  const i = (...n) => {
10
- const r = a.useRef();
10
+ const r = a.useRef(void 0);
11
11
  return (o) => {
12
12
  r.current !== void 0 && window.cancelAnimationFrame(r.current);
13
13
  const e = o.currentTarget, c = e.scrollLeft;
@@ -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 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.scrollTop;e.forEach(a=>{const c=a.current;c&&c!==o&&(t.current=window.requestAnimationFrame(()=>{c.scrollTop=Math.round(l)}))})}};exports.useVerticalScrollSync=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),d=(...e)=>{const t=s.useRef(void 0);return n=>{t.current!==void 0&&window.cancelAnimationFrame(t.current);const o=n.currentTarget,l=o.scrollTop;e.forEach(a=>{const c=a.current;c&&c!==o&&(t.current=window.requestAnimationFrame(()=>{c.scrollTop=Math.round(l)}))})}};exports.useVerticalScrollSync=d;
@@ -6,15 +6,15 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as a from "react";
9
- const i = (...o) => {
10
- const r = a.useRef();
9
+ const i = (...n) => {
10
+ const r = a.useRef(void 0);
11
11
  return (t) => {
12
12
  r.current !== void 0 && window.cancelAnimationFrame(r.current);
13
- const n = t.currentTarget, c = n.scrollTop;
14
- o.forEach((l) => {
15
- const e = l.current;
16
- e && e !== n && (r.current = window.requestAnimationFrame(() => {
17
- e.scrollTop = Math.round(c);
13
+ const e = t.currentTarget, c = e.scrollTop;
14
+ n.forEach((l) => {
15
+ const o = l.current;
16
+ o && o !== e && (r.current = window.requestAnimationFrame(() => {
17
+ o.scrollTop = Math.round(c);
18
18
  }));
19
19
  });
20
20
  };
package/index.d.mts CHANGED
@@ -119,7 +119,7 @@ export declare interface PivotGridAxesChangeEvent {
119
119
  /**
120
120
  * Represents the [KendoReact PivotGridAxesEditor component]({% slug api_pivotgrid_pivotgridaxeseditorprops %}).
121
121
  */
122
- export declare const PivotGridAxesEditor: React_2.ForwardRefExoticComponent<Omit<PivotGridAxesEditorProps, "ref"> & React_2.RefAttributes<PivotGridAxesEditorHandle | null>>;
122
+ export declare const PivotGridAxesEditor: React_2.ForwardRefExoticComponent<PivotGridAxesEditorProps & React_2.RefAttributes<PivotGridAxesEditorHandle>>;
123
123
 
124
124
  /**
125
125
  * Represents the object which is passed to the [`ref`](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom) callback of the PivotGridAxesEditor component.
@@ -152,6 +152,10 @@ export declare interface PivotGridAxesEditorProps extends FieldProps {
152
152
  * The default component is: [KendoReactChipList]({% slug api_buttons_chiplist %}).
153
153
  */
154
154
  chipList?: CustomComponent<ChipListProps>;
155
+ /**
156
+ * Sets the `className` props of the ClipList component.
157
+ */
158
+ className?: string;
155
159
  }
156
160
 
157
161
  export { PivotGridAxis }
@@ -1008,51 +1012,111 @@ export declare interface PivotGridHeaderCellProps extends KendoMouse<PivotGridHe
1008
1012
  export declare interface PivotGridProps {
1009
1013
  /**
1010
1014
  * Sets the `style` property of the top-most element of the PivotGrid.
1015
+ *
1016
+ * @example
1017
+ * ```jsx
1018
+ * <PivotGrid style={{ height: '500px' }} />
1019
+ * ```
1011
1020
  */
1012
1021
  style?: React_2.CSSProperties;
1013
1022
  /**
1014
1023
  * Sets the `className` property of the top-most element of the PivotGrid in addition to the default `k-pivotgrid` class.
1024
+ *
1025
+ * @example
1026
+ * ```jsx
1027
+ * <PivotGrid className="custom-class" />
1028
+ * ```
1015
1029
  */
1016
1030
  className?: string;
1017
1031
  /**
1018
1032
  * Sets the `id` property of the top-most element of the PivotGrid.
1033
+ *
1034
+ * @example
1035
+ * ```jsx
1036
+ * <PivotGrid id="pivotgrid-id" />
1037
+ * ```
1019
1038
  */
1020
1039
  id?: string;
1021
1040
  /**
1022
1041
  * Sets the `tabIndex` property of the top-most element of the PivotGrid.
1042
+ *
1043
+ * @example
1044
+ * ```jsx
1045
+ * <PivotGrid tabIndex={0} />
1046
+ * ```
1023
1047
  */
1024
1048
  tabIndex?: number;
1025
1049
  /**
1026
1050
  * If set to `true`, the user can use dedicated shortcuts to interact with the PivotGrid.
1027
1051
  * By default, navigation is disabled.
1052
+ *
1053
+ * @example
1054
+ * ```jsx
1055
+ * <PivotGrid navigatable={true} />
1056
+ * ```
1028
1057
  */
1029
1058
  navigatable?: boolean;
1030
1059
  /**
1031
1060
  * Sets the `data` of the PivotGrid.
1061
+ *
1062
+ * @example
1063
+ * ```jsx
1064
+ * <PivotGrid data={[{ field: 'value', data: 100 }]} />
1065
+ * ```
1032
1066
  */
1033
1067
  data?: PivotDataItem[];
1034
1068
  /**
1035
1069
  * Sets the `columns` data of the PivotGrid.
1070
+ *
1071
+ * @example
1072
+ * ```jsx
1073
+ * <PivotGrid columns={[['Category', 'Subcategory']]} />
1074
+ * ```
1036
1075
  */
1037
1076
  columns?: Tuple[];
1038
1077
  /**
1039
1078
  * Sets the `rows` data of the PivotGrid.
1079
+ *
1080
+ * @example
1081
+ * ```jsx
1082
+ * <PivotGrid rows={[['Region', 'Country']]} />
1083
+ * ```
1040
1084
  */
1041
1085
  rows?: Tuple[];
1042
1086
  /**
1043
1087
  * The configuration of the `column` axes.
1088
+ *
1089
+ * @example
1090
+ * ```jsx
1091
+ * <PivotGrid columnAxes={[{ name: 'Category', expand: true }]} />
1092
+ * ```
1044
1093
  */
1045
1094
  columnAxes?: PivotGridAxis[];
1046
1095
  /**
1047
1096
  * A callback, fired whenever the `columnAxes` property should change.
1097
+ *
1098
+ * @example
1099
+ * ```jsx
1100
+ * <PivotGrid onColumnAxesChange={(event) => console.log(event.value)} />
1101
+ * ```
1048
1102
  */
1049
1103
  onColumnAxesChange?: (event: PivotGridAxesChangeEvent) => void;
1050
1104
  /**
1051
1105
  * The configuration of the `row` axes.
1106
+ *
1107
+ * @example
1108
+ * ```jsx
1109
+ * <PivotGrid rowAxes={[{ name: 'Region', expand: true }]} />
1110
+ * ```
1052
1111
  */
1053
1112
  rowAxes?: PivotGridAxis[];
1054
1113
  /**
1055
1114
  * A callback, fired whenever the `rowAxes` property should change.
1115
+ *
1116
+ * @example
1117
+ * ```jsx
1118
+ * <PivotGrid onRowAxesChange={(event) => console.log(event.value)} />
1119
+ * ```
1056
1120
  */
1057
1121
  onRowAxesChange?: (event: PivotGridAxesChangeEvent) => void;
1058
1122
  /**
@@ -1060,7 +1124,10 @@ export declare interface PivotGridProps {
1060
1124
  *
1061
1125
  * The default component is: [PivotGridRow]({% slug api_pivotgrid_pivotgridrow %}).
1062
1126
  *
1063
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1127
+ * @example
1128
+ * ```jsx
1129
+ * <PivotGrid row={(props) => <CustomRow {...props} />} />
1130
+ * ```
1064
1131
  */
1065
1132
  row?: CustomComponent<PivotGridRowProps>;
1066
1133
  /**
@@ -1068,7 +1135,10 @@ export declare interface PivotGridProps {
1068
1135
  *
1069
1136
  * The default component is: [PivotGridColumn]({% slug api_pivotgrid_pivotgridcolumn %}).
1070
1137
  *
1071
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1138
+ * @example
1139
+ * ```jsx
1140
+ * <PivotGrid column={(props) => <CustomColumn {...props} />} />
1141
+ * ```
1072
1142
  */
1073
1143
  column?: CustomComponent<PivotGridColumnProps>;
1074
1144
  /**
@@ -1076,7 +1146,10 @@ export declare interface PivotGridProps {
1076
1146
  *
1077
1147
  * The default component is: [PivotGridCell]({% slug api_pivotgrid_pivotgridcell %}).
1078
1148
  *
1079
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1149
+ * @example
1150
+ * ```jsx
1151
+ * <PivotGrid cell={(props) => <CustomCell {...props} />} />
1152
+ * ```
1080
1153
  */
1081
1154
  cell?: CustomComponent<PivotGridCellProps>;
1082
1155
  /**
@@ -1084,7 +1157,10 @@ export declare interface PivotGridProps {
1084
1157
  *
1085
1158
  * The default component is: [PivotGridHeaderCell]({% slug api_pivotgrid_pivotgridheadercell %}).
1086
1159
  *
1087
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1160
+ * @example
1161
+ * ```jsx
1162
+ * <PivotGrid headerCell={(props) => <CustomHeaderCell {...props} />} />
1163
+ * ```
1088
1164
  */
1089
1165
  headerCell?: CustomComponent<PivotGridHeaderCellProps>;
1090
1166
  /**
@@ -1092,7 +1168,10 @@ export declare interface PivotGridProps {
1092
1168
  *
1093
1169
  * The default component is: [PivotGridRow]({% slug api_pivotgrid_pivotgridrow %}).
1094
1170
  *
1095
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1171
+ * @example
1172
+ * ```jsx
1173
+ * <PivotGrid columnHeadersRow={(props) => <CustomRow {...props} />} />
1174
+ * ```
1096
1175
  */
1097
1176
  columnHeadersRow?: React_2.ComponentType<PivotGridRowProps>;
1098
1177
  /**
@@ -1100,7 +1179,10 @@ export declare interface PivotGridProps {
1100
1179
  *
1101
1180
  * The default component is: [PivotGridColumn]({% slug api_pivotgrid_pivotgridcolumn %}).
1102
1181
  *
1103
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1182
+ * @example
1183
+ * ```jsx
1184
+ * <PivotGrid columnHeadersColumn={(props) => <CustomColumn {...props} />} />
1185
+ * ```
1104
1186
  */
1105
1187
  columnHeadersColumn?: React_2.ComponentType<PivotGridColumnProps>;
1106
1188
  /**
@@ -1108,7 +1190,10 @@ export declare interface PivotGridProps {
1108
1190
  *
1109
1191
  * The default component is: [PivotGridHeaderCell]({% slug api_pivotgrid_pivotgridheadercell %}).
1110
1192
  *
1111
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1193
+ * @example
1194
+ * ```jsx
1195
+ * <PivotGrid columnHeadersCell={(props) => <CustomHeaderCell {...props} />} />
1196
+ * ```
1112
1197
  */
1113
1198
  columnHeadersCell?: React_2.ComponentType<PivotGridHeaderCellProps>;
1114
1199
  /**
@@ -1116,7 +1201,10 @@ export declare interface PivotGridProps {
1116
1201
  *
1117
1202
  * The default component is: [PivotGridRow]({% slug api_pivotgrid_pivotgridrow %}).
1118
1203
  *
1119
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1204
+ * @example
1205
+ * ```jsx
1206
+ * <PivotGrid rowHeadersRow={(props) => <CustomRow {...props} />} />
1207
+ * ```
1120
1208
  */
1121
1209
  rowHeadersRow?: React_2.ComponentType<PivotGridRowProps>;
1122
1210
  /**
@@ -1124,7 +1212,10 @@ export declare interface PivotGridProps {
1124
1212
  *
1125
1213
  * The default component is: [PivotGridColumn]({% slug api_pivotgrid_pivotgridcolumn %}).
1126
1214
  *
1127
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1215
+ * @example
1216
+ * ```jsx
1217
+ * <PivotGrid rowHeadersColumn={(props) => <CustomColumn {...props} />} />
1218
+ * ```
1128
1219
  */
1129
1220
  rowHeadersColumn?: React_2.ComponentType<PivotGridColumnProps>;
1130
1221
  /**
@@ -1132,7 +1223,10 @@ export declare interface PivotGridProps {
1132
1223
  *
1133
1224
  * The default component is: [PivotGridHeaderCell]({% slug api_pivotgrid_pivotgridheadercell %}).
1134
1225
  *
1135
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1226
+ * @example
1227
+ * ```jsx
1228
+ * <PivotGrid rowHeadersCell={(props) => <CustomHeaderCell {...props} />} />
1229
+ * ```
1136
1230
  */
1137
1231
  rowHeadersCell?: React_2.ComponentType<PivotGridHeaderCellProps>;
1138
1232
  /**
@@ -1140,7 +1234,10 @@ export declare interface PivotGridProps {
1140
1234
  *
1141
1235
  * The default component is: [PivotGridRow]({% slug api_pivotgrid_pivotgridrow %}).
1142
1236
  *
1143
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1237
+ * @example
1238
+ * ```jsx
1239
+ * <PivotGrid dataRow={(props) => <CustomRow {...props} />} />
1240
+ * ```
1144
1241
  */
1145
1242
  dataRow?: React_2.ComponentType<PivotGridRowProps>;
1146
1243
  /**
@@ -1148,7 +1245,10 @@ export declare interface PivotGridProps {
1148
1245
  *
1149
1246
  * The default component is: [PivotGridColumn]({% slug api_pivotgrid_pivotgridcolumn %}).
1150
1247
  *
1151
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1248
+ * @example
1249
+ * ```jsx
1250
+ * <PivotGrid dataColumn={(props) => <CustomColumn {...props} />} />
1251
+ * ```
1152
1252
  */
1153
1253
  dataColumn?: React_2.ComponentType<PivotGridColumnProps>;
1154
1254
  }
package/index.d.ts CHANGED
@@ -119,7 +119,7 @@ export declare interface PivotGridAxesChangeEvent {
119
119
  /**
120
120
  * Represents the [KendoReact PivotGridAxesEditor component]({% slug api_pivotgrid_pivotgridaxeseditorprops %}).
121
121
  */
122
- export declare const PivotGridAxesEditor: React_2.ForwardRefExoticComponent<Omit<PivotGridAxesEditorProps, "ref"> & React_2.RefAttributes<PivotGridAxesEditorHandle | null>>;
122
+ export declare const PivotGridAxesEditor: React_2.ForwardRefExoticComponent<PivotGridAxesEditorProps & React_2.RefAttributes<PivotGridAxesEditorHandle>>;
123
123
 
124
124
  /**
125
125
  * Represents the object which is passed to the [`ref`](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom) callback of the PivotGridAxesEditor component.
@@ -152,6 +152,10 @@ export declare interface PivotGridAxesEditorProps extends FieldProps {
152
152
  * The default component is: [KendoReactChipList]({% slug api_buttons_chiplist %}).
153
153
  */
154
154
  chipList?: CustomComponent<ChipListProps>;
155
+ /**
156
+ * Sets the `className` props of the ClipList component.
157
+ */
158
+ className?: string;
155
159
  }
156
160
 
157
161
  export { PivotGridAxis }
@@ -1008,51 +1012,111 @@ export declare interface PivotGridHeaderCellProps extends KendoMouse<PivotGridHe
1008
1012
  export declare interface PivotGridProps {
1009
1013
  /**
1010
1014
  * Sets the `style` property of the top-most element of the PivotGrid.
1015
+ *
1016
+ * @example
1017
+ * ```jsx
1018
+ * <PivotGrid style={{ height: '500px' }} />
1019
+ * ```
1011
1020
  */
1012
1021
  style?: React_2.CSSProperties;
1013
1022
  /**
1014
1023
  * Sets the `className` property of the top-most element of the PivotGrid in addition to the default `k-pivotgrid` class.
1024
+ *
1025
+ * @example
1026
+ * ```jsx
1027
+ * <PivotGrid className="custom-class" />
1028
+ * ```
1015
1029
  */
1016
1030
  className?: string;
1017
1031
  /**
1018
1032
  * Sets the `id` property of the top-most element of the PivotGrid.
1033
+ *
1034
+ * @example
1035
+ * ```jsx
1036
+ * <PivotGrid id="pivotgrid-id" />
1037
+ * ```
1019
1038
  */
1020
1039
  id?: string;
1021
1040
  /**
1022
1041
  * Sets the `tabIndex` property of the top-most element of the PivotGrid.
1042
+ *
1043
+ * @example
1044
+ * ```jsx
1045
+ * <PivotGrid tabIndex={0} />
1046
+ * ```
1023
1047
  */
1024
1048
  tabIndex?: number;
1025
1049
  /**
1026
1050
  * If set to `true`, the user can use dedicated shortcuts to interact with the PivotGrid.
1027
1051
  * By default, navigation is disabled.
1052
+ *
1053
+ * @example
1054
+ * ```jsx
1055
+ * <PivotGrid navigatable={true} />
1056
+ * ```
1028
1057
  */
1029
1058
  navigatable?: boolean;
1030
1059
  /**
1031
1060
  * Sets the `data` of the PivotGrid.
1061
+ *
1062
+ * @example
1063
+ * ```jsx
1064
+ * <PivotGrid data={[{ field: 'value', data: 100 }]} />
1065
+ * ```
1032
1066
  */
1033
1067
  data?: PivotDataItem[];
1034
1068
  /**
1035
1069
  * Sets the `columns` data of the PivotGrid.
1070
+ *
1071
+ * @example
1072
+ * ```jsx
1073
+ * <PivotGrid columns={[['Category', 'Subcategory']]} />
1074
+ * ```
1036
1075
  */
1037
1076
  columns?: Tuple[];
1038
1077
  /**
1039
1078
  * Sets the `rows` data of the PivotGrid.
1079
+ *
1080
+ * @example
1081
+ * ```jsx
1082
+ * <PivotGrid rows={[['Region', 'Country']]} />
1083
+ * ```
1040
1084
  */
1041
1085
  rows?: Tuple[];
1042
1086
  /**
1043
1087
  * The configuration of the `column` axes.
1088
+ *
1089
+ * @example
1090
+ * ```jsx
1091
+ * <PivotGrid columnAxes={[{ name: 'Category', expand: true }]} />
1092
+ * ```
1044
1093
  */
1045
1094
  columnAxes?: PivotGridAxis[];
1046
1095
  /**
1047
1096
  * A callback, fired whenever the `columnAxes` property should change.
1097
+ *
1098
+ * @example
1099
+ * ```jsx
1100
+ * <PivotGrid onColumnAxesChange={(event) => console.log(event.value)} />
1101
+ * ```
1048
1102
  */
1049
1103
  onColumnAxesChange?: (event: PivotGridAxesChangeEvent) => void;
1050
1104
  /**
1051
1105
  * The configuration of the `row` axes.
1106
+ *
1107
+ * @example
1108
+ * ```jsx
1109
+ * <PivotGrid rowAxes={[{ name: 'Region', expand: true }]} />
1110
+ * ```
1052
1111
  */
1053
1112
  rowAxes?: PivotGridAxis[];
1054
1113
  /**
1055
1114
  * A callback, fired whenever the `rowAxes` property should change.
1115
+ *
1116
+ * @example
1117
+ * ```jsx
1118
+ * <PivotGrid onRowAxesChange={(event) => console.log(event.value)} />
1119
+ * ```
1056
1120
  */
1057
1121
  onRowAxesChange?: (event: PivotGridAxesChangeEvent) => void;
1058
1122
  /**
@@ -1060,7 +1124,10 @@ export declare interface PivotGridProps {
1060
1124
  *
1061
1125
  * The default component is: [PivotGridRow]({% slug api_pivotgrid_pivotgridrow %}).
1062
1126
  *
1063
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1127
+ * @example
1128
+ * ```jsx
1129
+ * <PivotGrid row={(props) => <CustomRow {...props} />} />
1130
+ * ```
1064
1131
  */
1065
1132
  row?: CustomComponent<PivotGridRowProps>;
1066
1133
  /**
@@ -1068,7 +1135,10 @@ export declare interface PivotGridProps {
1068
1135
  *
1069
1136
  * The default component is: [PivotGridColumn]({% slug api_pivotgrid_pivotgridcolumn %}).
1070
1137
  *
1071
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1138
+ * @example
1139
+ * ```jsx
1140
+ * <PivotGrid column={(props) => <CustomColumn {...props} />} />
1141
+ * ```
1072
1142
  */
1073
1143
  column?: CustomComponent<PivotGridColumnProps>;
1074
1144
  /**
@@ -1076,7 +1146,10 @@ export declare interface PivotGridProps {
1076
1146
  *
1077
1147
  * The default component is: [PivotGridCell]({% slug api_pivotgrid_pivotgridcell %}).
1078
1148
  *
1079
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1149
+ * @example
1150
+ * ```jsx
1151
+ * <PivotGrid cell={(props) => <CustomCell {...props} />} />
1152
+ * ```
1080
1153
  */
1081
1154
  cell?: CustomComponent<PivotGridCellProps>;
1082
1155
  /**
@@ -1084,7 +1157,10 @@ export declare interface PivotGridProps {
1084
1157
  *
1085
1158
  * The default component is: [PivotGridHeaderCell]({% slug api_pivotgrid_pivotgridheadercell %}).
1086
1159
  *
1087
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1160
+ * @example
1161
+ * ```jsx
1162
+ * <PivotGrid headerCell={(props) => <CustomHeaderCell {...props} />} />
1163
+ * ```
1088
1164
  */
1089
1165
  headerCell?: CustomComponent<PivotGridHeaderCellProps>;
1090
1166
  /**
@@ -1092,7 +1168,10 @@ export declare interface PivotGridProps {
1092
1168
  *
1093
1169
  * The default component is: [PivotGridRow]({% slug api_pivotgrid_pivotgridrow %}).
1094
1170
  *
1095
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1171
+ * @example
1172
+ * ```jsx
1173
+ * <PivotGrid columnHeadersRow={(props) => <CustomRow {...props} />} />
1174
+ * ```
1096
1175
  */
1097
1176
  columnHeadersRow?: React_2.ComponentType<PivotGridRowProps>;
1098
1177
  /**
@@ -1100,7 +1179,10 @@ export declare interface PivotGridProps {
1100
1179
  *
1101
1180
  * The default component is: [PivotGridColumn]({% slug api_pivotgrid_pivotgridcolumn %}).
1102
1181
  *
1103
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1182
+ * @example
1183
+ * ```jsx
1184
+ * <PivotGrid columnHeadersColumn={(props) => <CustomColumn {...props} />} />
1185
+ * ```
1104
1186
  */
1105
1187
  columnHeadersColumn?: React_2.ComponentType<PivotGridColumnProps>;
1106
1188
  /**
@@ -1108,7 +1190,10 @@ export declare interface PivotGridProps {
1108
1190
  *
1109
1191
  * The default component is: [PivotGridHeaderCell]({% slug api_pivotgrid_pivotgridheadercell %}).
1110
1192
  *
1111
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1193
+ * @example
1194
+ * ```jsx
1195
+ * <PivotGrid columnHeadersCell={(props) => <CustomHeaderCell {...props} />} />
1196
+ * ```
1112
1197
  */
1113
1198
  columnHeadersCell?: React_2.ComponentType<PivotGridHeaderCellProps>;
1114
1199
  /**
@@ -1116,7 +1201,10 @@ export declare interface PivotGridProps {
1116
1201
  *
1117
1202
  * The default component is: [PivotGridRow]({% slug api_pivotgrid_pivotgridrow %}).
1118
1203
  *
1119
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1204
+ * @example
1205
+ * ```jsx
1206
+ * <PivotGrid rowHeadersRow={(props) => <CustomRow {...props} />} />
1207
+ * ```
1120
1208
  */
1121
1209
  rowHeadersRow?: React_2.ComponentType<PivotGridRowProps>;
1122
1210
  /**
@@ -1124,7 +1212,10 @@ export declare interface PivotGridProps {
1124
1212
  *
1125
1213
  * The default component is: [PivotGridColumn]({% slug api_pivotgrid_pivotgridcolumn %}).
1126
1214
  *
1127
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1215
+ * @example
1216
+ * ```jsx
1217
+ * <PivotGrid rowHeadersColumn={(props) => <CustomColumn {...props} />} />
1218
+ * ```
1128
1219
  */
1129
1220
  rowHeadersColumn?: React_2.ComponentType<PivotGridColumnProps>;
1130
1221
  /**
@@ -1132,7 +1223,10 @@ export declare interface PivotGridProps {
1132
1223
  *
1133
1224
  * The default component is: [PivotGridHeaderCell]({% slug api_pivotgrid_pivotgridheadercell %}).
1134
1225
  *
1135
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1226
+ * @example
1227
+ * ```jsx
1228
+ * <PivotGrid rowHeadersCell={(props) => <CustomHeaderCell {...props} />} />
1229
+ * ```
1136
1230
  */
1137
1231
  rowHeadersCell?: React_2.ComponentType<PivotGridHeaderCellProps>;
1138
1232
  /**
@@ -1140,7 +1234,10 @@ export declare interface PivotGridProps {
1140
1234
  *
1141
1235
  * The default component is: [PivotGridRow]({% slug api_pivotgrid_pivotgridrow %}).
1142
1236
  *
1143
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1237
+ * @example
1238
+ * ```jsx
1239
+ * <PivotGrid dataRow={(props) => <CustomRow {...props} />} />
1240
+ * ```
1144
1241
  */
1145
1242
  dataRow?: React_2.ComponentType<PivotGridRowProps>;
1146
1243
  /**
@@ -1148,7 +1245,10 @@ export declare interface PivotGridProps {
1148
1245
  *
1149
1246
  * The default component is: [PivotGridColumn]({% slug api_pivotgrid_pivotgridcolumn %}).
1150
1247
  *
1151
- * For more information, refer to the [PivotGrid Customization]({% slug customization_pivotgrid %}) article.
1248
+ * @example
1249
+ * ```jsx
1250
+ * <PivotGrid dataColumn={(props) => <CustomColumn {...props} />} />
1251
+ * ```
1152
1252
  */
1153
1253
  dataColumn?: React_2.ComponentType<PivotGridColumnProps>;
1154
1254
  }
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-pivotgrid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1743432546,version:"10.2.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-pivotgrid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1745388343,version:"10.2.0-develop.11",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
@@ -10,8 +10,8 @@ const e = {
10
10
  productName: "KendoReact",
11
11
  productCode: "KENDOUIREACT",
12
12
  productCodes: ["KENDOUIREACT"],
13
- publishDate: 1743432546,
14
- version: "10.2.0-develop.1",
13
+ publishDate: 1745388343,
14
+ version: "10.2.0-develop.11",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
16
16
  };
17
17
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-pivotgrid",
3
- "version": "10.2.0-develop.1",
3
+ "version": "10.2.0-develop.11",
4
4
  "description": "React PivotGrid (also called Pivot Table) can be data-bound to an OLAP service and customized extensively. KendoReact PivotGrid package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -28,14 +28,14 @@
28
28
  "@progress/kendo-data-query": "^1.5.5",
29
29
  "@progress/kendo-licensing": "^1.5.1",
30
30
  "@progress/kendo-pivotgrid-common": "0.6.2",
31
- "@progress/kendo-react-buttons": "10.2.0-develop.1",
32
- "@progress/kendo-react-common": "10.2.0-develop.1",
33
- "@progress/kendo-react-data-tools": "10.2.0-develop.1",
34
- "@progress/kendo-react-form": "10.2.0-develop.1",
35
- "@progress/kendo-react-indicators": "10.2.0-develop.1",
36
- "@progress/kendo-react-intl": "10.2.0-develop.1",
37
- "@progress/kendo-react-labels": "10.2.0-develop.1",
38
- "@progress/kendo-react-treeview": "10.2.0-develop.1",
31
+ "@progress/kendo-react-buttons": "10.2.0-develop.11",
32
+ "@progress/kendo-react-common": "10.2.0-develop.11",
33
+ "@progress/kendo-react-data-tools": "10.2.0-develop.11",
34
+ "@progress/kendo-react-form": "10.2.0-develop.11",
35
+ "@progress/kendo-react-indicators": "10.2.0-develop.11",
36
+ "@progress/kendo-react-intl": "10.2.0-develop.11",
37
+ "@progress/kendo-react-labels": "10.2.0-develop.11",
38
+ "@progress/kendo-react-treeview": "10.2.0-develop.11",
39
39
  "@progress/kendo-svg-icons": "^4.0.0",
40
40
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
41
41
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
@@ -61,7 +61,7 @@
61
61
  "package": {
62
62
  "productName": "KendoReact",
63
63
  "productCode": "KENDOUIREACT",
64
- "publishDate": 1743432546,
64
+ "publishDate": 1745388343,
65
65
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
66
66
  }
67
67
  },