@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.
- package/components/AxisFilterFieldsEditor.js +1 -1
- package/components/AxisFilterFieldsEditor.mjs +49 -50
- package/components/Column.js +1 -1
- package/components/Column.mjs +21 -22
- package/components/Configurator.js +1 -1
- package/components/Configurator.mjs +24 -25
- package/components/ConfiguratorButton.js +1 -1
- package/components/ConfiguratorButton.mjs +17 -18
- package/components/ConfiguratorEditor.js +1 -1
- package/components/ConfiguratorEditor.mjs +98 -93
- package/components/Container.js +1 -1
- package/components/Container.mjs +20 -19
- package/components/FieldsEditor.js +1 -1
- package/components/FieldsEditor.mjs +27 -28
- package/components/HeaderCell.js +1 -1
- package/components/HeaderCell.mjs +17 -18
- package/dist/cdn/js/kendo-react-pivotgrid.js +1 -1
- package/package-metadata.mjs +1 -1
- package/package.json +9 -9
|
@@ -7,88 +7,94 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as e from "react";
|
|
10
|
-
import { Field as
|
|
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
|
|
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
|
|
16
|
-
import { configuratorEditorSearchTitle as
|
|
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
|
|
20
|
+
const ce = e.forwardRef((E, D) => {
|
|
21
21
|
const {
|
|
22
|
-
onFieldsEditorFieldCheck:
|
|
23
|
-
onFieldsEditorFieldCheckAction:
|
|
22
|
+
onFieldsEditorFieldCheck: v = r.onFieldsEditorFieldCheckAction,
|
|
23
|
+
onFieldsEditorFieldCheckAction: h = r.onFieldsEditorFieldCheckAction,
|
|
24
24
|
onFieldsEditorFieldExpand: P,
|
|
25
|
-
onFieldsEditorFieldExpandAction:
|
|
26
|
-
onAxisFilterFieldExpand:
|
|
27
|
-
onAxisFilterFieldsExpandChange:
|
|
28
|
-
} =
|
|
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:
|
|
37
|
+
props: o,
|
|
32
38
|
state: n
|
|
33
|
-
})), e.useImperativeHandle(
|
|
34
|
-
const
|
|
35
|
-
n.dragItem &&
|
|
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 &&
|
|
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 &&
|
|
46
|
-
},
|
|
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:
|
|
54
|
+
target: t.target,
|
|
49
55
|
currentTarget: i.current,
|
|
50
|
-
value:
|
|
51
|
-
syntheticEvent:
|
|
56
|
+
value: t.value,
|
|
57
|
+
syntheticEvent: t.syntheticEvent
|
|
52
58
|
};
|
|
53
|
-
if (
|
|
54
|
-
const a =
|
|
55
|
-
a && (Array.isArray(a) ? a.filter(Boolean).map((A) => A &&
|
|
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:
|
|
64
|
+
target: t.target,
|
|
59
65
|
currentTarget: i.current,
|
|
60
|
-
value:
|
|
61
|
-
syntheticEvent:
|
|
66
|
+
value: t.value,
|
|
67
|
+
syntheticEvent: t.syntheticEvent
|
|
62
68
|
});
|
|
63
|
-
}, oe = (
|
|
69
|
+
}, oe = (t) => {
|
|
64
70
|
const l = {
|
|
65
|
-
target:
|
|
71
|
+
target: t.target,
|
|
66
72
|
currentTarget: i.current,
|
|
67
|
-
value:
|
|
68
|
-
syntheticEvent:
|
|
73
|
+
value: t.value,
|
|
74
|
+
syntheticEvent: t.syntheticEvent
|
|
69
75
|
};
|
|
70
|
-
if (
|
|
71
|
-
const a =
|
|
72
|
-
a && (Array.isArray(a) ? a.filter(Boolean).map((A) => A &&
|
|
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
|
-
|
|
75
|
-
}, ne = (
|
|
80
|
+
v && v(l);
|
|
81
|
+
}, ne = (t) => {
|
|
76
82
|
const l = {
|
|
77
|
-
target:
|
|
83
|
+
target: t.target,
|
|
78
84
|
currentTarget: i.current,
|
|
79
|
-
value:
|
|
80
|
-
syntheticEvent:
|
|
85
|
+
value: t.value,
|
|
86
|
+
syntheticEvent: t.syntheticEvent
|
|
81
87
|
};
|
|
82
|
-
|
|
83
|
-
}, re = (
|
|
88
|
+
R && R(l);
|
|
89
|
+
}, re = (t) => {
|
|
84
90
|
const l = {
|
|
85
|
-
target:
|
|
91
|
+
target: t.target,
|
|
86
92
|
currentTarget: i.current,
|
|
87
|
-
value:
|
|
88
|
-
syntheticEvent:
|
|
93
|
+
value: t.value,
|
|
94
|
+
syntheticEvent: t.syntheticEvent
|
|
89
95
|
};
|
|
90
|
-
|
|
91
|
-
},
|
|
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,
|
|
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:
|
|
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(
|
|
117
|
+
)))), /* @__PURE__ */ e.createElement(b, { ...k }, /* @__PURE__ */ e.createElement(
|
|
112
118
|
"div",
|
|
113
119
|
{
|
|
114
120
|
className: "k-form-field",
|
|
115
|
-
onMouseEnter:
|
|
116
|
-
onMouseLeave:
|
|
121
|
+
onMouseEnter: F,
|
|
122
|
+
onMouseLeave: L
|
|
117
123
|
},
|
|
118
124
|
/* @__PURE__ */ e.createElement(
|
|
119
|
-
|
|
125
|
+
p,
|
|
120
126
|
{
|
|
121
127
|
name: "columnAxes",
|
|
122
128
|
field: "columnAxes",
|
|
123
129
|
component: _,
|
|
124
130
|
...K
|
|
125
131
|
},
|
|
126
|
-
m.toLanguageString(
|
|
132
|
+
m.toLanguageString(S, u[S])
|
|
127
133
|
)
|
|
128
|
-
),
|
|
129
|
-
|
|
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:
|
|
135
|
-
onMouseLeave:
|
|
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:
|
|
144
|
-
onMouseLeave:
|
|
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:
|
|
152
|
-
onMouseLeave:
|
|
157
|
+
onMouseEnter: C,
|
|
158
|
+
onMouseLeave: y
|
|
153
159
|
},
|
|
154
160
|
/* @__PURE__ */ e.createElement(
|
|
155
|
-
|
|
161
|
+
p,
|
|
156
162
|
{
|
|
157
163
|
name: "rowAxes",
|
|
158
164
|
field: "rowAxes",
|
|
159
165
|
component: j,
|
|
160
166
|
...q
|
|
161
167
|
},
|
|
162
|
-
m.toLanguageString(
|
|
168
|
+
m.toLanguageString(G, u[G])
|
|
163
169
|
)
|
|
164
|
-
),
|
|
165
|
-
|
|
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:
|
|
171
|
-
onMouseLeave:
|
|
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:
|
|
180
|
-
onMouseLeave:
|
|
185
|
+
onMouseEnter: C,
|
|
186
|
+
onMouseLeave: y
|
|
181
187
|
},
|
|
182
188
|
m.toLanguageString(x, u[x])
|
|
183
|
-
)), /* @__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:
|
|
188
|
-
onMouseLeave:
|
|
193
|
+
onMouseEnter: M,
|
|
194
|
+
onMouseLeave: w
|
|
189
195
|
},
|
|
190
196
|
/* @__PURE__ */ e.createElement(
|
|
191
|
-
|
|
197
|
+
p,
|
|
192
198
|
{
|
|
193
199
|
name: "measureAxes",
|
|
194
200
|
field: "measureAxes",
|
|
195
201
|
component: W,
|
|
196
202
|
...X
|
|
197
203
|
},
|
|
198
|
-
m.toLanguageString(
|
|
204
|
+
m.toLanguageString(z, u[z])
|
|
199
205
|
)
|
|
200
|
-
),
|
|
201
|
-
|
|
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:
|
|
207
|
-
onMouseLeave:
|
|
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:
|
|
216
|
-
onMouseLeave:
|
|
221
|
+
onMouseEnter: M,
|
|
222
|
+
onMouseLeave: w
|
|
217
223
|
},
|
|
218
224
|
m.toLanguageString(x, u[x])
|
|
219
225
|
)))
|
|
220
226
|
);
|
|
221
|
-
}),
|
|
227
|
+
}), r = {
|
|
222
228
|
data: [],
|
|
223
229
|
horizontal: !1,
|
|
224
230
|
fieldsLabel: g,
|
|
225
|
-
fieldsEditor:
|
|
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: (
|
|
234
|
-
onFieldsEditorFieldExpandAction: (
|
|
239
|
+
onFieldsEditorFieldCheckAction: (E) => ({ type: c.toggleSelection, payload: E.value }),
|
|
240
|
+
onFieldsEditorFieldExpandAction: (E) => ({ type: c.toggleExpansion, payload: E.value })
|
|
235
241
|
};
|
|
236
|
-
|
|
237
|
-
D.displayName = "KendoReactPivotGridConfiguratorEditor";
|
|
242
|
+
ce.displayName = "KendoReactPivotGridConfiguratorEditor";
|
|
238
243
|
export {
|
|
239
|
-
|
|
244
|
+
ce as PivotGridConfiguratorEditor
|
|
240
245
|
};
|
package/components/Container.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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;
|
package/components/Container.mjs
CHANGED
|
@@ -6,35 +6,36 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { classNames as
|
|
11
|
-
const
|
|
12
|
-
const o =
|
|
13
|
-
|
|
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:
|
|
18
|
-
style:
|
|
19
|
-
tabIndex:
|
|
20
|
-
className:
|
|
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":
|
|
24
|
-
"k-flex-row-reverse":
|
|
25
|
-
"k-flex-column":
|
|
26
|
-
"k-flex-column-reverse":
|
|
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
|
-
|
|
30
|
+
c
|
|
29
31
|
)
|
|
30
32
|
},
|
|
31
|
-
|
|
33
|
+
f
|
|
32
34
|
);
|
|
33
|
-
}),
|
|
35
|
+
}), d = {
|
|
34
36
|
configuratorPosition: "right"
|
|
35
37
|
};
|
|
36
|
-
|
|
37
|
-
r.displayName = "KendoReactPivotGridContainer";
|
|
38
|
+
u.displayName = "KendoReactPivotGridContainer";
|
|
38
39
|
export {
|
|
39
|
-
|
|
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"),
|
|
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
|
|
11
|
-
import { useCustomComponent as h, canUseRef as
|
|
12
|
-
import { extractDefaultFields as
|
|
13
|
-
import { PivotGridConfiguratorEditorStateContext as
|
|
14
|
-
const
|
|
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:
|
|
17
|
-
rowAxes:
|
|
18
|
-
columnAxes:
|
|
19
|
-
measureAxes:
|
|
16
|
+
data: p,
|
|
17
|
+
rowAxes: x,
|
|
18
|
+
columnAxes: C,
|
|
19
|
+
measureAxes: v,
|
|
20
20
|
onExpand: m,
|
|
21
21
|
onCheck: s
|
|
22
|
-
} = { ...
|
|
23
|
-
t.useImperativeHandle(n, () => ({ props: r, element:
|
|
24
|
-
const [
|
|
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) =>
|
|
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
|
-
},
|
|
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
|
-
},
|
|
50
|
-
return /* @__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:
|
|
54
|
-
data:
|
|
53
|
+
ref: D(l) ? i : void 0,
|
|
54
|
+
data: c,
|
|
55
55
|
checkboxes: !0,
|
|
56
56
|
onExpandChange: F,
|
|
57
|
-
onCheckChange:
|
|
57
|
+
onCheckChange: P,
|
|
58
58
|
textField: "caption",
|
|
59
59
|
expandIcons: !0,
|
|
60
60
|
hasChildrenField: "hasChildren",
|
|
61
61
|
checkIndeterminateField: "checkIndeterminate",
|
|
62
62
|
childrenField: "children",
|
|
63
|
-
...
|
|
63
|
+
...g
|
|
64
64
|
}
|
|
65
|
-
) : /* @__PURE__ */ t.createElement(
|
|
66
|
-
}),
|
|
65
|
+
) : /* @__PURE__ */ t.createElement(E, { ...y }));
|
|
66
|
+
}), d = {
|
|
67
67
|
data: [],
|
|
68
68
|
rowAxes: [],
|
|
69
69
|
columnAxes: [],
|
|
70
70
|
measureAxes: [],
|
|
71
|
-
treeView:
|
|
71
|
+
treeView: V,
|
|
72
72
|
noData: () => /* @__PURE__ */ t.createElement("div", null, "NO DATA")
|
|
73
73
|
};
|
|
74
|
-
|
|
75
|
-
I.displayName = "KendoReactPivotGridFieldsEditor";
|
|
74
|
+
b.displayName = "KendoReactPivotGridFieldsEditor";
|
|
76
75
|
export {
|
|
77
|
-
|
|
76
|
+
b as PivotGridFieldsEditor
|
|
78
77
|
};
|
package/components/HeaderCell.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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
|
|
11
|
-
import { chevronUpIcon as
|
|
12
|
-
const
|
|
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(
|
|
18
|
-
const [
|
|
17
|
+
})), n.useImperativeHandle(c, () => t.current);
|
|
18
|
+
const [o, d] = m(e.icon || x.icon), l = u(
|
|
19
19
|
e,
|
|
20
20
|
t
|
|
21
|
-
),
|
|
21
|
+
), i = (r) => {
|
|
22
22
|
e.onIconClick && e.onIconClick.call(void 0, {
|
|
23
|
-
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
|
-
...
|
|
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:
|
|
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
|
-
|
|
51
|
+
o,
|
|
52
52
|
{
|
|
53
|
-
...
|
|
54
|
-
onClick:
|
|
53
|
+
...d,
|
|
54
|
+
onClick: i,
|
|
55
55
|
name: `chevron-${e.expanded ? "up" : "down"}`,
|
|
56
56
|
"aria-hidden": !0,
|
|
57
|
-
icon: e.expanded ?
|
|
57
|
+
icon: e.expanded ? f : I
|
|
58
58
|
}
|
|
59
59
|
),
|
|
60
60
|
e.children
|
|
61
61
|
);
|
|
62
|
-
}),
|
|
63
|
-
icon:
|
|
62
|
+
}), x = {
|
|
63
|
+
icon: v
|
|
64
64
|
};
|
|
65
|
-
|
|
66
|
-
o.displayName = "KendoReactPivotGridHeaderCell";
|
|
65
|
+
h.displayName = "KendoReactPivotGridHeaderCell";
|
|
67
66
|
export {
|
|
68
|
-
|
|
67
|
+
h as PivotGridHeaderCell
|
|
69
68
|
};
|