@progress/kendo-react-pivotgrid 8.1.0-develop.22 → 8.1.0-develop.23

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.
@@ -7,88 +7,94 @@
7
7
  */
8
8
  "use client";
9
9
  import * as e from "react";
10
- import { Field as E } from "@progress/kendo-react-form";
10
+ import { Field as p } from "@progress/kendo-react-form";
11
11
  import { Label as g } from "@progress/kendo-react-labels";
12
- import { useLocalization as ae } from "@progress/kendo-react-intl";
12
+ import { useLocalization as se } from "@progress/kendo-react-intl";
13
13
  import { useCustomComponent as d } from "@progress/kendo-react-common";
14
14
  import { PivotGridAxesEditor as f } from "./AxesEditor.mjs";
15
- import { PivotGridFieldsEditor as se } from "./FieldsEditor.mjs";
16
- import { configuratorEditorSearchTitle as T, messages as u, configuratorColumnsTitle as I, configuratorMissingFields as x, configuratorRowsTitle as S, configuratorMeasuresTitle as G } from "../messages/index.mjs";
15
+ import { PivotGridFieldsEditor as ae } from "./FieldsEditor.mjs";
16
+ import { configuratorEditorSearchTitle as I, messages as u, configuratorColumnsTitle as S, configuratorMissingFields as x, configuratorRowsTitle as G, configuratorMeasuresTitle as z } from "../messages/index.mjs";
17
17
  import { usePivotConfiguratorEditor as ie, PIVOT_CONFIGURATOR_ACTION as c } from "../hooks/usePivotConfiguratorEditor.mjs";
18
18
  import { PivotGridConfiguratorEditorEventsContext as le } from "../shared/PivotGridConfiguratorEditorEventsContext.mjs";
19
19
  import { PivotGridConfiguratorEditorStateContext as de } from "../shared/PivotGridConfiguratorEditorStateContext.mjs";
