@progress/kendo-react-pivotgrid 8.1.0-develop.22 → 8.1.0-develop.24
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
|
@@ -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 W=require("react"),Y=require("@progress/kendo-react-treeview"),
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react"),Y=require("@progress/kendo-react-treeview"),P=require("@progress/kendo-react-buttons"),Z=require("@progress/kendo-react-indicators"),ee=require("@progress/kendo-react-intl"),N=require("@progress/kendo-react-data-tools"),i=require("@progress/kendo-react-common"),te=require("@progress/kendo-svg-icons"),C=require("../utils/index.js"),s=require("../messages/index.js"),ne=require("../shared/PivotGridConfiguratorEditorEventsContext.js"),oe=require("../shared/PivotGridConfiguratorEditorStateContext.js"),O=require("../hooks/useExpansion.js"),g=require("../hooks/usePivotConfiguratorEditor.js");function ae(n){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const l in n)if(l!=="default"){const d=Object.getOwnPropertyDescriptor(n,l);Object.defineProperty(u,l,d.get?d:{enumerable:!0,get:()=>n[l]})}}return u.default=n,Object.freeze(u)}const t=ae(W),S=t.forwardRef((n,u)=>{const{data:l,dataItem:d,defaultFilter:I}={...r,...n},F=t.useRef(null),m=t.useRef(null),y=ee.useLocalization(),[q,A]=i.useCustomComponent(n.columnMenuItem||r.columnMenuItem),[T,w]=i.useCustomComponent(n.columnMenuForm||r.columnMenuForm),[B,b]=i.useCustomComponent(n.resetButton||r.resetButton),[_,G]=i.useCustomComponent(n.applyButton||r.applyButton),[V,D]=i.useCustomComponent(n.treeView||r.treeView),[j,L]=i.useCustomComponent(n.noData||r.noData);t.useImperativeHandle(m,()=>({props:n,element:F.current})),t.useImperativeHandle(u,()=>m.current);const[h,f]=t.useState(!1),{onAxisFilterFieldsExpandChange:v,onAxisFilterFieldExpand:k}=t.useContext(ne.PivotGridConfiguratorEditorEventsContext),[,E]=t.useContext(oe.PivotGridConfiguratorEditorStateContext),[c,z]=t.useState(I),x=c?c.value.split(","):[],[H,U]=O.useExpansion([],void 0,m,C.compareFields),R={caption:e=>e.dataItem.caption,id:e=>e.dataItem.uniqueName,parent:(e,a)=>a&&a.value,value:e=>e.dataItem.defaultHierarchy||e.dataItem.uniqueName,expanded:e=>H.some(a=>a.uniqueName===e.id),checked:e=>!x.length||(x||[]).some(a=>a===e.dataItem.uniqueName),hasChildren:e=>parseInt(e.dataItem.childrenCardinality,10)>0,children:e=>C.recursiveMap(e.dataItem.children,R,e),checkIndeterminate:e=>{const a=(e.children||[]).length&&e.children.every(o=>o.checked);return a&&(e.checked=!0),(e.children||[]).some(o=>o.checked)&&!a}},p=C.recursiveMap(l,R),M=C.flatMap(p),K=e=>{f(!h),v&&v({value:!h,target:m.current,syntheticEvent:e})},X=e=>{U({type:O.EXPANSION_ACTION.toggle,payload:e.item.dataItem},e.syntheticEvent),k&&k({value:e.item.dataItem,target:m.current,syntheticEvent:e.syntheticEvent})},$=e=>{let a;e.item.checked?a={field:String(d.name),operator:"in",value:M.filter(o=>o.checked).map(o=>String(o.value)).filter(o=>o!==e.item.value&&o!==e.item.parent).join(",")}:a={field:String(d.name),operator:"in",value:M.filter(o=>o.checked).map(o=>String(o.value)).concat([e.item.value]).join(",")},z(a)},J=e=>{f(!1),c&&E({type:g.PIVOT_CONFIGURATOR_ACTION.removeFilter,payload:c},e)},Q=e=>{f(!1),c&&E({type:I?g.PIVOT_CONFIGURATOR_ACTION.changeFilter:g.PIVOT_CONFIGURATOR_ACTION.addFilter,payload:c},e)};return t.createElement("div",{ref:F,id:n.id,tabIndex:n.tabIndex,style:n.style,className:i.classNames("k-columnmenu-item-wrapper",n.className)},t.createElement(q,{...A,title:"Include Fields",iconClass:"k-i-grid-layout",svgIcon:te.gridLayoutIcon,onClick:K}),t.createElement(T,{show:h,actions:t.createElement(t.Fragment,null,t.createElement(B,{type:"reset",onClick:J,...b},y.toLanguageString(s.fieldMenuReset,s.messages[s.fieldMenuReset])),t.createElement(_,{themeColor:"primary",onClick:Q,...G},y.toLanguageString(s.fieldMenuApply,s.messages[s.fieldMenuApply]))),...w},p&&p.length?t.createElement(V,{data:p,checkboxes:!0,onExpandChange:X,onCheckChange:$,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...D}):t.createElement(j,{...L})))}),r={data:[],resetButton:P.Button,applyButton:P.Button,treeView:Y.TreeView,noData:()=>t.createElement(Z.Skeleton,{shape:"rectangle",style:{height:"20px",width:"calc(100% - 16px)",margin:8}}),columnMenuItem:N.ColumnMenuItem,columnMenuForm:N.ColumnMenuForm};S.displayName="KendoReactPivotGridAxisFilterFieldsEditor";exports.PivotGridAxisFilterFieldsEditor=S;
|
|
@@ -7,41 +7,41 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as t from "react";
|
|
10
|
-
import { TreeView as
|
|
10
|
+
import { TreeView as W } from "@progress/kendo-react-treeview";
|
|
11
11
|
import { Button as k } from "@progress/kendo-react-buttons";
|
|
12
|
-
import { Skeleton as
|
|
13
|
-
import { useLocalization as
|
|
14
|
-
import { ColumnMenuItem as
|
|
15
|
-
import { useCustomComponent as l, classNames as
|
|
16
|
-
import { gridLayoutIcon as
|
|
17
|
-
import { recursiveMap as v, flatMap as
|
|
12
|
+
import { Skeleton as Y } from "@progress/kendo-react-indicators";
|
|
13
|
+
import { useLocalization as Z } from "@progress/kendo-react-intl";
|
|
14
|
+
import { ColumnMenuItem as $, ColumnMenuForm as ee } from "@progress/kendo-react-data-tools";
|
|
15
|
+
import { useCustomComponent as l, classNames as te } from "@progress/kendo-react-common";
|
|
16
|
+
import { gridLayoutIcon as ne } from "@progress/kendo-svg-icons";
|
|
17
|
+
import { recursiveMap as v, flatMap as ae, compareFields as oe } from "../utils/index.mjs";
|
|
18
18
|
import { fieldMenuReset as M, messages as N, fieldMenuApply as P } from "../messages/index.mjs";
|
|
19
|
-
import { PivotGridConfiguratorEditorEventsContext as
|
|
20
|
-
import { PivotGridConfiguratorEditorStateContext as
|
|
21
|
-
import { useExpansion as
|
|
19
|
+
import { PivotGridConfiguratorEditorEventsContext as ie } from "../shared/PivotGridConfiguratorEditorEventsContext.mjs";
|
|
20
|
+
import { PivotGridConfiguratorEditorStateContext as re } from "../shared/PivotGridConfiguratorEditorStateContext.mjs";
|
|
21
|
+
import { useExpansion as le, EXPANSION_ACTION as ce } from "../hooks/useExpansion.mjs";
|
|
22
22
|
import { PIVOT_CONFIGURATOR_ACTION as u } from "../hooks/usePivotConfiguratorEditor.mjs";
|
|
23
|
-
const
|
|
24
|
-
(o,
|
|
23
|
+
const me = t.forwardRef(
|
|
24
|
+
(o, S) => {
|
|
25
25
|
const {
|
|
26
|
-
data:
|
|
26
|
+
data: w,
|
|
27
27
|
dataItem: p,
|
|
28
28
|
defaultFilter: h
|
|
29
|
-
} = { ...i, ...o }, f = t.useRef(null), c = t.useRef(null), C =
|
|
30
|
-
t.useImperativeHandle(c, () => ({ props: o, element: f.current })), t.useImperativeHandle(
|
|
29
|
+
} = { ...i, ...o }, f = t.useRef(null), c = t.useRef(null), C = Z(), [A, B] = l(o.columnMenuItem || i.columnMenuItem), [R, T] = l(o.columnMenuForm || i.columnMenuForm), [V, O] = l(o.resetButton || i.resetButton), [D, G] = l(o.applyButton || i.applyButton), [q, L] = l(o.treeView || i.treeView), [_, b] = l(o.noData || i.noData);
|
|
30
|
+
t.useImperativeHandle(c, () => ({ props: o, element: f.current })), t.useImperativeHandle(S, () => c.current);
|
|
31
31
|
const [s, d] = t.useState(!1), {
|
|
32
32
|
onAxisFilterFieldsExpandChange: I,
|
|
33
33
|
onAxisFilterFieldExpand: g
|
|
34
|
-
} = t.useContext(
|
|
34
|
+
} = t.useContext(ie), [, F] = t.useContext(re), [r, H] = t.useState(h), y = r ? r.value.split(",") : [], [j, z] = le(
|
|
35
35
|
[],
|
|
36
36
|
void 0,
|
|
37
37
|
c,
|
|
38
|
-
|
|
38
|
+
oe
|
|
39
39
|
), x = {
|
|
40
40
|
caption: (e) => e.dataItem.caption,
|
|
41
41
|
id: (e) => e.dataItem.uniqueName,
|
|
42
42
|
parent: (e, a) => a && a.value,
|
|
43
43
|
value: (e) => e.dataItem.defaultHierarchy || e.dataItem.uniqueName,
|
|
44
|
-
expanded: (e) =>
|
|
44
|
+
expanded: (e) => j.some((a) => a.uniqueName === e.id),
|
|
45
45
|
checked: (e) => !y.length || (y || []).some((a) => a === e.dataItem.uniqueName),
|
|
46
46
|
hasChildren: (e) => parseInt(e.dataItem.childrenCardinality, 10) > 0,
|
|
47
47
|
children: (e) => v(e.dataItem.children, x, e),
|
|
@@ -49,19 +49,19 @@ const S = t.forwardRef(
|
|
|
49
49
|
const a = (e.children || []).length && e.children.every((n) => n.checked);
|
|
50
50
|
return a && (e.checked = !0), (e.children || []).some((n) => n.checked) && !a;
|
|
51
51
|
}
|
|
52
|
-
}, m = v(
|
|
52
|
+
}, m = v(w, x), E = ae(m), K = (e) => {
|
|
53
53
|
d(!s), I && I({
|
|
54
54
|
value: !s,
|
|
55
55
|
target: c.current,
|
|
56
56
|
syntheticEvent: e
|
|
57
57
|
});
|
|
58
|
-
},
|
|
59
|
-
|
|
58
|
+
}, U = (e) => {
|
|
59
|
+
z({ type: ce.toggle, payload: e.item.dataItem }, e.syntheticEvent), g && g({
|
|
60
60
|
value: e.item.dataItem,
|
|
61
61
|
target: c.current,
|
|
62
62
|
syntheticEvent: e.syntheticEvent
|
|
63
63
|
});
|
|
64
|
-
},
|
|
64
|
+
}, X = (e) => {
|
|
65
65
|
let a;
|
|
66
66
|
e.item.checked ? a = {
|
|
67
67
|
field: String(p.name),
|
|
@@ -71,13 +71,13 @@ const S = t.forwardRef(
|
|
|
71
71
|
field: String(p.name),
|
|
72
72
|
operator: "in",
|
|
73
73
|
value: E.filter((n) => n.checked).map((n) => String(n.value)).concat([e.item.value]).join(",")
|
|
74
|
-
},
|
|
75
|
-
},
|
|
74
|
+
}, H(a);
|
|
75
|
+
}, J = (e) => {
|
|
76
76
|
d(!1), r && F({
|
|
77
77
|
type: u.removeFilter,
|
|
78
78
|
payload: r
|
|
79
79
|
}, e);
|
|
80
|
-
},
|
|
80
|
+
}, Q = (e) => {
|
|
81
81
|
d(!1), r && F({
|
|
82
82
|
type: h ? u.changeFilter : u.addFilter,
|
|
83
83
|
payload: r
|
|
@@ -90,56 +90,56 @@ const S = t.forwardRef(
|
|
|
90
90
|
id: o.id,
|
|
91
91
|
tabIndex: o.tabIndex,
|
|
92
92
|
style: o.style,
|
|
93
|
-
className:
|
|
93
|
+
className: te("k-columnmenu-item-wrapper", o.className)
|
|
94
94
|
},
|
|
95
95
|
/* @__PURE__ */ t.createElement(
|
|
96
|
-
|
|
96
|
+
A,
|
|
97
97
|
{
|
|
98
|
-
...
|
|
98
|
+
...B,
|
|
99
99
|
title: "Include Fields",
|
|
100
100
|
iconClass: "k-i-grid-layout",
|
|
101
|
-
svgIcon:
|
|
102
|
-
onClick:
|
|
101
|
+
svgIcon: ne,
|
|
102
|
+
onClick: K
|
|
103
103
|
}
|
|
104
104
|
),
|
|
105
105
|
/* @__PURE__ */ t.createElement(
|
|
106
|
-
|
|
106
|
+
R,
|
|
107
107
|
{
|
|
108
108
|
show: s,
|
|
109
109
|
actions: /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
110
|
-
|
|
110
|
+
V,
|
|
111
111
|
{
|
|
112
112
|
type: "reset",
|
|
113
|
-
onClick:
|
|
114
|
-
...
|
|
113
|
+
onClick: J,
|
|
114
|
+
...O
|
|
115
115
|
},
|
|
116
116
|
C.toLanguageString(M, N[M])
|
|
117
117
|
), /* @__PURE__ */ t.createElement(
|
|
118
|
-
|
|
118
|
+
D,
|
|
119
119
|
{
|
|
120
120
|
themeColor: "primary",
|
|
121
|
-
onClick:
|
|
122
|
-
...
|
|
121
|
+
onClick: Q,
|
|
122
|
+
...G
|
|
123
123
|
},
|
|
124
124
|
C.toLanguageString(P, N[P])
|
|
125
125
|
)),
|
|
126
|
-
...
|
|
126
|
+
...T
|
|
127
127
|
},
|
|
128
128
|
m && m.length ? /* @__PURE__ */ t.createElement(
|
|
129
|
-
|
|
129
|
+
q,
|
|
130
130
|
{
|
|
131
131
|
data: m,
|
|
132
132
|
checkboxes: !0,
|
|
133
|
-
onExpandChange:
|
|
134
|
-
onCheckChange:
|
|
133
|
+
onExpandChange: U,
|
|
134
|
+
onCheckChange: X,
|
|
135
135
|
textField: "caption",
|
|
136
136
|
expandIcons: !0,
|
|
137
137
|
hasChildrenField: "hasChildren",
|
|
138
138
|
checkIndeterminateField: "checkIndeterminate",
|
|
139
139
|
childrenField: "children",
|
|
140
|
-
...
|
|
140
|
+
...L
|
|
141
141
|
}
|
|
142
|
-
) : /* @__PURE__ */ t.createElement(
|
|
142
|
+
) : /* @__PURE__ */ t.createElement(_, { ...b })
|
|
143
143
|
)
|
|
144
144
|
);
|
|
145
145
|
}
|
|
@@ -147,13 +147,12 @@ const S = t.forwardRef(
|
|
|
147
147
|
data: [],
|
|
148
148
|
resetButton: k,
|
|
149
149
|
applyButton: k,
|
|
150
|
-
treeView:
|
|
151
|
-
noData: () => /* @__PURE__ */ t.createElement(
|
|
152
|
-
columnMenuItem:
|
|
153
|
-
columnMenuForm:
|
|
150
|
+
treeView: W,
|
|
151
|
+
noData: () => /* @__PURE__ */ t.createElement(Y, { shape: "rectangle", style: { height: "20px", width: "calc(100% - 16px)", margin: 8 } }),
|
|
152
|
+
columnMenuItem: $,
|
|
153
|
+
columnMenuForm: ee
|
|
154
154
|
};
|
|
155
|
-
|
|
156
|
-
S.displayName = "KendoReactPivotGridAxisFilterFieldsEditor";
|
|
155
|
+
me.displayName = "KendoReactPivotGridAxisFilterFieldsEditor";
|
|
157
156
|
export {
|
|
158
|
-
|
|
157
|
+
me as PivotGridAxisFilterFieldsEditor
|
|
159
158
|
};
|
package/components/Column.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"),p=require("@progress/kendo-react-common");function b(e){const r=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(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=b(f),c=n.forwardRef((e,r)=>{const t=n.useRef(null),o=n.useRef(null),{id:a,style:u,tabIndex:l,children:s,className:i,path:d=g.path}=e;n.useImperativeHandle(t,()=>({element:o.current,props:{path:d,...e}})),n.useImperativeHandle(r,()=>t.current);const m=p.useMouse(e,t);return n.createElement("col",{ref:o,...m,id:a,style:u,tabIndex:l,children:s,className:i})}),g={path:[]};c.displayName="KendoReactPivotGridColumn";exports.PivotGridColumn=c;
|
package/components/Column.mjs
CHANGED
|
@@ -6,35 +6,34 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { useMouse as
|
|
11
|
-
const
|
|
12
|
-
const n =
|
|
13
|
-
|
|
14
|
-
element:
|
|
15
|
-
props:
|
|
16
|
-
})),
|
|
17
|
-
const
|
|
18
|
-
|
|
9
|
+
import * as e from "react";
|
|
10
|
+
import { useMouse as d } from "@progress/kendo-react-common";
|
|
11
|
+
const p = e.forwardRef((t, o) => {
|
|
12
|
+
const n = e.useRef(null), r = e.useRef(null), { id: s, style: a, tabIndex: l, children: u, className: c, path: m = f.path } = t;
|
|
13
|
+
e.useImperativeHandle(n, () => ({
|
|
14
|
+
element: r.current,
|
|
15
|
+
props: { path: m, ...t }
|
|
16
|
+
})), e.useImperativeHandle(o, () => n.current);
|
|
17
|
+
const i = d(
|
|
18
|
+
t,
|
|
19
19
|
n
|
|
20
20
|
);
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ e.createElement(
|
|
22
22
|
"col",
|
|
23
23
|
{
|
|
24
|
-
ref:
|
|
25
|
-
...
|
|
26
|
-
id:
|
|
27
|
-
style:
|
|
28
|
-
tabIndex:
|
|
29
|
-
children:
|
|
30
|
-
className:
|
|
24
|
+
ref: r,
|
|
25
|
+
...i,
|
|
26
|
+
id: s,
|
|
27
|
+
style: a,
|
|
28
|
+
tabIndex: l,
|
|
29
|
+
children: u,
|
|
30
|
+
className: c
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
|
-
}),
|
|
33
|
+
}), f = {
|
|
34
34
|
path: []
|
|
35
35
|
};
|
|
36
|
-
|
|
37
|
-
a.displayName = "KendoReactPivotGridColumn";
|
|
36
|
+
p.displayName = "KendoReactPivotGridColumn";
|
|
38
37
|
export {
|
|
39
|
-
|
|
38
|
+
p as PivotGridColumn
|
|
40
39
|
};
|
|
@@ -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 P=require("react"),
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),v=require("@progress/kendo-react-buttons"),l=require("@progress/kendo-react-common"),z=require("@progress/kendo-react-intl"),F=require("@progress/kendo-react-form"),q=require("./ConfiguratorEditor.js"),o=require("../messages/index.js");function j(e){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(u,a,s.get?s:{enumerable:!0,get:()=>e[a]})}}return u.default=e,Object.freeze(u)}const t=j(P),h=t.forwardRef((e,u)=>{const{horizontal:a,data:s,rowAxes:d,columnAxes:f,measureAxes:g}={...m,...e},E=t.useRef(null),i=t.useRef(null),n=t.useRef(null),C=z.useLocalization(),[A,k]=l.useCustomComponent(e.editor||m.editor),[x,b]=l.useCustomComponent(e.form||m.form),[R,S]=l.useCustomComponent(e.formElement||m.formElement);t.useImperativeHandle(i,()=>({props:e,element:E.current})),t.useImperativeHandle(u,()=>i.current);const N=(r,c)=>{e.onRowAxesChange&&e.onRowAxesChange({target:i.current,value:r.rowAxes,syntheticEvent:c}),e.onColumnAxesChange&&e.onColumnAxesChange({target:i.current,value:r.columnAxes,syntheticEvent:c}),e.onMeasureAxesChange&&e.onMeasureAxesChange({target:i.current,value:r.measureAxes,syntheticEvent:c}),e.onSortChange&&e.onSortChange({target:i.current,value:r.sort,syntheticEvent:c}),e.onFilterChange&&e.onFilterChange({target:i.current,value:r.filter,syntheticEvent:c})},y={rowAxes:d,columnAxes:f,measureAxes:g,sort:e.sort,filter:e.filter};return t.useEffect(()=>{n.current&&n.current.onChange("rowAxes",{value:d})},[d]),t.useEffect(()=>{n.current&&n.current.onChange("columnAxes",{value:f})},[f]),t.useEffect(()=>{n.current&&n.current.onChange("measureAxes",{value:g})},[g]),t.useEffect(()=>{n.current&&n.current.onChange("sort",{value:e.sort})},[e.sort]),t.useEffect(()=>{n.current&&n.current.onChange("filter",{value:e.filter})},[e.filter]),t.createElement("div",{ref:E,id:e.id,tabIndex:e.tabIndex,style:e.style,className:l.classNames("k-pivotgrid-configurator",e.className)},t.createElement("div",{className:l.classNames("k-pivotgrid-configurator-panel","k-pivotgrid-configurator-push",{"k-pivotgrid-configurator-horizontal":a,"k-pivotgrid-configurator-vertical":!a})},t.createElement("div",{className:"k-pivotgrid-configurator-header"},t.createElement("div",{className:"k-pivotgrid-configurator-header-text"},C.toLanguageString(o.configuratorTitle,o.messages[o.configuratorTitle]))),t.createElement(x,{ref:l.canUseRef(x)?n:void 0,initialValues:y,onSubmit:N,render:r=>t.createElement(t.Fragment,null,t.createElement("div",{className:"k-pivotgrid-configurator-content"},t.createElement(R,{horizontal:a,...S},t.createElement(A,{...r,horizontal:e.horizontal,onFieldsEditorFieldExpand:e.onFieldsEditorFieldExpand,onFieldsEditorFieldCheck:e.onFieldsEditorFieldCheck,onAxisFilterFieldExpand:e.onAxisFilterFieldExpand,onAxisFilterFieldsExpandChange:e.onAxisFilterFieldsExpandChange,data:s,...k}))),t.createElement("div",{className:"k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end"},t.createElement(v.Button,{type:"submit",onClick:r.onFormReset},C.toLanguageString(o.configuratorCancel,o.messages[o.configuratorCancel])),t.createElement(v.Button,{themeColor:"primary",type:"submit",onClick:r.onSubmit},C.toLanguageString(o.configuratorApply,o.messages[o.configuratorApply])))),...b})))}),m={form:F.Form,formElement:F.FormElement,editor:q.PivotGridConfiguratorEditor,horizontal:!1,data:[],columnAxes:[],rowAxes:[],measureAxes:[]};h.displayName="KendoReactPivotGridConfigurator";exports.PivotGridConfigurator=h;
|
|
@@ -8,21 +8,21 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import * as t from "react";
|
|
10
10
|
import { Button as x } from "@progress/kendo-react-buttons";
|
|
11
|
-
import { useCustomComponent as f, classNames as E, canUseRef as
|
|
12
|
-
import { useLocalization as
|
|
13
|
-
import { Form as
|
|
14
|
-
import { PivotGridConfiguratorEditor as
|
|
11
|
+
import { useCustomComponent as f, classNames as E, canUseRef as L } from "@progress/kendo-react-common";
|
|
12
|
+
import { useLocalization as w } from "@progress/kendo-react-intl";
|
|
13
|
+
import { Form as G, FormElement as H } from "@progress/kendo-react-form";
|
|
14
|
+
import { PivotGridConfiguratorEditor as M } from "./ConfiguratorEditor.mjs";
|
|
15
15
|
import { configuratorTitle as v, messages as d, configuratorCancel as F, configuratorApply as h } from "../messages/index.mjs";
|
|
16
|
-
const
|
|
16
|
+
const j = t.forwardRef((e, A) => {
|
|
17
17
|
const {
|
|
18
18
|
horizontal: l,
|
|
19
|
-
data:
|
|
19
|
+
data: k,
|
|
20
20
|
rowAxes: u,
|
|
21
21
|
columnAxes: c,
|
|
22
22
|
measureAxes: m
|
|
23
|
-
} = { ...a, ...e }, g = t.useRef(null), o = t.useRef(null), r = t.useRef(null), s =
|
|
24
|
-
t.useImperativeHandle(o, () => ({ props: e, element: g.current })), t.useImperativeHandle(
|
|
25
|
-
const
|
|
23
|
+
} = { ...a, ...e }, g = t.useRef(null), o = t.useRef(null), r = t.useRef(null), s = w(), [R, N] = f(e.editor || a.editor), [C, S] = f(e.form || a.form), [b, z] = f(e.formElement || a.formElement);
|
|
24
|
+
t.useImperativeHandle(o, () => ({ props: e, element: g.current })), t.useImperativeHandle(A, () => o.current);
|
|
25
|
+
const P = (n, i) => {
|
|
26
26
|
e.onRowAxesChange && e.onRowAxesChange({
|
|
27
27
|
target: o.current,
|
|
28
28
|
value: n.rowAxes,
|
|
@@ -44,7 +44,7 @@ const A = t.forwardRef((e, k) => {
|
|
|
44
44
|
value: n.filter,
|
|
45
45
|
syntheticEvent: i
|
|
46
46
|
});
|
|
47
|
-
},
|
|
47
|
+
}, y = {
|
|
48
48
|
rowAxes: u,
|
|
49
49
|
columnAxes: c,
|
|
50
50
|
measureAxes: m,
|
|
@@ -89,17 +89,17 @@ const A = t.forwardRef((e, k) => {
|
|
|
89
89
|
/* @__PURE__ */ t.createElement(
|
|
90
90
|
C,
|
|
91
91
|
{
|
|
92
|
-
ref:
|
|
93
|
-
initialValues:
|
|
94
|
-
onSubmit:
|
|
92
|
+
ref: L(C) ? r : void 0,
|
|
93
|
+
initialValues: y,
|
|
94
|
+
onSubmit: P,
|
|
95
95
|
render: (n) => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", { className: "k-pivotgrid-configurator-content" }, /* @__PURE__ */ t.createElement(
|
|
96
|
-
|
|
96
|
+
b,
|
|
97
97
|
{
|
|
98
98
|
horizontal: l,
|
|
99
|
-
...
|
|
99
|
+
...z
|
|
100
100
|
},
|
|
101
101
|
/* @__PURE__ */ t.createElement(
|
|
102
|
-
|
|
102
|
+
R,
|
|
103
103
|
{
|
|
104
104
|
...n,
|
|
105
105
|
horizontal: e.horizontal,
|
|
@@ -107,28 +107,27 @@ const A = t.forwardRef((e, k) => {
|
|
|
107
107
|
onFieldsEditorFieldCheck: e.onFieldsEditorFieldCheck,
|
|
108
108
|
onAxisFilterFieldExpand: e.onAxisFilterFieldExpand,
|
|
109
109
|
onAxisFilterFieldsExpandChange: e.onAxisFilterFieldsExpandChange,
|
|
110
|
-
data:
|
|
111
|
-
...
|
|
110
|
+
data: k,
|
|
111
|
+
...N
|
|
112
112
|
}
|
|
113
113
|
)
|
|
114
114
|
)), /* @__PURE__ */ t.createElement("div", { className: "k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end" }, /* @__PURE__ */ t.createElement(x, { type: "submit", onClick: n.onFormReset }, s.toLanguageString(F, d[F])), /* @__PURE__ */ t.createElement(x, { themeColor: "primary", type: "submit", onClick: n.onSubmit }, s.toLanguageString(h, d[h])))),
|
|
115
|
-
...
|
|
115
|
+
...S
|
|
116
116
|
}
|
|
117
117
|
)
|
|
118
118
|
)
|
|
119
119
|
);
|
|
120
120
|
}), a = {
|
|
121
|
-
form:
|
|
122
|
-
formElement:
|
|
123
|
-
editor:
|
|
121
|
+
form: G,
|
|
122
|
+
formElement: H,
|
|
123
|
+
editor: M,
|
|
124
124
|
horizontal: !1,
|
|
125
125
|
data: [],
|
|
126
126
|
columnAxes: [],
|
|
127
127
|
rowAxes: [],
|
|
128
128
|
measureAxes: []
|
|
129
129
|
};
|
|
130
|
-
|
|
131
|
-
A.displayName = "KendoReactPivotGridConfigurator";
|
|
130
|
+
j.displayName = "KendoReactPivotGridConfigurator";
|
|
132
131
|
export {
|
|
133
|
-
|
|
132
|
+
j as PivotGridConfigurator
|
|
134
133
|
};
|
|
@@ -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"),a=require("@progress/kendo-react-common"),g=require("@progress/kendo-react-intl"),b=require("@progress/kendo-svg-icons"),c=require("../messages/index.js");function v(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const t=v(f),u=t.forwardRef((e,o)=>{const n=t.useRef(null),r=t.useRef(null),i=g.useLocalization();t.useImperativeHandle(n,()=>({props:e,element:r.current})),t.useImperativeHandle(o,()=>n.current);const[s,l]=a.useCustomComponent(e.icon||I.icon),d=t.useMemo(()=>a.classNames("k-pivotgrid-configurator-button",e.className),[e.className]),m=a.useMouse(e,n);return t.createElement("div",{ref:r,id:e.id,className:d,tabIndex:e.tabIndex,...m},t.createElement("span",null,i.toLanguageString(c.configuratorButtonLabel,c.messages[c.configuratorButtonLabel]),t.createElement(s,{name:"gear",icon:b.gearIcon,...l})))}),I={icon:a.IconWrap};u.displayName="KendoReactPivotGridConfiguratorButton";exports.PivotGridConfiguratorButton=u;
|
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as e from "react";
|
|
10
|
-
import { useCustomComponent as
|
|
11
|
-
import { useLocalization as
|
|
12
|
-
import { gearIcon as
|
|
13
|
-
import { configuratorButtonLabel as a, messages as
|
|
14
|
-
const
|
|
15
|
-
const o = e.useRef(null), n = e.useRef(null),
|
|
16
|
-
e.useImperativeHandle(o, () => ({ props: t, element: n.current })), e.useImperativeHandle(
|
|
17
|
-
const [
|
|
18
|
-
() =>
|
|
10
|
+
import { useCustomComponent as l, classNames as f, useMouse as d, IconWrap as g } from "@progress/kendo-react-common";
|
|
11
|
+
import { useLocalization as I } from "@progress/kendo-react-intl";
|
|
12
|
+
import { gearIcon as v } from "@progress/kendo-svg-icons";
|
|
13
|
+
import { configuratorButtonLabel as a, messages as p } from "../messages/index.mjs";
|
|
14
|
+
const C = e.forwardRef((t, r) => {
|
|
15
|
+
const o = e.useRef(null), n = e.useRef(null), c = I();
|
|
16
|
+
e.useImperativeHandle(o, () => ({ props: t, element: n.current })), e.useImperativeHandle(r, () => o.current);
|
|
17
|
+
const [s, i] = l(t.icon || N.icon), m = e.useMemo(
|
|
18
|
+
() => f("k-pivotgrid-configurator-button", t.className),
|
|
19
19
|
[t.className]
|
|
20
|
-
),
|
|
20
|
+
), u = d(
|
|
21
21
|
t,
|
|
22
22
|
o
|
|
23
23
|
);
|
|
@@ -26,17 +26,16 @@ const r = e.forwardRef((t, c) => {
|
|
|
26
26
|
{
|
|
27
27
|
ref: n,
|
|
28
28
|
id: t.id,
|
|
29
|
-
className:
|
|
29
|
+
className: m,
|
|
30
30
|
tabIndex: t.tabIndex,
|
|
31
|
-
...
|
|
31
|
+
...u
|
|
32
32
|
},
|
|
33
|
-
/* @__PURE__ */ e.createElement("span", null,
|
|
33
|
+
/* @__PURE__ */ e.createElement("span", null, c.toLanguageString(a, p[a]), /* @__PURE__ */ e.createElement(s, { name: "gear", icon: v, ...i }))
|
|
34
34
|
);
|
|
35
|
-
}),
|
|
36
|
-
icon:
|
|
35
|
+
}), N = {
|
|
36
|
+
icon: g
|
|
37
37
|
};
|
|
38
|
-
|
|
39
|
-
r.displayName = "KendoReactPivotGridConfiguratorButton";
|
|
38
|
+
C.displayName = "KendoReactPivotGridConfiguratorButton";
|
|
40
39
|
export {
|
|
41
|
-
|
|
40
|
+
C as PivotGridConfiguratorButton
|
|
42
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
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const te=require("react"),p=require("@progress/kendo-react-form"),C=require("@progress/kendo-react-labels"),oe=require("@progress/kendo-react-intl"),E=require("@progress/kendo-react-common"),v=require("./AxesEditor.js"),ne=require("./FieldsEditor.js"),o=require("../messages/index.js"),d=require("../hooks/usePivotConfiguratorEditor.js"),se=require("../shared/PivotGridConfiguratorEditorEventsContext.js"),re=require("../shared/PivotGridConfiguratorEditorStateContext.js");function ae(r){const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const c in r)if(c!=="default"){const A=Object.getOwnPropertyDescriptor(r,c);Object.defineProperty(x,c,A.get?A:{enumerable:!0,get:()=>r[c]})}}return x.default=r,Object.freeze(x)}const e=ae(te),w=e.forwardRef((r,x)=>{const{onFieldsEditorFieldCheck:c=a.onFieldsEditorFieldCheckAction,onFieldsEditorFieldCheckAction:A=a.onFieldsEditorFieldCheckAction,onFieldsEditorFieldExpand:b,onFieldsEditorFieldExpandAction:R,onAxisFilterFieldExpand:I,onAxisFilterFieldsExpandChange:N}=r,n={onFieldsEditorFieldCheck:c,onFieldsEditorFieldCheckAction:A,horizontal:a.horizontal,axesEditor:a.axesEditor,...r},[k,G]=E.useCustomComponent(n.fieldsLabel||a.fieldsLabel),[_,S]=E.useCustomComponent(n.fieldsEditor||a.fieldsEditor),[q,z]=E.useCustomComponent(n.columnAxesLabel||a.columnAxesLabel),[D,U]=E.useCustomComponent(n.columnAxesEditor||a.columnAxesEditor),[V,Z]=E.useCustomComponent(n.rowAxesLabel||a.rowAxesLabel),[j,B]=E.useCustomComponent(n.rowAxesEditor||a.rowAxesEditor),[H,K]=E.useCustomComponent(n.measureAxesLabel||a.measureAxesLabel),[J,Q]=E.useCustomComponent(n.measureAxesEditor||a.measureAxesEditor),W=e.useRef(null),u=e.useRef(null),g=oe.useLocalization(),[s,i]=d.usePivotConfiguratorEditor(n,u);e.useImperativeHandle(u,()=>({element:W.current,props:n,state:s})),e.useImperativeHandle(x,()=>u.current);const F=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:"columnAxes"})},L=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:null})},h=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:"rowAxes"})},y=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:null})},M=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:"measureAxes"})},T=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:null})},X=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};if(R){const l=R(m,n,s);l&&(Array.isArray(l)?l.filter(Boolean).map(f=>f&&i({...f},t.syntheticEvent)):i({...l},t.syntheticEvent))}b&&b({target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent})},Y=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};if(A){const l=A(m,n,s);l&&(Array.isArray(l)?l.filter(Boolean).map(f=>f&&i({...f},t.syntheticEvent)):i({...l},t.syntheticEvent))}c&&c(m)},$=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};I&&I(m)},ee=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};N&&N(m)},O=n.horizontal?"div":e.Fragment,P=n.horizontal?{className:"k-form-field-wrapper"}:{};return e.createElement(se.PivotGridConfiguratorEditorEventsContext.Provider,{value:{onAxisFilterFieldExpand:$,onAxisFilterFieldsExpandChange:ee}},e.createElement(re.PivotGridConfiguratorEditorStateContext.Provider,{value:[s,i]},e.createElement(O,{...P},e.createElement("div",{className:"k-form-field"},e.createElement(k,{name:"",component:C.Label,...G},g.toLanguageString(o.configuratorEditorSearchTitle,o.messages[o.configuratorEditorSearchTitle]))),e.createElement("div",{className:"k-form-field"},e.createElement("div",{className:"k-fields-list-wrapper"},e.createElement(_,{data:n.data,onExpand:X,onCheck:Y,columnAxes:s.columnAxes,rowAxes:s.rowAxes,measureAxes:s.measureAxes,...S})))),e.createElement(O,{...P},e.createElement("div",{className:"k-form-field",onMouseEnter:F,onMouseLeave:L},e.createElement(p.Field,{name:"columnAxes",field:"columnAxes",component:q,...z},g.toLanguageString(o.configuratorColumnsTitle,o.messages[o.configuratorColumnsTitle]))),n.valueGetter("columnAxes").length?e.createElement(p.Field,{name:"columnAxes",field:"columnAxes",component:D,onMouseEnter:F,onMouseLeave:L,className:"k-column-fields",...U}):e.createElement("div",{className:"k-settings-description",onMouseEnter:F,onMouseLeave:L},g.toLanguageString(o.configuratorMissingFields,o.messages[o.configuratorMissingFields])),e.createElement("div",{className:"k-form-field",onMouseEnter:h,onMouseLeave:y},e.createElement(p.Field,{name:"rowAxes",field:"rowAxes",component:V,...Z},g.toLanguageString(o.configuratorRowsTitle,o.messages[o.configuratorRowsTitle]))),n.valueGetter("rowAxes").length?e.createElement(p.Field,{name:"rowAxes",field:"rowAxes",component:j,onMouseEnter:h,onMouseLeave:y,className:"k-column-fields",...B}):e.createElement("div",{className:"k-settings-description",onMouseEnter:h,onMouseLeave:y},g.toLanguageString(o.configuratorMissingFields,o.messages[o.configuratorMissingFields]))),e.createElement(O,{...P},e.createElement("div",{className:"k-form-field",onMouseEnter:M,onMouseLeave:T},e.createElement(p.Field,{name:"measureAxes",field:"measureAxes",component:H,...K},g.toLanguageString(o.configuratorMeasuresTitle,o.messages[o.configuratorMeasuresTitle]))),n.valueGetter("measureAxes").length?e.createElement(p.Field,{name:"measureAxes",field:"measureAxes",component:J,onMouseEnter:M,onMouseLeave:T,className:"k-column-fields",...Q}):e.createElement("div",{className:"k-settings-description",onMouseEnter:M,onMouseLeave:T},g.toLanguageString(o.configuratorMissingFields,o.messages[o.configuratorMissingFields])))))}),a={data:[],horizontal:!1,fieldsLabel:C.Label,fieldsEditor:ne.PivotGridFieldsEditor,columnAxesLabel:C.Label,columnAxesEditor:v.PivotGridAxesEditor,rowAxesLabel:C.Label,rowAxesEditor:v.PivotGridAxesEditor,measureAxesLabel:C.Label,measureAxesEditor:v.PivotGridAxesEditor,axesEditor:v.PivotGridAxesEditor,onFieldsEditorFieldCheckAction:r=>({type:d.PIVOT_CONFIGURATOR_ACTION.toggleSelection,payload:r.value}),onFieldsEditorFieldExpandAction:r=>({type:d.PIVOT_CONFIGURATOR_ACTION.toggleExpansion,payload:r.value})};w.displayName="KendoReactPivotGridConfiguratorEditor";exports.PivotGridConfiguratorEditor=w;
|