@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.
@@ -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"),N=require("@progress/kendo-react-buttons"),Z=require("@progress/kendo-react-indicators"),ee=require("@progress/kendo-react-intl"),O=require("@progress/kendo-react-data-tools"),r=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"),S=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),I=t.forwardRef((n,u)=>{const{data:l,dataItem:d,defaultFilter:F}={...i,...n},y=t.useRef(null),m=t.useRef(null),v=ee.useLocalization(),[q,A]=r.useCustomComponent(n.columnMenuItem||i.columnMenuItem),[T,w]=r.useCustomComponent(n.columnMenuForm||i.columnMenuForm),[B,b]=r.useCustomComponent(n.resetButton||i.resetButton),[_,G]=r.useCustomComponent(n.applyButton||i.applyButton),[V,D]=r.useCustomComponent(n.treeView||i.treeView),[j,L]=r.useCustomComponent(n.noData||i.noData);t.useImperativeHandle(m,()=>({props:n,element:y.current})),t.useImperativeHandle(u,()=>m.current);const[h,f]=t.useState(!1),{onAxisFilterFieldsExpandChange:k,onAxisFilterFieldExpand:E}=t.useContext(ne.PivotGridConfiguratorEditorEventsContext),[,x]=t.useContext(oe.PivotGridConfiguratorEditorStateContext),[c,z]=t.useState(F),P=c?c.value.split(","):[],[H,U]=S.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=>!P.length||(P||[]).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),k&&k({value:!h,target:m.current,syntheticEvent:e})},X=e=>{U({type:S.EXPANSION_ACTION.toggle,payload:e.item.dataItem},e.syntheticEvent),E&&E({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&&x({type:g.PIVOT_CONFIGURATOR_ACTION.removeFilter,payload:c},e)},Q=e=>{f(!1),c&&x({type:F?g.PIVOT_CONFIGURATOR_ACTION.changeFilter:g.PIVOT_CONFIGURATOR_ACTION.addFilter,payload:c},e)};return t.createElement("div",{ref:y,id:n.id,tabIndex:n.tabIndex,style:n.style,className:r.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},v.toLanguageString(s.fieldMenuReset,s.messages[s.fieldMenuReset])),t.createElement(_,{themeColor:"primary",onClick:Q,...G},v.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})))}),i={data:[],resetButton:N.Button,applyButton:N.Button,treeView:Y.TreeView,noData:()=>t.createElement(Z.Skeleton,{shape:"rectangle",style:{height:"20px",width:"calc(100% - 16px)",margin:8}}),columnMenuItem:O.ColumnMenuItem,columnMenuForm:O.ColumnMenuForm};I.defaultProps=i;I.displayName="KendoReactPivotGridAxisFilterFieldsEditor";exports.PivotGridAxisFilterFieldsEditor=I;
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 Y } from "@progress/kendo-react-treeview";
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 Z } from "@progress/kendo-react-indicators";
13
- import { useLocalization as $ } from "@progress/kendo-react-intl";
14
- import { ColumnMenuItem as ee, ColumnMenuForm as te } from "@progress/kendo-react-data-tools";
15
- import { useCustomComponent as l, classNames as ne } from "@progress/kendo-react-common";
16
- import { gridLayoutIcon as ae } from "@progress/kendo-svg-icons";
17
- import { recursiveMap as v, flatMap as oe, compareFields as ie } from "../utils/index.mjs";
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 re } from "../shared/PivotGridConfiguratorEditorEventsContext.mjs";
20
- import { PivotGridConfiguratorEditorStateContext as le } from "../shared/PivotGridConfiguratorEditorStateContext.mjs";
21
- import { useExpansion as ce, EXPANSION_ACTION as me } from "../hooks/useExpansion.mjs";
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 S = t.forwardRef(
24
- (o, w) => {
23
+ const me = t.forwardRef(
24
+ (o, S) => {
25
25
  const {
26
- data: A,
26
+ data: w,
27
27
  dataItem: p,
28
28
  defaultFilter: h
29
- } = { ...i, ...o }, f = t.useRef(null), c = t.useRef(null), C = $(), [B, R] = l(o.columnMenuItem || i.columnMenuItem), [T, V] = l(o.columnMenuForm || i.columnMenuForm), [O, D] = l(o.resetButton || i.resetButton), [G, q] = l(o.applyButton || i.applyButton), [L, _] = l(o.treeView || i.treeView), [b, H] = l(o.noData || i.noData);
30
- t.useImperativeHandle(c, () => ({ props: o, element: f.current })), t.useImperativeHandle(w, () => c.current);
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(re), [, F] = t.useContext(le), [r, j] = t.useState(h), y = r ? r.value.split(",") : [], [z, K] = ce(
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
- ie
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) => z.some((a) => a.uniqueName === e.id),
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(A, x), E = oe(m), U = (e) => {
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
- }, X = (e) => {
59
- K({ type: me.toggle, payload: e.item.dataItem }, e.syntheticEvent), g && g({
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
- }, J = (e) => {
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
- }, j(a);
75
- }, Q = (e) => {
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
- }, W = (e) => {
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: ne("k-columnmenu-item-wrapper", o.className)
93
+ className: te("k-columnmenu-item-wrapper", o.className)
94
94
  },
95
95
  /* @__PURE__ */ t.createElement(
96
- B,
96
+ A,
97
97
  {
98
- ...R,
98
+ ...B,
99
99
  title: "Include Fields",
100
100
  iconClass: "k-i-grid-layout",
101
- svgIcon: ae,
102
- onClick: U
101
+ svgIcon: ne,
102
+ onClick: K
103
103
  }
104
104
  ),
105
105
  /* @__PURE__ */ t.createElement(
106
- T,
106
+ R,
107
107
  {
108
108
  show: s,
109
109
  actions: /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
110
- O,
110
+ V,
111
111
  {
112
112
  type: "reset",
113
- onClick: Q,
114
- ...D
113
+ onClick: J,
114
+ ...O
115
115
  },
116
116
  C.toLanguageString(M, N[M])
117
117
  ), /* @__PURE__ */ t.createElement(
118
- G,
118
+ D,
119
119
  {
120
120
  themeColor: "primary",
121
- onClick: W,
122
- ...q
121
+ onClick: Q,
122
+ ...G
123
123
  },
124
124
  C.toLanguageString(P, N[P])
125
125
  )),
126
- ...V
126
+ ...T
127
127
  },
128
128
  m && m.length ? /* @__PURE__ */ t.createElement(
129
- L,
129
+ q,
130
130
  {
131
131
  data: m,
132
132
  checkboxes: !0,
133
- onExpandChange: X,
134
- onCheckChange: J,
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(b, { ...H })
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: Y,
151
- noData: () => /* @__PURE__ */ t.createElement(Z, { shape: "rectangle", style: { height: "20px", width: "calc(100% - 16px)", margin: 8 } }),
152
- columnMenuItem: ee,
153
- columnMenuForm: te
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
- S.defaultProps = i;
156
- S.displayName = "KendoReactPivotGridAxisFilterFieldsEditor";
155
+ me.displayName = "KendoReactPivotGridAxisFilterFieldsEditor";
157
156
  export {
158
- S as PivotGridAxisFilterFieldsEditor
157
+ me as PivotGridAxisFilterFieldsEditor
159
158
  };
@@ -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 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;
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;
@@ -6,35 +6,34 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
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,
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__ */ t.createElement(
21
+ return /* @__PURE__ */ e.createElement(
22
22
  "col",
23
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
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
- }), c = {
33
+ }), f = {
34
34
  path: []
35
35
  };
36
- a.defaultProps = c;
37
- a.displayName = "KendoReactPivotGridColumn";
36
+ p.displayName = "KendoReactPivotGridColumn";
38
37
  export {
39
- a as PivotGridColumn
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"),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;
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 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";
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 A = t.forwardRef((e, k) => {
16
+ const j = t.forwardRef((e, A) => {
17
17
  const {
18
18
  horizontal: l,
19
- data: R,
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 = 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) => {
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
- }, L = {
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: w(C) ? r : void 0,
93
- initialValues: L,
94
- onSubmit: y,
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
- z,
96
+ b,
97
97
  {
98
98
  horizontal: l,
99
- ...P
99
+ ...z
100
100
  },
101
101
  /* @__PURE__ */ t.createElement(
102
- N,
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: R,
111
- ...S
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
- ...b
115
+ ...S
116
116
  }
117
117
  )
118
118
  )
119
119
  );
120
120
  }), a = {
121
- form: H,
122
- formElement: M,
123
- editor: j,
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
- A.defaultProps = a;
131
- A.displayName = "KendoReactPivotGridConfigurator";
130
+ j.displayName = "KendoReactPivotGridConfigurator";
132
131
  export {
133
- A as PivotGridConfigurator
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 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;
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 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),
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
- ), f = I(
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: l,
29
+ className: m,
30
30
  tabIndex: t.tabIndex,
31
- ...f
31
+ ...u
32
32
  },
33
- /* @__PURE__ */ e.createElement("span", null, i.toLanguageString(a, C[a]), /* @__PURE__ */ e.createElement(m, { name: "gear", icon: P, ...u }))
33
+ /* @__PURE__ */ e.createElement("span", null, c.toLanguageString(a, p[a]), /* @__PURE__ */ e.createElement(s, { name: "gear", icon: v, ...i }))
34
34
  );
35
- }), s = {
36
- icon: p
35
+ }), N = {
36
+ icon: g
37
37
  };
38
- r.defaultProps = s;
39
- r.displayName = "KendoReactPivotGridConfiguratorButton";
38
+ C.displayName = "KendoReactPivotGridConfiguratorButton";
40
39
  export {
41
- r as PivotGridConfiguratorButton
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 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;
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;