20
- const D = e.forwardRef((t, Z) => {
20
+ const ce = e.forwardRef((E, D) => {
21
21
  const {
22
- onFieldsEditorFieldCheck: w,
23
- onFieldsEditorFieldCheckAction: b,
22
+ onFieldsEditorFieldCheck: v = r.onFieldsEditorFieldCheckAction,
23
+ onFieldsEditorFieldCheckAction: h = r.onFieldsEditorFieldCheckAction,
24
24
  onFieldsEditorFieldExpand: P,
25
- onFieldsEditorFieldExpandAction: k,
26
- onAxisFilterFieldExpand: N,
27
- onAxisFilterFieldsExpandChange: R
28
- } = t, [z, O] = d(t.fieldsLabel || s.fieldsLabel), [B, H] = d(t.fieldsEditor || s.fieldsEditor), [_, K] = d(t.columnAxesLabel || s.columnAxesLabel), [U, V] = d(t.columnAxesEditor || s.columnAxesEditor), [j, q] = d(t.rowAxesLabel || s.rowAxesLabel), [J, Q] = d(t.rowAxesEditor || s.rowAxesEditor), [W, X] = d(t.measureAxesLabel || s.measureAxesLabel), [Y, $] = d(t.measureAxesEditor || s.measureAxesEditor), ee = e.useRef(null), i = e.useRef(null), m = ae(), [n, r] = ie(t, i);
25
+ onFieldsEditorFieldExpandAction: N,
26
+ onAxisFilterFieldExpand: R,
27
+ onAxisFilterFieldsExpandChange: T
28
+ } = E, o = {
29
+ onFieldsEditorFieldCheck: v,
30
+ onFieldsEditorFieldCheckAction: h,
31
+ horizontal: r.horizontal,
32
+ axesEditor: r.axesEditor,
33
+ ...E
34
+ }, [Z, O] = d(o.fieldsLabel || r.fieldsLabel), [B, H] = d(o.fieldsEditor || r.fieldsEditor), [_, K] = d(o.columnAxesLabel || r.columnAxesLabel), [U, V] = d(o.columnAxesEditor || r.columnAxesEditor), [j, q] = d(o.rowAxesLabel || r.rowAxesLabel), [J, Q] = d(o.rowAxesEditor || r.rowAxesEditor), [W, X] = d(o.measureAxesLabel || r.measureAxesLabel), [Y, $] = d(o.measureAxesEditor || r.measureAxesEditor), ee = e.useRef(null), i = e.useRef(null), m = se(), [n, s] = ie(o, i);
29
35
  e.useImperativeHandle(i, () => ({
30
36
  element: ee.current,
31
- props: t,
37
+ props: o,
32
38
  state: n
33
- })), e.useImperativeHandle(Z, () => i.current);
34
- const v = () => {
35
- n.dragItem && r({ type: c.setDropZone, payload: "columnAxes" });
36
- }, p = () => {
37
- n.dragItem && r({ type: c.setDropZone, payload: null });
39
+ })), e.useImperativeHandle(D, () => i.current);
40
+ const F = () => {
41
+ n.dragItem && s({ type: c.setDropZone, payload: "columnAxes" });
38
42
  }, L = () => {
39
- n.dragItem && r({ type: c.setDropZone, payload: "rowAxes" });
40
- }, h = () => {
41
- n.dragItem && r({ type: c.setDropZone, payload: null });
42
- }, F = () => {
43
- n.dragItem && r({ type: c.setDropZone, payload: "measureAxes" });
43
+ n.dragItem && s({ type: c.setDropZone, payload: null });
44
44
  }, C = () => {
45
- n.dragItem && r({ type: c.setDropZone, payload: null });
46
- }, te = (o) => {
45
+ n.dragItem && s({ type: c.setDropZone, payload: "rowAxes" });
46
+ }, y = () => {
47
+ n.dragItem && s({ type: c.setDropZone, payload: null });
48
+ }, M = () => {
49
+ n.dragItem && s({ type: c.setDropZone, payload: "measureAxes" });
50
+ }, w = () => {
51
+ n.dragItem && s({ type: c.setDropZone, payload: null });
52
+ }, te = (t) => {
47
53
  const l = {
48
- target: o.target,
54
+ target: t.target,
49
55
  currentTarget: i.current,
50
- value: o.value,
51
- syntheticEvent: o.syntheticEvent
56
+ value: t.value,
57
+ syntheticEvent: t.syntheticEvent
52
58
  };
53
- if (k) {
54
- const a = k(l, t, n);
55
- a && (Array.isArray(a) ? a.filter(Boolean).map((A) => A && r({ ...A }, o.syntheticEvent)) : r({ ...a }, o.syntheticEvent));
59
+ if (N) {
60
+ const a = N(l, o, n);
61
+ a && (Array.isArray(a) ? a.filter(Boolean).map((A) => A && s({ ...A }, t.syntheticEvent)) : s({ ...a }, t.syntheticEvent));
56
62
  }
57
63
  P && P({
58
- target: o.target,
64
+ target: t.target,
59
65
  currentTarget: i.current,
60
- value: o.value,
61
- syntheticEvent: o.syntheticEvent
66
+ value: t.value,
67
+ syntheticEvent: t.syntheticEvent
62
68
  });
63
- }, oe = (o) => {
69
+ }, oe = (t) => {
64
70
  const l = {
65
- target: o.target,
71
+ target: t.target,
66
72
  currentTarget: i.current,
67
- value: o.value,
68
- syntheticEvent: o.syntheticEvent
73
+ value: t.value,
74
+ syntheticEvent: t.syntheticEvent
69
75
  };
70
- if (b) {
71
- const a = b(l, t, n);
72
- a && (Array.isArray(a) ? a.filter(Boolean).map((A) => A && r({ ...A }, o.syntheticEvent)) : r({ ...a }, o.syntheticEvent));
76
+ if (h) {
77
+ const a = h(l, o, n);
78
+ a && (Array.isArray(a) ? a.filter(Boolean).map((A) => A && s({ ...A }, t.syntheticEvent)) : s({ ...a }, t.syntheticEvent));
73
79
  }
74
- w && w(l);
75
- }, ne = (o) => {
80
+ v && v(l);
81
+ }, ne = (t) => {
76
82
  const l = {
77
- target: o.target,
83
+ target: t.target,
78
84
  currentTarget: i.current,
79
- value: o.value,
80
- syntheticEvent: o.syntheticEvent
85
+ value: t.value,
86
+ syntheticEvent: t.syntheticEvent
81
87
  };
82
- N && N(l);
83
- }, re = (o) => {
88
+ R && R(l);
89
+ }, re = (t) => {
84
90
  const l = {
85
- target: o.target,
91
+ target: t.target,
86
92
  currentTarget: i.current,
87
- value: o.value,
88
- syntheticEvent: o.syntheticEvent
93
+ value: t.value,
94
+ syntheticEvent: t.syntheticEvent
89
95
  };
90
- R && R(l);
91
- }, y = t.horizontal ? "div" : e.Fragment, M = t.horizontal ? { className: "k-form-field-wrapper" } : {};
96
+ T && T(l);
97
+ }, b = o.horizontal ? "div" : e.Fragment, k = o.horizontal ? { className: "k-form-field-wrapper" } : {};
92
98
  return /* @__PURE__ */ e.createElement(
93
99
  le.Provider,
94
100
  {
@@ -97,10 +103,10 @@ const D = e.forwardRef((t, Z) => {
97
103
  onAxisFilterFieldsExpandChange: re
98
104
  }
99
105
  },
100
- /* @__PURE__ */ e.createElement(de.Provider, { value: [n, r] }, /* @__PURE__ */ e.createElement(y, { ...M }, /* @__PURE__ */ e.createElement("div", { className: "k-form-field" }, /* @__PURE__ */ e.createElement(z, { name: "", component: g, ...O }, m.toLanguageString(T, u[T]))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field" }, /* @__PURE__ */ e.createElement("div", { className: "k-fields-list-wrapper" }, /* @__PURE__ */ e.createElement(
106
+ /* @__PURE__ */ e.createElement(de.Provider, { value: [n, s] }, /* @__PURE__ */ e.createElement(b, { ...k }, /* @__PURE__ */ e.createElement("div", { className: "k-form-field" }, /* @__PURE__ */ e.createElement(Z, { name: "", component: g, ...O }, m.toLanguageString(I, u[I]))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field" }, /* @__PURE__ */ e.createElement("div", { className: "k-fields-list-wrapper" }, /* @__PURE__ */ e.createElement(
101
107
  B,
102
108
  {
103
- data: t.data,
109
+ data: o.data,
104
110
  onExpand: te,
105
111
  onCheck: oe,
106
112
  columnAxes: n.columnAxes,
@@ -108,31 +114,31 @@ const D = e.forwardRef((t, Z) => {
108
114
  measureAxes: n.measureAxes,
109
115
  ...H
110
116
  }
111
- )))), /* @__PURE__ */ e.createElement(y, { ...M }, /* @__PURE__ */ e.createElement(
117
+ )))), /* @__PURE__ */ e.createElement(b, { ...k }, /* @__PURE__ */ e.createElement(
112
118
  "div",
113
119
  {
114
120
  className: "k-form-field",
115
- onMouseEnter: v,
116
- onMouseLeave: p
121
+ onMouseEnter: F,
122
+ onMouseLeave: L
117
123
  },
118
124
  /* @__PURE__ */ e.createElement(
119
- E,
125
+ p,
120
126
  {
121
127
  name: "columnAxes",
122
128
  field: "columnAxes",
123
129
  component: _,
124
130
  ...K
125
131
  },
126
- m.toLanguageString(I, u[I])
132
+ m.toLanguageString(S, u[S])
127
133
  )
128
- ), t.valueGetter("columnAxes").length ? /* @__PURE__ */ e.createElement(
129
- E,
134
+ ), o.valueGetter("columnAxes").length ? /* @__PURE__ */ e.createElement(
135
+ p,
130
136
  {
131
137
  name: "columnAxes",
132
138
  field: "columnAxes",
133
139
  component: U,
134
- onMouseEnter: v,
135
- onMouseLeave: p,
140
+ onMouseEnter: F,
141
+ onMouseLeave: L,
136
142
  className: "k-column-fields",
137
143
  ...V
138
144
  }
@@ -140,35 +146,35 @@ const D = e.forwardRef((t, Z) => {
140
146
  "div",
141
147
  {
142
148
  className: "k-settings-description",
143
- onMouseEnter: v,
144
- onMouseLeave: p
149
+ onMouseEnter: F,
150
+ onMouseLeave: L
145
151
  },
146
152
  m.toLanguageString(x, u[x])
147
153
  ), /* @__PURE__ */ e.createElement(
148
154
  "div",
149
155
  {
150
156
  className: "k-form-field",
151
- onMouseEnter: L,
152
- onMouseLeave: h
157
+ onMouseEnter: C,
158
+ onMouseLeave: y
153
159
  },
154
160
  /* @__PURE__ */ e.createElement(
155
- E,
161
+ p,
156
162
  {
157
163
  name: "rowAxes",
158
164
  field: "rowAxes",
159
165
  component: j,
160
166
  ...q
161
167
  },
162
- m.toLanguageString(S, u[S])
168
+ m.toLanguageString(G, u[G])
163
169
  )
164
- ), t.valueGetter("rowAxes").length ? /* @__PURE__ */ e.createElement(
165
- E,
170
+ ), o.valueGetter("rowAxes").length ? /* @__PURE__ */ e.createElement(
171
+ p,
166
172
  {
167
173
  name: "rowAxes",
168
174
  field: "rowAxes",
169
175
  component: J,
170
- onMouseEnter: L,
171
- onMouseLeave: h,
176
+ onMouseEnter: C,
177
+ onMouseLeave: y,
172
178
  className: "k-column-fields",
173
179
  ...Q
174
180
  }
@@ -176,35 +182,35 @@ const D = e.forwardRef((t, Z) => {
176
182
  "div",
177
183
  {
178
184
  className: "k-settings-description",
179
- onMouseEnter: L,
180
- onMouseLeave: h
185
+ onMouseEnter: C,
186
+ onMouseLeave: y
181
187
  },
182
188
  m.toLanguageString(x, u[x])
183
- )), /* @__PURE__ */ e.createElement(y, { ...M }, /* @__PURE__ */ e.createElement(
189
+ )), /* @__PURE__ */ e.createElement(b, { ...k }, /* @__PURE__ */ e.createElement(
184
190
  "div",
185
191
  {
186
192
  className: "k-form-field",
187
- onMouseEnter: F,
188
- onMouseLeave: C
193
+ onMouseEnter: M,
194
+ onMouseLeave: w
189
195
  },
190
196
  /* @__PURE__ */ e.createElement(
191
- E,
197
+ p,
192
198
  {
193
199
  name: "measureAxes",
194
200
  field: "measureAxes",
195
201
  component: W,
196
202
  ...X
197
203
  },
198
- m.toLanguageString(G, u[G])
204
+ m.toLanguageString(z, u[z])
199
205
  )
200
- ), t.valueGetter("measureAxes").length ? /* @__PURE__ */ e.createElement(
201
- E,
206
+ ), o.valueGetter("measureAxes").length ? /* @__PURE__ */ e.createElement(
207
+ p,
202
208
  {
203
209
  name: "measureAxes",
204
210
  field: "measureAxes",
205
211
  component: Y,
206
- onMouseEnter: F,
207
- onMouseLeave: C,
212
+ onMouseEnter: M,
213
+ onMouseLeave: w,
208
214
  className: "k-column-fields",
209
215
  ...$
210
216
  }
@@ -212,17 +218,17 @@ const D = e.forwardRef((t, Z) => {
212
218
  "div",
213
219
  {
214
220
  className: "k-settings-description",
215
- onMouseEnter: F,
216
- onMouseLeave: C
221
+ onMouseEnter: M,
222
+ onMouseLeave: w
217
223
  },
218
224
  m.toLanguageString(x, u[x])
219
225
  )))
220
226
  );
221
- }), s = {
227
+ }), r = {
222
228
  data: [],
223
229
  horizontal: !1,
224
230
  fieldsLabel: g,
225
- fieldsEditor: se,
231
+ fieldsEditor: ae,
226
232
  columnAxesLabel: g,
227
233
  columnAxesEditor: f,
228
234
  rowAxesLabel: g,
@@ -230,11 +236,10 @@ const D = e.forwardRef((t, Z) => {
230
236
  measureAxesLabel: g,
231
237
  measureAxesEditor: f,
232
238
  axesEditor: f,
233
- onFieldsEditorFieldCheckAction: (t) => ({ type: c.toggleSelection, payload: t.value }),
234
- onFieldsEditorFieldExpandAction: (t) => ({ type: c.toggleExpansion, payload: t.value })
239
+ onFieldsEditorFieldCheckAction: (E) => ({ type: c.toggleSelection, payload: E.value }),
240
+ onFieldsEditorFieldExpandAction: (E) => ({ type: c.toggleExpansion, payload: E.value })
235
241
  };
236
- D.defaultProps = s;
237
- D.displayName = "KendoReactPivotGridConfiguratorEditor";
242
+ ce.displayName = "KendoReactPivotGridConfiguratorEditor";
238
243
  export {
239
- D as PivotGridConfiguratorEditor
244
+ ce as PivotGridConfiguratorEditor
240
245
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),c=require("@progress/kendo-react-common");function l(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const n=l(a),i=n.forwardRef((e,o)=>{const t=n.useRef(null),r=n.useRef(null);return n.useImperativeHandle(r,()=>({props:e,element:t.current})),n.useImperativeHandle(o,()=>r.current),n.createElement("div",{ref:t,id:e.id,style:e.style,tabIndex:e.tabIndex,className:c.classNames("k-d-flex k-pos-relative",{"k-flex-row":e.configuratorPosition==="right","k-flex-row-reverse":e.configuratorPosition==="left","k-flex-column":e.configuratorPosition==="bottom","k-flex-column-reverse":e.configuratorPosition==="top"},e.className)},e.children)}),u={configuratorPosition:"right"};i.defaultProps=u;i.displayName="KendoReactPivotGridContainer";exports.PivotGridContainer=i;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),m=require("@progress/kendo-react-common");function g(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=g(d),c=r.forwardRef((e,n)=>{const t=r.useRef(null),o=r.useRef(null);r.useImperativeHandle(o,()=>({props:e,element:t.current})),r.useImperativeHandle(n,()=>o.current);const{id:i,style:l,tabIndex:s,configuratorPosition:a,className:u,children:f}={...p,...e};return r.createElement("div",{ref:t,id:i,style:l,tabIndex:s,className:m.classNames("k-d-flex k-pos-relative",{"k-flex-row":a==="right","k-flex-row-reverse":a==="left","k-flex-column":a==="bottom","k-flex-column-reverse":a==="top"},u)},f)}),p={configuratorPosition:"right"};c.displayName="KendoReactPivotGridContainer";exports.PivotGridContainer=c;
@@ -6,35 +6,36 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as t from "react";
10
- import { classNames as a } from "@progress/kendo-react-common";
11
- const r = t.forwardRef((e, i) => {
12
- const o = t.useRef(null), n = t.useRef(null);
13
- return t.useImperativeHandle(n, () => ({ props: e, element: o.current })), t.useImperativeHandle(i, () => n.current), /* @__PURE__ */ t.createElement(
9
+ import * as e from "react";
10
+ import { classNames as m } from "@progress/kendo-react-common";
11
+ const u = e.forwardRef((r, l) => {
12
+ const o = e.useRef(null), n = e.useRef(null);
13
+ e.useImperativeHandle(n, () => ({ props: r, element: o.current })), e.useImperativeHandle(l, () => n.current);
14
+ const { id: a, style: s, tabIndex: i, configuratorPosition: t, className: c, children: f } = { ...d, ...r };
15
+ return /* @__PURE__ */ e.createElement(
14
16
  "div",
15
17
  {
16
18
  ref: o,
17
- id: e.id,
18
- style: e.style,
19
- tabIndex: e.tabIndex,
20
- className: a(
19
+ id: a,
20
+ style: s,
21
+ tabIndex: i,
22
+ className: m(
21
23
  "k-d-flex k-pos-relative",
22
24
  {
23
- "k-flex-row": e.configuratorPosition === "right",
24
- "k-flex-row-reverse": e.configuratorPosition === "left",
25
- "k-flex-column": e.configuratorPosition === "bottom",
26
- "k-flex-column-reverse": e.configuratorPosition === "top"
25
+ "k-flex-row": t === "right",
26
+ "k-flex-row-reverse": t === "left",
27
+ "k-flex-column": t === "bottom",
28
+ "k-flex-column-reverse": t === "top"
27
29
  },
28
- e.className
30
+ c
29
31
  )
30
32
  },
31
- e.children
33
+ f
32
34
  );
33
- }), l = {
35
+ }), d = {
34
36
  configuratorPosition: "right"
35
37
  };
36
- r.defaultProps = l;
37
- r.displayName = "KendoReactPivotGridContainer";
38
+ u.displayName = "KendoReactPivotGridContainer";
38
39
  export {
39
- r as PivotGridContainer
40
+ u as PivotGridContainer
40
41
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("react"),g=require("@progress/kendo-react-treeview"),m=require("@progress/kendo-react-common"),i=require("../utils/index.js"),R=require("../shared/PivotGridConfiguratorEditorStateContext.js");function A(t){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(c,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return c.default=t,Object.freeze(c)}const a=A(H),h=a.forwardRef((t,c)=>{const{data:n,rowAxes:o,columnAxes:v,measureAxes:C,onExpand:f,onCheck:p}={...d,...t},l=a.useRef(null),s=a.useRef(null),[I,y]=m.useCustomComponent(t.treeView||d.treeView),[E,P]=m.useCustomComponent(t.noData||d.noData);a.useImperativeHandle(s,()=>({props:t,element:l.current&&l.current.element})),a.useImperativeHandle(c,()=>s.current);const[q]=a.useContext(R.PivotGridConfiguratorEditorStateContext),w=i.extractDefaultFields(v),N=i.extractDefaultFields(o),k=i.extractDefaultFields(C),b=i.flatMap(n).filter(e=>[...w,...N,...k].some(r=>r===e.uniqueName||r===e.defaultHierarchy)),x={caption:e=>e.dataItem.caption,id:e=>e.dataItem.uniqueName,value:e=>e.dataItem.defaultHierarchy||e.dataItem.uniqueName,expanded:e=>q.expanded.some(r=>r.uniqueName===e.dataItem.uniqueName),hasChildren:e=>!("hierarchyUniqueName"in e.dataItem)&&!("aggregator"in e.dataItem),selectable:e=>!(!e.hasChildren&&!e.dataItem.aggregator&&!e.dataItem.measure||e.dataItem.type===2||e.dataItem.uniqueName==="[KPIs]"),children:e=>i.recursiveMap(e.dataItem.children,x,e),checked:e=>b.some(r=>e.dataItem.defaultHierarchy?r.defaultHierarchy===e.dataItem.defaultHierarchy:r.uniqueName===e.dataItem.uniqueName)||e.children.length&&e.children.every(r=>r.checked)},F=e=>{f&&f({value:e.item.dataItem,target:s.current,syntheticEvent:e.syntheticEvent})},D=e=>{p&&p({value:e.item.dataItem,target:s.current,syntheticEvent:e.syntheticEvent})},u=i.recursiveMap(t.data,x);return a.createElement(g.TreeViewItemPropsContext.Provider,{value:e=>({...e,checkboxes:e.item.selectable})},u&&u.length?a.createElement(I,{ref:m.canUseRef(I)?l:void 0,data:u,checkboxes:!0,onExpandChange:F,onCheckChange:D,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...y}):a.createElement(E,{...P}))}),d={data:[],rowAxes:[],columnAxes:[],measureAxes:[],treeView:g.TreeView,noData:()=>a.createElement("div",null,"NO DATA")};h.defaultProps=d;h.displayName="KendoReactPivotGridFieldsEditor";exports.PivotGridFieldsEditor=h;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("react"),x=require("@progress/kendo-react-treeview"),u=require("@progress/kendo-react-common"),i=require("../utils/index.js"),R=require("../shared/PivotGridConfiguratorEditorStateContext.js");function A(t){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(c,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return c.default=t,Object.freeze(c)}const a=A(H),g=a.forwardRef((t,c)=>{const{data:n,rowAxes:o,columnAxes:v,measureAxes:C,onExpand:h,onCheck:f}={...m,...t},d=a.useRef(null),s=a.useRef(null),[p,y]=u.useCustomComponent(t.treeView||m.treeView),[E,q]=u.useCustomComponent(t.noData||m.noData);a.useImperativeHandle(s,()=>({props:t,element:d.current&&d.current.element})),a.useImperativeHandle(c,()=>s.current);const[w]=a.useContext(R.PivotGridConfiguratorEditorStateContext),N=i.extractDefaultFields(v),P=i.extractDefaultFields(o),k=i.extractDefaultFields(C),b=i.flatMap(n).filter(e=>[...N,...P,...k].some(r=>r===e.uniqueName||r===e.defaultHierarchy)),I={caption:e=>e.dataItem.caption,id:e=>e.dataItem.uniqueName,value:e=>e.dataItem.defaultHierarchy||e.dataItem.uniqueName,expanded:e=>w.expanded.some(r=>r.uniqueName===e.dataItem.uniqueName),hasChildren:e=>!("hierarchyUniqueName"in e.dataItem)&&!("aggregator"in e.dataItem),selectable:e=>!(!e.hasChildren&&!e.dataItem.aggregator&&!e.dataItem.measure||e.dataItem.type===2||e.dataItem.uniqueName==="[KPIs]"),children:e=>i.recursiveMap(e.dataItem.children,I,e),checked:e=>b.some(r=>e.dataItem.defaultHierarchy?r.defaultHierarchy===e.dataItem.defaultHierarchy:r.uniqueName===e.dataItem.uniqueName)||e.children.length&&e.children.every(r=>r.checked)},F=e=>{h&&h({value:e.item.dataItem,target:s.current,syntheticEvent:e.syntheticEvent})},D=e=>{f&&f({value:e.item.dataItem,target:s.current,syntheticEvent:e.syntheticEvent})},l=i.recursiveMap(t.data,I);return a.createElement(x.TreeViewItemPropsContext.Provider,{value:e=>({...e,checkboxes:e.item.selectable})},l&&l.length?a.createElement(p,{ref:u.canUseRef(p)?d:void 0,data:l,checkboxes:!0,onExpandChange:F,onCheckChange:D,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...y}):a.createElement(E,{...q}))}),m={data:[],rowAxes:[],columnAxes:[],measureAxes:[],treeView:x.TreeView,noData:()=>a.createElement("div",null,"NO DATA")};g.displayName="KendoReactPivotGridFieldsEditor";exports.PivotGridFieldsEditor=g;
@@ -7,29 +7,29 @@
7
7
  */
8
8
  "use client";
9
9
  import * as t from "react";
10
- import { TreeViewItemPropsContext as V, TreeView as D } from "@progress/kendo-react-treeview";
11
- import { useCustomComponent as h, canUseRef as R } from "@progress/kendo-react-common";
12
- import { extractDefaultFields as d, flatMap as T, recursiveMap as f } from "../utils/index.mjs";
13
- import { PivotGridConfiguratorEditorStateContext as b } from "../shared/PivotGridConfiguratorEditorStateContext.mjs";
14
- const I = t.forwardRef((r, p) => {
10
+ import { TreeViewItemPropsContext as A, TreeView as V } from "@progress/kendo-react-treeview";
11
+ import { useCustomComponent as h, canUseRef as D } from "@progress/kendo-react-common";
12
+ import { extractDefaultFields as o, flatMap as R, recursiveMap as f } from "../utils/index.mjs";
13
+ import { PivotGridConfiguratorEditorStateContext as T } from "../shared/PivotGridConfiguratorEditorStateContext.mjs";
14
+ const b = t.forwardRef((r, I) => {
15
15
  const {
16
- data: x,
17
- rowAxes: C,
18
- columnAxes: v,
19
- measureAxes: g,
16
+ data: p,
17
+ rowAxes: x,
18
+ columnAxes: C,
19
+ measureAxes: v,
20
20
  onExpand: m,
21
21
  onCheck: s
22
- } = { ...i, ...r }, c = t.useRef(null), n = t.useRef(null), [l, E] = h(r.treeView || i.treeView), [y, N] = h(r.noData || i.noData);
23
- t.useImperativeHandle(n, () => ({ props: r, element: c.current && c.current.element })), t.useImperativeHandle(p, () => n.current);
24
- const [w] = t.useContext(b), k = d(v), H = d(C), P = d(g), q = T(x).filter((e) => [
22
+ } = { ...d, ...r }, i = t.useRef(null), n = t.useRef(null), [l, g] = h(r.treeView || d.treeView), [E, y] = h(r.noData || d.noData);
23
+ t.useImperativeHandle(n, () => ({ props: r, element: i.current && i.current.element })), t.useImperativeHandle(I, () => n.current);
24
+ const [N] = t.useContext(T), w = o(C), k = o(x), H = o(v), q = R(p).filter((e) => [
25
+ ...w,
25
26
  ...k,
26
- ...H,
27
- ...P
27
+ ...H
28
28
  ].some((a) => a === e.uniqueName || a === e.defaultHierarchy)), u = {
29
29
  caption: (e) => e.dataItem.caption,
30
30
  id: (e) => e.dataItem.uniqueName,
31
31
  value: (e) => e.dataItem.defaultHierarchy || e.dataItem.uniqueName,
32
- expanded: (e) => w.expanded.some((a) => a.uniqueName === e.dataItem.uniqueName),
32
+ expanded: (e) => N.expanded.some((a) => a.uniqueName === e.dataItem.uniqueName),
33
33
  hasChildren: (e) => !("hierarchyUniqueName" in e.dataItem) && !("aggregator" in e.dataItem),
34
34
  selectable: (e) => !(!e.hasChildren && !e.dataItem.aggregator && !e.dataItem.measure || e.dataItem.type === 2 || e.dataItem.uniqueName === "[KPIs]"),
35
35
  children: (e) => f(e.dataItem.children, u, e),
@@ -40,39 +40,38 @@ const I = t.forwardRef((r, p) => {
40
40
  target: n.current,
41
41
  syntheticEvent: e.syntheticEvent
42
42
  });
43
- }, A = (e) => {
43
+ }, P = (e) => {
44
44
  s && s({
45
45
  value: e.item.dataItem,
46
46
  target: n.current,
47
47
  syntheticEvent: e.syntheticEvent
48
48
  });
49
- }, o = f(r.data, u);
50
- return /* @__PURE__ */ t.createElement(V.Provider, { value: (e) => ({ ...e, checkboxes: e.item.selectable }) }, o && o.length ? /* @__PURE__ */ t.createElement(
49
+ }, c = f(r.data, u);
50
+ return /* @__PURE__ */ t.createElement(A.Provider, { value: (e) => ({ ...e, checkboxes: e.item.selectable }) }, c && c.length ? /* @__PURE__ */ t.createElement(
51
51
  l,
52
52
  {
53
- ref: R(l) ? c : void 0,
54
- data: o,
53
+ ref: D(l) ? i : void 0,
54
+ data: c,
55
55
  checkboxes: !0,
56
56
  onExpandChange: F,
57
- onCheckChange: A,
57
+ onCheckChange: P,
58
58
  textField: "caption",
59
59
  expandIcons: !0,
60
60
  hasChildrenField: "hasChildren",
61
61
  checkIndeterminateField: "checkIndeterminate",
62
62
  childrenField: "children",
63
- ...E
63
+ ...g
64
64
  }
65
- ) : /* @__PURE__ */ t.createElement(y, { ...N }));
66
- }), i = {
65
+ ) : /* @__PURE__ */ t.createElement(E, { ...y }));
66
+ }), d = {
67
67
  data: [],
68
68
  rowAxes: [],
69
69
  columnAxes: [],
70
70
  measureAxes: [],
71
- treeView: D,
71
+ treeView: V,
72
72
  noData: () => /* @__PURE__ */ t.createElement("div", null, "NO DATA")
73
73
  };
74
- I.defaultProps = i;
75
- I.displayName = "KendoReactPivotGridFieldsEditor";
74
+ b.displayName = "KendoReactPivotGridFieldsEditor";
76
75
  export {
77
- I as PivotGridFieldsEditor
76
+ b as PivotGridFieldsEditor
78
77
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),o=require("@progress/kendo-react-common"),r=require("@progress/kendo-svg-icons");function g(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,c.get?c:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const n=g(v),l=n.forwardRef((e,a)=>{const t=n.useRef(null),c=n.useRef(null);n.useImperativeHandle(t,()=>({element:c.current,props:e})),n.useImperativeHandle(a,()=>t.current);const[i,u]=o.useCustomComponent(e.icon||d.icon),s=o.useMouse(e,t),m=f=>{e.onIconClick&&e.onIconClick.call(void 0,{syntheticEvent:f.syntheticEvent,target:t.current})};return n.createElement("th",{ref:c,...s,colSpan:e.colSpan,rowSpan:e.rowSpan,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,...e.expandable?{"aria-expanded":e.expanded}:{},className:o.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total,"k-pivotgrid-header-root":e.root,"k-pivotgrid-expanded":e.expanded,"k-first":e.first},e.className)},e.expandable&&n.createElement(i,{...u,onClick:m,name:`chevron-${e.expanded?"up":"down"}`,"aria-hidden":!0,icon:e.expanded?r.chevronUpIcon:r.chevronDownIcon}),e.children)}),d={icon:o.IconWrap};l.defaultProps=d;l.displayName="KendoReactPivotGridHeaderCell";exports.PivotGridHeaderCell=l;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),o=require("@progress/kendo-react-common"),l=require("@progress/kendo-svg-icons");function v(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const c=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(a,n,c.get?c:{enumerable:!0,get:()=>e[n]})}}return a.default=e,Object.freeze(a)}const t=v(f),i=t.forwardRef((e,a)=>{const n=t.useRef(null),c=t.useRef(null);t.useImperativeHandle(n,()=>({element:c.current,props:e})),t.useImperativeHandle(a,()=>n.current);const[r,d]=o.useCustomComponent(e.icon||g.icon),u=o.useMouse(e,n),s=m=>{e.onIconClick&&e.onIconClick.call(void 0,{syntheticEvent:m.syntheticEvent,target:n.current})};return t.createElement("th",{ref:c,...u,colSpan:e.colSpan,rowSpan:e.rowSpan,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,...e.expandable?{"aria-expanded":e.expanded}:{},className:o.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total,"k-pivotgrid-header-root":e.root,"k-pivotgrid-expanded":e.expanded,"k-first":e.first},e.className)},e.expandable&&t.createElement(r,{...d,onClick:s,name:`chevron-${e.expanded?"up":"down"}`,"aria-hidden":!0,icon:e.expanded?l.chevronUpIcon:l.chevronDownIcon}),e.children)}),g={icon:o.IconWrap};i.displayName="KendoReactPivotGridHeaderCell";exports.PivotGridHeaderCell=i;
@@ -7,20 +7,20 @@
7
7
  */
8
8
  "use client";
9
9
  import * as n from "react";
10
- import { useCustomComponent as s, useMouse as v, classNames as f, IconWrap as I } from "@progress/kendo-react-common";
11
- import { chevronUpIcon as h, chevronDownIcon as x } from "@progress/kendo-svg-icons";
12
- const o = n.forwardRef((e, d) => {
10
+ import { useCustomComponent as m, useMouse as u, classNames as s, IconWrap as v } from "@progress/kendo-react-common";
11
+ import { chevronUpIcon as f, chevronDownIcon as I } from "@progress/kendo-svg-icons";
12
+ const h = n.forwardRef((e, c) => {
13
13
  const t = n.useRef(null), a = n.useRef(null);
14
14
  n.useImperativeHandle(t, () => ({
15
15
  element: a.current,
16
16
  props: e
17
- })), n.useImperativeHandle(d, () => t.current);
18
- const [l, i] = s(e.icon || c.icon), r = v(
17
+ })), n.useImperativeHandle(c, () => t.current);
18
+ const [o, d] = m(e.icon || x.icon), l = u(
19
19
  e,
20
20
  t
21
- ), m = (u) => {
21
+ ), i = (r) => {
22
22
  e.onIconClick && e.onIconClick.call(void 0, {
23
- syntheticEvent: u.syntheticEvent,
23
+ syntheticEvent: r.syntheticEvent,
24
24
  target: t.current
25
25
  });
26
26
  };
@@ -28,7 +28,7 @@ const o = n.forwardRef((e, d) => {
28
28
  "th",
29
29
  {
30
30
  ref: a,
31
- ...r,
31
+ ...l,
32
32
  colSpan: e.colSpan,
33
33
  rowSpan: e.rowSpan,
34
34
  id: e.id,
@@ -36,7 +36,7 @@ const o = n.forwardRef((e, d) => {
36
36
  tabIndex: e.tabIndex,
37
37
  role: e.role,
38
38
  ...e.expandable ? { "aria-expanded": e.expanded } : {},
39
- className: f(
39
+ className: s(
40
40
  "k-pivotgrid-cell",
41
41
  {
42
42
  "k-pivotgrid-header-total": e.total,
@@ -48,22 +48,21 @@ const o = n.forwardRef((e, d) => {
48
48
  )
49
49
  },
50
50
  e.expandable && /* @__PURE__ */ n.createElement(
51
- l,
51
+ o,
52
52
  {
53
- ...i,
54
- onClick: m,
53
+ ...d,
54
+ onClick: i,
55
55
  name: `chevron-${e.expanded ? "up" : "down"}`,
56
56
  "aria-hidden": !0,
57
- icon: e.expanded ? h : x
57
+ icon: e.expanded ? f : I
58
58
  }
59
59
  ),
60
60
  e.children
61
61
  );
62
- }), c = {
63
- icon: I
62
+ }), x = {
63
+ icon: v
64
64
  };
65
- o.defaultProps = c;
66
- o.displayName = "KendoReactPivotGridHeaderCell";
65
+ h.displayName = "KendoReactPivotGridHeaderCell";
67
66
  export {
68
- o as PivotGridHeaderCell
67
+ h as PivotGridHeaderCell
69
68
  };