@progress/kendo-react-pivotgrid 7.2.4-develop.3 → 7.3.0-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/PivotGrid.js +8 -0
  2. package/PivotGrid.mjs +252 -0
  3. package/components/AxesEditor.js +8 -0
  4. package/components/AxesEditor.mjs +43 -0
  5. package/components/AxisEditor.js +8 -0
  6. package/components/AxisEditor.mjs +108 -0
  7. package/components/AxisFilterFieldsEditor.js +8 -0
  8. package/components/AxisFilterFieldsEditor.mjs +159 -0
  9. package/components/Cell.js +8 -0
  10. package/components/Cell.mjs +45 -0
  11. package/components/Column.js +8 -0
  12. package/components/Column.mjs +40 -0
  13. package/components/Configurator.js +8 -0
  14. package/components/Configurator.mjs +134 -0
  15. package/components/ConfiguratorButton.js +8 -0
  16. package/components/ConfiguratorButton.mjs +42 -0
  17. package/components/ConfiguratorEditor.js +8 -0
  18. package/components/ConfiguratorEditor.mjs +240 -0
  19. package/components/Container.js +8 -0
  20. package/components/Container.mjs +40 -0
  21. package/components/EditorContext.js +8 -0
  22. package/components/EditorContext.mjs +13 -0
  23. package/components/FieldsEditor.js +8 -0
  24. package/components/FieldsEditor.mjs +78 -0
  25. package/components/HeaderCell.js +8 -0
  26. package/components/HeaderCell.mjs +69 -0
  27. package/components/Row.js +8 -0
  28. package/components/Row.mjs +42 -0
  29. package/dist/cdn/js/kendo-react-pivotgrid.js +8 -5
  30. package/hooks/useExpansion.js +8 -0
  31. package/hooks/useExpansion.mjs +46 -0
  32. package/hooks/useHeaders.js +8 -0
  33. package/hooks/useHeaders.mjs +18 -0
  34. package/hooks/useHorizontalScrollSync.js +8 -0
  35. package/hooks/useHorizontalScrollSync.mjs +25 -0
  36. package/hooks/usePivotConfiguratorEditor.js +8 -0
  37. package/hooks/usePivotConfiguratorEditor.mjs +67 -0
  38. package/hooks/usePivotLocalDataService.js +8 -0
  39. package/hooks/usePivotLocalDataService.mjs +94 -0
  40. package/hooks/usePivotOLAPService.js +8 -0
  41. package/hooks/usePivotOLAPService.mjs +230 -0
  42. package/hooks/useVerticalScrollSync.js +8 -0
  43. package/hooks/useVerticalScrollSync.mjs +25 -0
  44. package/index.d.mts +1342 -5
  45. package/index.d.ts +1342 -22
  46. package/index.js +8 -5
  47. package/index.mjs +46 -1583
  48. package/messages/index.js +8 -0
  49. package/messages/index.mjs +39 -0
  50. package/package-metadata.js +8 -0
  51. package/package-metadata.mjs +19 -0
  52. package/package.json +9 -9
  53. package/shared/PivotGridConfiguratorEditorEventsContext.js +8 -0
  54. package/shared/PivotGridConfiguratorEditorEventsContext.mjs +13 -0
  55. package/shared/PivotGridConfiguratorEditorStateContext.js +8 -0
  56. package/shared/PivotGridConfiguratorEditorStateContext.mjs +28 -0
  57. package/utils/index.js +8 -0
  58. package/utils/index.mjs +59 -0
  59. package/PivotGrid.d.ts +0 -181
  60. package/components/AxesEditor.d.ts +0 -44
  61. package/components/AxisEditor.d.ts +0 -56
  62. package/components/AxisFilterFieldsEditor.d.ts +0 -118
  63. package/components/Cell.d.ts +0 -69
  64. package/components/Column.d.ts +0 -46
  65. package/components/Configurator.d.ts +0 -129
  66. package/components/ConfiguratorButton.d.ts +0 -44
  67. package/components/ConfiguratorEditor.d.ts +0 -130
  68. package/components/Container.d.ts +0 -50
  69. package/components/EditorContext.d.ts +0 -11
  70. package/components/FieldsEditor.d.ts +0 -78
  71. package/components/HeaderCell.d.ts +0 -100
  72. package/components/Row.d.ts +0 -54
  73. package/hooks/index.d.ts +0 -6
  74. package/hooks/useExpansion.d.ts +0 -23
  75. package/hooks/useHeaders.d.ts +0 -16
  76. package/hooks/useHorizontalScrollSync.d.ts +0 -9
  77. package/hooks/usePivotConfiguratorEditor.d.ts +0 -87
  78. package/hooks/usePivotLocalDataService.d.ts +0 -83
  79. package/hooks/usePivotOLAPService.d.ts +0 -45
  80. package/hooks/useVerticalScrollSync.d.ts +0 -9
  81. package/messages/index.d.ts +0 -74
  82. package/models/index.d.ts +0 -48
  83. package/package-metadata.d.ts +0 -9
  84. package/shared/PivotGridConfiguratorEditorEventsContext.d.ts +0 -17
  85. package/shared/PivotGridConfiguratorEditorStateContext.d.ts +0 -10
  86. package/shared/index.d.ts +0 -6
  87. package/utils/index.d.ts +0 -51
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as t from "react";
10
+ import { useMouse as d, classNames as n } from "@progress/kendo-react-common";
11
+ const c = t.forwardRef((e, r) => {
12
+ const a = t.useRef(null), l = t.useRef(null);
13
+ t.useImperativeHandle(a, () => ({
14
+ element: l.current,
15
+ props: e
16
+ })), t.useImperativeHandle(r, () => a.current);
17
+ const i = d(
18
+ e,
19
+ a
20
+ );
21
+ return /* @__PURE__ */ t.createElement(
22
+ "td",
23
+ {
24
+ ref: l,
25
+ ...i,
26
+ id: e.id,
27
+ style: e.style,
28
+ tabIndex: e.tabIndex,
29
+ role: e.role,
30
+ "aria-describedby": e.ariaDescribedby,
31
+ className: n(
32
+ "k-pivotgrid-cell",
33
+ {
34
+ "k-pivotgrid-header-total": e.total
35
+ },
36
+ e.className
37
+ )
38
+ },
39
+ e.children
40
+ );
41
+ });
42
+ c.displayName = "KendoReactPivotGridCell";
43
+ export {
44
+ c as PivotGridCell
45
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),u=require("@progress/kendo-react-common");function s(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=s(o),c=n.forwardRef((e,r)=>{const t=n.useRef(null),a=n.useRef(null);n.useImperativeHandle(t,()=>({element:a.current,props:e})),n.useImperativeHandle(r,()=>t.current);const l=u.useMouse(e,t);return n.createElement("col",{ref:a,...l,id:e.id,style:e.style,tabIndex:e.tabIndex,children:e.children,className:e.className})}),i={path:[]};c.defaultProps=i;c.displayName="KendoReactPivotGridColumn";exports.PivotGridColumn=c;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as t from "react";
10
+ import { useMouse as u } from "@progress/kendo-react-common";
11
+ const a = t.forwardRef((e, r) => {
12
+ const n = t.useRef(null), l = t.useRef(null);
13
+ t.useImperativeHandle(n, () => ({
14
+ element: l.current,
15
+ props: e
16
+ })), t.useImperativeHandle(r, () => n.current);
17
+ const s = u(
18
+ e,
19
+ n
20
+ );
21
+ return /* @__PURE__ */ t.createElement(
22
+ "col",
23
+ {
24
+ ref: l,
25
+ ...s,
26
+ id: e.id,
27
+ style: e.style,
28
+ tabIndex: e.tabIndex,
29
+ children: e.children,
30
+ className: e.className
31
+ }
32
+ );
33
+ }), c = {
34
+ path: []
35
+ };
36
+ a.defaultProps = c;
37
+ a.displayName = "KendoReactPivotGridColumn";
38
+ export {
39
+ a as PivotGridColumn
40
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),F=require("@progress/kendo-react-buttons"),l=require("@progress/kendo-react-common"),z=require("@progress/kendo-react-intl"),h=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 m=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(u,a,m.get?m:{enumerable:!0,get:()=>e[a]})}}return u.default=e,Object.freeze(u)}const t=j(P),E=t.forwardRef((e,u)=>{const{horizontal:a,data:m,rowAxes:d,columnAxes:f,measureAxes:g}={...s,...e},x=t.useRef(null),i=t.useRef(null),n=t.useRef(null),C=z.useLocalization(),[A,k]=l.useCustomComponent(e.editor||s.editor),[v,b]=l.useCustomComponent(e.form||s.form),[R,S]=l.useCustomComponent(e.formElement||s.formElement);t.useImperativeHandle(i,()=>({props:e,element:x.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:x,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(v,{ref:l.canUseRef(v)?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:m,...k}))),t.createElement("div",{className:"k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end"},t.createElement(F.Button,{type:"submit",onClick:r.onFormReset},C.toLanguageString(o.configuratorCancel,o.messages[o.configuratorCancel])),t.createElement(F.Button,{themeColor:"primary",type:"submit",onClick:r.onSubmit},C.toLanguageString(o.configuratorApply,o.messages[o.configuratorApply])))),...b})))}),s={form:h.Form,formElement:h.FormElement,editor:q.PivotGridConfiguratorEditor,horizontal:!1,data:[],columnAxes:[],rowAxes:[],measureAxes:[]};E.defaultProps=s;E.displayName="KendoReactPivotGridConfigurator";exports.PivotGridConfigurator=E;
@@ -0,0 +1,134 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as t from "react";
10
+ import { Button as x } from "@progress/kendo-react-buttons";
11
+ import { useCustomComponent as f, classNames as E, canUseRef as w } from "@progress/kendo-react-common";
12
+ import { useLocalization as G } from "@progress/kendo-react-intl";
13
+ import { Form as H, FormElement as M } from "@progress/kendo-react-form";
14
+ import { PivotGridConfiguratorEditor as j } from "./ConfiguratorEditor.mjs";
15
+ import { configuratorTitle as v, messages as d, configuratorCancel as F, configuratorApply as h } from "../messages/index.mjs";
16
+ const A = t.forwardRef((e, k) => {
17
+ const {
18
+ horizontal: l,
19
+ data: R,
20
+ rowAxes: u,
21
+ columnAxes: c,
22
+ measureAxes: m
23
+ } = { ...a, ...e }, g = t.useRef(null), o = t.useRef(null), r = t.useRef(null), s = G(), [N, S] = f(e.editor || a.editor), [C, b] = f(e.form || a.form), [z, P] = f(e.formElement || a.formElement);
24
+ t.useImperativeHandle(o, () => ({ props: e, element: g.current })), t.useImperativeHandle(k, () => o.current);
25
+ const y = (n, i) => {
26
+ e.onRowAxesChange && e.onRowAxesChange({
27
+ target: o.current,
28
+ value: n.rowAxes,
29
+ syntheticEvent: i
30
+ }), e.onColumnAxesChange && e.onColumnAxesChange({
31
+ target: o.current,
32
+ value: n.columnAxes,
33
+ syntheticEvent: i
34
+ }), e.onMeasureAxesChange && e.onMeasureAxesChange({
35
+ target: o.current,
36
+ value: n.measureAxes,
37
+ syntheticEvent: i
38
+ }), e.onSortChange && e.onSortChange({
39
+ target: o.current,
40
+ value: n.sort,
41
+ syntheticEvent: i
42
+ }), e.onFilterChange && e.onFilterChange({
43
+ target: o.current,
44
+ value: n.filter,
45
+ syntheticEvent: i
46
+ });
47
+ }, L = {
48
+ rowAxes: u,
49
+ columnAxes: c,
50
+ measureAxes: m,
51
+ sort: e.sort,
52
+ filter: e.filter
53
+ };
54
+ return t.useEffect(() => {
55
+ r.current && r.current.onChange("rowAxes", { value: u });
56
+ }, [u]), t.useEffect(() => {
57
+ r.current && r.current.onChange("columnAxes", { value: c });
58
+ }, [c]), t.useEffect(() => {
59
+ r.current && r.current.onChange("measureAxes", { value: m });
60
+ }, [m]), t.useEffect(() => {
61
+ r.current && r.current.onChange("sort", { value: e.sort });
62
+ }, [e.sort]), t.useEffect(() => {
63
+ r.current && r.current.onChange("filter", { value: e.filter });
64
+ }, [e.filter]), /* @__PURE__ */ t.createElement(
65
+ "div",
66
+ {
67
+ ref: g,
68
+ id: e.id,
69
+ tabIndex: e.tabIndex,
70
+ style: e.style,
71
+ className: E(
72
+ "k-pivotgrid-configurator",
73
+ e.className
74
+ )
75
+ },
76
+ /* @__PURE__ */ t.createElement(
77
+ "div",
78
+ {
79
+ className: E(
80
+ "k-pivotgrid-configurator-panel",
81
+ "k-pivotgrid-configurator-push",
82
+ {
83
+ "k-pivotgrid-configurator-horizontal": l,
84
+ "k-pivotgrid-configurator-vertical": !l
85
+ }
86
+ )
87
+ },
88
+ /* @__PURE__ */ t.createElement("div", { className: "k-pivotgrid-configurator-header" }, /* @__PURE__ */ t.createElement("div", { className: "k-pivotgrid-configurator-header-text" }, s.toLanguageString(v, d[v]))),
89
+ /* @__PURE__ */ t.createElement(
90
+ C,
91
+ {
92
+ ref: w(C) ? r : void 0,
93
+ initialValues: L,
94
+ onSubmit: y,
95
+ render: (n) => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", { className: "k-pivotgrid-configurator-content" }, /* @__PURE__ */ t.createElement(
96
+ z,
97
+ {
98
+ horizontal: l,
99
+ ...P
100
+ },
101
+ /* @__PURE__ */ t.createElement(
102
+ N,
103
+ {
104
+ ...n,
105
+ horizontal: e.horizontal,
106
+ onFieldsEditorFieldExpand: e.onFieldsEditorFieldExpand,
107
+ onFieldsEditorFieldCheck: e.onFieldsEditorFieldCheck,
108
+ onAxisFilterFieldExpand: e.onAxisFilterFieldExpand,
109
+ onAxisFilterFieldsExpandChange: e.onAxisFilterFieldsExpandChange,
110
+ data: R,
111
+ ...S
112
+ }
113
+ )
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
+ ...b
116
+ }
117
+ )
118
+ )
119
+ );
120
+ }), a = {
121
+ form: H,
122
+ formElement: M,
123
+ editor: j,
124
+ horizontal: !1,
125
+ data: [],
126
+ columnAxes: [],
127
+ rowAxes: [],
128
+ measureAxes: []
129
+ };
130
+ A.defaultProps = a;
131
+ A.displayName = "KendoReactPivotGridConfigurator";
132
+ export {
133
+ A as PivotGridConfigurator
134
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),a=require("@progress/kendo-react-common"),b=require("@progress/kendo-react-intl"),v=require("@progress/kendo-svg-icons"),c=require("../messages/index.js");function I(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=I(g),u=t.forwardRef((e,o)=>{const n=t.useRef(null),r=t.useRef(null),s=b.useLocalization();t.useImperativeHandle(n,()=>({props:e,element:r.current})),t.useImperativeHandle(o,()=>n.current);const[l,d]=a.useCustomComponent(e.icon||i.icon),m=t.useMemo(()=>a.classNames("k-pivotgrid-configurator-button",e.className),[e.className]),f=a.useMouse(e,n);return t.createElement("div",{ref:r,id:e.id,className:m,tabIndex:e.tabIndex,...f},t.createElement("span",null,s.toLanguageString(c.configuratorButtonLabel,c.messages[c.configuratorButtonLabel]),t.createElement(l,{name:"gear",icon:v.gearIcon,...d})))}),i={icon:a.IconWrap};u.defaultProps=i;u.displayName="KendoReactPivotGridConfiguratorButton";exports.PivotGridConfiguratorButton=u;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as e from "react";
10
+ import { useCustomComponent as d, classNames as g, useMouse as I, IconWrap as p } from "@progress/kendo-react-common";
11
+ import { useLocalization as v } from "@progress/kendo-react-intl";
12
+ import { gearIcon as P } from "@progress/kendo-svg-icons";
13
+ import { configuratorButtonLabel as a, messages as C } from "../messages/index.mjs";
14
+ const r = e.forwardRef((t, c) => {
15
+ const o = e.useRef(null), n = e.useRef(null), i = v();
16
+ e.useImperativeHandle(o, () => ({ props: t, element: n.current })), e.useImperativeHandle(c, () => o.current);
17
+ const [m, u] = d(t.icon || s.icon), l = e.useMemo(
18
+ () => g("k-pivotgrid-configurator-button", t.className),
19
+ [t.className]
20
+ ), f = I(
21
+ t,
22
+ o
23
+ );
24
+ return /* @__PURE__ */ e.createElement(
25
+ "div",
26
+ {
27
+ ref: n,
28
+ id: t.id,
29
+ className: l,
30
+ tabIndex: t.tabIndex,
31
+ ...f
32
+ },
33
+ /* @__PURE__ */ e.createElement("span", null, i.toLanguageString(a, C[a]), /* @__PURE__ */ e.createElement(m, { name: "gear", icon: P, ...u }))
34
+ );
35
+ }), s = {
36
+ icon: p
37
+ };
38
+ r.defaultProps = s;
39
+ r.displayName = "KendoReactPivotGridConfiguratorButton";
40
+ export {
41
+ r as PivotGridConfiguratorButton
42
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ee=require("react"),g=require("@progress/kendo-react-form"),C=require("@progress/kendo-react-labels"),te=require("@progress/kendo-react-intl"),c=require("@progress/kendo-react-common"),v=require("./AxesEditor.js"),oe=require("./FieldsEditor.js"),n=require("../messages/index.js"),l=require("../hooks/usePivotConfiguratorEditor.js"),ne=require("../shared/PivotGridConfiguratorEditorEventsContext.js"),se=require("../shared/PivotGridConfiguratorEditorStateContext.js");function re(e){const A=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const m in e)if(m!=="default"){const f=Object.getOwnPropertyDescriptor(e,m);Object.defineProperty(A,m,f.get?f:{enumerable:!0,get:()=>e[m]})}}return A.default=e,Object.freeze(A)}const t=re(ee),P=t.forwardRef((e,A)=>{const{onFieldsEditorFieldCheck:m,onFieldsEditorFieldCheckAction:f,onFieldsEditorFieldExpand:b,onFieldsEditorFieldExpandAction:R,onAxisFilterFieldExpand:I,onAxisFilterFieldsExpandChange:N}=e,[w,k]=c.useCustomComponent(e.fieldsLabel||i.fieldsLabel),[G,_]=c.useCustomComponent(e.fieldsEditor||i.fieldsEditor),[S,q]=c.useCustomComponent(e.columnAxesLabel||i.columnAxesLabel),[D,U]=c.useCustomComponent(e.columnAxesEditor||i.columnAxesEditor),[V,z]=c.useCustomComponent(e.rowAxesLabel||i.rowAxesLabel),[Z,j]=c.useCustomComponent(e.rowAxesEditor||i.rowAxesEditor),[B,H]=c.useCustomComponent(e.measureAxesLabel||i.measureAxesLabel),[K,J]=c.useCustomComponent(e.measureAxesEditor||i.measureAxesEditor),Q=t.useRef(null),d=t.useRef(null),E=te.useLocalization(),[s,r]=l.usePivotConfiguratorEditor(e,d);t.useImperativeHandle(d,()=>({element:Q.current,props:e,state:s})),t.useImperativeHandle(A,()=>d.current);const F=()=>{s.dragItem&&r({type:l.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:"columnAxes"})},p=()=>{s.dragItem&&r({type:l.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:null})},L=()=>{s.dragItem&&r({type:l.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:"rowAxes"})},h=()=>{s.dragItem&&r({type:l.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:null})},y=()=>{s.dragItem&&r({type:l.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:"measureAxes"})},M=()=>{s.dragItem&&r({type:l.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:null})},W=o=>{const u={target:o.target,currentTarget:d.current,value:o.value,syntheticEvent:o.syntheticEvent};if(R){const a=R(u,e,s);a&&(Array.isArray(a)?a.filter(Boolean).map(x=>x&&r({...x},o.syntheticEvent)):r({...a},o.syntheticEvent))}b&&b({target:o.target,currentTarget:d.current,value:o.value,syntheticEvent:o.syntheticEvent})},X=o=>{const u={target:o.target,currentTarget:d.current,value:o.value,syntheticEvent:o.syntheticEvent};if(f){const a=f(u,e,s);a&&(Array.isArray(a)?a.filter(Boolean).map(x=>x&&r({...x},o.syntheticEvent)):r({...a},o.syntheticEvent))}m&&m(u)},Y=o=>{const u={target:o.target,currentTarget:d.current,value:o.value,syntheticEvent:o.syntheticEvent};I&&I(u)},$=o=>{const u={target:o.target,currentTarget:d.current,value:o.value,syntheticEvent:o.syntheticEvent};N&&N(u)},T=e.horizontal?"div":t.Fragment,O=e.horizontal?{className:"k-form-field-wrapper"}:{};return t.createElement(ne.PivotGridConfiguratorEditorEventsContext.Provider,{value:{onAxisFilterFieldExpand:Y,onAxisFilterFieldsExpandChange:$}},t.createElement(se.PivotGridConfiguratorEditorStateContext.Provider,{value:[s,r]},t.createElement(T,{...O},t.createElement("div",{className:"k-form-field"},t.createElement(w,{name:"",component:C.Label,...k},E.toLanguageString(n.configuratorEditorSearchTitle,n.messages[n.configuratorEditorSearchTitle]))),t.createElement("div",{className:"k-form-field"},t.createElement("div",{className:"k-fields-list-wrapper"},t.createElement(G,{data:e.data,onExpand:W,onCheck:X,columnAxes:s.columnAxes,rowAxes:s.rowAxes,measureAxes:s.measureAxes,..._})))),t.createElement(T,{...O},t.createElement("div",{className:"k-form-field",onMouseEnter:F,onMouseLeave:p},t.createElement(g.Field,{name:"columnAxes",field:"columnAxes",component:S,...q},E.toLanguageString(n.configuratorColumnsTitle,n.messages[n.configuratorColumnsTitle]))),e.valueGetter("columnAxes").length?t.createElement(g.Field,{name:"columnAxes",field:"columnAxes",component:D,onMouseEnter:F,onMouseLeave:p,className:"k-column-fields",...U}):t.createElement("div",{className:"k-settings-description",onMouseEnter:F,onMouseLeave:p},E.toLanguageString(n.configuratorMissingFields,n.messages[n.configuratorMissingFields])),t.createElement("div",{className:"k-form-field",onMouseEnter:L,onMouseLeave:h},t.createElement(g.Field,{name:"rowAxes",field:"rowAxes",component:V,...z},E.toLanguageString(n.configuratorRowsTitle,n.messages[n.configuratorRowsTitle]))),e.valueGetter("rowAxes").length?t.createElement(g.Field,{name:"rowAxes",field:"rowAxes",component:Z,onMouseEnter:L,onMouseLeave:h,className:"k-column-fields",...j}):t.createElement("div",{className:"k-settings-description",onMouseEnter:L,onMouseLeave:h},E.toLanguageString(n.configuratorMissingFields,n.messages[n.configuratorMissingFields]))),t.createElement(T,{...O},t.createElement("div",{className:"k-form-field",onMouseEnter:y,onMouseLeave:M},t.createElement(g.Field,{name:"measureAxes",field:"measureAxes",component:B,...H},E.toLanguageString(n.configuratorMeasuresTitle,n.messages[n.configuratorMeasuresTitle]))),e.valueGetter("measureAxes").length?t.createElement(g.Field,{name:"measureAxes",field:"measureAxes",component:K,onMouseEnter:y,onMouseLeave:M,className:"k-column-fields",...J}):t.createElement("div",{className:"k-settings-description",onMouseEnter:y,onMouseLeave:M},E.toLanguageString(n.configuratorMissingFields,n.messages[n.configuratorMissingFields])))))}),i={data:[],horizontal:!1,fieldsLabel:C.Label,fieldsEditor:oe.PivotGridFieldsEditor,columnAxesLabel:C.Label,columnAxesEditor:v.PivotGridAxesEditor,rowAxesLabel:C.Label,rowAxesEditor:v.PivotGridAxesEditor,measureAxesLabel:C.Label,measureAxesEditor:v.PivotGridAxesEditor,axesEditor:v.PivotGridAxesEditor,onFieldsEditorFieldCheckAction:e=>({type:l.PIVOT_CONFIGURATOR_ACTION.toggleSelection,payload:e.value}),onFieldsEditorFieldExpandAction:e=>({type:l.PIVOT_CONFIGURATOR_ACTION.toggleExpansion,payload:e.value})};P.defaultProps=i;P.displayName="KendoReactPivotGridConfiguratorEditor";exports.PivotGridConfiguratorEditor=P;
@@ -0,0 +1,240 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as e from "react";
10
+ import { Field as E } from "@progress/kendo-react-form";
11
+ import { Label as g } from "@progress/kendo-react-labels";
12
+ import { useLocalization as ae } from "@progress/kendo-react-intl";
13
+ import { useCustomComponent as d } from "@progress/kendo-react-common";
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";
17
+ import { usePivotConfiguratorEditor as ie, PIVOT_CONFIGURATOR_ACTION as c } from "../hooks/usePivotConfiguratorEditor.mjs";
18
+ import { PivotGridConfiguratorEditorEventsContext as le } from "../shared/PivotGridConfiguratorEditorEventsContext.mjs";
19
+ import { PivotGridConfiguratorEditorStateContext as de } from "../shared/PivotGridConfiguratorEditorStateContext.mjs";
20
+ const D = e.forwardRef((t, Z) => {
21
+ const {
22
+ onFieldsEditorFieldCheck: w,
23
+ onFieldsEditorFieldCheckAction: b,
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);
29
+ e.useImperativeHandle(i, () => ({
30
+ element: ee.current,
31
+ props: t,
32
+ 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 });
38
+ }, 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" });
44
+ }, C = () => {
45
+ n.dragItem && r({ type: c.setDropZone, payload: null });
46
+ }, te = (o) => {
47
+ const l = {
48
+ target: o.target,
49
+ currentTarget: i.current,
50
+ value: o.value,
51
+ syntheticEvent: o.syntheticEvent
52
+ };
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));
56
+ }
57
+ P && P({
58
+ target: o.target,
59
+ currentTarget: i.current,
60
+ value: o.value,
61
+ syntheticEvent: o.syntheticEvent
62
+ });
63
+ }, oe = (o) => {
64
+ const l = {
65
+ target: o.target,
66
+ currentTarget: i.current,
67
+ value: o.value,
68
+ syntheticEvent: o.syntheticEvent
69
+ };
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));
73
+ }
74
+ w && w(l);
75
+ }, ne = (o) => {
76
+ const l = {
77
+ target: o.target,
78
+ currentTarget: i.current,
79
+ value: o.value,
80
+ syntheticEvent: o.syntheticEvent
81
+ };
82
+ N && N(l);
83
+ }, re = (o) => {
84
+ const l = {
85
+ target: o.target,
86
+ currentTarget: i.current,
87
+ value: o.value,
88
+ syntheticEvent: o.syntheticEvent
89
+ };
90
+ R && R(l);
91
+ }, y = t.horizontal ? "div" : e.Fragment, M = t.horizontal ? { className: "k-form-field-wrapper" } : {};
92
+ return /* @__PURE__ */ e.createElement(
93
+ le.Provider,
94
+ {
95
+ value: {
96
+ onAxisFilterFieldExpand: ne,
97
+ onAxisFilterFieldsExpandChange: re
98
+ }
99
+ },
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(
101
+ B,
102
+ {
103
+ data: t.data,
104
+ onExpand: te,
105
+ onCheck: oe,
106
+ columnAxes: n.columnAxes,
107
+ rowAxes: n.rowAxes,
108
+ measureAxes: n.measureAxes,
109
+ ...H
110
+ }
111
+ )))), /* @__PURE__ */ e.createElement(y, { ...M }, /* @__PURE__ */ e.createElement(
112
+ "div",
113
+ {
114
+ className: "k-form-field",
115
+ onMouseEnter: v,
116
+ onMouseLeave: p
117
+ },
118
+ /* @__PURE__ */ e.createElement(
119
+ E,
120
+ {
121
+ name: "columnAxes",
122
+ field: "columnAxes",
123
+ component: _,
124
+ ...K
125
+ },
126
+ m.toLanguageString(I, u[I])
127
+ )
128
+ ), t.valueGetter("columnAxes").length ? /* @__PURE__ */ e.createElement(
129
+ E,
130
+ {
131
+ name: "columnAxes",
132
+ field: "columnAxes",
133
+ component: U,
134
+ onMouseEnter: v,
135
+ onMouseLeave: p,
136
+ className: "k-column-fields",
137
+ ...V
138
+ }
139
+ ) : /* @__PURE__ */ e.createElement(
140
+ "div",
141
+ {
142
+ className: "k-settings-description",
143
+ onMouseEnter: v,
144
+ onMouseLeave: p
145
+ },
146
+ m.toLanguageString(x, u[x])
147
+ ), /* @__PURE__ */ e.createElement(
148
+ "div",
149
+ {
150
+ className: "k-form-field",
151
+ onMouseEnter: L,
152
+ onMouseLeave: h
153
+ },
154
+ /* @__PURE__ */ e.createElement(
155
+ E,
156
+ {
157
+ name: "rowAxes",
158
+ field: "rowAxes",
159
+ component: j,
160
+ ...q
161
+ },
162
+ m.toLanguageString(S, u[S])
163
+ )
164
+ ), t.valueGetter("rowAxes").length ? /* @__PURE__ */ e.createElement(
165
+ E,
166
+ {
167
+ name: "rowAxes",
168
+ field: "rowAxes",
169
+ component: J,
170
+ onMouseEnter: L,
171
+ onMouseLeave: h,
172
+ className: "k-column-fields",
173
+ ...Q
174
+ }
175
+ ) : /* @__PURE__ */ e.createElement(
176
+ "div",
177
+ {
178
+ className: "k-settings-description",
179
+ onMouseEnter: L,
180
+ onMouseLeave: h
181
+ },
182
+ m.toLanguageString(x, u[x])
183
+ )), /* @__PURE__ */ e.createElement(y, { ...M }, /* @__PURE__ */ e.createElement(
184
+ "div",
185
+ {
186
+ className: "k-form-field",
187
+ onMouseEnter: F,
188
+ onMouseLeave: C
189
+ },
190
+ /* @__PURE__ */ e.createElement(
191
+ E,
192
+ {
193
+ name: "measureAxes",
194
+ field: "measureAxes",
195
+ component: W,
196
+ ...X
197
+ },
198
+ m.toLanguageString(G, u[G])
199
+ )
200
+ ), t.valueGetter("measureAxes").length ? /* @__PURE__ */ e.createElement(
201
+ E,
202
+ {
203
+ name: "measureAxes",
204
+ field: "measureAxes",
205
+ component: Y,
206
+ onMouseEnter: F,
207
+ onMouseLeave: C,
208
+ className: "k-column-fields",
209
+ ...$
210
+ }
211
+ ) : /* @__PURE__ */ e.createElement(
212
+ "div",
213
+ {
214
+ className: "k-settings-description",
215
+ onMouseEnter: F,
216
+ onMouseLeave: C
217
+ },
218
+ m.toLanguageString(x, u[x])
219
+ )))
220
+ );
221
+ }), s = {
222
+ data: [],
223
+ horizontal: !1,
224
+ fieldsLabel: g,
225
+ fieldsEditor: se,
226
+ columnAxesLabel: g,
227
+ columnAxesEditor: f,
228
+ rowAxesLabel: g,
229
+ rowAxesEditor: f,
230
+ measureAxesLabel: g,
231
+ measureAxesEditor: f,
232
+ axesEditor: f,
233
+ onFieldsEditorFieldCheckAction: (t) => ({ type: c.toggleSelection, payload: t.value }),
234
+ onFieldsEditorFieldExpandAction: (t) => ({ type: c.toggleExpansion, payload: t.value })
235
+ };
236
+ D.defaultProps = s;
237
+ D.displayName = "KendoReactPivotGridConfiguratorEditor";
238
+ export {
239
+ D as PivotGridConfiguratorEditor
240
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
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;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
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(
14
+ "div",
15
+ {
16
+ ref: o,
17
+ id: e.id,
18
+ style: e.style,
19
+ tabIndex: e.tabIndex,
20
+ className: a(
21
+ "k-d-flex k-pos-relative",
22
+ {
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"
27
+ },
28
+ e.className
29
+ )
30
+ },
31
+ e.children
32
+ );
33
+ }), l = {
34
+ configuratorPosition: "right"
35
+ };
36
+ r.defaultProps = l;
37
+ r.displayName = "KendoReactPivotGridContainer";
38
+ export {
39
+ r as PivotGridContainer
40
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react");function c(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const i=c(n),a=i.createContext({axes:null});exports.PivotGridConfiguratorEditorAxesContext=a;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as t from "react";
10
+ const e = t.createContext({ axes: null });
11
+ export {
12
+ e as PivotGridConfiguratorEditorAxesContext
13
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
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;