@progress/kendo-react-pivotgrid 7.1.0-develop.9 → 7.1.1-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.
package/NOTICE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  Progress KendoReact 2024
2
2
 
3
- Copyright © 2018-2023 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
3
+ Copyright © 2018-2024 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
4
4
 
5
5
  Portions of the Product include certain open source and commercial third-party components listed below (“Third-Party Components”). The authors of the Third-Party Components require Progress Software Corporation (“PSC”) to include the following notices and additional licensing terms as a condition of PSC’s use of such Third-Party Components. You acknowledge that the authors of the Third-Party Components have no obligation to provide support to you for the Third-Party Components or the Product. You hereby undertake to comply with all licenses related to the applicable Third-Party Components. Notwithstanding anything to the contrary, to the extent that any of the terms and conditions of the Product Agreement conflict, vary, or are in addition to the terms and conditions of the aforementioned third-party licenses for these technologies, such terms and conditions are offered by Progress alone and not by any other party.
6
6
 
@@ -24,7 +24,6 @@ DefinitelyTyped.org | @types/prosemirror-transform | 1.2.9 - Open Source | MIT-s
24
24
  DefinitelyTyped.org | @types/prosemirror-view | 1.11.4 - Open Source | MIT-style License
25
25
  Facebook, Inc. | prop-types | 15.6.0 - Open Source | MIT-style License
26
26
  Facebook, Inc. | react-transition-group | 2.2.0 - Open Source | BSD-style License
27
- Mozilla Foundation | pdf.js | 2.6.347 – Open Source | Apache Software License Version 2.0
28
27
  Progress Software Corporation | Kendo UI Licensing CLI | 1.1 - Proprietary |
29
28
  Progress Software Corporation | jszip-esm | 1.0.0 - Open Source | MIT-style License
30
29
  Progress Software Corporation | pako-esm | 1.0.0 - Open Source | MIT-style License
@@ -43,14 +42,9 @@ ProseMirror | prosemirror-view | 1.5.2 - Open Source | MIT-style License
43
42
 
44
43
  1. Special Notices Regarding Open-Source Third-Party Components incorporated into the Product:
45
44
 
46
- (1) The Apache Software License, Version 2.0:
45
+ (1) BSD-Style Licenses:
47
46
 
48
- Progress KendoReact 2023 incorporates pdf.js v2.6.347. Such technology is subject to the following terms and conditions: Apache Software License Version 2.0. Copyright 2001-2004 The Apache Software Foundation. Such Apache Technology is subject to the following terms and conditions: The Apache Software License, Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
49
- -------------------------------------------------------------------------
50
-
51
- (2) BSD-Style Licenses:
52
-
53
- (a) Progress KendoReact 2023 incorporates React-Transition-Group v2.2.0. Such technology is subject to the following terms and conditions:
47
+ (a) Progress KendoReact 2024 incorporates React-Transition-Group v2.2.0. Such technology is subject to the following terms and conditions:
54
48
  BSD 3-Clause License
55
49
  Copyright (c) 2018, React Community
56
50
  Forked from React (https://github.com/facebook/react) Copyright 2013-present, Facebook, Inc.
@@ -63,14 +57,14 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
63
57
 
64
58
  (2) MIT-Style Licenses:
65
59
 
66
- (a) Progress KendoReact 2023 incorporates @types/prosemirror-commands v1*, @types/prosemirror-dropcursor v1*, @types/prosemirror-gapcursor v1*, @types/prosemirror-history v1*, @types/prosemirror-inputrules v1*, @types/prosemirror-keymap v1*, @types/prosemirror-model v1*, @types/prosemirror-schema-list v1*, @types/prosemirror-state v1*, @types/prosemirror-tables v0.9*, @types/prosemirror-transform v1*, and @types/prosemirror-view v1*. Such technologies are subject to the following terms and conditions:
60
+ (a) Progress KendoReact 2024 incorporates @types/prosemirror-commands v1*, @types/prosemirror-dropcursor v1*, @types/prosemirror-gapcursor v1*, @types/prosemirror-history v1*, @types/prosemirror-inputrules v1*, @types/prosemirror-keymap v1*, @types/prosemirror-model v1*, @types/prosemirror-schema-list v1*, @types/prosemirror-state v1*, @types/prosemirror-tables v0.9*, @types/prosemirror-transform v1*, and @types/prosemirror-view v1*. Such technologies are subject to the following terms and conditions:
67
61
  This project is licensed under the MIT license.
68
62
  Copyrights are respective of each contributor listed at the beginning of each definition file.
69
63
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
70
64
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
71
65
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
72
66
 
73
- (b) Progress KendoReact 2023 incorporates prop-types v15*. Such technology is subject to the following terms and conditions:
67
+ (b) Progress KendoReact 2024 incorporates prop-types v15*. Such technology is subject to the following terms and conditions:
74
68
  MIT License
75
69
  Copyright (c) 2013-present, Facebook, Inc.
76
70
  Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -79,27 +73,27 @@ furnished to do so, subject to the following conditions:
79
73
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
80
74
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
81
75
 
82
- (c) Progress KendoReact 2023 incorporates Axios v0.18.1. Such technology is subject to the following terms and conditions:
76
+ (c) Progress KendoReact 2024 incorporates Axios v0.18.1. Such technology is subject to the following terms and conditions:
83
77
  Copyright (c) 2014-present Matt Zabriskie
84
78
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
85
79
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
86
80
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
87
81
 
88
- (d) Progress KendoReact 2023 incorporates pako-esm v1.0.0. Such technology is subject to the following terms and conditions:
82
+ (d) Progress KendoReact 2024 incorporates pako-esm v1.0.0. Such technology is subject to the following terms and conditions:
89
83
  Copyright © 2020 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved. (as modified)
90
84
  Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn
91
85
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
92
86
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
93
87
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
94
88
 
95
- (e) Progress KendoReact 2023 incorporates jszip-esm v1.0.0. Such technology is subject to the following terms and conditions:
89
+ (e) Progress KendoReact 2024 incorporates jszip-esm v1.0.0. Such technology is subject to the following terms and conditions:
96
90
  Copyright © 2020 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved. (as modified)
97
91
  Copyright (c) 2009-2016 Stuart Knightley, David Duponchel, Franz Buchinger, António Afonso
98
92
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
99
93
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
100
94
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
101
95
 
102
- (f) Progress KendoReact 2023 incorporates prosemirror-commands v1*, prosemirror-gapcursor v1*, prosemirror-history v1*, prosemirror-inputrules v1*, prosemirror-keymap v1*, prosemirror-model v1*, prosemirror-schema-list v1*, prosemirror-state v1*, prosemirror-tables v0.9*, prosemirror-transform v1*, and prosemirror-view v1*. Such technologies are subject to the following terms and conditions:
96
+ (f) Progress KendoReact 2024 incorporates prosemirror-commands v1*, prosemirror-gapcursor v1*, prosemirror-history v1*, prosemirror-inputrules v1*, prosemirror-keymap v1*, prosemirror-model v1*, prosemirror-schema-list v1*, prosemirror-state v1*, prosemirror-tables v0.9*, prosemirror-transform v1*, and prosemirror-view v1*. Such technologies are subject to the following terms and conditions:
103
97
  Copyright (C) 2015-2017 by Marijn Haverbeke <marijnh@gmail.com> and others
104
98
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
105
99
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
@@ -109,9 +103,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
109
103
 
110
104
  3. Special Notices Regarding Progress Products incorporated into the Product:
111
105
 
112
- (a) Progress KendoReact 2023 incorporates Kendo UI Licensing CLI v1.1 from Progress Software Corporation. See NOTICE.txt text file within product for third-party license information.
106
+ (a) Progress KendoReact 2024 incorporates Kendo UI Licensing CLI v1.1 from Progress Software Corporation. See NOTICE.txt text file within product for third-party license information.
113
107
 
114
108
  NOTICE FROM PROGRESS SOFTWARE CORPORATION: Additional notices may be included in the release notes or other documentation that accompanies updates received in connection with support of the Product.
115
109
 
116
-
117
- Updated 11.Jan.2023
110
+ Updated 4.Jan.2024
@@ -2,4 +2,4 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- (function(A,me){typeof exports=="object"&&typeof module!="undefined"?me(exports,require("react"),require("@progress/kendo-react-common"),require("@progress/kendo-react-intl"),require("@progress/kendo-pivotgrid-common"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-form"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-data-tools"),require("@progress/kendo-react-treeview"),require("@progress/kendo-react-indicators")):typeof define=="function"&&define.amd?define(["exports","react","@progress/kendo-react-common","@progress/kendo-react-intl","@progress/kendo-pivotgrid-common","@progress/kendo-svg-icons","@progress/kendo-react-buttons","@progress/kendo-react-form","@progress/kendo-react-labels","@progress/kendo-react-data-tools","@progress/kendo-react-treeview","@progress/kendo-react-indicators"],me):(A=typeof globalThis!="undefined"?globalThis:A||self,me(A.KendoReactPivotgrid={},A.React,A.KendoReactCommon,A.KendoReactIntl,A.KendoPivotgridCommon,A.KendoSvgIcons,A.KendoReactButtons,A.KendoReactForm,A.KendoReactLabels,A.KendoReactDataTools,A.KendoReactTreeview,A.KendoReactIndicators))})(this,function(A,me,c,fe,b,pe,ie,ne,ge,Ee,Te,vt){"use strict";"use client";function xt(e){const a=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(a,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return a.default=e,Object.freeze(a)}const t=xt(me),pt={name:"@progress/kendo-react-pivotgrid",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},De="pivotgrid.emptyCellAriaLabel",He="pivotgrid.fieldMenuReset",Re="pivotgrid.fieldMenuApply",Ge="pivotgrid.configuratorTitle",Oe="pivotgrid.configuratorCancel",qe="pivotgrid.configuratorApply",ke="pivotgrid.configuratorColumnsTitle",Ke="pivotgrid.configuratorRowsTitle",ze="pivotgrid.configuratorMeasuresTitle",Be="pivotgrid.configuratorEditorSearchTitle",Et="pivotgrid.configuratorEditorSearchPlaceholder",re="pivotgrid.configuratorMissingFields",Ue="pivotgrid.configuratorButtonLabel",Z={[De]:"PivotGrid component. Use the arrow keys to navigate.",[He]:"Reset",[Re]:"Apply",[Oe]:"Cancel",[qe]:"Apply",[Ge]:"Settings",[Be]:"Fields",[Et]:"Search...",[ke]:"Columns",[Ke]:"Rows",[ze]:"Values",[Ue]:"Change settings",[re]:"Select some fields to begin setup"},Ve=t.forwardRef((e,a)=>{const n=t.useRef(null),r=t.useRef(null);t.useImperativeHandle(n,()=>({element:r.current,props:e})),t.useImperativeHandle(a,()=>n.current);const s=c.useMouse(e,n);return t.createElement("tr",{ref:r,...s,id:e.id,style:e.style,tabIndex:e.tabIndex,children:e.children,role:e.role,"aria-owns":e.ariaOwns,className:c.classNames("k-pivotgrid-row",e.className)})});Ve.displayName="KendoReactPivotGridRow";const je=t.forwardRef((e,a)=>{const n=t.useRef(null),r=t.useRef(null);t.useImperativeHandle(n,()=>({element:r.current,props:e})),t.useImperativeHandle(a,()=>n.current);const s=c.useMouse(e,n);return t.createElement("td",{ref:r,...s,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,"aria-describedby":e.ariaDescribedby,className:c.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total},e.className)},e.children)});je.displayName="KendoReactPivotGridCell";const et=(e,a,n)=>[e,(s,l)=>{const m=b.headersReducer(e,{...s,tree:a});n&&n(m,l)}],Ce=t.forwardRef((e,a)=>{const n=t.useRef(null),r=t.useRef(null);t.useImperativeHandle(n,()=>({element:r.current,props:e})),t.useImperativeHandle(a,()=>n.current);const[s,l]=c.useCustomComponent(e.icon||tt.icon),m=c.useMouse(e,n),i=C=>{e.onIconClick&&e.onIconClick.call(void 0,{syntheticEvent:C.syntheticEvent,target:n.current})};return t.createElement("th",{ref:r,...m,colSpan:e.colSpan,rowSpan:e.rowSpan,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,...e.expandable?{"aria-expanded":e.expanded}:{},className:c.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total,"k-pivotgrid-header-root":e.root,"k-pivotgrid-expanded":e.expanded,"k-first":e.first},e.className)},e.expandable&&t.createElement(s,{...l,onClick:i,name:`chevron-${e.expanded?"up":"down"}`,"aria-hidden":!0,icon:e.expanded?pe.chevronUpIcon:pe.chevronDownIcon}),e.children)}),tt={icon:c.IconWrap};Ce.defaultProps=tt,Ce.displayName="KendoReactPivotGridHeaderCell";const Ct=(...e)=>{const a=t.useRef();return r=>{a.current!==void 0&&window.cancelAnimationFrame(a.current);const s=r.currentTarget,l=s.scrollLeft;e.forEach(m=>{const i=m.current;i&&i!==s&&(a.current=window.requestAnimationFrame(()=>{i.scrollLeft=Math.round(l)}))})}},At=(...e)=>{const a=t.useRef();return r=>{a.current!==void 0&&window.cancelAnimationFrame(a.current);const s=r.currentTarget,l=s.scrollTop;e.forEach(m=>{const i=m.current;i&&i!==s&&(a.current=window.requestAnimationFrame(()=>{i.scrollTop=Math.round(l)}))})}},Ae=t.forwardRef((e,a)=>{const n=t.useRef(null),r=t.useRef(null);t.useImperativeHandle(n,()=>({element:r.current,props:e})),t.useImperativeHandle(a,()=>n.current);const s=c.useMouse(e,n);return t.createElement("col",{ref:r,...s,id:e.id,style:e.style,tabIndex:e.tabIndex,children:e.children,className:e.className})}),yt={path:[]};Ae.defaultProps=yt,Ae.displayName="KendoReactPivotGridColumn";const wt=(e,a,n)=>{const r=JSON.parse(JSON.stringify(e||[])),s=JSON.parse(JSON.stringify(a||[])),l=JSON.parse(JSON.stringify(n||[])),m=b.toTree(r),[,i,C]=b.toRows(m),f=b.toTree(s),[,x,,F]=b.toColumns(f);return b.toData(l,x,i,F,C)},ye=(e=[],a={},n=null)=>e.map(r=>{const s={dataItem:r};return Object.keys(a).forEach(l=>{s[l]=a[l](s,n)}),s}),$e=(e=[])=>{let a=[...e];return(e||[]).forEach(n=>{a=a.concat($e(n.children))}),a},_e=(e=[])=>{const a=new Set;return e.forEach(n=>{a.add(String(n.name))}),Array.from(a)},oe=(e=[])=>`${e.join(",")}`,Ft=(e,a)=>`${oe(e.map(n=>n.name))}|${oe(a.map(n=>n.name))}`,bt=(e,a,n)=>{if(!e)return;let r=0,s,l=e.length,m;for(;r<l;r++)m=e[r].operator,(!n&&m!=="in"||m===n)&&e[r].field===a&&(s=e[r]);return s},nt=(e,a,n)=>{if(!e)return[];let r=0,s=[],l=e.length,m;for(;r<l;r++)m=e[r].operator,(!n&&m!=="in"||m===n)&&e[r].field===a&&s.push(e[r]);return s},at=(e,a)=>e.uniqueName===a.uniqueName,rt=t.forwardRef((e,a)=>{c.validatePackage(pt);const{rows:n,rowAxes:r,columns:s,columnAxes:l,data:m}={...he,...e},i=t.useRef(null),C=t.useRef(null),f=t.useRef(null),x=t.useRef(null),F=t.useRef(null),K=t.useRef(null),D=t.useRef(null),j=fe.useLocalization(),G=(v,M)=>{e.onRowAxesChange&&e.onRowAxesChange({value:v,target:C.current,syntheticEvent:M})},$=(v,M)=>{e.onColumnAxesChange&&e.onColumnAxesChange({value:v,target:C.current,syntheticEvent:M})},_=b.toTree((n||[]).slice()),[,p]=et((r||[]).slice(),_,G),[L,g,U,V]=b.toRows(_),O=b.toTree((s||[]).slice()),[,u]=et((l||[]).slice(),O,$),[y,H,,P]=b.toColumns(O),w=b.toData((m||[]).slice(),H,g,P,U);t.useImperativeHandle(C,()=>({props:e,element:i.current,columnHeaderRows:y,rowHeaderRows:L,dataCells:w,rowHeaderBreadth:V,columnHeaderBreadth:P})),t.useImperativeHandle(a,()=>C.current);const J=[],W=[],o=[],[h,E]=c.useCustomComponent(e.row||he.row),[N,T]=c.useCustomComponent(e.column||he.column),[z,X]=c.useCustomComponent(e.cell||he.cell),[d,q]=c.useCustomComponent(e.headerCell||he.headerCell),B=e.columnHeadersRow||h,R=e.columnHeadersColumn||N,ee=e.columnHeadersCell||d,Q=e.rowHeadersRow||h,le=e.rowHeadersColumn||N,Tt=e.rowHeadersCell||d,Dt=e.dataRow||h,Ht=e.dataColumn||N;for(let v=0;v<H.length;v++)J.push(t.createElement(Ht,{key:String(H[v].path),...T,path:H[v].path})),o.push(t.createElement(R,{key:String(H[v].path),...T,path:H[v].path}));for(let v=0;v<V;v++)W.push(t.createElement(le,{key:v,...T}));const Rt=v=>{v.target.props.expandable&&u({type:b.HEADERS_ACTION.toggle,payload:v.target.props.dataItem.path},v.syntheticEvent)},Gt=v=>{v.target.props.expandable&&p({type:b.HEADERS_ACTION.toggle,payload:v.target.props.dataItem.path},v.syntheticEvent)},ft=Ct(D,K),Ot=At(D,F),qt=v=>{ft(v),Ot(v)},gt=t.useCallback(()=>{i.current&&x.current&&(i.current.style.gridTemplateRows="",i.current.style.gridTemplateRows=`${x.current.offsetHeight}px 1fr`)},[]),ht=t.useCallback(()=>{i.current&&f.current&&(i.current.style.gridTemplateColumns="",i.current.style.gridTemplateColumns=`${f.current.offsetWidth}px 1fr`)},[]),ce=t.useRef(new b.PivotGridNavigation({tabIndex:e.tabIndex||0}));t.useEffect(()=>{if(i.current){const v=e.tabIndex||0;if(ce.current.stop(),ce.current.tabIndex=v,e.navigatable){ce.current.start(i.current);const M=ce.current.first;M&&M.setAttribute("tabindex",String(v))}}return()=>{ce.current.stop()}},[e.tabIndex,e.navigatable]),t.useEffect(()=>{ce.current.update()}),t.useEffect(()=>{if(x.current){const v=new window.ResizeObserver(gt);return v.observe(x.current),()=>{v.disconnect()}}},[gt]),t.useEffect(()=>{if(f.current){const v=new window.ResizeObserver(ht);return v.observe(f.current),()=>{v.disconnect()}}},[ht]),t.useLayoutEffect(()=>{if(c.setScrollbarWidth(),f.current){const v=new window.ResizeObserver(c.setScrollbarWidth);return v.observe(f.current),()=>{v.disconnect()}}},[]);const ue=new Array(y.length).fill([]).map(()=>new Array(H.length));y.forEach((v,M)=>{let S=0;Array.from(v.cells).forEach(I=>{const Y=!!(I&&I.children&&I.children.length),Qe=(I?oe(I.normalizedPath)+(I.total?"|[TOTAL]":"")+(Y?"|[EXPANDED]":""):"").replace(/\s/g,"-");if(I)for(let Le=0;Le<(I.colSpan||1);Le++){for(let de=0;de<(I.rowSpan||1);de++){const kt=ue[M+de].findIndex((Kt,zt)=>zt>=S&&!Kt);ue[M+de][kt]=Qe}S++}})});const Me=w.map(v=>v.cells.map(M=>Ft(M.rowTuple.members,M.columnTuple.members).replace(/\s/g,"-")));return t.createElement("div",{ref:i,id:e.id,style:e.style,tabIndex:e.navigatable?void 0:e.tabIndex,className:c.classNames("k-pivotgrid",e.className),role:"grid"},t.createElement("span",{className:"k-pivotgrid-empty-cell"},t.createElement("span",{className:"k-sr-only"},j.toLanguageString(De,Z[De]))),t.createElement("div",{ref:K,className:"k-pivotgrid-column-headers",onScroll:ft},t.createElement("table",{ref:x,className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,o),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},y.map((v,M)=>{let S=!1;return t.createElement(B,{key:v.name,role:"row",...E},v.cells.map((I,Y)=>{const Qe=Y!==0&&!S;I&&(S=!0);const Le=I&&!!(I.children&&I.children.length),de=I&&I.hasChildren&&(!I.total||I.total&&I.parent.total);return I?t.createElement(ee,{...q,key:ue[M][Y],"data-key":ue[M][Y],id:ue[M][Y],columnPath:I.normalizedPath,rowSpan:I.rowSpan||void 0,colSpan:I.colSpan||void 0,onIconClick:Rt,dataItem:I,expanded:Le,expandable:de,total:I.total,first:Qe,root:I.levelNum===0,role:"columnheader"},I.caption):null}))})))),t.createElement("div",{ref:F,className:"k-pivotgrid-row-headers"},t.createElement("table",{ref:f,className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,W),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},L.map((v,M)=>t.createElement(Q,{key:oe(g[M].path),...E,path:g[M].path,role:"row",ariaOwns:Me[M].join(" ")},v.cells.filter(Boolean).map(S=>S?t.createElement(Tt,{...q,key:oe(S.normalizedPath)+(S.total?"|[TOTAL]":"")+(S.children&&S.children.length?"|[EXPANDED]":""),"data-key":oe(S.normalizedPath)+(S.total?"|[TOTAL]":"")+(S.children&&S.children.length?"|[EXPANDED]":""),rowPath:S.normalizedPath,rowSpan:S.rowSpan||void 0,colSpan:S.colSpan||void 0,dataItem:S,expanded:!!(S.children&&S.children.length),expandable:S.hasChildren&&!S.total,total:S.total,onIconClick:Gt,root:S.levelNum===0,role:"rowheader"},S.caption):null)))))),t.createElement("div",{ref:D,className:"k-pivotgrid-values",onScroll:qt},t.createElement("table",{className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,J),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"none"},w.map((v,M)=>t.createElement(Dt,{key:oe(g[M].path),...E,path:g[M].path,role:"none"},v.cells.map((S,I)=>t.createElement(z,{key:Me[M][I],"data-key":Me[M][I],id:Me[M][I],...X,rowPath:S.rowTuple.members.map(Y=>Y.name),columnPath:S.columnTuple.members.map(Y=>Y.name),dataItem:S,total:g[M].total||H[I].total,role:"gridcell",ariaDescribedby:ue.map(Y=>Y[I]).join(" ")},S&&S.data&&S.data.fmtValue?S.data.fmtValue:" "))))))))}),he={rowAxes:[],columnAxes:[],data:[],row:Ve,column:Ae,cell:je,headerCell:Ce};rt.displayName="KendoReactPivotGrid";const Xe=t.forwardRef((e,a)=>{const n=t.useRef(null),r=t.useRef(null);return t.useImperativeHandle(r,()=>({props:e,element:n.current})),t.useImperativeHandle(a,()=>r.current),t.createElement("div",{ref:n,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)}),Nt={configuratorPosition:"right"};Xe.defaultProps=Nt,Xe.displayName="KendoReactPivotGridContainer";const ot=t.createContext({axes:null});var Ze=(e=>(e.toggle="EXPAND_TOGGLE",e.expand="EXPAND_EXPAND",e.collapse="EXPAND_COLLAPSE",e))(Ze||{});const St=(e,a,n)=>{switch(a.type){case"EXPAND_TOGGLE":return Array.isArray(e)?e.find(r=>n(r,a.payload))?[...e.filter(r=>!n(r,a.payload))]:[...e,a.payload]:n(e,a.payload)?null:a.payload;case"EXPAND_EXPAND":if(Array.isArray(e)){if(!e.find(r=>n(r,a.payload)))return[...e,a.payload]}else if(!n(e,a.payload))return a.payload;break;case"EXPAND_COLLAPSE":if(Array.isArray(e)){if(e.find(r=>n(r,a.payload)))return[...e.filter(r=>!n(r,a.payload))]}else n(e,a.payload);break;default:return e}},st=(e=[],a,n,r=(s,l)=>s===l)=>{const[s,l]=t.useState(e);return[s,(i,C)=>{const f=St(s,i,r);a&&a.call(void 0,{value:f,target:n.current,syntheticEvent:C}),l(f)}]};var lt=(e=>(e.toggleExpansion="PIVOT_CONFIGURATOR_ACTION_TOGGLE_EXPANSION",e))(lt||{});const k={...b.PIVOT_CONFIGURATOR_ACTION,...lt},It=(e,a)=>{const n=e.valueGetter("rowAxes"),r=e.valueGetter("columnAxes"),s=e.valueGetter("measureAxes"),l=e.valueGetter("sort"),m=e.valueGetter("filter"),[i,C]=st([],void 0,a,at),[f,x]=t.useState(null),[F,K]=t.useState(null),[D,j]=t.useState(null),[G,$]=t.useState(null);return[{dragItem:f,dropTarget:D,dropZone:F,dropDirection:G,columnAxes:r,rowAxes:n,measureAxes:s,sort:l,filter:m,expanded:i},(p,L)=>{switch(p.type){case k.toggleExpansion:{C({type:Ze.toggle,payload:p.payload},L);break}default:const g=b.configuratorReducer({filter:p.override&&p.override.filter!==void 0?p.override.filter:m,sort:p.override&&p.override.sort!==void 0?p.override.sort:l,rowAxes:p.override&&p.override.rowAxes!==void 0?p.override.rowAxes:n,columnAxes:p.override&&p.override.columnAxes!==void 0?p.override.columnAxes:r,measureAxes:p.override&&p.override.measureAxes!==void 0?p.override.measureAxes:s,dragItem:p.override&&p.override.dragItem!==void 0?p.override.dragItem:f,dropDirection:p.override&&p.override.dropDirection!==void 0?p.override.dropDirection:G,dropTarget:p.override&&p.override.dropTarget!==void 0?p.override.dropTarget:D,dropZone:p.override&&p.override.dropZone!==void 0?p.override.dropZone:F},p);g.columnAxes!==void 0&&e.onChange("columnAxes",{value:g.columnAxes}),g.rowAxes!==void 0&&e.onChange("rowAxes",{value:g.rowAxes}),g.measureAxes!==void 0&&e.onChange("measureAxes",{value:g.measureAxes}),g.sort!==void 0&&e.onChange("sort",{value:g.sort}),g.filter!==void 0&&e.onChange("filter",{value:g.filter}),g.dropDirection!==void 0&&$(g.dropDirection),g.dropTarget!==void 0&&j(g.dropTarget),g.dropZone!==void 0&&K(g.dropZone),g.dragItem!==void 0&&x(g.dragItem);break}}]},it=t.createContext({}),we=t.createContext([{expanded:[],rowAxes:[],columnAxes:[],measureAxes:[],dragItem:null,dropZone:null,dropDirection:null,dropTarget:null},c.noop]),Fe=t.forwardRef((e,a)=>{const{data:n,dataItem:r,defaultFilter:s}={...ae,...e},l=t.useRef(null),m=t.useRef(null),i=fe.useLocalization(),[C,f]=c.useCustomComponent(e.columnMenuItem||ae.columnMenuItem),[x,F]=c.useCustomComponent(e.columnMenuForm||ae.columnMenuForm),[K,D]=c.useCustomComponent(e.resetButton||ae.resetButton),[j,G]=c.useCustomComponent(e.applyButton||ae.applyButton),[$,_]=c.useCustomComponent(e.treeView||ae.treeView),[p,L]=c.useCustomComponent(e.noData||ae.noData);t.useImperativeHandle(m,()=>({props:e,element:l.current})),t.useImperativeHandle(a,()=>m.current);const[g,U]=t.useState(!1),{onAxisFilterFieldsExpandChange:V,onAxisFilterFieldExpand:O}=t.useContext(it),[,u]=t.useContext(we),[y,H]=t.useState(s),P=y?y.value.split(","):[],[w,J]=st([],void 0,m,at),W={caption:d=>d.dataItem.caption,id:d=>d.dataItem.uniqueName,parent:(d,q)=>q&&q.value,value:d=>d.dataItem.defaultHierarchy||d.dataItem.uniqueName,expanded:d=>w.some(q=>q.uniqueName===d.id),checked:d=>!P.length||(P||[]).some(q=>q===d.dataItem.uniqueName),hasChildren:d=>parseInt(d.dataItem.childrenCardinality,10)>0,children:d=>ye(d.dataItem.children,W,d),checkIndeterminate:d=>{const q=(d.children||[]).length&&d.children.every(B=>B.checked);return q&&(d.checked=!0),(d.children||[]).some(B=>B.checked)&&!q}},o=ye(n,W),h=$e(o),E=d=>{U(!g),V&&V({value:!g,target:m.current,syntheticEvent:d})},N=d=>{J({type:Ze.toggle,payload:d.item.dataItem},d.syntheticEvent),O&&O({value:d.item.dataItem,target:m.current,syntheticEvent:d.syntheticEvent})},T=d=>{let q;d.item.checked?q={field:String(r.name),operator:"in",value:h.filter(B=>B.checked).map(B=>String(B.value)).filter(B=>B!==d.item.value&&B!==d.item.parent).join(",")}:q={field:String(r.name),operator:"in",value:h.filter(B=>B.checked).map(B=>String(B.value)).concat([d.item.value]).join(",")},H(q)},z=d=>{U(!1),y&&u({type:k.removeFilter,payload:y},d)},X=d=>{U(!1),y&&u({type:s?k.changeFilter:k.addFilter,payload:y},d)};return t.createElement("div",{ref:l,id:e.id,tabIndex:e.tabIndex,style:e.style,className:c.classNames("k-columnmenu-item-wrapper",e.className)},t.createElement(C,{...f,title:"Include Fields",iconClass:"k-i-grid-layout",svgIcon:pe.gridLayoutIcon,onClick:E}),t.createElement(x,{show:g,actions:t.createElement(t.Fragment,null,t.createElement(K,{type:"reset",onClick:z,...D},i.toLanguageString(He,Z[He])),t.createElement(j,{themeColor:"primary",onClick:X,...G},i.toLanguageString(Re,Z[Re]))),...F},o&&o.length?t.createElement($,{data:o,checkboxes:!0,onExpandChange:N,onCheckChange:T,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",..._}):t.createElement(p,{...L})))}),ae={data:[],resetButton:ie.Button,applyButton:ie.Button,treeView:Te.TreeView,noData:()=>t.createElement(vt.Skeleton,{shape:"rectangle",style:{height:"20px",width:"calc(100% - 16px)",margin:8}}),columnMenuItem:Ee.ColumnMenuItem,columnMenuForm:Ee.ColumnMenuForm};Fe.defaultProps=ae,Fe.displayName="KendoReactPivotGridAxisFilterFieldsEditor";const be=t.forwardRef((e,a)=>{const n=t.useRef(0),r=t.useRef(0),s=t.useRef(null),l=t.useRef(null),m=t.useRef(null),{axes:i}=t.useContext(ot),[C,f]=t.useState(!1),[x,F]=t.useContext(we);t.useImperativeHandle(l,()=>s.current&&s.current.element),t.useImperativeHandle(m,()=>({props:e,element:l.current})),t.useImperativeHandle(a,()=>m.current);const[K,D]=c.useCustomComponent(e.chip||ve.chip),[j,G]=c.useCustomComponent(e.dropClue||ve.dropClue),[$,_]=c.useCustomComponent(e.columnMenuTextColumn||ve.columnMenuTextColumn),[p,L]=c.useCustomComponent(e.filterFieldsEditor||ve.filterFieldsEditor),g=nt(x.filter,String(e.value),"in"),U=nt(x.filter,String(e.value)),V=(o,h)=>{F({type:k.setSort,payload:h},o)},O=(o,h)=>{h.length?F({type:k.setFilter,payload:[...g||[],...h.reduce((E,N)=>[...E,...N.filters.filter(T=>T.value)],[])]},o):F({type:k.setFilter,payload:g},o)},u=o=>{F({type:k.remove,payload:e.dataItem},o.syntheticEvent)},y=o=>{const h=o.slice(),E=bt(x.filter,String(e.dataItem.name),"in");return h.splice(1,0,t.createElement(p,{key:"axis-filter-fields-editor",defaultFilter:E,dataItem:e.dataItem,data:e.dataItem.fields,axes:i,...L})),h},H=o=>{n.current=o.clientX,r.current=o.clientY},P=o=>{Math.abs(n.current-o.clientX)<10&&Math.abs(r.current-o.clientY)<10||(l.current&&(l.current.style.transform=`translate(${o.clientX-n.current}px, ${o.clientY-r.current}px)`),f(!0),F({type:k.setDragItem,payload:e.dataItem}))},w=()=>{f(!1),x.dragItem&&(l.current&&(l.current.style.transform=""),F({type:k.drop,payload:e.dataItem}))},J=o=>{x.dragItem&&(F({type:k.setDropTarget,payload:e.dataItem},o.syntheticEvent),F({type:k.setDropZone,payload:i},o.syntheticEvent))},W=o=>{if(x.dragItem&&!C&&l.current){const h=l.current.getBoundingClientRect(),N=o.syntheticEvent.clientX-h.left<h.width/2?"before":"after";F({type:k.setDropDirection,payload:N},o.syntheticEvent)}};return c.useDraggable(l,{onPress:H,onDrag:P,onRelease:w}),t.createElement(t.Fragment,null,x.dropTarget&&b.compareAxes(x.dropTarget,e.dataItem)&&x.dropDirection==="before"&&t.createElement(j,{...G}),t.createElement(K,{ref:c.canUseRef(K)?s:void 0,...e,removable:!0,onRemove:u,onMouseEnter:J,onMouseMove:W,style:{pointerEvents:C?"none":void 0},rounded:"full",...D},e.text,i!=="measureAxes"&&t.createElement($,{field:String(e.value),itemsRender:y,sort:x.sort,onSortChange:V,filter:U&&U.length?[{logic:"and",filters:U}]:void 0,onFilterChange:O,filterContent:[Ee.ColumnMenuTextFilter],..._})),x.dropTarget&&b.compareAxes(x.dropTarget,e.dataItem)&&x.dropDirection==="after"&&t.createElement(j,{...G}))}),ve={chip:ie.Chip,columnMenuTextColumn:Ee.ColumnMenuTextColumn,filterFieldsEditor:Fe,dropClue:e=>t.createElement("div",{className:"k-grouping-dropclue",style:{position:"relative",zIndex:1e4},...e})};be.defaultProps=ve,be.displayName="KendoReactPivotGridAxisEditor";const se=t.forwardRef((e,a)=>{const{value:n,field:r}={...Je,...e},s=t.useRef(null),l=t.useRef(null),m=t.useRef(null),[i,C]=c.useCustomComponent(e.chipList||Je.chipList);t.useImperativeHandle(l,()=>s.current&&s.current.element),t.useImperativeHandle(m,()=>({props:e,element:l.current})),t.useImperativeHandle(a,()=>m.current);const f=n.filter(x=>x.name.length===1&&x.name.every(F=>F.indexOf("&")===-1)).map(x=>({...x,text:String(x.name)}));return t.createElement(ot.Provider,{value:{axes:r}},t.createElement(i,{ref:c.canUseRef(i)?s:void 0,textField:"text",valueField:"name",data:f,chip:be,style:{position:"relative"},className:e.className,selection:"none",...C}))}),Je={value:[],chipList:ie.ChipList};se.defaultProps=Je,se.displayName="KendoReactPivotGridAxesEditor";const Ne=t.forwardRef((e,a)=>{const{data:n,rowAxes:r,columnAxes:s,measureAxes:l,onExpand:m,onCheck:i}={...Se,...e},C=t.useRef(null),f=t.useRef(null),[x,F]=c.useCustomComponent(e.treeView||Se.treeView),[K,D]=c.useCustomComponent(e.noData||Se.noData);t.useImperativeHandle(f,()=>({props:e,element:C.current&&C.current.element})),t.useImperativeHandle(a,()=>f.current);const[j]=t.useContext(we),G=_e(s),$=_e(r),_=_e(l),L=$e(n).filter(u=>[...G,...$,..._].some(y=>y===u.uniqueName||y===u.defaultHierarchy)),g={caption:u=>u.dataItem.caption,id:u=>u.dataItem.uniqueName,value:u=>u.dataItem.defaultHierarchy||u.dataItem.uniqueName,expanded:u=>j.expanded.some(y=>y.uniqueName===u.dataItem.uniqueName),hasChildren:u=>!("hierarchyUniqueName"in u.dataItem)&&!("aggregator"in u.dataItem),selectable:u=>!(!u.hasChildren&&!u.dataItem.aggregator&&!u.dataItem.measure||u.dataItem.type===2||u.dataItem.uniqueName==="[KPIs]"),children:u=>ye(u.dataItem.children,g,u),checked:u=>L.some(y=>u.dataItem.defaultHierarchy?y.defaultHierarchy===u.dataItem.defaultHierarchy:y.uniqueName===u.dataItem.uniqueName)||u.children.length&&u.children.every(y=>y.checked)},U=u=>{m&&m({value:u.item.dataItem,target:f.current,syntheticEvent:u.syntheticEvent})},V=u=>{i&&i({value:u.item.dataItem,target:f.current,syntheticEvent:u.syntheticEvent})},O=ye(e.data,g);return t.createElement(Te.TreeViewItemPropsContext.Provider,{value:u=>({...u,checkboxes:u.item.selectable})},O&&O.length?t.createElement(x,{ref:c.canUseRef(x)?C:void 0,data:O,checkboxes:!0,onExpandChange:U,onCheckChange:V,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...F}):t.createElement(K,{...D}))}),Se={data:[],rowAxes:[],columnAxes:[],measureAxes:[],treeView:Te.TreeView,noData:()=>t.createElement("div",null,"NO DATA")};Ne.defaultProps=Se,Ne.displayName="KendoReactPivotGridFieldsEditor";const Ie=t.forwardRef((e,a)=>{const{onFieldsEditorFieldCheck:n,onFieldsEditorFieldCheckAction:r,onFieldsEditorFieldExpand:s,onFieldsEditorFieldExpandAction:l,onAxisFilterFieldExpand:m,onAxisFilterFieldsExpandChange:i}=e,[C,f]=c.useCustomComponent(e.fieldsLabel||te.fieldsLabel),[x,F]=c.useCustomComponent(e.fieldsEditor||te.fieldsEditor),[K,D]=c.useCustomComponent(e.columnAxesLabel||te.columnAxesLabel),[j,G]=c.useCustomComponent(e.columnAxesEditor||te.columnAxesEditor),[$,_]=c.useCustomComponent(e.rowAxesLabel||te.rowAxesLabel),[p,L]=c.useCustomComponent(e.rowAxesEditor||te.rowAxesEditor),[g,U]=c.useCustomComponent(e.measureAxesLabel||te.measureAxesLabel),[V,O]=c.useCustomComponent(e.measureAxesEditor||te.measureAxesEditor),u=t.useRef(null),y=t.useRef(null),H=fe.useLocalization(),[P,w]=It(e,y);t.useImperativeHandle(y,()=>({element:u.current,props:e,state:P})),t.useImperativeHandle(a,()=>y.current);const J=()=>{P.dragItem&&w({type:k.setDropZone,payload:"columnAxes"})},W=()=>{P.dragItem&&w({type:k.setDropZone,payload:null})},o=()=>{P.dragItem&&w({type:k.setDropZone,payload:"rowAxes"})},h=()=>{P.dragItem&&w({type:k.setDropZone,payload:null})},E=()=>{P.dragItem&&w({type:k.setDropZone,payload:"measureAxes"})},N=()=>{P.dragItem&&w({type:k.setDropZone,payload:null})},T=R=>{const ee={target:R.target,currentTarget:y.current,value:R.value,syntheticEvent:R.syntheticEvent};if(l){const Q=l(ee,e,P);Q&&(Array.isArray(Q)?Q.filter(Boolean).map(le=>le&&w({...le},R.syntheticEvent)):w({...Q},R.syntheticEvent))}s&&s({target:R.target,currentTarget:y.current,value:R.value,syntheticEvent:R.syntheticEvent})},z=R=>{const ee={target:R.target,currentTarget:y.current,value:R.value,syntheticEvent:R.syntheticEvent};if(r){const Q=r(ee,e,P);Q&&(Array.isArray(Q)?Q.filter(Boolean).map(le=>le&&w({...le},R.syntheticEvent)):w({...Q},R.syntheticEvent))}n&&n(ee)},X=R=>{const ee={target:R.target,currentTarget:y.current,value:R.value,syntheticEvent:R.syntheticEvent};m&&m(ee)},d=R=>{const ee={target:R.target,currentTarget:y.current,value:R.value,syntheticEvent:R.syntheticEvent};i&&i(ee)},q=e.horizontal?"div":t.Fragment,B=e.horizontal?{className:"k-form-field-wrapper"}:{};return t.createElement(it.Provider,{value:{onAxisFilterFieldExpand:X,onAxisFilterFieldsExpandChange:d}},t.createElement(we.Provider,{value:[P,w]},t.createElement(q,{...B},t.createElement("div",{className:"k-form-field"},t.createElement(C,{name:"",component:ge.Label,...f},H.toLanguageString(Be,Z[Be]))),t.createElement("div",{className:"k-form-field"},t.createElement("div",{className:"k-fields-list-wrapper"},t.createElement(x,{data:e.data,onExpand:T,onCheck:z,columnAxes:P.columnAxes,rowAxes:P.rowAxes,measureAxes:P.measureAxes,...F})))),t.createElement(q,{...B},t.createElement("div",{className:"k-form-field",onMouseEnter:J,onMouseLeave:W},t.createElement(ne.Field,{name:"columnAxes",field:"columnAxes",component:K,...D},H.toLanguageString(ke,Z[ke]))),e.valueGetter("columnAxes").length?t.createElement(ne.Field,{name:"columnAxes",field:"columnAxes",component:j,onMouseEnter:J,onMouseLeave:W,className:"k-column-fields",...G}):t.createElement("div",{className:"k-settings-description",onMouseEnter:J,onMouseLeave:W},H.toLanguageString(re,Z[re])),t.createElement("div",{className:"k-form-field",onMouseEnter:o,onMouseLeave:h},t.createElement(ne.Field,{name:"rowAxes",field:"rowAxes",component:$,..._},H.toLanguageString(Ke,Z[Ke]))),e.valueGetter("rowAxes").length?t.createElement(ne.Field,{name:"rowAxes",field:"rowAxes",component:p,onMouseEnter:o,onMouseLeave:h,className:"k-column-fields",...L}):t.createElement("div",{className:"k-settings-description",onMouseEnter:o,onMouseLeave:h},H.toLanguageString(re,Z[re]))),t.createElement(q,{...B},t.createElement("div",{className:"k-form-field",onMouseEnter:E,onMouseLeave:N},t.createElement(ne.Field,{name:"measureAxes",field:"measureAxes",component:g,...U},H.toLanguageString(ze,Z[ze]))),e.valueGetter("measureAxes").length?t.createElement(ne.Field,{name:"measureAxes",field:"measureAxes",component:V,onMouseEnter:E,onMouseLeave:N,className:"k-column-fields",...O}):t.createElement("div",{className:"k-settings-description",onMouseEnter:E,onMouseLeave:N},H.toLanguageString(re,Z[re])))))}),te={data:[],horizontal:!1,fieldsLabel:ge.Label,fieldsEditor:Ne,columnAxesLabel:ge.Label,columnAxesEditor:se,rowAxesLabel:ge.Label,rowAxesEditor:se,measureAxesLabel:ge.Label,measureAxesEditor:se,axesEditor:se,onFieldsEditorFieldCheckAction:e=>({type:k.toggleSelection,payload:e.value}),onFieldsEditorFieldExpandAction:e=>({type:k.toggleExpansion,payload:e.value})};Ie.defaultProps=te,Ie.displayName="KendoReactPivotGridConfiguratorEditor";const We=t.forwardRef((e,a)=>{const{horizontal:n,data:r,rowAxes:s,columnAxes:l,measureAxes:m}={...xe,...e},i=t.useRef(null),C=t.useRef(null),f=t.useRef(null),x=fe.useLocalization(),[F,K]=c.useCustomComponent(e.editor||xe.editor),[D,j]=c.useCustomComponent(e.form||xe.form),[G,$]=c.useCustomComponent(e.formElement||xe.formElement);t.useImperativeHandle(C,()=>({props:e,element:i.current})),t.useImperativeHandle(a,()=>C.current);const _=(L,g)=>{e.onRowAxesChange&&e.onRowAxesChange({target:C.current,value:L.rowAxes,syntheticEvent:g}),e.onColumnAxesChange&&e.onColumnAxesChange({target:C.current,value:L.columnAxes,syntheticEvent:g}),e.onMeasureAxesChange&&e.onMeasureAxesChange({target:C.current,value:L.measureAxes,syntheticEvent:g}),e.onSortChange&&e.onSortChange({target:C.current,value:L.sort,syntheticEvent:g}),e.onFilterChange&&e.onFilterChange({target:C.current,value:L.filter,syntheticEvent:g})},p={rowAxes:s,columnAxes:l,measureAxes:m,sort:e.sort,filter:e.filter};return t.useEffect(()=>{f.current&&f.current.onChange("rowAxes",{value:s})},[s]),t.useEffect(()=>{f.current&&f.current.onChange("columnAxes",{value:l})},[l]),t.useEffect(()=>{f.current&&f.current.onChange("measureAxes",{value:m})},[m]),t.useEffect(()=>{f.current&&f.current.onChange("sort",{value:e.sort})},[e.sort]),t.useEffect(()=>{f.current&&f.current.onChange("filter",{value:e.filter})},[e.filter]),t.createElement("div",{ref:i,id:e.id,tabIndex:e.tabIndex,style:e.style,className:c.classNames("k-pivotgrid-configurator",e.className)},t.createElement("div",{className:c.classNames("k-pivotgrid-configurator-panel","k-pivotgrid-configurator-push",{"k-pivotgrid-configurator-horizontal":n,"k-pivotgrid-configurator-vertical":!n})},t.createElement("div",{className:"k-pivotgrid-configurator-header"},t.createElement("div",{className:"k-pivotgrid-configurator-header-text"},x.toLanguageString(Ge,Z[Ge]))),t.createElement(D,{ref:c.canUseRef(D)?f:void 0,initialValues:p,onSubmit:_,render:L=>t.createElement(t.Fragment,null,t.createElement("div",{className:"k-pivotgrid-configurator-content"},t.createElement(G,{horizontal:n,...$},t.createElement(F,{...L,horizontal:e.horizontal,onFieldsEditorFieldExpand:e.onFieldsEditorFieldExpand,onFieldsEditorFieldCheck:e.onFieldsEditorFieldCheck,onAxisFilterFieldExpand:e.onAxisFilterFieldExpand,onAxisFilterFieldsExpandChange:e.onAxisFilterFieldsExpandChange,data:r,...K}))),t.createElement("div",{className:"k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end"},t.createElement(ie.Button,{type:"submit",onClick:L.onFormReset},x.toLanguageString(Oe,Z[Oe])),t.createElement(ie.Button,{themeColor:"primary",type:"submit",onClick:L.onSubmit},x.toLanguageString(qe,Z[qe])))),...j})))}),xe={form:ne.Form,formElement:ne.FormElement,editor:Ie,horizontal:!1,data:[],columnAxes:[],rowAxes:[],measureAxes:[]};We.defaultProps=xe,We.displayName="KendoReactPivotGridConfigurator";const Ye=t.forwardRef((e,a)=>{const n=t.useRef(null),r=t.useRef(null),s=fe.useLocalization();t.useImperativeHandle(n,()=>({props:e,element:r.current})),t.useImperativeHandle(a,()=>n.current);const[l,m]=c.useCustomComponent(e.icon||ct.icon),i=t.useMemo(()=>c.classNames("k-pivotgrid-configurator-button",e.className),[e.className]),C=c.useMouse(e,n);return t.createElement("div",{ref:r,id:e.id,className:i,tabIndex:e.tabIndex,...C},t.createElement("span",null,s.toLanguageString(Ue,Z[Ue]),t.createElement(l,{name:"gear",icon:pe.gearIcon,...m})))}),ct={icon:c.IconWrap};Ye.defaultProps=ct,Ye.displayName="KendoReactPivotGridConfiguratorButton";const ut=e=>{const[a,n]=t.useState(!0),[r,s]=t.useState({data:[],columns:[],rows:[]}),[l,m]=t.useState([]),[i,C]=t.useState(e.defaultColumnAxes||[]),[f,x]=t.useState(e.defaultRowAxes||[]),[F,K]=t.useState(e.defaultMeasureAxes||[]),[D,j]=t.useState(e.defaultSort||[]),[G,$]=t.useState(e.defaultFilter||[]),_=o=>{x(o.value)},p=o=>{C(o.value)},L=o=>{K(o.value)},g=o=>{j(o.value)},U=o=>{$(o.value)};t.useEffect(()=>{n(!0);const o={connection:{catalog:e.catalog,cube:e.cube},columnAxes:i.slice(),rowAxes:f.slice(),measureAxes:F,sort:D,filter:G};setTimeout(()=>{b.fetchData({url:e.url},c.clone(o)).then(b.createDataState).then(h=>{s(h),n(!1)})})},[i,f,F,G,D,e.cube,e.catalog,e.url]),t.useEffect(()=>{n(!0);const o={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube},command:"schemaDimensions"};b.fetchDiscover({url:e.url},o).then(h=>{b.addKPI(h),m(h),n(!1)})},[e.catalog,e.cube,e.url]);const V=(o=[],h)=>{for(let E=0;E<o.length;E++){const N=o[E];if(String(N.name)===String(h.name))return N}return null},O=(o=[],h)=>{for(let E=0;E<o.length;E++){const N=o[E];if(N.uniqueName===h.uniqueName)return N;let T=O(N.children,h);if(T!==null)return T}return null},u=async o=>{let h,E,N,T,z,X;o.name&&(h="schemaMembers",T=`${String(o.name)}.[(ALL)]`);const d={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:N,dimensionUniqueName:E,levelUniqueName:T,memberUniqueName:z,treeOp:X},command:h};return b.fetchDiscover({url:e.url},d)},y=async o=>{let h,E,N,T,z,X;o.uniqueName&&(h="schemaMembers",z=o.uniqueName.replace(/\&/g,"&amp;"),X=1);const d={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:N,dimensionUniqueName:E,levelUniqueName:T,memberUniqueName:z,treeOp:X},command:h};return b.fetchDiscover({url:e.url},d)},H=async o=>{let h,E,N,T,z,X;o.type===2?h="schemaMeasures":o.dimensionUniqueName?(h="schemaLevels",N=o.uniqueName):(h="schemaHierarchies",E=o.uniqueName);const d={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:N,dimensionUniqueName:E,levelUniqueName:T,memberUniqueName:z,treeOp:X},command:h};return b.fetchDiscover({url:e.url},d)},P=async()=>{const o={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube},command:"schemaKPIs"};return b.fetchDiscover({url:e.url},o)},w=async o=>{const h=l.slice(),E=O(h,o.value);if(E&&E.uniqueName==="[KPIs]"){const N=Mt(await P());E.children=N}else if(E&&E.type==="kpi")E.children=b.buildKPIMeasures(E);else if(E&&!E.children){const N=await H(E);E.children=N}m(h)},J=async o=>{if(!o)return;const h={rowAxes:[f,x],columnAxes:[i,C],measureAxes:[F,K]},[E,N]=h[o.target.props.axes],T=E.slice(),z=V(T,o.target.props.dataItem);if(z&&!z.fields){const X=await u(z);z.fields=X,N(T)}},W=async o=>{if(!o)return;const h={rowAxes:[f,x],columnAxes:[i,C],measureAxes:[F,K]},[E,N]=h[o.target.props.axes],T=E.slice(),z=V(T,o.target.props.dataItem);if(z){const X=(z.fields||[]).slice(),d=O(X,o.value);if(d&&(!d.children||!d.children.length)){const q=await y(d);d.children=q,z.fields=X,N(T)}}};return{pivotProps:{rowAxes:f,columnAxes:i,data:r.data,rows:r.rows,columns:r.columns,onRowAxesChange:_,onColumnAxesChange:p},configuratorProps:{sort:D,onSortChange:g,filter:G,onFilterChange:U,data:l,rowAxes:f,columnAxes:i,measureAxes:F,onRowAxesChange:_,onColumnAxesChange:p,onMeasureAxesChange:L,onFieldsEditorFieldExpand:w,onAxisFilterFieldExpand:W,onAxisFilterFieldsExpandChange:J},state:{loading:a}}},Pt=e=>{const a=ut(e);return e.children(a)},Mt=e=>{for(let a=0,n=e.length;a<n;a++)e[a].uniqueName=e[a].name,e[a].type="kpi";return e},dt={dataField:"aggregate",columnsData:"columns"},Pe="&",mt=e=>{const[a,n]=t.useState(!0),[r,s]=t.useState(e.defaultColumnAxes||[]),[l,m]=t.useState(e.defaultRowAxes||[]),[i,C]=t.useState(e.defaultMeasureAxes||[]),[f,x]=t.useState(e.defaultSort||[]),[F,K]=t.useState(e.defaultFilter||[]),[D,j]=t.useState(new Map),G=t.useCallback(w=>{m(w.value)},[]),$=t.useCallback(w=>{s(w.value)},[]),_=w=>{C(w.value)},p=w=>{x(w.value)},L=w=>{K(w.value)},g=t.useMemo(()=>Array.from(b.rootFields(r).keys()).join(Pe),[r]),U=t.useMemo(()=>Array.from(b.rootFields(l).keys()).join(Pe),[l]),V=t.useCallback(w=>({key:w,...e.dimensions[w]}),[e.dimensions]),O=t.useMemo(()=>g?g.split(Pe).map(V):[],[g,V]),u=t.useMemo(()=>U?U.split(Pe).map(V):[],[U,V]),y=t.useMemo(()=>i.map(w=>e.measures.find(J=>String(J.name)===String(w.name))).filter(Boolean),[i,e.measures]);t.useEffect(()=>{n(!0),setTimeout(()=>{const w=b.createDataTree(e.data,u,O,y,dt,F);j(w),n(!1)},0)},[e.data,u,O,y,F]);const H=t.useMemo(()=>b.createFlatSchemaDimensions(e.dimensions,e.measures),[e.dimensions,e.measures]),P=t.useMemo(()=>b.createLocalDataState({dataTree:D,rowSettings:u,columnSettings:O,rowAxes:l,columnAxes:r,measures:y,sort:f,fields:dt}),[r,O,D,l,u,f]);return{pivotProps:{rowAxes:l,columnAxes:r,data:P.data,rows:P.rows,columns:P.columns,onRowAxesChange:G,onColumnAxesChange:$},configuratorProps:{sort:f,onSortChange:p,filter:F,onFilterChange:L,data:H,rowAxes:l,columnAxes:r,measureAxes:i,onRowAxesChange:G,onColumnAxesChange:$,onMeasureAxesChange:_},state:{loading:a}}},Lt=e=>{const a=mt(e);return e.children(a)};Object.defineProperty(A,"averageAggregate",{enumerable:!0,get:()=>b.averageAggregate}),Object.defineProperty(A,"maxAggregate",{enumerable:!0,get:()=>b.maxAggregate}),Object.defineProperty(A,"minAggregate",{enumerable:!0,get:()=>b.minAggregate}),Object.defineProperty(A,"sumAggregate",{enumerable:!0,get:()=>b.sumAggregate}),A.PivotGrid=rt,A.PivotGridAxesEditor=se,A.PivotGridAxisEditor=be,A.PivotGridAxisFilterFieldsEditor=Fe,A.PivotGridCell=je,A.PivotGridColumn=Ae,A.PivotGridConfigurator=We,A.PivotGridConfiguratorButton=Ye,A.PivotGridConfiguratorEditor=Ie,A.PivotGridContainer=Xe,A.PivotGridFieldsEditor=Ne,A.PivotGridHeaderCell=Ce,A.PivotGridRow=Ve,A.PivotLocalDataService=Lt,A.PivotOLAPService=Pt,A.dataCells=wt,A.usePivotLocalDataService=mt,A.usePivotOLAPService=ut,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
5
+ (function(A,me){typeof exports=="object"&&typeof module!="undefined"?me(exports,require("react"),require("@progress/kendo-react-common"),require("@progress/kendo-react-intl"),require("@progress/kendo-pivotgrid-common"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-form"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-data-tools"),require("@progress/kendo-react-treeview"),require("@progress/kendo-react-indicators")):typeof define=="function"&&define.amd?define(["exports","react","@progress/kendo-react-common","@progress/kendo-react-intl","@progress/kendo-pivotgrid-common","@progress/kendo-svg-icons","@progress/kendo-react-buttons","@progress/kendo-react-form","@progress/kendo-react-labels","@progress/kendo-react-data-tools","@progress/kendo-react-treeview","@progress/kendo-react-indicators"],me):(A=typeof globalThis!="undefined"?globalThis:A||self,me(A.KendoReactPivotgrid={},A.React,A.KendoReactCommon,A.KendoReactIntl,A.KendoPivotgridCommon,A.KendoSvgIcons,A.KendoReactButtons,A.KendoReactForm,A.KendoReactLabels,A.KendoReactDataTools,A.KendoReactTreeview,A.KendoReactIndicators))})(this,function(A,me,c,fe,b,pe,ie,ne,ge,Ee,Te,vt){"use strict";"use client";function xt(e){const a=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(a,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return a.default=e,Object.freeze(a)}const t=xt(me),pt={name:"@progress/kendo-react-pivotgrid",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},De="pivotgrid.emptyCellAriaLabel",He="pivotgrid.fieldMenuReset",Re="pivotgrid.fieldMenuApply",Ge="pivotgrid.configuratorTitle",Oe="pivotgrid.configuratorCancel",qe="pivotgrid.configuratorApply",Ke="pivotgrid.configuratorColumnsTitle",ke="pivotgrid.configuratorRowsTitle",ze="pivotgrid.configuratorMeasuresTitle",Be="pivotgrid.configuratorEditorSearchTitle",Et="pivotgrid.configuratorEditorSearchPlaceholder",re="pivotgrid.configuratorMissingFields",Ue="pivotgrid.configuratorButtonLabel",Z={[De]:"PivotGrid component. Use the arrow keys to navigate.",[He]:"Reset",[Re]:"Apply",[Oe]:"Cancel",[qe]:"Apply",[Ge]:"Settings",[Be]:"Fields",[Et]:"Search...",[Ke]:"Columns",[ke]:"Rows",[ze]:"Values",[Ue]:"Change settings",[re]:"Select some fields to begin setup"},Ve=t.forwardRef((e,a)=>{const n=t.useRef(null),r=t.useRef(null);t.useImperativeHandle(n,()=>({element:r.current,props:e})),t.useImperativeHandle(a,()=>n.current);const s=c.useMouse(e,n);return t.createElement("tr",{ref:r,...s,id:e.id,style:e.style,tabIndex:e.tabIndex,children:e.children,role:e.role,"aria-owns":e.ariaOwns,className:c.classNames("k-pivotgrid-row",e.className)})});Ve.displayName="KendoReactPivotGridRow";const je=t.forwardRef((e,a)=>{const n=t.useRef(null),r=t.useRef(null);t.useImperativeHandle(n,()=>({element:r.current,props:e})),t.useImperativeHandle(a,()=>n.current);const s=c.useMouse(e,n);return t.createElement("td",{ref:r,...s,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,"aria-describedby":e.ariaDescribedby,className:c.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total},e.className)},e.children)});je.displayName="KendoReactPivotGridCell";const et=(e,a,n)=>[e,(s,l)=>{const m=b.headersReducer(e,{...s,tree:a});n&&n(m,l)}],Ce=t.forwardRef((e,a)=>{const n=t.useRef(null),r=t.useRef(null);t.useImperativeHandle(n,()=>({element:r.current,props:e})),t.useImperativeHandle(a,()=>n.current);const[s,l]=c.useCustomComponent(e.icon||tt.icon),m=c.useMouse(e,n),i=C=>{e.onIconClick&&e.onIconClick.call(void 0,{syntheticEvent:C.syntheticEvent,target:n.current})};return t.createElement("th",{ref:r,...m,colSpan:e.colSpan,rowSpan:e.rowSpan,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,...e.expandable?{"aria-expanded":e.expanded}:{},className:c.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total,"k-pivotgrid-header-root":e.root,"k-pivotgrid-expanded":e.expanded,"k-first":e.first},e.className)},e.expandable&&t.createElement(s,{...l,onClick:i,name:`chevron-${e.expanded?"up":"down"}`,"aria-hidden":!0,icon:e.expanded?pe.chevronUpIcon:pe.chevronDownIcon}),e.children)}),tt={icon:c.IconWrap};Ce.defaultProps=tt,Ce.displayName="KendoReactPivotGridHeaderCell";const Ct=(...e)=>{const a=t.useRef();return r=>{a.current!==void 0&&window.cancelAnimationFrame(a.current);const s=r.currentTarget,l=s.scrollLeft;e.forEach(m=>{const i=m.current;i&&i!==s&&(a.current=window.requestAnimationFrame(()=>{i.scrollLeft=Math.round(l)}))})}},At=(...e)=>{const a=t.useRef();return r=>{a.current!==void 0&&window.cancelAnimationFrame(a.current);const s=r.currentTarget,l=s.scrollTop;e.forEach(m=>{const i=m.current;i&&i!==s&&(a.current=window.requestAnimationFrame(()=>{i.scrollTop=Math.round(l)}))})}},Ae=t.forwardRef((e,a)=>{const n=t.useRef(null),r=t.useRef(null);t.useImperativeHandle(n,()=>({element:r.current,props:e})),t.useImperativeHandle(a,()=>n.current);const s=c.useMouse(e,n);return t.createElement("col",{ref:r,...s,id:e.id,style:e.style,tabIndex:e.tabIndex,children:e.children,className:e.className})}),yt={path:[]};Ae.defaultProps=yt,Ae.displayName="KendoReactPivotGridColumn";const wt=(e,a,n)=>{const r=JSON.parse(JSON.stringify(e||[])),s=JSON.parse(JSON.stringify(a||[])),l=JSON.parse(JSON.stringify(n||[])),m=b.toTree(r),[,i,C]=b.toRows(m),f=b.toTree(s),[,x,,F]=b.toColumns(f);return b.toData(l,x,i,F,C)},ye=(e=[],a={},n=null)=>e.map(r=>{const s={dataItem:r};return Object.keys(a).forEach(l=>{s[l]=a[l](s,n)}),s}),$e=(e=[])=>{let a=[...e];return(e||[]).forEach(n=>{a=a.concat($e(n.children))}),a},_e=(e=[])=>{const a=new Set;return e.forEach(n=>{a.add(String(n.name))}),Array.from(a)},oe=(e=[])=>`${e.join(",")}`,Ft=(e,a)=>`${oe(e.map(n=>n.name))}|${oe(a.map(n=>n.name))}`,bt=(e,a,n)=>{if(!e)return;let r=0,s,l=e.length,m;for(;r<l;r++)m=e[r].operator,(!n&&m!=="in"||m===n)&&e[r].field===a&&(s=e[r]);return s},nt=(e,a,n)=>{if(!e)return[];let r=0,s=[],l=e.length,m;for(;r<l;r++)m=e[r].operator,(!n&&m!=="in"||m===n)&&e[r].field===a&&s.push(e[r]);return s},at=(e,a)=>e.uniqueName===a.uniqueName,rt=t.forwardRef((e,a)=>{c.validatePackage(pt);const{rows:n,rowAxes:r,columns:s,columnAxes:l,data:m}={...he,...e},i=t.useRef(null),C=t.useRef(null),f=t.useRef(null),x=t.useRef(null),F=t.useRef(null),k=t.useRef(null),D=t.useRef(null),j=fe.useLocalization(),G=(v,M)=>{e.onRowAxesChange&&e.onRowAxesChange({value:v,target:C.current,syntheticEvent:M})},$=(v,M)=>{e.onColumnAxesChange&&e.onColumnAxesChange({value:v,target:C.current,syntheticEvent:M})},_=b.toTree((n||[]).slice()),[,p]=et((r||[]).slice(),_,G),[L,g,U,V]=b.toRows(_),O=b.toTree((s||[]).slice()),[,u]=et((l||[]).slice(),O,$),[y,H,,P]=b.toColumns(O),w=b.toData((m||[]).slice(),H,g,P,U);t.useImperativeHandle(C,()=>({props:e,element:i.current,columnHeaderRows:y,rowHeaderRows:L,dataCells:w,rowHeaderBreadth:V,columnHeaderBreadth:P})),t.useImperativeHandle(a,()=>C.current);const J=[],W=[],o=[],[h,E]=c.useCustomComponent(e.row||he.row),[N,T]=c.useCustomComponent(e.column||he.column),[z,X]=c.useCustomComponent(e.cell||he.cell),[d,q]=c.useCustomComponent(e.headerCell||he.headerCell),B=e.columnHeadersRow||h,R=e.columnHeadersColumn||N,ee=e.columnHeadersCell||d,Q=e.rowHeadersRow||h,le=e.rowHeadersColumn||N,Tt=e.rowHeadersCell||d,Dt=e.dataRow||h,Ht=e.dataColumn||N;for(let v=0;v<H.length;v++)J.push(t.createElement(Ht,{key:String(H[v].path),...T,path:H[v].path})),o.push(t.createElement(R,{key:String(H[v].path),...T,path:H[v].path}));for(let v=0;v<V;v++)W.push(t.createElement(le,{key:v,...T}));const Rt=v=>{v.target.props.expandable&&u({type:b.HEADERS_ACTION.toggle,payload:v.target.props.dataItem.path},v.syntheticEvent)},Gt=v=>{v.target.props.expandable&&p({type:b.HEADERS_ACTION.toggle,payload:v.target.props.dataItem.path},v.syntheticEvent)},ft=Ct(D,k),Ot=At(D,F),qt=v=>{ft(v),Ot(v)},gt=t.useCallback(()=>{i.current&&x.current&&(i.current.style.gridTemplateRows="",i.current.style.gridTemplateRows=`${x.current.offsetHeight}px 1fr`)},[]),ht=t.useCallback(()=>{i.current&&f.current&&(i.current.style.gridTemplateColumns="",i.current.style.gridTemplateColumns=`${f.current.offsetWidth}px 1fr`)},[]),ce=t.useRef(new b.PivotGridNavigation({tabIndex:e.tabIndex||0}));t.useEffect(()=>{if(i.current){const v=e.tabIndex||0;if(ce.current.stop(),ce.current.tabIndex=v,e.navigatable){ce.current.start(i.current);const M=ce.current.first;M&&M.setAttribute("tabindex",String(v))}}return()=>{ce.current.stop()}},[e.tabIndex,e.navigatable]),t.useEffect(()=>{ce.current.update()}),t.useEffect(()=>{if(x.current){const v=new window.ResizeObserver(gt);return v.observe(x.current),()=>{v.disconnect()}}},[gt]),t.useEffect(()=>{if(f.current){const v=new window.ResizeObserver(ht);return v.observe(f.current),()=>{v.disconnect()}}},[ht]),c.useIsomorphicLayoutEffect(()=>{if(c.setScrollbarWidth(),f.current){const v=new window.ResizeObserver(c.setScrollbarWidth);return v.observe(f.current),()=>{v.disconnect()}}},[]);const ue=new Array(y.length).fill([]).map(()=>new Array(H.length));y.forEach((v,M)=>{let S=0;Array.from(v.cells).forEach(I=>{const Y=!!(I&&I.children&&I.children.length),Qe=(I?oe(I.normalizedPath)+(I.total?"|[TOTAL]":"")+(Y?"|[EXPANDED]":""):"").replace(/\s/g,"-");if(I)for(let Le=0;Le<(I.colSpan||1);Le++){for(let de=0;de<(I.rowSpan||1);de++){const Kt=ue[M+de].findIndex((kt,zt)=>zt>=S&&!kt);ue[M+de][Kt]=Qe}S++}})});const Me=w.map(v=>v.cells.map(M=>Ft(M.rowTuple.members,M.columnTuple.members).replace(/\s/g,"-")));return t.createElement("div",{ref:i,id:e.id,style:e.style,tabIndex:e.navigatable?void 0:e.tabIndex,className:c.classNames("k-pivotgrid",e.className),role:"grid"},t.createElement("span",{className:"k-pivotgrid-empty-cell"},t.createElement("span",{className:"k-sr-only"},j.toLanguageString(De,Z[De]))),t.createElement("div",{ref:k,className:"k-pivotgrid-column-headers",onScroll:ft},t.createElement("table",{ref:x,className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,o),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},y.map((v,M)=>{let S=!1;return t.createElement(B,{key:v.name,role:"row",...E},v.cells.map((I,Y)=>{const Qe=Y!==0&&!S;I&&(S=!0);const Le=I&&!!(I.children&&I.children.length),de=I&&I.hasChildren&&(!I.total||I.total&&I.parent.total);return I?t.createElement(ee,{...q,key:ue[M][Y],"data-key":ue[M][Y],id:ue[M][Y],columnPath:I.normalizedPath,rowSpan:I.rowSpan||void 0,colSpan:I.colSpan||void 0,onIconClick:Rt,dataItem:I,expanded:Le,expandable:de,total:I.total,first:Qe,root:I.levelNum===0,role:"columnheader"},I.caption):null}))})))),t.createElement("div",{ref:F,className:"k-pivotgrid-row-headers"},t.createElement("table",{ref:f,className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,W),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},L.map((v,M)=>t.createElement(Q,{key:oe(g[M].path),...E,path:g[M].path,role:"row",ariaOwns:Me[M].join(" ")},v.cells.filter(Boolean).map(S=>S?t.createElement(Tt,{...q,key:oe(S.normalizedPath)+(S.total?"|[TOTAL]":"")+(S.children&&S.children.length?"|[EXPANDED]":""),"data-key":oe(S.normalizedPath)+(S.total?"|[TOTAL]":"")+(S.children&&S.children.length?"|[EXPANDED]":""),rowPath:S.normalizedPath,rowSpan:S.rowSpan||void 0,colSpan:S.colSpan||void 0,dataItem:S,expanded:!!(S.children&&S.children.length),expandable:S.hasChildren&&!S.total,total:S.total,onIconClick:Gt,root:S.levelNum===0,role:"rowheader"},S.caption):null)))))),t.createElement("div",{ref:D,className:"k-pivotgrid-values",onScroll:qt},t.createElement("table",{className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,J),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"none"},w.map((v,M)=>t.createElement(Dt,{key:oe(g[M].path),...E,path:g[M].path,role:"none"},v.cells.map((S,I)=>t.createElement(z,{key:Me[M][I],"data-key":Me[M][I],id:Me[M][I],...X,rowPath:S.rowTuple.members.map(Y=>Y.name),columnPath:S.columnTuple.members.map(Y=>Y.name),dataItem:S,total:g[M].total||H[I].total,role:"gridcell",ariaDescribedby:ue.map(Y=>Y[I]).join(" ")},S&&S.data&&S.data.fmtValue?S.data.fmtValue:" "))))))))}),he={rowAxes:[],columnAxes:[],data:[],row:Ve,column:Ae,cell:je,headerCell:Ce};rt.displayName="KendoReactPivotGrid";const Xe=t.forwardRef((e,a)=>{const n=t.useRef(null),r=t.useRef(null);return t.useImperativeHandle(r,()=>({props:e,element:n.current})),t.useImperativeHandle(a,()=>r.current),t.createElement("div",{ref:n,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)}),Nt={configuratorPosition:"right"};Xe.defaultProps=Nt,Xe.displayName="KendoReactPivotGridContainer";const ot=t.createContext({axes:null});var Ze=(e=>(e.toggle="EXPAND_TOGGLE",e.expand="EXPAND_EXPAND",e.collapse="EXPAND_COLLAPSE",e))(Ze||{});const St=(e,a,n)=>{switch(a.type){case"EXPAND_TOGGLE":return Array.isArray(e)?e.find(r=>n(r,a.payload))?[...e.filter(r=>!n(r,a.payload))]:[...e,a.payload]:n(e,a.payload)?null:a.payload;case"EXPAND_EXPAND":if(Array.isArray(e)){if(!e.find(r=>n(r,a.payload)))return[...e,a.payload]}else if(!n(e,a.payload))return a.payload;break;case"EXPAND_COLLAPSE":if(Array.isArray(e)){if(e.find(r=>n(r,a.payload)))return[...e.filter(r=>!n(r,a.payload))]}else n(e,a.payload);break;default:return e}},st=(e=[],a,n,r=(s,l)=>s===l)=>{const[s,l]=t.useState(e);return[s,(i,C)=>{const f=St(s,i,r);a&&a.call(void 0,{value:f,target:n.current,syntheticEvent:C}),l(f)}]};var lt=(e=>(e.toggleExpansion="PIVOT_CONFIGURATOR_ACTION_TOGGLE_EXPANSION",e))(lt||{});const K={...b.PIVOT_CONFIGURATOR_ACTION,...lt},It=(e,a)=>{const n=e.valueGetter("rowAxes"),r=e.valueGetter("columnAxes"),s=e.valueGetter("measureAxes"),l=e.valueGetter("sort"),m=e.valueGetter("filter"),[i,C]=st([],void 0,a,at),[f,x]=t.useState(null),[F,k]=t.useState(null),[D,j]=t.useState(null),[G,$]=t.useState(null);return[{dragItem:f,dropTarget:D,dropZone:F,dropDirection:G,columnAxes:r,rowAxes:n,measureAxes:s,sort:l,filter:m,expanded:i},(p,L)=>{switch(p.type){case K.toggleExpansion:{C({type:Ze.toggle,payload:p.payload},L);break}default:const g=b.configuratorReducer({filter:p.override&&p.override.filter!==void 0?p.override.filter:m,sort:p.override&&p.override.sort!==void 0?p.override.sort:l,rowAxes:p.override&&p.override.rowAxes!==void 0?p.override.rowAxes:n,columnAxes:p.override&&p.override.columnAxes!==void 0?p.override.columnAxes:r,measureAxes:p.override&&p.override.measureAxes!==void 0?p.override.measureAxes:s,dragItem:p.override&&p.override.dragItem!==void 0?p.override.dragItem:f,dropDirection:p.override&&p.override.dropDirection!==void 0?p.override.dropDirection:G,dropTarget:p.override&&p.override.dropTarget!==void 0?p.override.dropTarget:D,dropZone:p.override&&p.override.dropZone!==void 0?p.override.dropZone:F},p);g.columnAxes!==void 0&&e.onChange("columnAxes",{value:g.columnAxes}),g.rowAxes!==void 0&&e.onChange("rowAxes",{value:g.rowAxes}),g.measureAxes!==void 0&&e.onChange("measureAxes",{value:g.measureAxes}),g.sort!==void 0&&e.onChange("sort",{value:g.sort}),g.filter!==void 0&&e.onChange("filter",{value:g.filter}),g.dropDirection!==void 0&&$(g.dropDirection),g.dropTarget!==void 0&&j(g.dropTarget),g.dropZone!==void 0&&k(g.dropZone),g.dragItem!==void 0&&x(g.dragItem);break}}]},it=t.createContext({}),we=t.createContext([{expanded:[],rowAxes:[],columnAxes:[],measureAxes:[],dragItem:null,dropZone:null,dropDirection:null,dropTarget:null},c.noop]),Fe=t.forwardRef((e,a)=>{const{data:n,dataItem:r,defaultFilter:s}={...ae,...e},l=t.useRef(null),m=t.useRef(null),i=fe.useLocalization(),[C,f]=c.useCustomComponent(e.columnMenuItem||ae.columnMenuItem),[x,F]=c.useCustomComponent(e.columnMenuForm||ae.columnMenuForm),[k,D]=c.useCustomComponent(e.resetButton||ae.resetButton),[j,G]=c.useCustomComponent(e.applyButton||ae.applyButton),[$,_]=c.useCustomComponent(e.treeView||ae.treeView),[p,L]=c.useCustomComponent(e.noData||ae.noData);t.useImperativeHandle(m,()=>({props:e,element:l.current})),t.useImperativeHandle(a,()=>m.current);const[g,U]=t.useState(!1),{onAxisFilterFieldsExpandChange:V,onAxisFilterFieldExpand:O}=t.useContext(it),[,u]=t.useContext(we),[y,H]=t.useState(s),P=y?y.value.split(","):[],[w,J]=st([],void 0,m,at),W={caption:d=>d.dataItem.caption,id:d=>d.dataItem.uniqueName,parent:(d,q)=>q&&q.value,value:d=>d.dataItem.defaultHierarchy||d.dataItem.uniqueName,expanded:d=>w.some(q=>q.uniqueName===d.id),checked:d=>!P.length||(P||[]).some(q=>q===d.dataItem.uniqueName),hasChildren:d=>parseInt(d.dataItem.childrenCardinality,10)>0,children:d=>ye(d.dataItem.children,W,d),checkIndeterminate:d=>{const q=(d.children||[]).length&&d.children.every(B=>B.checked);return q&&(d.checked=!0),(d.children||[]).some(B=>B.checked)&&!q}},o=ye(n,W),h=$e(o),E=d=>{U(!g),V&&V({value:!g,target:m.current,syntheticEvent:d})},N=d=>{J({type:Ze.toggle,payload:d.item.dataItem},d.syntheticEvent),O&&O({value:d.item.dataItem,target:m.current,syntheticEvent:d.syntheticEvent})},T=d=>{let q;d.item.checked?q={field:String(r.name),operator:"in",value:h.filter(B=>B.checked).map(B=>String(B.value)).filter(B=>B!==d.item.value&&B!==d.item.parent).join(",")}:q={field:String(r.name),operator:"in",value:h.filter(B=>B.checked).map(B=>String(B.value)).concat([d.item.value]).join(",")},H(q)},z=d=>{U(!1),y&&u({type:K.removeFilter,payload:y},d)},X=d=>{U(!1),y&&u({type:s?K.changeFilter:K.addFilter,payload:y},d)};return t.createElement("div",{ref:l,id:e.id,tabIndex:e.tabIndex,style:e.style,className:c.classNames("k-columnmenu-item-wrapper",e.className)},t.createElement(C,{...f,title:"Include Fields",iconClass:"k-i-grid-layout",svgIcon:pe.gridLayoutIcon,onClick:E}),t.createElement(x,{show:g,actions:t.createElement(t.Fragment,null,t.createElement(k,{type:"reset",onClick:z,...D},i.toLanguageString(He,Z[He])),t.createElement(j,{themeColor:"primary",onClick:X,...G},i.toLanguageString(Re,Z[Re]))),...F},o&&o.length?t.createElement($,{data:o,checkboxes:!0,onExpandChange:N,onCheckChange:T,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",..._}):t.createElement(p,{...L})))}),ae={data:[],resetButton:ie.Button,applyButton:ie.Button,treeView:Te.TreeView,noData:()=>t.createElement(vt.Skeleton,{shape:"rectangle",style:{height:"20px",width:"calc(100% - 16px)",margin:8}}),columnMenuItem:Ee.ColumnMenuItem,columnMenuForm:Ee.ColumnMenuForm};Fe.defaultProps=ae,Fe.displayName="KendoReactPivotGridAxisFilterFieldsEditor";const be=t.forwardRef((e,a)=>{const n=t.useRef(0),r=t.useRef(0),s=t.useRef(null),l=t.useRef(null),m=t.useRef(null),{axes:i}=t.useContext(ot),[C,f]=t.useState(!1),[x,F]=t.useContext(we);t.useImperativeHandle(l,()=>s.current&&s.current.element),t.useImperativeHandle(m,()=>({props:e,element:l.current})),t.useImperativeHandle(a,()=>m.current);const[k,D]=c.useCustomComponent(e.chip||ve.chip),[j,G]=c.useCustomComponent(e.dropClue||ve.dropClue),[$,_]=c.useCustomComponent(e.columnMenuTextColumn||ve.columnMenuTextColumn),[p,L]=c.useCustomComponent(e.filterFieldsEditor||ve.filterFieldsEditor),g=nt(x.filter,String(e.value),"in"),U=nt(x.filter,String(e.value)),V=(o,h)=>{F({type:K.setSort,payload:h},o)},O=(o,h)=>{h.length?F({type:K.setFilter,payload:[...g||[],...h.reduce((E,N)=>[...E,...N.filters.filter(T=>T.value)],[])]},o):F({type:K.setFilter,payload:g},o)},u=o=>{F({type:K.remove,payload:e.dataItem},o.syntheticEvent)},y=o=>{const h=o.slice(),E=bt(x.filter,String(e.dataItem.name),"in");return h.splice(1,0,t.createElement(p,{key:"axis-filter-fields-editor",defaultFilter:E,dataItem:e.dataItem,data:e.dataItem.fields,axes:i,...L})),h},H=o=>{n.current=o.clientX,r.current=o.clientY},P=o=>{Math.abs(n.current-o.clientX)<10&&Math.abs(r.current-o.clientY)<10||(l.current&&(l.current.style.transform=`translate(${o.clientX-n.current}px, ${o.clientY-r.current}px)`),f(!0),F({type:K.setDragItem,payload:e.dataItem}))},w=()=>{f(!1),x.dragItem&&(l.current&&(l.current.style.transform=""),F({type:K.drop,payload:e.dataItem}))},J=o=>{x.dragItem&&(F({type:K.setDropTarget,payload:e.dataItem},o.syntheticEvent),F({type:K.setDropZone,payload:i},o.syntheticEvent))},W=o=>{if(x.dragItem&&!C&&l.current){const h=l.current.getBoundingClientRect(),N=o.syntheticEvent.clientX-h.left<h.width/2?"before":"after";F({type:K.setDropDirection,payload:N},o.syntheticEvent)}};return c.useDraggable(l,{onPress:H,onDrag:P,onRelease:w}),t.createElement(t.Fragment,null,x.dropTarget&&b.compareAxes(x.dropTarget,e.dataItem)&&x.dropDirection==="before"&&t.createElement(j,{...G}),t.createElement(k,{ref:c.canUseRef(k)?s:void 0,...e,removable:!0,onRemove:u,onMouseEnter:J,onMouseMove:W,style:{pointerEvents:C?"none":void 0},rounded:"full",...D},e.text,i!=="measureAxes"&&t.createElement($,{field:String(e.value),itemsRender:y,sort:x.sort,onSortChange:V,filter:U&&U.length?[{logic:"and",filters:U}]:void 0,onFilterChange:O,filterContent:[Ee.ColumnMenuTextFilter],..._})),x.dropTarget&&b.compareAxes(x.dropTarget,e.dataItem)&&x.dropDirection==="after"&&t.createElement(j,{...G}))}),ve={chip:ie.Chip,columnMenuTextColumn:Ee.ColumnMenuTextColumn,filterFieldsEditor:Fe,dropClue:e=>t.createElement("div",{className:"k-grouping-dropclue",style:{position:"relative",zIndex:1e4},...e})};be.defaultProps=ve,be.displayName="KendoReactPivotGridAxisEditor";const se=t.forwardRef((e,a)=>{const{value:n,field:r}={...Je,...e},s=t.useRef(null),l=t.useRef(null),m=t.useRef(null),[i,C]=c.useCustomComponent(e.chipList||Je.chipList);t.useImperativeHandle(l,()=>s.current&&s.current.element),t.useImperativeHandle(m,()=>({props:e,element:l.current})),t.useImperativeHandle(a,()=>m.current);const f=n.filter(x=>x.name.length===1&&x.name.every(F=>F.indexOf("&")===-1)).map(x=>({...x,text:String(x.name)}));return t.createElement(ot.Provider,{value:{axes:r}},t.createElement(i,{ref:c.canUseRef(i)?s:void 0,textField:"text",valueField:"name",data:f,chip:be,style:{position:"relative"},className:e.className,selection:"none",...C}))}),Je={value:[],chipList:ie.ChipList};se.defaultProps=Je,se.displayName="KendoReactPivotGridAxesEditor";const Ne=t.forwardRef((e,a)=>{const{data:n,rowAxes:r,columnAxes:s,measureAxes:l,onExpand:m,onCheck:i}={...Se,...e},C=t.useRef(null),f=t.useRef(null),[x,F]=c.useCustomComponent(e.treeView||Se.treeView),[k,D]=c.useCustomComponent(e.noData||Se.noData);t.useImperativeHandle(f,()=>({props:e,element:C.current&&C.current.element})),t.useImperativeHandle(a,()=>f.current);const[j]=t.useContext(we),G=_e(s),$=_e(r),_=_e(l),L=$e(n).filter(u=>[...G,...$,..._].some(y=>y===u.uniqueName||y===u.defaultHierarchy)),g={caption:u=>u.dataItem.caption,id:u=>u.dataItem.uniqueName,value:u=>u.dataItem.defaultHierarchy||u.dataItem.uniqueName,expanded:u=>j.expanded.some(y=>y.uniqueName===u.dataItem.uniqueName),hasChildren:u=>!("hierarchyUniqueName"in u.dataItem)&&!("aggregator"in u.dataItem),selectable:u=>!(!u.hasChildren&&!u.dataItem.aggregator&&!u.dataItem.measure||u.dataItem.type===2||u.dataItem.uniqueName==="[KPIs]"),children:u=>ye(u.dataItem.children,g,u),checked:u=>L.some(y=>u.dataItem.defaultHierarchy?y.defaultHierarchy===u.dataItem.defaultHierarchy:y.uniqueName===u.dataItem.uniqueName)||u.children.length&&u.children.every(y=>y.checked)},U=u=>{m&&m({value:u.item.dataItem,target:f.current,syntheticEvent:u.syntheticEvent})},V=u=>{i&&i({value:u.item.dataItem,target:f.current,syntheticEvent:u.syntheticEvent})},O=ye(e.data,g);return t.createElement(Te.TreeViewItemPropsContext.Provider,{value:u=>({...u,checkboxes:u.item.selectable})},O&&O.length?t.createElement(x,{ref:c.canUseRef(x)?C:void 0,data:O,checkboxes:!0,onExpandChange:U,onCheckChange:V,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...F}):t.createElement(k,{...D}))}),Se={data:[],rowAxes:[],columnAxes:[],measureAxes:[],treeView:Te.TreeView,noData:()=>t.createElement("div",null,"NO DATA")};Ne.defaultProps=Se,Ne.displayName="KendoReactPivotGridFieldsEditor";const Ie=t.forwardRef((e,a)=>{const{onFieldsEditorFieldCheck:n,onFieldsEditorFieldCheckAction:r,onFieldsEditorFieldExpand:s,onFieldsEditorFieldExpandAction:l,onAxisFilterFieldExpand:m,onAxisFilterFieldsExpandChange:i}=e,[C,f]=c.useCustomComponent(e.fieldsLabel||te.fieldsLabel),[x,F]=c.useCustomComponent(e.fieldsEditor||te.fieldsEditor),[k,D]=c.useCustomComponent(e.columnAxesLabel||te.columnAxesLabel),[j,G]=c.useCustomComponent(e.columnAxesEditor||te.columnAxesEditor),[$,_]=c.useCustomComponent(e.rowAxesLabel||te.rowAxesLabel),[p,L]=c.useCustomComponent(e.rowAxesEditor||te.rowAxesEditor),[g,U]=c.useCustomComponent(e.measureAxesLabel||te.measureAxesLabel),[V,O]=c.useCustomComponent(e.measureAxesEditor||te.measureAxesEditor),u=t.useRef(null),y=t.useRef(null),H=fe.useLocalization(),[P,w]=It(e,y);t.useImperativeHandle(y,()=>({element:u.current,props:e,state:P})),t.useImperativeHandle(a,()=>y.current);const J=()=>{P.dragItem&&w({type:K.setDropZone,payload:"columnAxes"})},W=()=>{P.dragItem&&w({type:K.setDropZone,payload:null})},o=()=>{P.dragItem&&w({type:K.setDropZone,payload:"rowAxes"})},h=()=>{P.dragItem&&w({type:K.setDropZone,payload:null})},E=()=>{P.dragItem&&w({type:K.setDropZone,payload:"measureAxes"})},N=()=>{P.dragItem&&w({type:K.setDropZone,payload:null})},T=R=>{const ee={target:R.target,currentTarget:y.current,value:R.value,syntheticEvent:R.syntheticEvent};if(l){const Q=l(ee,e,P);Q&&(Array.isArray(Q)?Q.filter(Boolean).map(le=>le&&w({...le},R.syntheticEvent)):w({...Q},R.syntheticEvent))}s&&s({target:R.target,currentTarget:y.current,value:R.value,syntheticEvent:R.syntheticEvent})},z=R=>{const ee={target:R.target,currentTarget:y.current,value:R.value,syntheticEvent:R.syntheticEvent};if(r){const Q=r(ee,e,P);Q&&(Array.isArray(Q)?Q.filter(Boolean).map(le=>le&&w({...le},R.syntheticEvent)):w({...Q},R.syntheticEvent))}n&&n(ee)},X=R=>{const ee={target:R.target,currentTarget:y.current,value:R.value,syntheticEvent:R.syntheticEvent};m&&m(ee)},d=R=>{const ee={target:R.target,currentTarget:y.current,value:R.value,syntheticEvent:R.syntheticEvent};i&&i(ee)},q=e.horizontal?"div":t.Fragment,B=e.horizontal?{className:"k-form-field-wrapper"}:{};return t.createElement(it.Provider,{value:{onAxisFilterFieldExpand:X,onAxisFilterFieldsExpandChange:d}},t.createElement(we.Provider,{value:[P,w]},t.createElement(q,{...B},t.createElement("div",{className:"k-form-field"},t.createElement(C,{name:"",component:ge.Label,...f},H.toLanguageString(Be,Z[Be]))),t.createElement("div",{className:"k-form-field"},t.createElement("div",{className:"k-fields-list-wrapper"},t.createElement(x,{data:e.data,onExpand:T,onCheck:z,columnAxes:P.columnAxes,rowAxes:P.rowAxes,measureAxes:P.measureAxes,...F})))),t.createElement(q,{...B},t.createElement("div",{className:"k-form-field",onMouseEnter:J,onMouseLeave:W},t.createElement(ne.Field,{name:"columnAxes",field:"columnAxes",component:k,...D},H.toLanguageString(Ke,Z[Ke]))),e.valueGetter("columnAxes").length?t.createElement(ne.Field,{name:"columnAxes",field:"columnAxes",component:j,onMouseEnter:J,onMouseLeave:W,className:"k-column-fields",...G}):t.createElement("div",{className:"k-settings-description",onMouseEnter:J,onMouseLeave:W},H.toLanguageString(re,Z[re])),t.createElement("div",{className:"k-form-field",onMouseEnter:o,onMouseLeave:h},t.createElement(ne.Field,{name:"rowAxes",field:"rowAxes",component:$,..._},H.toLanguageString(ke,Z[ke]))),e.valueGetter("rowAxes").length?t.createElement(ne.Field,{name:"rowAxes",field:"rowAxes",component:p,onMouseEnter:o,onMouseLeave:h,className:"k-column-fields",...L}):t.createElement("div",{className:"k-settings-description",onMouseEnter:o,onMouseLeave:h},H.toLanguageString(re,Z[re]))),t.createElement(q,{...B},t.createElement("div",{className:"k-form-field",onMouseEnter:E,onMouseLeave:N},t.createElement(ne.Field,{name:"measureAxes",field:"measureAxes",component:g,...U},H.toLanguageString(ze,Z[ze]))),e.valueGetter("measureAxes").length?t.createElement(ne.Field,{name:"measureAxes",field:"measureAxes",component:V,onMouseEnter:E,onMouseLeave:N,className:"k-column-fields",...O}):t.createElement("div",{className:"k-settings-description",onMouseEnter:E,onMouseLeave:N},H.toLanguageString(re,Z[re])))))}),te={data:[],horizontal:!1,fieldsLabel:ge.Label,fieldsEditor:Ne,columnAxesLabel:ge.Label,columnAxesEditor:se,rowAxesLabel:ge.Label,rowAxesEditor:se,measureAxesLabel:ge.Label,measureAxesEditor:se,axesEditor:se,onFieldsEditorFieldCheckAction:e=>({type:K.toggleSelection,payload:e.value}),onFieldsEditorFieldExpandAction:e=>({type:K.toggleExpansion,payload:e.value})};Ie.defaultProps=te,Ie.displayName="KendoReactPivotGridConfiguratorEditor";const We=t.forwardRef((e,a)=>{const{horizontal:n,data:r,rowAxes:s,columnAxes:l,measureAxes:m}={...xe,...e},i=t.useRef(null),C=t.useRef(null),f=t.useRef(null),x=fe.useLocalization(),[F,k]=c.useCustomComponent(e.editor||xe.editor),[D,j]=c.useCustomComponent(e.form||xe.form),[G,$]=c.useCustomComponent(e.formElement||xe.formElement);t.useImperativeHandle(C,()=>({props:e,element:i.current})),t.useImperativeHandle(a,()=>C.current);const _=(L,g)=>{e.onRowAxesChange&&e.onRowAxesChange({target:C.current,value:L.rowAxes,syntheticEvent:g}),e.onColumnAxesChange&&e.onColumnAxesChange({target:C.current,value:L.columnAxes,syntheticEvent:g}),e.onMeasureAxesChange&&e.onMeasureAxesChange({target:C.current,value:L.measureAxes,syntheticEvent:g}),e.onSortChange&&e.onSortChange({target:C.current,value:L.sort,syntheticEvent:g}),e.onFilterChange&&e.onFilterChange({target:C.current,value:L.filter,syntheticEvent:g})},p={rowAxes:s,columnAxes:l,measureAxes:m,sort:e.sort,filter:e.filter};return t.useEffect(()=>{f.current&&f.current.onChange("rowAxes",{value:s})},[s]),t.useEffect(()=>{f.current&&f.current.onChange("columnAxes",{value:l})},[l]),t.useEffect(()=>{f.current&&f.current.onChange("measureAxes",{value:m})},[m]),t.useEffect(()=>{f.current&&f.current.onChange("sort",{value:e.sort})},[e.sort]),t.useEffect(()=>{f.current&&f.current.onChange("filter",{value:e.filter})},[e.filter]),t.createElement("div",{ref:i,id:e.id,tabIndex:e.tabIndex,style:e.style,className:c.classNames("k-pivotgrid-configurator",e.className)},t.createElement("div",{className:c.classNames("k-pivotgrid-configurator-panel","k-pivotgrid-configurator-push",{"k-pivotgrid-configurator-horizontal":n,"k-pivotgrid-configurator-vertical":!n})},t.createElement("div",{className:"k-pivotgrid-configurator-header"},t.createElement("div",{className:"k-pivotgrid-configurator-header-text"},x.toLanguageString(Ge,Z[Ge]))),t.createElement(D,{ref:c.canUseRef(D)?f:void 0,initialValues:p,onSubmit:_,render:L=>t.createElement(t.Fragment,null,t.createElement("div",{className:"k-pivotgrid-configurator-content"},t.createElement(G,{horizontal:n,...$},t.createElement(F,{...L,horizontal:e.horizontal,onFieldsEditorFieldExpand:e.onFieldsEditorFieldExpand,onFieldsEditorFieldCheck:e.onFieldsEditorFieldCheck,onAxisFilterFieldExpand:e.onAxisFilterFieldExpand,onAxisFilterFieldsExpandChange:e.onAxisFilterFieldsExpandChange,data:r,...k}))),t.createElement("div",{className:"k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end"},t.createElement(ie.Button,{type:"submit",onClick:L.onFormReset},x.toLanguageString(Oe,Z[Oe])),t.createElement(ie.Button,{themeColor:"primary",type:"submit",onClick:L.onSubmit},x.toLanguageString(qe,Z[qe])))),...j})))}),xe={form:ne.Form,formElement:ne.FormElement,editor:Ie,horizontal:!1,data:[],columnAxes:[],rowAxes:[],measureAxes:[]};We.defaultProps=xe,We.displayName="KendoReactPivotGridConfigurator";const Ye=t.forwardRef((e,a)=>{const n=t.useRef(null),r=t.useRef(null),s=fe.useLocalization();t.useImperativeHandle(n,()=>({props:e,element:r.current})),t.useImperativeHandle(a,()=>n.current);const[l,m]=c.useCustomComponent(e.icon||ct.icon),i=t.useMemo(()=>c.classNames("k-pivotgrid-configurator-button",e.className),[e.className]),C=c.useMouse(e,n);return t.createElement("div",{ref:r,id:e.id,className:i,tabIndex:e.tabIndex,...C},t.createElement("span",null,s.toLanguageString(Ue,Z[Ue]),t.createElement(l,{name:"gear",icon:pe.gearIcon,...m})))}),ct={icon:c.IconWrap};Ye.defaultProps=ct,Ye.displayName="KendoReactPivotGridConfiguratorButton";const ut=e=>{const[a,n]=t.useState(!0),[r,s]=t.useState({data:[],columns:[],rows:[]}),[l,m]=t.useState([]),[i,C]=t.useState(e.defaultColumnAxes||[]),[f,x]=t.useState(e.defaultRowAxes||[]),[F,k]=t.useState(e.defaultMeasureAxes||[]),[D,j]=t.useState(e.defaultSort||[]),[G,$]=t.useState(e.defaultFilter||[]),_=o=>{x(o.value)},p=o=>{C(o.value)},L=o=>{k(o.value)},g=o=>{j(o.value)},U=o=>{$(o.value)};t.useEffect(()=>{n(!0);const o={connection:{catalog:e.catalog,cube:e.cube},columnAxes:i.slice(),rowAxes:f.slice(),measureAxes:F,sort:D,filter:G};setTimeout(()=>{b.fetchData({url:e.url},c.clone(o)).then(b.createDataState).then(h=>{s(h),n(!1)})})},[i,f,F,G,D,e.cube,e.catalog,e.url]),t.useEffect(()=>{n(!0);const o={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube},command:"schemaDimensions"};b.fetchDiscover({url:e.url},o).then(h=>{b.addKPI(h),m(h),n(!1)})},[e.catalog,e.cube,e.url]);const V=(o=[],h)=>{for(let E=0;E<o.length;E++){const N=o[E];if(String(N.name)===String(h.name))return N}return null},O=(o=[],h)=>{for(let E=0;E<o.length;E++){const N=o[E];if(N.uniqueName===h.uniqueName)return N;let T=O(N.children,h);if(T!==null)return T}return null},u=async o=>{let h,E,N,T,z,X;o.name&&(h="schemaMembers",T=`${String(o.name)}.[(ALL)]`);const d={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:N,dimensionUniqueName:E,levelUniqueName:T,memberUniqueName:z,treeOp:X},command:h};return b.fetchDiscover({url:e.url},d)},y=async o=>{let h,E,N,T,z,X;o.uniqueName&&(h="schemaMembers",z=o.uniqueName.replace(/\&/g,"&amp;"),X=1);const d={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:N,dimensionUniqueName:E,levelUniqueName:T,memberUniqueName:z,treeOp:X},command:h};return b.fetchDiscover({url:e.url},d)},H=async o=>{let h,E,N,T,z,X;o.type===2?h="schemaMeasures":o.dimensionUniqueName?(h="schemaLevels",N=o.uniqueName):(h="schemaHierarchies",E=o.uniqueName);const d={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:N,dimensionUniqueName:E,levelUniqueName:T,memberUniqueName:z,treeOp:X},command:h};return b.fetchDiscover({url:e.url},d)},P=async()=>{const o={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube},command:"schemaKPIs"};return b.fetchDiscover({url:e.url},o)},w=async o=>{const h=l.slice(),E=O(h,o.value);if(E&&E.uniqueName==="[KPIs]"){const N=Mt(await P());E.children=N}else if(E&&E.type==="kpi")E.children=b.buildKPIMeasures(E);else if(E&&!E.children){const N=await H(E);E.children=N}m(h)},J=async o=>{if(!o)return;const h={rowAxes:[f,x],columnAxes:[i,C],measureAxes:[F,k]},[E,N]=h[o.target.props.axes],T=E.slice(),z=V(T,o.target.props.dataItem);if(z&&!z.fields){const X=await u(z);z.fields=X,N(T)}},W=async o=>{if(!o)return;const h={rowAxes:[f,x],columnAxes:[i,C],measureAxes:[F,k]},[E,N]=h[o.target.props.axes],T=E.slice(),z=V(T,o.target.props.dataItem);if(z){const X=(z.fields||[]).slice(),d=O(X,o.value);if(d&&(!d.children||!d.children.length)){const q=await y(d);d.children=q,z.fields=X,N(T)}}};return{pivotProps:{rowAxes:f,columnAxes:i,data:r.data,rows:r.rows,columns:r.columns,onRowAxesChange:_,onColumnAxesChange:p},configuratorProps:{sort:D,onSortChange:g,filter:G,onFilterChange:U,data:l,rowAxes:f,columnAxes:i,measureAxes:F,onRowAxesChange:_,onColumnAxesChange:p,onMeasureAxesChange:L,onFieldsEditorFieldExpand:w,onAxisFilterFieldExpand:W,onAxisFilterFieldsExpandChange:J},state:{loading:a}}},Pt=e=>{const a=ut(e);return e.children(a)},Mt=e=>{for(let a=0,n=e.length;a<n;a++)e[a].uniqueName=e[a].name,e[a].type="kpi";return e},dt={dataField:"aggregate",columnsData:"columns"},Pe="&",mt=e=>{const[a,n]=t.useState(!0),[r,s]=t.useState(e.defaultColumnAxes||[]),[l,m]=t.useState(e.defaultRowAxes||[]),[i,C]=t.useState(e.defaultMeasureAxes||[]),[f,x]=t.useState(e.defaultSort||[]),[F,k]=t.useState(e.defaultFilter||[]),[D,j]=t.useState(new Map),G=t.useCallback(w=>{m(w.value)},[]),$=t.useCallback(w=>{s(w.value)},[]),_=w=>{C(w.value)},p=w=>{x(w.value)},L=w=>{k(w.value)},g=t.useMemo(()=>Array.from(b.rootFields(r).keys()).join(Pe),[r]),U=t.useMemo(()=>Array.from(b.rootFields(l).keys()).join(Pe),[l]),V=t.useCallback(w=>({key:w,...e.dimensions[w]}),[e.dimensions]),O=t.useMemo(()=>g?g.split(Pe).map(V):[],[g,V]),u=t.useMemo(()=>U?U.split(Pe).map(V):[],[U,V]),y=t.useMemo(()=>i.map(w=>e.measures.find(J=>String(J.name)===String(w.name))).filter(Boolean),[i,e.measures]);t.useEffect(()=>{n(!0),setTimeout(()=>{const w=b.createDataTree(e.data,u,O,y,dt,F);j(w),n(!1)},0)},[e.data,u,O,y,F]);const H=t.useMemo(()=>b.createFlatSchemaDimensions(e.dimensions,e.measures),[e.dimensions,e.measures]),P=t.useMemo(()=>b.createLocalDataState({dataTree:D,rowSettings:u,columnSettings:O,rowAxes:l,columnAxes:r,measures:y,sort:f,fields:dt}),[r,O,D,l,u,f]);return{pivotProps:{rowAxes:l,columnAxes:r,data:P.data,rows:P.rows,columns:P.columns,onRowAxesChange:G,onColumnAxesChange:$},configuratorProps:{sort:f,onSortChange:p,filter:F,onFilterChange:L,data:H,rowAxes:l,columnAxes:r,measureAxes:i,onRowAxesChange:G,onColumnAxesChange:$,onMeasureAxesChange:_},state:{loading:a}}},Lt=e=>{const a=mt(e);return e.children(a)};Object.defineProperty(A,"averageAggregate",{enumerable:!0,get:()=>b.averageAggregate}),Object.defineProperty(A,"maxAggregate",{enumerable:!0,get:()=>b.maxAggregate}),Object.defineProperty(A,"minAggregate",{enumerable:!0,get:()=>b.minAggregate}),Object.defineProperty(A,"sumAggregate",{enumerable:!0,get:()=>b.sumAggregate}),A.PivotGrid=rt,A.PivotGridAxesEditor=se,A.PivotGridAxisEditor=be,A.PivotGridAxisFilterFieldsEditor=Fe,A.PivotGridCell=je,A.PivotGridColumn=Ae,A.PivotGridConfigurator=We,A.PivotGridConfiguratorButton=Ye,A.PivotGridConfiguratorEditor=Ie,A.PivotGridContainer=Xe,A.PivotGridFieldsEditor=Ne,A.PivotGridHeaderCell=Ce,A.PivotGridRow=Ve,A.PivotLocalDataService=Lt,A.PivotOLAPService=Pt,A.dataCells=wt,A.usePivotLocalDataService=mt,A.usePivotOLAPService=ut,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
package/index.js CHANGED
@@ -2,4 +2,4 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const bt=require("react"),c=require("@progress/kendo-react-common"),he=require("@progress/kendo-react-intl"),b=require("@progress/kendo-pivotgrid-common"),pe=require("@progress/kendo-svg-icons"),ue=require("@progress/kendo-react-buttons"),ne=require("@progress/kendo-react-form"),me=require("@progress/kendo-react-labels"),Ae=require("@progress/kendo-react-data-tools"),Ve=require("@progress/kendo-react-treeview"),Ft=require("@progress/kendo-react-indicators");function Pt(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const t=Pt(bt),Rt={name:"@progress/kendo-react-pivotgrid",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},Me="pivotgrid.emptyCellAriaLabel",Le="pivotgrid.fieldMenuReset",Te="pivotgrid.fieldMenuApply",De="pivotgrid.configuratorTitle",He="pivotgrid.configuratorCancel",Ge="pivotgrid.configuratorApply",Oe="pivotgrid.configuratorColumnsTitle",qe="pivotgrid.configuratorRowsTitle",Be="pivotgrid.configuratorMeasuresTitle",ze="pivotgrid.configuratorEditorSearchTitle",It="pivotgrid.configuratorEditorSearchPlaceholder",ae="pivotgrid.configuratorMissingFields",Ke="pivotgrid.configuratorButtonLabel",Z={[Me]:"PivotGrid component. Use the arrow keys to navigate.",[Le]:"Reset",[Te]:"Apply",[He]:"Cancel",[Ge]:"Apply",[De]:"Settings",[ze]:"Fields",[It]:"Search...",[Oe]:"Columns",[qe]:"Rows",[Be]:"Values",[Ke]:"Change settings",[ae]:"Select some fields to begin setup"},$e=t.forwardRef((e,o)=>{const n=t.useRef(null),a=t.useRef(null);t.useImperativeHandle(n,()=>({element:a.current,props:e})),t.useImperativeHandle(o,()=>n.current);const l=c.useMouse(e,n);return t.createElement("tr",{ref:a,...l,id:e.id,style:e.style,tabIndex:e.tabIndex,children:e.children,role:e.role,"aria-owns":e.ariaOwns,className:c.classNames("k-pivotgrid-row",e.className)})});$e.displayName="KendoReactPivotGridRow";const je=t.forwardRef((e,o)=>{const n=t.useRef(null),a=t.useRef(null);t.useImperativeHandle(n,()=>({element:a.current,props:e})),t.useImperativeHandle(o,()=>n.current);const l=c.useMouse(e,n);return t.createElement("td",{ref:a,...l,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,"aria-describedby":e.ariaDescribedby,className:c.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total},e.className)},e.children)});je.displayName="KendoReactPivotGridCell";const tt=(e,o,n)=>[e,(l,s)=>{const m=b.headersReducer(e,{...l,tree:o});n&&n(m,s)}],we=t.forwardRef((e,o)=>{const n=t.useRef(null),a=t.useRef(null);t.useImperativeHandle(n,()=>({element:a.current,props:e})),t.useImperativeHandle(o,()=>n.current);const[l,s]=c.useCustomComponent(e.icon||at.icon),m=c.useMouse(e,n),i=p=>{e.onIconClick&&e.onIconClick.call(void 0,{syntheticEvent:p.syntheticEvent,target:n.current})};return t.createElement("th",{ref:a,...m,colSpan:e.colSpan,rowSpan:e.rowSpan,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,...e.expandable?{"aria-expanded":e.expanded}:{},className:c.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total,"k-pivotgrid-header-root":e.root,"k-pivotgrid-expanded":e.expanded,"k-first":e.first},e.className)},e.expandable&&t.createElement(l,{...s,onClick:i,name:`chevron-${e.expanded?"up":"down"}`,"aria-hidden":!0,icon:e.expanded?pe.chevronUpIcon:pe.chevronDownIcon}),e.children)}),at={icon:c.IconWrap};we.defaultProps=at;we.displayName="KendoReactPivotGridHeaderCell";const St=(...e)=>{const o=t.useRef();return a=>{o.current!==void 0&&window.cancelAnimationFrame(o.current);const l=a.currentTarget,s=l.scrollLeft;e.forEach(m=>{const i=m.current;i&&i!==l&&(o.current=window.requestAnimationFrame(()=>{i.scrollLeft=Math.round(s)}))})}},Nt=(...e)=>{const o=t.useRef();return a=>{o.current!==void 0&&window.cancelAnimationFrame(o.current);const l=a.currentTarget,s=l.scrollTop;e.forEach(m=>{const i=m.current;i&&i!==l&&(o.current=window.requestAnimationFrame(()=>{i.scrollTop=Math.round(s)}))})}},be=t.forwardRef((e,o)=>{const n=t.useRef(null),a=t.useRef(null);t.useImperativeHandle(n,()=>({element:a.current,props:e})),t.useImperativeHandle(o,()=>n.current);const l=c.useMouse(e,n);return t.createElement("col",{ref:a,...l,id:e.id,style:e.style,tabIndex:e.tabIndex,children:e.children,className:e.className})}),kt={path:[]};be.defaultProps=kt;be.displayName="KendoReactPivotGridColumn";const Mt=(e,o,n)=>{const a=JSON.parse(JSON.stringify(e||[])),l=JSON.parse(JSON.stringify(o||[])),s=JSON.parse(JSON.stringify(n||[])),m=b.toTree(a),[,i,p]=b.toRows(m),f=b.toTree(l),[,v,,w]=b.toColumns(f);return b.toData(s,v,i,w,p)},ye=(e=[],o={},n=null)=>e.map(a=>{const l={dataItem:a};return Object.keys(o).forEach(s=>{l[s]=o[s](l,n)}),l}),_e=(e=[])=>{let o=[...e];return(e||[]).forEach(n=>{o=o.concat(_e(n.children))}),o},ke=(e=[])=>{const o=new Set;return e.forEach(n=>{o.add(String(n.name))}),Array.from(o)},re=(e=[])=>`${e.join(",")}`,Lt=(e,o)=>`${re(e.map(n=>n.name))}|${re(o.map(n=>n.name))}`,Tt=(e,o,n)=>{if(!e)return;let a=0,l,s=e.length,m;for(;a<s;a++)m=e[a].operator,(!n&&m!=="in"||m===n)&&e[a].field===o&&(l=e[a]);return l},nt=(e,o,n)=>{if(!e)return[];let a=0,l=[],s=e.length,m;for(;a<s;a++)m=e[a].operator,(!n&&m!=="in"||m===n)&&e[a].field===o&&l.push(e[a]);return l},rt=(e,o)=>e.uniqueName===o.uniqueName,lt=t.forwardRef((e,o)=>{c.validatePackage(Rt);const{rows:n,rowAxes:a,columns:l,columnAxes:s,data:m}={...de,...e},i=t.useRef(null),p=t.useRef(null),f=t.useRef(null),v=t.useRef(null),w=t.useRef(null),O=t.useRef(null),M=t.useRef(null),V=he.useLocalization(),D=(C,S)=>{e.onRowAxesChange&&e.onRowAxesChange({value:C,target:p.current,syntheticEvent:S})},$=(C,S)=>{e.onColumnAxesChange&&e.onColumnAxesChange({value:C,target:p.current,syntheticEvent:S})},j=b.toTree((n||[]).slice()),[,x]=tt((a||[]).slice(),j,D),[N,g,K,U]=b.toRows(j),H=b.toTree((l||[]).slice()),[,u]=tt((s||[]).slice(),H,$),[A,L,,I]=b.toColumns(H),y=b.toData((m||[]).slice(),L,g,I,K);t.useImperativeHandle(p,()=>({props:e,element:i.current,columnHeaderRows:A,rowHeaderRows:N,dataCells:y,rowHeaderBreadth:U,columnHeaderBreadth:I})),t.useImperativeHandle(o,()=>p.current);const X=[],J=[],r=[],[h,E]=c.useCustomComponent(e.row||de.row),[F,k]=c.useCustomComponent(e.column||de.column),[q,_]=c.useCustomComponent(e.cell||de.cell),[d,G]=c.useCustomComponent(e.headerCell||de.headerCell),z=e.columnHeadersRow||h,T=e.columnHeadersColumn||F,Q=e.columnHeadersCell||d,Y=e.rowHeadersRow||h,oe=e.rowHeadersColumn||F,gt=e.rowHeadersCell||d,ht=e.dataRow||h,Ct=e.dataColumn||F;for(let C=0;C<L.length;C++)X.push(t.createElement(Ct,{key:String(L[C].path),...k,path:L[C].path})),r.push(t.createElement(T,{key:String(L[C].path),...k,path:L[C].path}));for(let C=0;C<U;C++)J.push(t.createElement(oe,{key:C,...k}));const vt=C=>{C.target.props.expandable&&u({type:b.HEADERS_ACTION.toggle,payload:C.target.props.dataItem.path},C.syntheticEvent)},xt=C=>{C.target.props.expandable&&x({type:b.HEADERS_ACTION.toggle,payload:C.target.props.dataItem.path},C.syntheticEvent)},Ye=St(M,O),Et=Nt(M,w),pt=C=>{Ye(C),Et(C)},Qe=t.useCallback(()=>{i.current&&v.current&&(i.current.style.gridTemplateRows="",i.current.style.gridTemplateRows=`${v.current.offsetHeight}px 1fr`)},[]),et=t.useCallback(()=>{i.current&&f.current&&(i.current.style.gridTemplateColumns="",i.current.style.gridTemplateColumns=`${f.current.offsetWidth}px 1fr`)},[]),se=t.useRef(new b.PivotGridNavigation({tabIndex:e.tabIndex||0}));t.useEffect(()=>{if(i.current){const C=e.tabIndex||0;if(se.current.stop(),se.current.tabIndex=C,e.navigatable){se.current.start(i.current);const S=se.current.first;S&&S.setAttribute("tabindex",String(C))}}return()=>{se.current.stop()}},[e.tabIndex,e.navigatable]),t.useEffect(()=>{se.current.update()}),t.useEffect(()=>{if(v.current){const C=new window.ResizeObserver(Qe);return C.observe(v.current),()=>{C.disconnect()}}},[Qe]),t.useEffect(()=>{if(f.current){const C=new window.ResizeObserver(et);return C.observe(f.current),()=>{C.disconnect()}}},[et]),t.useLayoutEffect(()=>{if(c.setScrollbarWidth(),f.current){const C=new window.ResizeObserver(c.setScrollbarWidth);return C.observe(f.current),()=>{C.disconnect()}}},[]);const ie=new Array(A.length).fill([]).map(()=>new Array(L.length));A.forEach((C,S)=>{let P=0;Array.from(C.cells).forEach(R=>{const W=!!(R&&R.children&&R.children.length),Ne=(R?re(R.normalizedPath)+(R.total?"|[TOTAL]":"")+(W?"|[EXPANDED]":""):"").replace(/\s/g,"-");if(R)for(let ve=0;ve<(R.colSpan||1);ve++){for(let ce=0;ce<(R.rowSpan||1);ce++){const At=ie[S+ce].findIndex((yt,wt)=>wt>=P&&!yt);ie[S+ce][At]=Ne}P++}})});const Ce=y.map(C=>C.cells.map(S=>Lt(S.rowTuple.members,S.columnTuple.members).replace(/\s/g,"-")));return t.createElement("div",{ref:i,id:e.id,style:e.style,tabIndex:e.navigatable?void 0:e.tabIndex,className:c.classNames("k-pivotgrid",e.className),role:"grid"},t.createElement("span",{className:"k-pivotgrid-empty-cell"},t.createElement("span",{className:"k-sr-only"},V.toLanguageString(Me,Z[Me]))),t.createElement("div",{ref:O,className:"k-pivotgrid-column-headers",onScroll:Ye},t.createElement("table",{ref:v,className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,r),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},A.map((C,S)=>{let P=!1;return t.createElement(z,{key:C.name,role:"row",...E},C.cells.map((R,W)=>{const Ne=W!==0&&!P;R&&(P=!0);const ve=R&&!!(R.children&&R.children.length),ce=R&&R.hasChildren&&(!R.total||R.total&&R.parent.total);return R?t.createElement(Q,{...G,key:ie[S][W],"data-key":ie[S][W],id:ie[S][W],columnPath:R.normalizedPath,rowSpan:R.rowSpan||void 0,colSpan:R.colSpan||void 0,onIconClick:vt,dataItem:R,expanded:ve,expandable:ce,total:R.total,first:Ne,root:R.levelNum===0,role:"columnheader"},R.caption):null}))})))),t.createElement("div",{ref:w,className:"k-pivotgrid-row-headers"},t.createElement("table",{ref:f,className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,J),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},N.map((C,S)=>t.createElement(Y,{key:re(g[S].path),...E,path:g[S].path,role:"row",ariaOwns:Ce[S].join(" ")},C.cells.filter(Boolean).map(P=>P?t.createElement(gt,{...G,key:re(P.normalizedPath)+(P.total?"|[TOTAL]":"")+(P.children&&P.children.length?"|[EXPANDED]":""),"data-key":re(P.normalizedPath)+(P.total?"|[TOTAL]":"")+(P.children&&P.children.length?"|[EXPANDED]":""),rowPath:P.normalizedPath,rowSpan:P.rowSpan||void 0,colSpan:P.colSpan||void 0,dataItem:P,expanded:!!(P.children&&P.children.length),expandable:P.hasChildren&&!P.total,total:P.total,onIconClick:xt,root:P.levelNum===0,role:"rowheader"},P.caption):null)))))),t.createElement("div",{ref:M,className:"k-pivotgrid-values",onScroll:pt},t.createElement("table",{className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,X),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"none"},y.map((C,S)=>t.createElement(ht,{key:re(g[S].path),...E,path:g[S].path,role:"none"},C.cells.map((P,R)=>t.createElement(q,{key:Ce[S][R],"data-key":Ce[S][R],id:Ce[S][R],..._,rowPath:P.rowTuple.members.map(W=>W.name),columnPath:P.columnTuple.members.map(W=>W.name),dataItem:P,total:g[S].total||L[R].total,role:"gridcell",ariaDescribedby:ie.map(W=>W[R]).join(" ")},P&&P.data&&P.data.fmtValue?P.data.fmtValue:" "))))))))}),de={rowAxes:[],columnAxes:[],data:[],row:$e,column:be,cell:je,headerCell:we};lt.displayName="KendoReactPivotGrid";const Xe=t.forwardRef((e,o)=>{const n=t.useRef(null),a=t.useRef(null);return t.useImperativeHandle(a,()=>({props:e,element:n.current})),t.useImperativeHandle(o,()=>a.current),t.createElement("div",{ref:n,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)}),Dt={configuratorPosition:"right"};Xe.defaultProps=Dt;Xe.displayName="KendoReactPivotGridContainer";const st=t.createContext({axes:null});var Ze=(e=>(e.toggle="EXPAND_TOGGLE",e.expand="EXPAND_EXPAND",e.collapse="EXPAND_COLLAPSE",e))(Ze||{});const Ht=(e,o,n)=>{switch(o.type){case"EXPAND_TOGGLE":return Array.isArray(e)?e.find(a=>n(a,o.payload))?[...e.filter(a=>!n(a,o.payload))]:[...e,o.payload]:n(e,o.payload)?null:o.payload;case"EXPAND_EXPAND":if(Array.isArray(e)){if(!e.find(a=>n(a,o.payload)))return[...e,o.payload]}else if(!n(e,o.payload))return o.payload;break;case"EXPAND_COLLAPSE":if(Array.isArray(e)){if(e.find(a=>n(a,o.payload)))return[...e.filter(a=>!n(a,o.payload))]}else n(e,o.payload);break;default:return e}},it=(e=[],o,n,a=(l,s)=>l===s)=>{const[l,s]=t.useState(e);return[l,(i,p)=>{const f=Ht(l,i,a);o&&o.call(void 0,{value:f,target:n.current,syntheticEvent:p}),s(f)}]};var ct=(e=>(e.toggleExpansion="PIVOT_CONFIGURATOR_ACTION_TOGGLE_EXPANSION",e))(ct||{});const B={...b.PIVOT_CONFIGURATOR_ACTION,...ct},Gt=(e,o)=>{const n=e.valueGetter("rowAxes"),a=e.valueGetter("columnAxes"),l=e.valueGetter("measureAxes"),s=e.valueGetter("sort"),m=e.valueGetter("filter"),[i,p]=it([],void 0,o,rt),[f,v]=t.useState(null),[w,O]=t.useState(null),[M,V]=t.useState(null),[D,$]=t.useState(null);return[{dragItem:f,dropTarget:M,dropZone:w,dropDirection:D,columnAxes:a,rowAxes:n,measureAxes:l,sort:s,filter:m,expanded:i},(x,N)=>{switch(x.type){case B.toggleExpansion:{p({type:Ze.toggle,payload:x.payload},N);break}default:const g=b.configuratorReducer({filter:x.override&&x.override.filter!==void 0?x.override.filter:m,sort:x.override&&x.override.sort!==void 0?x.override.sort:s,rowAxes:x.override&&x.override.rowAxes!==void 0?x.override.rowAxes:n,columnAxes:x.override&&x.override.columnAxes!==void 0?x.override.columnAxes:a,measureAxes:x.override&&x.override.measureAxes!==void 0?x.override.measureAxes:l,dragItem:x.override&&x.override.dragItem!==void 0?x.override.dragItem:f,dropDirection:x.override&&x.override.dropDirection!==void 0?x.override.dropDirection:D,dropTarget:x.override&&x.override.dropTarget!==void 0?x.override.dropTarget:M,dropZone:x.override&&x.override.dropZone!==void 0?x.override.dropZone:w},x);g.columnAxes!==void 0&&e.onChange("columnAxes",{value:g.columnAxes}),g.rowAxes!==void 0&&e.onChange("rowAxes",{value:g.rowAxes}),g.measureAxes!==void 0&&e.onChange("measureAxes",{value:g.measureAxes}),g.sort!==void 0&&e.onChange("sort",{value:g.sort}),g.filter!==void 0&&e.onChange("filter",{value:g.filter}),g.dropDirection!==void 0&&$(g.dropDirection),g.dropTarget!==void 0&&V(g.dropTarget),g.dropZone!==void 0&&O(g.dropZone),g.dragItem!==void 0&&v(g.dragItem);break}}]},ut=t.createContext({}),Fe=t.createContext([{expanded:[],rowAxes:[],columnAxes:[],measureAxes:[],dragItem:null,dropZone:null,dropDirection:null,dropTarget:null},c.noop]),Pe=t.forwardRef((e,o)=>{const{data:n,dataItem:a,defaultFilter:l}={...te,...e},s=t.useRef(null),m=t.useRef(null),i=he.useLocalization(),[p,f]=c.useCustomComponent(e.columnMenuItem||te.columnMenuItem),[v,w]=c.useCustomComponent(e.columnMenuForm||te.columnMenuForm),[O,M]=c.useCustomComponent(e.resetButton||te.resetButton),[V,D]=c.useCustomComponent(e.applyButton||te.applyButton),[$,j]=c.useCustomComponent(e.treeView||te.treeView),[x,N]=c.useCustomComponent(e.noData||te.noData);t.useImperativeHandle(m,()=>({props:e,element:s.current})),t.useImperativeHandle(o,()=>m.current);const[g,K]=t.useState(!1),{onAxisFilterFieldsExpandChange:U,onAxisFilterFieldExpand:H}=t.useContext(ut),[,u]=t.useContext(Fe),[A,L]=t.useState(l),I=A?A.value.split(","):[],[y,X]=it([],void 0,m,rt),J={caption:d=>d.dataItem.caption,id:d=>d.dataItem.uniqueName,parent:(d,G)=>G&&G.value,value:d=>d.dataItem.defaultHierarchy||d.dataItem.uniqueName,expanded:d=>y.some(G=>G.uniqueName===d.id),checked:d=>!I.length||(I||[]).some(G=>G===d.dataItem.uniqueName),hasChildren:d=>parseInt(d.dataItem.childrenCardinality,10)>0,children:d=>ye(d.dataItem.children,J,d),checkIndeterminate:d=>{const G=(d.children||[]).length&&d.children.every(z=>z.checked);return G&&(d.checked=!0),(d.children||[]).some(z=>z.checked)&&!G}},r=ye(n,J),h=_e(r),E=d=>{K(!g),U&&U({value:!g,target:m.current,syntheticEvent:d})},F=d=>{X({type:Ze.toggle,payload:d.item.dataItem},d.syntheticEvent),H&&H({value:d.item.dataItem,target:m.current,syntheticEvent:d.syntheticEvent})},k=d=>{let G;d.item.checked?G={field:String(a.name),operator:"in",value:h.filter(z=>z.checked).map(z=>String(z.value)).filter(z=>z!==d.item.value&&z!==d.item.parent).join(",")}:G={field:String(a.name),operator:"in",value:h.filter(z=>z.checked).map(z=>String(z.value)).concat([d.item.value]).join(",")},L(G)},q=d=>{K(!1),A&&u({type:B.removeFilter,payload:A},d)},_=d=>{K(!1),A&&u({type:l?B.changeFilter:B.addFilter,payload:A},d)};return t.createElement("div",{ref:s,id:e.id,tabIndex:e.tabIndex,style:e.style,className:c.classNames("k-columnmenu-item-wrapper",e.className)},t.createElement(p,{...f,title:"Include Fields",iconClass:"k-i-grid-layout",svgIcon:pe.gridLayoutIcon,onClick:E}),t.createElement(v,{show:g,actions:t.createElement(t.Fragment,null,t.createElement(O,{type:"reset",onClick:q,...M},i.toLanguageString(Le,Z[Le])),t.createElement(V,{themeColor:"primary",onClick:_,...D},i.toLanguageString(Te,Z[Te]))),...w},r&&r.length?t.createElement($,{data:r,checkboxes:!0,onExpandChange:F,onCheckChange:k,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...j}):t.createElement(x,{...N})))}),te={data:[],resetButton:ue.Button,applyButton:ue.Button,treeView:Ve.TreeView,noData:()=>t.createElement(Ft.Skeleton,{shape:"rectangle",style:{height:"20px",width:"calc(100% - 16px)",margin:8}}),columnMenuItem:Ae.ColumnMenuItem,columnMenuForm:Ae.ColumnMenuForm};Pe.defaultProps=te;Pe.displayName="KendoReactPivotGridAxisFilterFieldsEditor";const Re=t.forwardRef((e,o)=>{const n=t.useRef(0),a=t.useRef(0),l=t.useRef(null),s=t.useRef(null),m=t.useRef(null),{axes:i}=t.useContext(st),[p,f]=t.useState(!1),[v,w]=t.useContext(Fe);t.useImperativeHandle(s,()=>l.current&&l.current.element),t.useImperativeHandle(m,()=>({props:e,element:s.current})),t.useImperativeHandle(o,()=>m.current);const[O,M]=c.useCustomComponent(e.chip||fe.chip),[V,D]=c.useCustomComponent(e.dropClue||fe.dropClue),[$,j]=c.useCustomComponent(e.columnMenuTextColumn||fe.columnMenuTextColumn),[x,N]=c.useCustomComponent(e.filterFieldsEditor||fe.filterFieldsEditor),g=nt(v.filter,String(e.value),"in"),K=nt(v.filter,String(e.value)),U=(r,h)=>{w({type:B.setSort,payload:h},r)},H=(r,h)=>{h.length?w({type:B.setFilter,payload:[...g||[],...h.reduce((E,F)=>[...E,...F.filters.filter(k=>k.value)],[])]},r):w({type:B.setFilter,payload:g},r)},u=r=>{w({type:B.remove,payload:e.dataItem},r.syntheticEvent)},A=r=>{const h=r.slice(),E=Tt(v.filter,String(e.dataItem.name),"in");return h.splice(1,0,t.createElement(x,{key:"axis-filter-fields-editor",defaultFilter:E,dataItem:e.dataItem,data:e.dataItem.fields,axes:i,...N})),h},L=r=>{n.current=r.clientX,a.current=r.clientY},I=r=>{Math.abs(n.current-r.clientX)<10&&Math.abs(a.current-r.clientY)<10||(s.current&&(s.current.style.transform=`translate(${r.clientX-n.current}px, ${r.clientY-a.current}px)`),f(!0),w({type:B.setDragItem,payload:e.dataItem}))},y=()=>{f(!1),v.dragItem&&(s.current&&(s.current.style.transform=""),w({type:B.drop,payload:e.dataItem}))},X=r=>{v.dragItem&&(w({type:B.setDropTarget,payload:e.dataItem},r.syntheticEvent),w({type:B.setDropZone,payload:i},r.syntheticEvent))},J=r=>{if(v.dragItem&&!p&&s.current){const h=s.current.getBoundingClientRect(),F=r.syntheticEvent.clientX-h.left<h.width/2?"before":"after";w({type:B.setDropDirection,payload:F},r.syntheticEvent)}};return c.useDraggable(s,{onPress:L,onDrag:I,onRelease:y}),t.createElement(t.Fragment,null,v.dropTarget&&b.compareAxes(v.dropTarget,e.dataItem)&&v.dropDirection==="before"&&t.createElement(V,{...D}),t.createElement(O,{ref:c.canUseRef(O)?l:void 0,...e,removable:!0,onRemove:u,onMouseEnter:X,onMouseMove:J,style:{pointerEvents:p?"none":void 0},rounded:"full",...M},e.text,i!=="measureAxes"&&t.createElement($,{field:String(e.value),itemsRender:A,sort:v.sort,onSortChange:U,filter:K&&K.length?[{logic:"and",filters:K}]:void 0,onFilterChange:H,filterContent:[Ae.ColumnMenuTextFilter],...j})),v.dropTarget&&b.compareAxes(v.dropTarget,e.dataItem)&&v.dropDirection==="after"&&t.createElement(V,{...D}))}),fe={chip:ue.Chip,columnMenuTextColumn:Ae.ColumnMenuTextColumn,filterFieldsEditor:Pe,dropClue:e=>t.createElement("div",{className:"k-grouping-dropclue",style:{position:"relative",zIndex:1e4},...e})};Re.defaultProps=fe;Re.displayName="KendoReactPivotGridAxisEditor";const le=t.forwardRef((e,o)=>{const{value:n,field:a}={...Ue,...e},l=t.useRef(null),s=t.useRef(null),m=t.useRef(null),[i,p]=c.useCustomComponent(e.chipList||Ue.chipList);t.useImperativeHandle(s,()=>l.current&&l.current.element),t.useImperativeHandle(m,()=>({props:e,element:s.current})),t.useImperativeHandle(o,()=>m.current);const f=n.filter(v=>v.name.length===1&&v.name.every(w=>w.indexOf("&")===-1)).map(v=>({...v,text:String(v.name)}));return t.createElement(st.Provider,{value:{axes:a}},t.createElement(i,{ref:c.canUseRef(i)?l:void 0,textField:"text",valueField:"name",data:f,chip:Re,style:{position:"relative"},className:e.className,selection:"none",...p}))}),Ue={value:[],chipList:ue.ChipList};le.defaultProps=Ue;le.displayName="KendoReactPivotGridAxesEditor";const Ie=t.forwardRef((e,o)=>{const{data:n,rowAxes:a,columnAxes:l,measureAxes:s,onExpand:m,onCheck:i}={...Ee,...e},p=t.useRef(null),f=t.useRef(null),[v,w]=c.useCustomComponent(e.treeView||Ee.treeView),[O,M]=c.useCustomComponent(e.noData||Ee.noData);t.useImperativeHandle(f,()=>({props:e,element:p.current&&p.current.element})),t.useImperativeHandle(o,()=>f.current);const[V]=t.useContext(Fe),D=ke(l),$=ke(a),j=ke(s),N=_e(n).filter(u=>[...D,...$,...j].some(A=>A===u.uniqueName||A===u.defaultHierarchy)),g={caption:u=>u.dataItem.caption,id:u=>u.dataItem.uniqueName,value:u=>u.dataItem.defaultHierarchy||u.dataItem.uniqueName,expanded:u=>V.expanded.some(A=>A.uniqueName===u.dataItem.uniqueName),hasChildren:u=>!("hierarchyUniqueName"in u.dataItem)&&!("aggregator"in u.dataItem),selectable:u=>!(!u.hasChildren&&!u.dataItem.aggregator&&!u.dataItem.measure||u.dataItem.type===2||u.dataItem.uniqueName==="[KPIs]"),children:u=>ye(u.dataItem.children,g,u),checked:u=>N.some(A=>u.dataItem.defaultHierarchy?A.defaultHierarchy===u.dataItem.defaultHierarchy:A.uniqueName===u.dataItem.uniqueName)||u.children.length&&u.children.every(A=>A.checked)},K=u=>{m&&m({value:u.item.dataItem,target:f.current,syntheticEvent:u.syntheticEvent})},U=u=>{i&&i({value:u.item.dataItem,target:f.current,syntheticEvent:u.syntheticEvent})},H=ye(e.data,g);return t.createElement(Ve.TreeViewItemPropsContext.Provider,{value:u=>({...u,checkboxes:u.item.selectable})},H&&H.length?t.createElement(v,{ref:c.canUseRef(v)?p:void 0,data:H,checkboxes:!0,onExpandChange:K,onCheckChange:U,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...w}):t.createElement(O,{...M}))}),Ee={data:[],rowAxes:[],columnAxes:[],measureAxes:[],treeView:Ve.TreeView,noData:()=>t.createElement("div",null,"NO DATA")};Ie.defaultProps=Ee;Ie.displayName="KendoReactPivotGridFieldsEditor";const Se=t.forwardRef((e,o)=>{const{onFieldsEditorFieldCheck:n,onFieldsEditorFieldCheckAction:a,onFieldsEditorFieldExpand:l,onFieldsEditorFieldExpandAction:s,onAxisFilterFieldExpand:m,onAxisFilterFieldsExpandChange:i}=e,[p,f]=c.useCustomComponent(e.fieldsLabel||ee.fieldsLabel),[v,w]=c.useCustomComponent(e.fieldsEditor||ee.fieldsEditor),[O,M]=c.useCustomComponent(e.columnAxesLabel||ee.columnAxesLabel),[V,D]=c.useCustomComponent(e.columnAxesEditor||ee.columnAxesEditor),[$,j]=c.useCustomComponent(e.rowAxesLabel||ee.rowAxesLabel),[x,N]=c.useCustomComponent(e.rowAxesEditor||ee.rowAxesEditor),[g,K]=c.useCustomComponent(e.measureAxesLabel||ee.measureAxesLabel),[U,H]=c.useCustomComponent(e.measureAxesEditor||ee.measureAxesEditor),u=t.useRef(null),A=t.useRef(null),L=he.useLocalization(),[I,y]=Gt(e,A);t.useImperativeHandle(A,()=>({element:u.current,props:e,state:I})),t.useImperativeHandle(o,()=>A.current);const X=()=>{I.dragItem&&y({type:B.setDropZone,payload:"columnAxes"})},J=()=>{I.dragItem&&y({type:B.setDropZone,payload:null})},r=()=>{I.dragItem&&y({type:B.setDropZone,payload:"rowAxes"})},h=()=>{I.dragItem&&y({type:B.setDropZone,payload:null})},E=()=>{I.dragItem&&y({type:B.setDropZone,payload:"measureAxes"})},F=()=>{I.dragItem&&y({type:B.setDropZone,payload:null})},k=T=>{const Q={target:T.target,currentTarget:A.current,value:T.value,syntheticEvent:T.syntheticEvent};if(s){const Y=s(Q,e,I);Y&&(Array.isArray(Y)?Y.filter(Boolean).map(oe=>oe&&y({...oe},T.syntheticEvent)):y({...Y},T.syntheticEvent))}l&&l({target:T.target,currentTarget:A.current,value:T.value,syntheticEvent:T.syntheticEvent})},q=T=>{const Q={target:T.target,currentTarget:A.current,value:T.value,syntheticEvent:T.syntheticEvent};if(a){const Y=a(Q,e,I);Y&&(Array.isArray(Y)?Y.filter(Boolean).map(oe=>oe&&y({...oe},T.syntheticEvent)):y({...Y},T.syntheticEvent))}n&&n(Q)},_=T=>{const Q={target:T.target,currentTarget:A.current,value:T.value,syntheticEvent:T.syntheticEvent};m&&m(Q)},d=T=>{const Q={target:T.target,currentTarget:A.current,value:T.value,syntheticEvent:T.syntheticEvent};i&&i(Q)},G=e.horizontal?"div":t.Fragment,z=e.horizontal?{className:"k-form-field-wrapper"}:{};return t.createElement(ut.Provider,{value:{onAxisFilterFieldExpand:_,onAxisFilterFieldsExpandChange:d}},t.createElement(Fe.Provider,{value:[I,y]},t.createElement(G,{...z},t.createElement("div",{className:"k-form-field"},t.createElement(p,{name:"",component:me.Label,...f},L.toLanguageString(ze,Z[ze]))),t.createElement("div",{className:"k-form-field"},t.createElement("div",{className:"k-fields-list-wrapper"},t.createElement(v,{data:e.data,onExpand:k,onCheck:q,columnAxes:I.columnAxes,rowAxes:I.rowAxes,measureAxes:I.measureAxes,...w})))),t.createElement(G,{...z},t.createElement("div",{className:"k-form-field",onMouseEnter:X,onMouseLeave:J},t.createElement(ne.Field,{name:"columnAxes",field:"columnAxes",component:O,...M},L.toLanguageString(Oe,Z[Oe]))),e.valueGetter("columnAxes").length?t.createElement(ne.Field,{name:"columnAxes",field:"columnAxes",component:V,onMouseEnter:X,onMouseLeave:J,className:"k-column-fields",...D}):t.createElement("div",{className:"k-settings-description",onMouseEnter:X,onMouseLeave:J},L.toLanguageString(ae,Z[ae])),t.createElement("div",{className:"k-form-field",onMouseEnter:r,onMouseLeave:h},t.createElement(ne.Field,{name:"rowAxes",field:"rowAxes",component:$,...j},L.toLanguageString(qe,Z[qe]))),e.valueGetter("rowAxes").length?t.createElement(ne.Field,{name:"rowAxes",field:"rowAxes",component:x,onMouseEnter:r,onMouseLeave:h,className:"k-column-fields",...N}):t.createElement("div",{className:"k-settings-description",onMouseEnter:r,onMouseLeave:h},L.toLanguageString(ae,Z[ae]))),t.createElement(G,{...z},t.createElement("div",{className:"k-form-field",onMouseEnter:E,onMouseLeave:F},t.createElement(ne.Field,{name:"measureAxes",field:"measureAxes",component:g,...K},L.toLanguageString(Be,Z[Be]))),e.valueGetter("measureAxes").length?t.createElement(ne.Field,{name:"measureAxes",field:"measureAxes",component:U,onMouseEnter:E,onMouseLeave:F,className:"k-column-fields",...H}):t.createElement("div",{className:"k-settings-description",onMouseEnter:E,onMouseLeave:F},L.toLanguageString(ae,Z[ae])))))}),ee={data:[],horizontal:!1,fieldsLabel:me.Label,fieldsEditor:Ie,columnAxesLabel:me.Label,columnAxesEditor:le,rowAxesLabel:me.Label,rowAxesEditor:le,measureAxesLabel:me.Label,measureAxesEditor:le,axesEditor:le,onFieldsEditorFieldCheckAction:e=>({type:B.toggleSelection,payload:e.value}),onFieldsEditorFieldExpandAction:e=>({type:B.toggleExpansion,payload:e.value})};Se.defaultProps=ee;Se.displayName="KendoReactPivotGridConfiguratorEditor";const Je=t.forwardRef((e,o)=>{const{horizontal:n,data:a,rowAxes:l,columnAxes:s,measureAxes:m}={...ge,...e},i=t.useRef(null),p=t.useRef(null),f=t.useRef(null),v=he.useLocalization(),[w,O]=c.useCustomComponent(e.editor||ge.editor),[M,V]=c.useCustomComponent(e.form||ge.form),[D,$]=c.useCustomComponent(e.formElement||ge.formElement);t.useImperativeHandle(p,()=>({props:e,element:i.current})),t.useImperativeHandle(o,()=>p.current);const j=(N,g)=>{e.onRowAxesChange&&e.onRowAxesChange({target:p.current,value:N.rowAxes,syntheticEvent:g}),e.onColumnAxesChange&&e.onColumnAxesChange({target:p.current,value:N.columnAxes,syntheticEvent:g}),e.onMeasureAxesChange&&e.onMeasureAxesChange({target:p.current,value:N.measureAxes,syntheticEvent:g}),e.onSortChange&&e.onSortChange({target:p.current,value:N.sort,syntheticEvent:g}),e.onFilterChange&&e.onFilterChange({target:p.current,value:N.filter,syntheticEvent:g})},x={rowAxes:l,columnAxes:s,measureAxes:m,sort:e.sort,filter:e.filter};return t.useEffect(()=>{f.current&&f.current.onChange("rowAxes",{value:l})},[l]),t.useEffect(()=>{f.current&&f.current.onChange("columnAxes",{value:s})},[s]),t.useEffect(()=>{f.current&&f.current.onChange("measureAxes",{value:m})},[m]),t.useEffect(()=>{f.current&&f.current.onChange("sort",{value:e.sort})},[e.sort]),t.useEffect(()=>{f.current&&f.current.onChange("filter",{value:e.filter})},[e.filter]),t.createElement("div",{ref:i,id:e.id,tabIndex:e.tabIndex,style:e.style,className:c.classNames("k-pivotgrid-configurator",e.className)},t.createElement("div",{className:c.classNames("k-pivotgrid-configurator-panel","k-pivotgrid-configurator-push",{"k-pivotgrid-configurator-horizontal":n,"k-pivotgrid-configurator-vertical":!n})},t.createElement("div",{className:"k-pivotgrid-configurator-header"},t.createElement("div",{className:"k-pivotgrid-configurator-header-text"},v.toLanguageString(De,Z[De]))),t.createElement(M,{ref:c.canUseRef(M)?f:void 0,initialValues:x,onSubmit:j,render:N=>t.createElement(t.Fragment,null,t.createElement("div",{className:"k-pivotgrid-configurator-content"},t.createElement(D,{horizontal:n,...$},t.createElement(w,{...N,horizontal:e.horizontal,onFieldsEditorFieldExpand:e.onFieldsEditorFieldExpand,onFieldsEditorFieldCheck:e.onFieldsEditorFieldCheck,onAxisFilterFieldExpand:e.onAxisFilterFieldExpand,onAxisFilterFieldsExpandChange:e.onAxisFilterFieldsExpandChange,data:a,...O}))),t.createElement("div",{className:"k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end"},t.createElement(ue.Button,{type:"submit",onClick:N.onFormReset},v.toLanguageString(He,Z[He])),t.createElement(ue.Button,{themeColor:"primary",type:"submit",onClick:N.onSubmit},v.toLanguageString(Ge,Z[Ge])))),...V})))}),ge={form:ne.Form,formElement:ne.FormElement,editor:Se,horizontal:!1,data:[],columnAxes:[],rowAxes:[],measureAxes:[]};Je.defaultProps=ge;Je.displayName="KendoReactPivotGridConfigurator";const We=t.forwardRef((e,o)=>{const n=t.useRef(null),a=t.useRef(null),l=he.useLocalization();t.useImperativeHandle(n,()=>({props:e,element:a.current})),t.useImperativeHandle(o,()=>n.current);const[s,m]=c.useCustomComponent(e.icon||dt.icon),i=t.useMemo(()=>c.classNames("k-pivotgrid-configurator-button",e.className),[e.className]),p=c.useMouse(e,n);return t.createElement("div",{ref:a,id:e.id,className:i,tabIndex:e.tabIndex,...p},t.createElement("span",null,l.toLanguageString(Ke,Z[Ke]),t.createElement(s,{name:"gear",icon:pe.gearIcon,...m})))}),dt={icon:c.IconWrap};We.defaultProps=dt;We.displayName="KendoReactPivotGridConfiguratorButton";const mt=e=>{const[o,n]=t.useState(!0),[a,l]=t.useState({data:[],columns:[],rows:[]}),[s,m]=t.useState([]),[i,p]=t.useState(e.defaultColumnAxes||[]),[f,v]=t.useState(e.defaultRowAxes||[]),[w,O]=t.useState(e.defaultMeasureAxes||[]),[M,V]=t.useState(e.defaultSort||[]),[D,$]=t.useState(e.defaultFilter||[]),j=r=>{v(r.value)},x=r=>{p(r.value)},N=r=>{O(r.value)},g=r=>{V(r.value)},K=r=>{$(r.value)};t.useEffect(()=>{n(!0);const r={connection:{catalog:e.catalog,cube:e.cube},columnAxes:i.slice(),rowAxes:f.slice(),measureAxes:w,sort:M,filter:D};setTimeout(()=>{b.fetchData({url:e.url},c.clone(r)).then(b.createDataState).then(h=>{l(h),n(!1)})})},[i,f,w,D,M,e.cube,e.catalog,e.url]),t.useEffect(()=>{n(!0);const r={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube},command:"schemaDimensions"};b.fetchDiscover({url:e.url},r).then(h=>{b.addKPI(h),m(h),n(!1)})},[e.catalog,e.cube,e.url]);const U=(r=[],h)=>{for(let E=0;E<r.length;E++){const F=r[E];if(String(F.name)===String(h.name))return F}return null},H=(r=[],h)=>{for(let E=0;E<r.length;E++){const F=r[E];if(F.uniqueName===h.uniqueName)return F;let k=H(F.children,h);if(k!==null)return k}return null},u=async r=>{let h,E,F,k,q,_;r.name&&(h="schemaMembers",k=`${String(r.name)}.[(ALL)]`);const d={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:F,dimensionUniqueName:E,levelUniqueName:k,memberUniqueName:q,treeOp:_},command:h};return b.fetchDiscover({url:e.url},d)},A=async r=>{let h,E,F,k,q,_;r.uniqueName&&(h="schemaMembers",q=r.uniqueName.replace(/\&/g,"&amp;"),_=1);const d={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:F,dimensionUniqueName:E,levelUniqueName:k,memberUniqueName:q,treeOp:_},command:h};return b.fetchDiscover({url:e.url},d)},L=async r=>{let h,E,F,k,q,_;r.type===2?h="schemaMeasures":r.dimensionUniqueName?(h="schemaLevels",F=r.uniqueName):(h="schemaHierarchies",E=r.uniqueName);const d={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:F,dimensionUniqueName:E,levelUniqueName:k,memberUniqueName:q,treeOp:_},command:h};return b.fetchDiscover({url:e.url},d)},I=async()=>{const r={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube},command:"schemaKPIs"};return b.fetchDiscover({url:e.url},r)},y=async r=>{const h=s.slice(),E=H(h,r.value);if(E&&E.uniqueName==="[KPIs]"){const F=qt(await I());E.children=F}else if(E&&E.type==="kpi")E.children=b.buildKPIMeasures(E);else if(E&&!E.children){const F=await L(E);E.children=F}m(h)},X=async r=>{if(!r)return;const h={rowAxes:[f,v],columnAxes:[i,p],measureAxes:[w,O]},[E,F]=h[r.target.props.axes],k=E.slice(),q=U(k,r.target.props.dataItem);if(q&&!q.fields){const _=await u(q);q.fields=_,F(k)}},J=async r=>{if(!r)return;const h={rowAxes:[f,v],columnAxes:[i,p],measureAxes:[w,O]},[E,F]=h[r.target.props.axes],k=E.slice(),q=U(k,r.target.props.dataItem);if(q){const _=(q.fields||[]).slice(),d=H(_,r.value);if(d&&(!d.children||!d.children.length)){const G=await A(d);d.children=G,q.fields=_,F(k)}}};return{pivotProps:{rowAxes:f,columnAxes:i,data:a.data,rows:a.rows,columns:a.columns,onRowAxesChange:j,onColumnAxesChange:x},configuratorProps:{sort:M,onSortChange:g,filter:D,onFilterChange:K,data:s,rowAxes:f,columnAxes:i,measureAxes:w,onRowAxesChange:j,onColumnAxesChange:x,onMeasureAxesChange:N,onFieldsEditorFieldExpand:y,onAxisFilterFieldExpand:J,onAxisFilterFieldsExpandChange:X},state:{loading:o}}},Ot=e=>{const o=mt(e);return e.children(o)},qt=e=>{for(let o=0,n=e.length;o<n;o++)e[o].uniqueName=e[o].name,e[o].type="kpi";return e},Bt="aggregate",zt="columns",ot={dataField:Bt,columnsData:zt},xe="&",ft=e=>{const[o,n]=t.useState(!0),[a,l]=t.useState(e.defaultColumnAxes||[]),[s,m]=t.useState(e.defaultRowAxes||[]),[i,p]=t.useState(e.defaultMeasureAxes||[]),[f,v]=t.useState(e.defaultSort||[]),[w,O]=t.useState(e.defaultFilter||[]),[M,V]=t.useState(new Map),D=t.useCallback(y=>{m(y.value)},[]),$=t.useCallback(y=>{l(y.value)},[]),j=y=>{p(y.value)},x=y=>{v(y.value)},N=y=>{O(y.value)},g=t.useMemo(()=>Array.from(b.rootFields(a).keys()).join(xe),[a]),K=t.useMemo(()=>Array.from(b.rootFields(s).keys()).join(xe),[s]),U=t.useCallback(y=>({key:y,...e.dimensions[y]}),[e.dimensions]),H=t.useMemo(()=>g?g.split(xe).map(U):[],[g,U]),u=t.useMemo(()=>K?K.split(xe).map(U):[],[K,U]),A=t.useMemo(()=>i.map(y=>e.measures.find(X=>String(X.name)===String(y.name))).filter(Boolean),[i,e.measures]);t.useEffect(()=>{n(!0),setTimeout(()=>{const y=b.createDataTree(e.data,u,H,A,ot,w);V(y),n(!1)},0)},[e.data,u,H,A,w]);const L=t.useMemo(()=>b.createFlatSchemaDimensions(e.dimensions,e.measures),[e.dimensions,e.measures]),I=t.useMemo(()=>b.createLocalDataState({dataTree:M,rowSettings:u,columnSettings:H,rowAxes:s,columnAxes:a,measures:A,sort:f,fields:ot}),[a,H,M,s,u,f]);return{pivotProps:{rowAxes:s,columnAxes:a,data:I.data,rows:I.rows,columns:I.columns,onRowAxesChange:D,onColumnAxesChange:$},configuratorProps:{sort:f,onSortChange:x,filter:w,onFilterChange:N,data:L,rowAxes:s,columnAxes:a,measureAxes:i,onRowAxesChange:D,onColumnAxesChange:$,onMeasureAxesChange:j},state:{loading:o}}},Kt=e=>{const o=ft(e);return e.children(o)};Object.defineProperty(exports,"averageAggregate",{enumerable:!0,get:()=>b.averageAggregate});Object.defineProperty(exports,"maxAggregate",{enumerable:!0,get:()=>b.maxAggregate});Object.defineProperty(exports,"minAggregate",{enumerable:!0,get:()=>b.minAggregate});Object.defineProperty(exports,"sumAggregate",{enumerable:!0,get:()=>b.sumAggregate});exports.PivotGrid=lt;exports.PivotGridAxesEditor=le;exports.PivotGridAxisEditor=Re;exports.PivotGridAxisFilterFieldsEditor=Pe;exports.PivotGridCell=je;exports.PivotGridColumn=be;exports.PivotGridConfigurator=Je;exports.PivotGridConfiguratorButton=We;exports.PivotGridConfiguratorEditor=Se;exports.PivotGridContainer=Xe;exports.PivotGridFieldsEditor=Ie;exports.PivotGridHeaderCell=we;exports.PivotGridRow=$e;exports.PivotLocalDataService=Kt;exports.PivotOLAPService=Ot;exports.dataCells=Mt;exports.usePivotLocalDataService=ft;exports.usePivotOLAPService=mt;
5
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const bt=require("react"),c=require("@progress/kendo-react-common"),he=require("@progress/kendo-react-intl"),b=require("@progress/kendo-pivotgrid-common"),pe=require("@progress/kendo-svg-icons"),ue=require("@progress/kendo-react-buttons"),ne=require("@progress/kendo-react-form"),me=require("@progress/kendo-react-labels"),Ae=require("@progress/kendo-react-data-tools"),Ve=require("@progress/kendo-react-treeview"),Ft=require("@progress/kendo-react-indicators");function Pt(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const t=Pt(bt),Rt={name:"@progress/kendo-react-pivotgrid",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},Me="pivotgrid.emptyCellAriaLabel",Le="pivotgrid.fieldMenuReset",Te="pivotgrid.fieldMenuApply",De="pivotgrid.configuratorTitle",He="pivotgrid.configuratorCancel",Ge="pivotgrid.configuratorApply",Oe="pivotgrid.configuratorColumnsTitle",qe="pivotgrid.configuratorRowsTitle",Be="pivotgrid.configuratorMeasuresTitle",ze="pivotgrid.configuratorEditorSearchTitle",It="pivotgrid.configuratorEditorSearchPlaceholder",ae="pivotgrid.configuratorMissingFields",Ke="pivotgrid.configuratorButtonLabel",Z={[Me]:"PivotGrid component. Use the arrow keys to navigate.",[Le]:"Reset",[Te]:"Apply",[He]:"Cancel",[Ge]:"Apply",[De]:"Settings",[ze]:"Fields",[It]:"Search...",[Oe]:"Columns",[qe]:"Rows",[Be]:"Values",[Ke]:"Change settings",[ae]:"Select some fields to begin setup"},$e=t.forwardRef((e,o)=>{const n=t.useRef(null),a=t.useRef(null);t.useImperativeHandle(n,()=>({element:a.current,props:e})),t.useImperativeHandle(o,()=>n.current);const l=c.useMouse(e,n);return t.createElement("tr",{ref:a,...l,id:e.id,style:e.style,tabIndex:e.tabIndex,children:e.children,role:e.role,"aria-owns":e.ariaOwns,className:c.classNames("k-pivotgrid-row",e.className)})});$e.displayName="KendoReactPivotGridRow";const je=t.forwardRef((e,o)=>{const n=t.useRef(null),a=t.useRef(null);t.useImperativeHandle(n,()=>({element:a.current,props:e})),t.useImperativeHandle(o,()=>n.current);const l=c.useMouse(e,n);return t.createElement("td",{ref:a,...l,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,"aria-describedby":e.ariaDescribedby,className:c.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total},e.className)},e.children)});je.displayName="KendoReactPivotGridCell";const tt=(e,o,n)=>[e,(l,s)=>{const m=b.headersReducer(e,{...l,tree:o});n&&n(m,s)}],we=t.forwardRef((e,o)=>{const n=t.useRef(null),a=t.useRef(null);t.useImperativeHandle(n,()=>({element:a.current,props:e})),t.useImperativeHandle(o,()=>n.current);const[l,s]=c.useCustomComponent(e.icon||at.icon),m=c.useMouse(e,n),i=p=>{e.onIconClick&&e.onIconClick.call(void 0,{syntheticEvent:p.syntheticEvent,target:n.current})};return t.createElement("th",{ref:a,...m,colSpan:e.colSpan,rowSpan:e.rowSpan,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,...e.expandable?{"aria-expanded":e.expanded}:{},className:c.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total,"k-pivotgrid-header-root":e.root,"k-pivotgrid-expanded":e.expanded,"k-first":e.first},e.className)},e.expandable&&t.createElement(l,{...s,onClick:i,name:`chevron-${e.expanded?"up":"down"}`,"aria-hidden":!0,icon:e.expanded?pe.chevronUpIcon:pe.chevronDownIcon}),e.children)}),at={icon:c.IconWrap};we.defaultProps=at;we.displayName="KendoReactPivotGridHeaderCell";const St=(...e)=>{const o=t.useRef();return a=>{o.current!==void 0&&window.cancelAnimationFrame(o.current);const l=a.currentTarget,s=l.scrollLeft;e.forEach(m=>{const i=m.current;i&&i!==l&&(o.current=window.requestAnimationFrame(()=>{i.scrollLeft=Math.round(s)}))})}},Nt=(...e)=>{const o=t.useRef();return a=>{o.current!==void 0&&window.cancelAnimationFrame(o.current);const l=a.currentTarget,s=l.scrollTop;e.forEach(m=>{const i=m.current;i&&i!==l&&(o.current=window.requestAnimationFrame(()=>{i.scrollTop=Math.round(s)}))})}},be=t.forwardRef((e,o)=>{const n=t.useRef(null),a=t.useRef(null);t.useImperativeHandle(n,()=>({element:a.current,props:e})),t.useImperativeHandle(o,()=>n.current);const l=c.useMouse(e,n);return t.createElement("col",{ref:a,...l,id:e.id,style:e.style,tabIndex:e.tabIndex,children:e.children,className:e.className})}),kt={path:[]};be.defaultProps=kt;be.displayName="KendoReactPivotGridColumn";const Mt=(e,o,n)=>{const a=JSON.parse(JSON.stringify(e||[])),l=JSON.parse(JSON.stringify(o||[])),s=JSON.parse(JSON.stringify(n||[])),m=b.toTree(a),[,i,p]=b.toRows(m),f=b.toTree(l),[,v,,w]=b.toColumns(f);return b.toData(s,v,i,w,p)},ye=(e=[],o={},n=null)=>e.map(a=>{const l={dataItem:a};return Object.keys(o).forEach(s=>{l[s]=o[s](l,n)}),l}),_e=(e=[])=>{let o=[...e];return(e||[]).forEach(n=>{o=o.concat(_e(n.children))}),o},ke=(e=[])=>{const o=new Set;return e.forEach(n=>{o.add(String(n.name))}),Array.from(o)},re=(e=[])=>`${e.join(",")}`,Lt=(e,o)=>`${re(e.map(n=>n.name))}|${re(o.map(n=>n.name))}`,Tt=(e,o,n)=>{if(!e)return;let a=0,l,s=e.length,m;for(;a<s;a++)m=e[a].operator,(!n&&m!=="in"||m===n)&&e[a].field===o&&(l=e[a]);return l},nt=(e,o,n)=>{if(!e)return[];let a=0,l=[],s=e.length,m;for(;a<s;a++)m=e[a].operator,(!n&&m!=="in"||m===n)&&e[a].field===o&&l.push(e[a]);return l},rt=(e,o)=>e.uniqueName===o.uniqueName,lt=t.forwardRef((e,o)=>{c.validatePackage(Rt);const{rows:n,rowAxes:a,columns:l,columnAxes:s,data:m}={...de,...e},i=t.useRef(null),p=t.useRef(null),f=t.useRef(null),v=t.useRef(null),w=t.useRef(null),O=t.useRef(null),M=t.useRef(null),V=he.useLocalization(),D=(C,S)=>{e.onRowAxesChange&&e.onRowAxesChange({value:C,target:p.current,syntheticEvent:S})},$=(C,S)=>{e.onColumnAxesChange&&e.onColumnAxesChange({value:C,target:p.current,syntheticEvent:S})},j=b.toTree((n||[]).slice()),[,x]=tt((a||[]).slice(),j,D),[N,g,K,U]=b.toRows(j),H=b.toTree((l||[]).slice()),[,u]=tt((s||[]).slice(),H,$),[A,L,,I]=b.toColumns(H),y=b.toData((m||[]).slice(),L,g,I,K);t.useImperativeHandle(p,()=>({props:e,element:i.current,columnHeaderRows:A,rowHeaderRows:N,dataCells:y,rowHeaderBreadth:U,columnHeaderBreadth:I})),t.useImperativeHandle(o,()=>p.current);const X=[],J=[],r=[],[h,E]=c.useCustomComponent(e.row||de.row),[F,k]=c.useCustomComponent(e.column||de.column),[q,_]=c.useCustomComponent(e.cell||de.cell),[d,G]=c.useCustomComponent(e.headerCell||de.headerCell),z=e.columnHeadersRow||h,T=e.columnHeadersColumn||F,Q=e.columnHeadersCell||d,Y=e.rowHeadersRow||h,oe=e.rowHeadersColumn||F,gt=e.rowHeadersCell||d,ht=e.dataRow||h,Ct=e.dataColumn||F;for(let C=0;C<L.length;C++)X.push(t.createElement(Ct,{key:String(L[C].path),...k,path:L[C].path})),r.push(t.createElement(T,{key:String(L[C].path),...k,path:L[C].path}));for(let C=0;C<U;C++)J.push(t.createElement(oe,{key:C,...k}));const vt=C=>{C.target.props.expandable&&u({type:b.HEADERS_ACTION.toggle,payload:C.target.props.dataItem.path},C.syntheticEvent)},xt=C=>{C.target.props.expandable&&x({type:b.HEADERS_ACTION.toggle,payload:C.target.props.dataItem.path},C.syntheticEvent)},Ye=St(M,O),Et=Nt(M,w),pt=C=>{Ye(C),Et(C)},Qe=t.useCallback(()=>{i.current&&v.current&&(i.current.style.gridTemplateRows="",i.current.style.gridTemplateRows=`${v.current.offsetHeight}px 1fr`)},[]),et=t.useCallback(()=>{i.current&&f.current&&(i.current.style.gridTemplateColumns="",i.current.style.gridTemplateColumns=`${f.current.offsetWidth}px 1fr`)},[]),se=t.useRef(new b.PivotGridNavigation({tabIndex:e.tabIndex||0}));t.useEffect(()=>{if(i.current){const C=e.tabIndex||0;if(se.current.stop(),se.current.tabIndex=C,e.navigatable){se.current.start(i.current);const S=se.current.first;S&&S.setAttribute("tabindex",String(C))}}return()=>{se.current.stop()}},[e.tabIndex,e.navigatable]),t.useEffect(()=>{se.current.update()}),t.useEffect(()=>{if(v.current){const C=new window.ResizeObserver(Qe);return C.observe(v.current),()=>{C.disconnect()}}},[Qe]),t.useEffect(()=>{if(f.current){const C=new window.ResizeObserver(et);return C.observe(f.current),()=>{C.disconnect()}}},[et]),c.useIsomorphicLayoutEffect(()=>{if(c.setScrollbarWidth(),f.current){const C=new window.ResizeObserver(c.setScrollbarWidth);return C.observe(f.current),()=>{C.disconnect()}}},[]);const ie=new Array(A.length).fill([]).map(()=>new Array(L.length));A.forEach((C,S)=>{let P=0;Array.from(C.cells).forEach(R=>{const W=!!(R&&R.children&&R.children.length),Ne=(R?re(R.normalizedPath)+(R.total?"|[TOTAL]":"")+(W?"|[EXPANDED]":""):"").replace(/\s/g,"-");if(R)for(let ve=0;ve<(R.colSpan||1);ve++){for(let ce=0;ce<(R.rowSpan||1);ce++){const At=ie[S+ce].findIndex((yt,wt)=>wt>=P&&!yt);ie[S+ce][At]=Ne}P++}})});const Ce=y.map(C=>C.cells.map(S=>Lt(S.rowTuple.members,S.columnTuple.members).replace(/\s/g,"-")));return t.createElement("div",{ref:i,id:e.id,style:e.style,tabIndex:e.navigatable?void 0:e.tabIndex,className:c.classNames("k-pivotgrid",e.className),role:"grid"},t.createElement("span",{className:"k-pivotgrid-empty-cell"},t.createElement("span",{className:"k-sr-only"},V.toLanguageString(Me,Z[Me]))),t.createElement("div",{ref:O,className:"k-pivotgrid-column-headers",onScroll:Ye},t.createElement("table",{ref:v,className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,r),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},A.map((C,S)=>{let P=!1;return t.createElement(z,{key:C.name,role:"row",...E},C.cells.map((R,W)=>{const Ne=W!==0&&!P;R&&(P=!0);const ve=R&&!!(R.children&&R.children.length),ce=R&&R.hasChildren&&(!R.total||R.total&&R.parent.total);return R?t.createElement(Q,{...G,key:ie[S][W],"data-key":ie[S][W],id:ie[S][W],columnPath:R.normalizedPath,rowSpan:R.rowSpan||void 0,colSpan:R.colSpan||void 0,onIconClick:vt,dataItem:R,expanded:ve,expandable:ce,total:R.total,first:Ne,root:R.levelNum===0,role:"columnheader"},R.caption):null}))})))),t.createElement("div",{ref:w,className:"k-pivotgrid-row-headers"},t.createElement("table",{ref:f,className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,J),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},N.map((C,S)=>t.createElement(Y,{key:re(g[S].path),...E,path:g[S].path,role:"row",ariaOwns:Ce[S].join(" ")},C.cells.filter(Boolean).map(P=>P?t.createElement(gt,{...G,key:re(P.normalizedPath)+(P.total?"|[TOTAL]":"")+(P.children&&P.children.length?"|[EXPANDED]":""),"data-key":re(P.normalizedPath)+(P.total?"|[TOTAL]":"")+(P.children&&P.children.length?"|[EXPANDED]":""),rowPath:P.normalizedPath,rowSpan:P.rowSpan||void 0,colSpan:P.colSpan||void 0,dataItem:P,expanded:!!(P.children&&P.children.length),expandable:P.hasChildren&&!P.total,total:P.total,onIconClick:xt,root:P.levelNum===0,role:"rowheader"},P.caption):null)))))),t.createElement("div",{ref:M,className:"k-pivotgrid-values",onScroll:pt},t.createElement("table",{className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,X),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"none"},y.map((C,S)=>t.createElement(ht,{key:re(g[S].path),...E,path:g[S].path,role:"none"},C.cells.map((P,R)=>t.createElement(q,{key:Ce[S][R],"data-key":Ce[S][R],id:Ce[S][R],..._,rowPath:P.rowTuple.members.map(W=>W.name),columnPath:P.columnTuple.members.map(W=>W.name),dataItem:P,total:g[S].total||L[R].total,role:"gridcell",ariaDescribedby:ie.map(W=>W[R]).join(" ")},P&&P.data&&P.data.fmtValue?P.data.fmtValue:" "))))))))}),de={rowAxes:[],columnAxes:[],data:[],row:$e,column:be,cell:je,headerCell:we};lt.displayName="KendoReactPivotGrid";const Xe=t.forwardRef((e,o)=>{const n=t.useRef(null),a=t.useRef(null);return t.useImperativeHandle(a,()=>({props:e,element:n.current})),t.useImperativeHandle(o,()=>a.current),t.createElement("div",{ref:n,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)}),Dt={configuratorPosition:"right"};Xe.defaultProps=Dt;Xe.displayName="KendoReactPivotGridContainer";const st=t.createContext({axes:null});var Ze=(e=>(e.toggle="EXPAND_TOGGLE",e.expand="EXPAND_EXPAND",e.collapse="EXPAND_COLLAPSE",e))(Ze||{});const Ht=(e,o,n)=>{switch(o.type){case"EXPAND_TOGGLE":return Array.isArray(e)?e.find(a=>n(a,o.payload))?[...e.filter(a=>!n(a,o.payload))]:[...e,o.payload]:n(e,o.payload)?null:o.payload;case"EXPAND_EXPAND":if(Array.isArray(e)){if(!e.find(a=>n(a,o.payload)))return[...e,o.payload]}else if(!n(e,o.payload))return o.payload;break;case"EXPAND_COLLAPSE":if(Array.isArray(e)){if(e.find(a=>n(a,o.payload)))return[...e.filter(a=>!n(a,o.payload))]}else n(e,o.payload);break;default:return e}},it=(e=[],o,n,a=(l,s)=>l===s)=>{const[l,s]=t.useState(e);return[l,(i,p)=>{const f=Ht(l,i,a);o&&o.call(void 0,{value:f,target:n.current,syntheticEvent:p}),s(f)}]};var ct=(e=>(e.toggleExpansion="PIVOT_CONFIGURATOR_ACTION_TOGGLE_EXPANSION",e))(ct||{});const B={...b.PIVOT_CONFIGURATOR_ACTION,...ct},Gt=(e,o)=>{const n=e.valueGetter("rowAxes"),a=e.valueGetter("columnAxes"),l=e.valueGetter("measureAxes"),s=e.valueGetter("sort"),m=e.valueGetter("filter"),[i,p]=it([],void 0,o,rt),[f,v]=t.useState(null),[w,O]=t.useState(null),[M,V]=t.useState(null),[D,$]=t.useState(null);return[{dragItem:f,dropTarget:M,dropZone:w,dropDirection:D,columnAxes:a,rowAxes:n,measureAxes:l,sort:s,filter:m,expanded:i},(x,N)=>{switch(x.type){case B.toggleExpansion:{p({type:Ze.toggle,payload:x.payload},N);break}default:const g=b.configuratorReducer({filter:x.override&&x.override.filter!==void 0?x.override.filter:m,sort:x.override&&x.override.sort!==void 0?x.override.sort:s,rowAxes:x.override&&x.override.rowAxes!==void 0?x.override.rowAxes:n,columnAxes:x.override&&x.override.columnAxes!==void 0?x.override.columnAxes:a,measureAxes:x.override&&x.override.measureAxes!==void 0?x.override.measureAxes:l,dragItem:x.override&&x.override.dragItem!==void 0?x.override.dragItem:f,dropDirection:x.override&&x.override.dropDirection!==void 0?x.override.dropDirection:D,dropTarget:x.override&&x.override.dropTarget!==void 0?x.override.dropTarget:M,dropZone:x.override&&x.override.dropZone!==void 0?x.override.dropZone:w},x);g.columnAxes!==void 0&&e.onChange("columnAxes",{value:g.columnAxes}),g.rowAxes!==void 0&&e.onChange("rowAxes",{value:g.rowAxes}),g.measureAxes!==void 0&&e.onChange("measureAxes",{value:g.measureAxes}),g.sort!==void 0&&e.onChange("sort",{value:g.sort}),g.filter!==void 0&&e.onChange("filter",{value:g.filter}),g.dropDirection!==void 0&&$(g.dropDirection),g.dropTarget!==void 0&&V(g.dropTarget),g.dropZone!==void 0&&O(g.dropZone),g.dragItem!==void 0&&v(g.dragItem);break}}]},ut=t.createContext({}),Fe=t.createContext([{expanded:[],rowAxes:[],columnAxes:[],measureAxes:[],dragItem:null,dropZone:null,dropDirection:null,dropTarget:null},c.noop]),Pe=t.forwardRef((e,o)=>{const{data:n,dataItem:a,defaultFilter:l}={...te,...e},s=t.useRef(null),m=t.useRef(null),i=he.useLocalization(),[p,f]=c.useCustomComponent(e.columnMenuItem||te.columnMenuItem),[v,w]=c.useCustomComponent(e.columnMenuForm||te.columnMenuForm),[O,M]=c.useCustomComponent(e.resetButton||te.resetButton),[V,D]=c.useCustomComponent(e.applyButton||te.applyButton),[$,j]=c.useCustomComponent(e.treeView||te.treeView),[x,N]=c.useCustomComponent(e.noData||te.noData);t.useImperativeHandle(m,()=>({props:e,element:s.current})),t.useImperativeHandle(o,()=>m.current);const[g,K]=t.useState(!1),{onAxisFilterFieldsExpandChange:U,onAxisFilterFieldExpand:H}=t.useContext(ut),[,u]=t.useContext(Fe),[A,L]=t.useState(l),I=A?A.value.split(","):[],[y,X]=it([],void 0,m,rt),J={caption:d=>d.dataItem.caption,id:d=>d.dataItem.uniqueName,parent:(d,G)=>G&&G.value,value:d=>d.dataItem.defaultHierarchy||d.dataItem.uniqueName,expanded:d=>y.some(G=>G.uniqueName===d.id),checked:d=>!I.length||(I||[]).some(G=>G===d.dataItem.uniqueName),hasChildren:d=>parseInt(d.dataItem.childrenCardinality,10)>0,children:d=>ye(d.dataItem.children,J,d),checkIndeterminate:d=>{const G=(d.children||[]).length&&d.children.every(z=>z.checked);return G&&(d.checked=!0),(d.children||[]).some(z=>z.checked)&&!G}},r=ye(n,J),h=_e(r),E=d=>{K(!g),U&&U({value:!g,target:m.current,syntheticEvent:d})},F=d=>{X({type:Ze.toggle,payload:d.item.dataItem},d.syntheticEvent),H&&H({value:d.item.dataItem,target:m.current,syntheticEvent:d.syntheticEvent})},k=d=>{let G;d.item.checked?G={field:String(a.name),operator:"in",value:h.filter(z=>z.checked).map(z=>String(z.value)).filter(z=>z!==d.item.value&&z!==d.item.parent).join(",")}:G={field:String(a.name),operator:"in",value:h.filter(z=>z.checked).map(z=>String(z.value)).concat([d.item.value]).join(",")},L(G)},q=d=>{K(!1),A&&u({type:B.removeFilter,payload:A},d)},_=d=>{K(!1),A&&u({type:l?B.changeFilter:B.addFilter,payload:A},d)};return t.createElement("div",{ref:s,id:e.id,tabIndex:e.tabIndex,style:e.style,className:c.classNames("k-columnmenu-item-wrapper",e.className)},t.createElement(p,{...f,title:"Include Fields",iconClass:"k-i-grid-layout",svgIcon:pe.gridLayoutIcon,onClick:E}),t.createElement(v,{show:g,actions:t.createElement(t.Fragment,null,t.createElement(O,{type:"reset",onClick:q,...M},i.toLanguageString(Le,Z[Le])),t.createElement(V,{themeColor:"primary",onClick:_,...D},i.toLanguageString(Te,Z[Te]))),...w},r&&r.length?t.createElement($,{data:r,checkboxes:!0,onExpandChange:F,onCheckChange:k,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...j}):t.createElement(x,{...N})))}),te={data:[],resetButton:ue.Button,applyButton:ue.Button,treeView:Ve.TreeView,noData:()=>t.createElement(Ft.Skeleton,{shape:"rectangle",style:{height:"20px",width:"calc(100% - 16px)",margin:8}}),columnMenuItem:Ae.ColumnMenuItem,columnMenuForm:Ae.ColumnMenuForm};Pe.defaultProps=te;Pe.displayName="KendoReactPivotGridAxisFilterFieldsEditor";const Re=t.forwardRef((e,o)=>{const n=t.useRef(0),a=t.useRef(0),l=t.useRef(null),s=t.useRef(null),m=t.useRef(null),{axes:i}=t.useContext(st),[p,f]=t.useState(!1),[v,w]=t.useContext(Fe);t.useImperativeHandle(s,()=>l.current&&l.current.element),t.useImperativeHandle(m,()=>({props:e,element:s.current})),t.useImperativeHandle(o,()=>m.current);const[O,M]=c.useCustomComponent(e.chip||fe.chip),[V,D]=c.useCustomComponent(e.dropClue||fe.dropClue),[$,j]=c.useCustomComponent(e.columnMenuTextColumn||fe.columnMenuTextColumn),[x,N]=c.useCustomComponent(e.filterFieldsEditor||fe.filterFieldsEditor),g=nt(v.filter,String(e.value),"in"),K=nt(v.filter,String(e.value)),U=(r,h)=>{w({type:B.setSort,payload:h},r)},H=(r,h)=>{h.length?w({type:B.setFilter,payload:[...g||[],...h.reduce((E,F)=>[...E,...F.filters.filter(k=>k.value)],[])]},r):w({type:B.setFilter,payload:g},r)},u=r=>{w({type:B.remove,payload:e.dataItem},r.syntheticEvent)},A=r=>{const h=r.slice(),E=Tt(v.filter,String(e.dataItem.name),"in");return h.splice(1,0,t.createElement(x,{key:"axis-filter-fields-editor",defaultFilter:E,dataItem:e.dataItem,data:e.dataItem.fields,axes:i,...N})),h},L=r=>{n.current=r.clientX,a.current=r.clientY},I=r=>{Math.abs(n.current-r.clientX)<10&&Math.abs(a.current-r.clientY)<10||(s.current&&(s.current.style.transform=`translate(${r.clientX-n.current}px, ${r.clientY-a.current}px)`),f(!0),w({type:B.setDragItem,payload:e.dataItem}))},y=()=>{f(!1),v.dragItem&&(s.current&&(s.current.style.transform=""),w({type:B.drop,payload:e.dataItem}))},X=r=>{v.dragItem&&(w({type:B.setDropTarget,payload:e.dataItem},r.syntheticEvent),w({type:B.setDropZone,payload:i},r.syntheticEvent))},J=r=>{if(v.dragItem&&!p&&s.current){const h=s.current.getBoundingClientRect(),F=r.syntheticEvent.clientX-h.left<h.width/2?"before":"after";w({type:B.setDropDirection,payload:F},r.syntheticEvent)}};return c.useDraggable(s,{onPress:L,onDrag:I,onRelease:y}),t.createElement(t.Fragment,null,v.dropTarget&&b.compareAxes(v.dropTarget,e.dataItem)&&v.dropDirection==="before"&&t.createElement(V,{...D}),t.createElement(O,{ref:c.canUseRef(O)?l:void 0,...e,removable:!0,onRemove:u,onMouseEnter:X,onMouseMove:J,style:{pointerEvents:p?"none":void 0},rounded:"full",...M},e.text,i!=="measureAxes"&&t.createElement($,{field:String(e.value),itemsRender:A,sort:v.sort,onSortChange:U,filter:K&&K.length?[{logic:"and",filters:K}]:void 0,onFilterChange:H,filterContent:[Ae.ColumnMenuTextFilter],...j})),v.dropTarget&&b.compareAxes(v.dropTarget,e.dataItem)&&v.dropDirection==="after"&&t.createElement(V,{...D}))}),fe={chip:ue.Chip,columnMenuTextColumn:Ae.ColumnMenuTextColumn,filterFieldsEditor:Pe,dropClue:e=>t.createElement("div",{className:"k-grouping-dropclue",style:{position:"relative",zIndex:1e4},...e})};Re.defaultProps=fe;Re.displayName="KendoReactPivotGridAxisEditor";const le=t.forwardRef((e,o)=>{const{value:n,field:a}={...Ue,...e},l=t.useRef(null),s=t.useRef(null),m=t.useRef(null),[i,p]=c.useCustomComponent(e.chipList||Ue.chipList);t.useImperativeHandle(s,()=>l.current&&l.current.element),t.useImperativeHandle(m,()=>({props:e,element:s.current})),t.useImperativeHandle(o,()=>m.current);const f=n.filter(v=>v.name.length===1&&v.name.every(w=>w.indexOf("&")===-1)).map(v=>({...v,text:String(v.name)}));return t.createElement(st.Provider,{value:{axes:a}},t.createElement(i,{ref:c.canUseRef(i)?l:void 0,textField:"text",valueField:"name",data:f,chip:Re,style:{position:"relative"},className:e.className,selection:"none",...p}))}),Ue={value:[],chipList:ue.ChipList};le.defaultProps=Ue;le.displayName="KendoReactPivotGridAxesEditor";const Ie=t.forwardRef((e,o)=>{const{data:n,rowAxes:a,columnAxes:l,measureAxes:s,onExpand:m,onCheck:i}={...Ee,...e},p=t.useRef(null),f=t.useRef(null),[v,w]=c.useCustomComponent(e.treeView||Ee.treeView),[O,M]=c.useCustomComponent(e.noData||Ee.noData);t.useImperativeHandle(f,()=>({props:e,element:p.current&&p.current.element})),t.useImperativeHandle(o,()=>f.current);const[V]=t.useContext(Fe),D=ke(l),$=ke(a),j=ke(s),N=_e(n).filter(u=>[...D,...$,...j].some(A=>A===u.uniqueName||A===u.defaultHierarchy)),g={caption:u=>u.dataItem.caption,id:u=>u.dataItem.uniqueName,value:u=>u.dataItem.defaultHierarchy||u.dataItem.uniqueName,expanded:u=>V.expanded.some(A=>A.uniqueName===u.dataItem.uniqueName),hasChildren:u=>!("hierarchyUniqueName"in u.dataItem)&&!("aggregator"in u.dataItem),selectable:u=>!(!u.hasChildren&&!u.dataItem.aggregator&&!u.dataItem.measure||u.dataItem.type===2||u.dataItem.uniqueName==="[KPIs]"),children:u=>ye(u.dataItem.children,g,u),checked:u=>N.some(A=>u.dataItem.defaultHierarchy?A.defaultHierarchy===u.dataItem.defaultHierarchy:A.uniqueName===u.dataItem.uniqueName)||u.children.length&&u.children.every(A=>A.checked)},K=u=>{m&&m({value:u.item.dataItem,target:f.current,syntheticEvent:u.syntheticEvent})},U=u=>{i&&i({value:u.item.dataItem,target:f.current,syntheticEvent:u.syntheticEvent})},H=ye(e.data,g);return t.createElement(Ve.TreeViewItemPropsContext.Provider,{value:u=>({...u,checkboxes:u.item.selectable})},H&&H.length?t.createElement(v,{ref:c.canUseRef(v)?p:void 0,data:H,checkboxes:!0,onExpandChange:K,onCheckChange:U,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...w}):t.createElement(O,{...M}))}),Ee={data:[],rowAxes:[],columnAxes:[],measureAxes:[],treeView:Ve.TreeView,noData:()=>t.createElement("div",null,"NO DATA")};Ie.defaultProps=Ee;Ie.displayName="KendoReactPivotGridFieldsEditor";const Se=t.forwardRef((e,o)=>{const{onFieldsEditorFieldCheck:n,onFieldsEditorFieldCheckAction:a,onFieldsEditorFieldExpand:l,onFieldsEditorFieldExpandAction:s,onAxisFilterFieldExpand:m,onAxisFilterFieldsExpandChange:i}=e,[p,f]=c.useCustomComponent(e.fieldsLabel||ee.fieldsLabel),[v,w]=c.useCustomComponent(e.fieldsEditor||ee.fieldsEditor),[O,M]=c.useCustomComponent(e.columnAxesLabel||ee.columnAxesLabel),[V,D]=c.useCustomComponent(e.columnAxesEditor||ee.columnAxesEditor),[$,j]=c.useCustomComponent(e.rowAxesLabel||ee.rowAxesLabel),[x,N]=c.useCustomComponent(e.rowAxesEditor||ee.rowAxesEditor),[g,K]=c.useCustomComponent(e.measureAxesLabel||ee.measureAxesLabel),[U,H]=c.useCustomComponent(e.measureAxesEditor||ee.measureAxesEditor),u=t.useRef(null),A=t.useRef(null),L=he.useLocalization(),[I,y]=Gt(e,A);t.useImperativeHandle(A,()=>({element:u.current,props:e,state:I})),t.useImperativeHandle(o,()=>A.current);const X=()=>{I.dragItem&&y({type:B.setDropZone,payload:"columnAxes"})},J=()=>{I.dragItem&&y({type:B.setDropZone,payload:null})},r=()=>{I.dragItem&&y({type:B.setDropZone,payload:"rowAxes"})},h=()=>{I.dragItem&&y({type:B.setDropZone,payload:null})},E=()=>{I.dragItem&&y({type:B.setDropZone,payload:"measureAxes"})},F=()=>{I.dragItem&&y({type:B.setDropZone,payload:null})},k=T=>{const Q={target:T.target,currentTarget:A.current,value:T.value,syntheticEvent:T.syntheticEvent};if(s){const Y=s(Q,e,I);Y&&(Array.isArray(Y)?Y.filter(Boolean).map(oe=>oe&&y({...oe},T.syntheticEvent)):y({...Y},T.syntheticEvent))}l&&l({target:T.target,currentTarget:A.current,value:T.value,syntheticEvent:T.syntheticEvent})},q=T=>{const Q={target:T.target,currentTarget:A.current,value:T.value,syntheticEvent:T.syntheticEvent};if(a){const Y=a(Q,e,I);Y&&(Array.isArray(Y)?Y.filter(Boolean).map(oe=>oe&&y({...oe},T.syntheticEvent)):y({...Y},T.syntheticEvent))}n&&n(Q)},_=T=>{const Q={target:T.target,currentTarget:A.current,value:T.value,syntheticEvent:T.syntheticEvent};m&&m(Q)},d=T=>{const Q={target:T.target,currentTarget:A.current,value:T.value,syntheticEvent:T.syntheticEvent};i&&i(Q)},G=e.horizontal?"div":t.Fragment,z=e.horizontal?{className:"k-form-field-wrapper"}:{};return t.createElement(ut.Provider,{value:{onAxisFilterFieldExpand:_,onAxisFilterFieldsExpandChange:d}},t.createElement(Fe.Provider,{value:[I,y]},t.createElement(G,{...z},t.createElement("div",{className:"k-form-field"},t.createElement(p,{name:"",component:me.Label,...f},L.toLanguageString(ze,Z[ze]))),t.createElement("div",{className:"k-form-field"},t.createElement("div",{className:"k-fields-list-wrapper"},t.createElement(v,{data:e.data,onExpand:k,onCheck:q,columnAxes:I.columnAxes,rowAxes:I.rowAxes,measureAxes:I.measureAxes,...w})))),t.createElement(G,{...z},t.createElement("div",{className:"k-form-field",onMouseEnter:X,onMouseLeave:J},t.createElement(ne.Field,{name:"columnAxes",field:"columnAxes",component:O,...M},L.toLanguageString(Oe,Z[Oe]))),e.valueGetter("columnAxes").length?t.createElement(ne.Field,{name:"columnAxes",field:"columnAxes",component:V,onMouseEnter:X,onMouseLeave:J,className:"k-column-fields",...D}):t.createElement("div",{className:"k-settings-description",onMouseEnter:X,onMouseLeave:J},L.toLanguageString(ae,Z[ae])),t.createElement("div",{className:"k-form-field",onMouseEnter:r,onMouseLeave:h},t.createElement(ne.Field,{name:"rowAxes",field:"rowAxes",component:$,...j},L.toLanguageString(qe,Z[qe]))),e.valueGetter("rowAxes").length?t.createElement(ne.Field,{name:"rowAxes",field:"rowAxes",component:x,onMouseEnter:r,onMouseLeave:h,className:"k-column-fields",...N}):t.createElement("div",{className:"k-settings-description",onMouseEnter:r,onMouseLeave:h},L.toLanguageString(ae,Z[ae]))),t.createElement(G,{...z},t.createElement("div",{className:"k-form-field",onMouseEnter:E,onMouseLeave:F},t.createElement(ne.Field,{name:"measureAxes",field:"measureAxes",component:g,...K},L.toLanguageString(Be,Z[Be]))),e.valueGetter("measureAxes").length?t.createElement(ne.Field,{name:"measureAxes",field:"measureAxes",component:U,onMouseEnter:E,onMouseLeave:F,className:"k-column-fields",...H}):t.createElement("div",{className:"k-settings-description",onMouseEnter:E,onMouseLeave:F},L.toLanguageString(ae,Z[ae])))))}),ee={data:[],horizontal:!1,fieldsLabel:me.Label,fieldsEditor:Ie,columnAxesLabel:me.Label,columnAxesEditor:le,rowAxesLabel:me.Label,rowAxesEditor:le,measureAxesLabel:me.Label,measureAxesEditor:le,axesEditor:le,onFieldsEditorFieldCheckAction:e=>({type:B.toggleSelection,payload:e.value}),onFieldsEditorFieldExpandAction:e=>({type:B.toggleExpansion,payload:e.value})};Se.defaultProps=ee;Se.displayName="KendoReactPivotGridConfiguratorEditor";const Je=t.forwardRef((e,o)=>{const{horizontal:n,data:a,rowAxes:l,columnAxes:s,measureAxes:m}={...ge,...e},i=t.useRef(null),p=t.useRef(null),f=t.useRef(null),v=he.useLocalization(),[w,O]=c.useCustomComponent(e.editor||ge.editor),[M,V]=c.useCustomComponent(e.form||ge.form),[D,$]=c.useCustomComponent(e.formElement||ge.formElement);t.useImperativeHandle(p,()=>({props:e,element:i.current})),t.useImperativeHandle(o,()=>p.current);const j=(N,g)=>{e.onRowAxesChange&&e.onRowAxesChange({target:p.current,value:N.rowAxes,syntheticEvent:g}),e.onColumnAxesChange&&e.onColumnAxesChange({target:p.current,value:N.columnAxes,syntheticEvent:g}),e.onMeasureAxesChange&&e.onMeasureAxesChange({target:p.current,value:N.measureAxes,syntheticEvent:g}),e.onSortChange&&e.onSortChange({target:p.current,value:N.sort,syntheticEvent:g}),e.onFilterChange&&e.onFilterChange({target:p.current,value:N.filter,syntheticEvent:g})},x={rowAxes:l,columnAxes:s,measureAxes:m,sort:e.sort,filter:e.filter};return t.useEffect(()=>{f.current&&f.current.onChange("rowAxes",{value:l})},[l]),t.useEffect(()=>{f.current&&f.current.onChange("columnAxes",{value:s})},[s]),t.useEffect(()=>{f.current&&f.current.onChange("measureAxes",{value:m})},[m]),t.useEffect(()=>{f.current&&f.current.onChange("sort",{value:e.sort})},[e.sort]),t.useEffect(()=>{f.current&&f.current.onChange("filter",{value:e.filter})},[e.filter]),t.createElement("div",{ref:i,id:e.id,tabIndex:e.tabIndex,style:e.style,className:c.classNames("k-pivotgrid-configurator",e.className)},t.createElement("div",{className:c.classNames("k-pivotgrid-configurator-panel","k-pivotgrid-configurator-push",{"k-pivotgrid-configurator-horizontal":n,"k-pivotgrid-configurator-vertical":!n})},t.createElement("div",{className:"k-pivotgrid-configurator-header"},t.createElement("div",{className:"k-pivotgrid-configurator-header-text"},v.toLanguageString(De,Z[De]))),t.createElement(M,{ref:c.canUseRef(M)?f:void 0,initialValues:x,onSubmit:j,render:N=>t.createElement(t.Fragment,null,t.createElement("div",{className:"k-pivotgrid-configurator-content"},t.createElement(D,{horizontal:n,...$},t.createElement(w,{...N,horizontal:e.horizontal,onFieldsEditorFieldExpand:e.onFieldsEditorFieldExpand,onFieldsEditorFieldCheck:e.onFieldsEditorFieldCheck,onAxisFilterFieldExpand:e.onAxisFilterFieldExpand,onAxisFilterFieldsExpandChange:e.onAxisFilterFieldsExpandChange,data:a,...O}))),t.createElement("div",{className:"k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end"},t.createElement(ue.Button,{type:"submit",onClick:N.onFormReset},v.toLanguageString(He,Z[He])),t.createElement(ue.Button,{themeColor:"primary",type:"submit",onClick:N.onSubmit},v.toLanguageString(Ge,Z[Ge])))),...V})))}),ge={form:ne.Form,formElement:ne.FormElement,editor:Se,horizontal:!1,data:[],columnAxes:[],rowAxes:[],measureAxes:[]};Je.defaultProps=ge;Je.displayName="KendoReactPivotGridConfigurator";const We=t.forwardRef((e,o)=>{const n=t.useRef(null),a=t.useRef(null),l=he.useLocalization();t.useImperativeHandle(n,()=>({props:e,element:a.current})),t.useImperativeHandle(o,()=>n.current);const[s,m]=c.useCustomComponent(e.icon||dt.icon),i=t.useMemo(()=>c.classNames("k-pivotgrid-configurator-button",e.className),[e.className]),p=c.useMouse(e,n);return t.createElement("div",{ref:a,id:e.id,className:i,tabIndex:e.tabIndex,...p},t.createElement("span",null,l.toLanguageString(Ke,Z[Ke]),t.createElement(s,{name:"gear",icon:pe.gearIcon,...m})))}),dt={icon:c.IconWrap};We.defaultProps=dt;We.displayName="KendoReactPivotGridConfiguratorButton";const mt=e=>{const[o,n]=t.useState(!0),[a,l]=t.useState({data:[],columns:[],rows:[]}),[s,m]=t.useState([]),[i,p]=t.useState(e.defaultColumnAxes||[]),[f,v]=t.useState(e.defaultRowAxes||[]),[w,O]=t.useState(e.defaultMeasureAxes||[]),[M,V]=t.useState(e.defaultSort||[]),[D,$]=t.useState(e.defaultFilter||[]),j=r=>{v(r.value)},x=r=>{p(r.value)},N=r=>{O(r.value)},g=r=>{V(r.value)},K=r=>{$(r.value)};t.useEffect(()=>{n(!0);const r={connection:{catalog:e.catalog,cube:e.cube},columnAxes:i.slice(),rowAxes:f.slice(),measureAxes:w,sort:M,filter:D};setTimeout(()=>{b.fetchData({url:e.url},c.clone(r)).then(b.createDataState).then(h=>{l(h),n(!1)})})},[i,f,w,D,M,e.cube,e.catalog,e.url]),t.useEffect(()=>{n(!0);const r={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube},command:"schemaDimensions"};b.fetchDiscover({url:e.url},r).then(h=>{b.addKPI(h),m(h),n(!1)})},[e.catalog,e.cube,e.url]);const U=(r=[],h)=>{for(let E=0;E<r.length;E++){const F=r[E];if(String(F.name)===String(h.name))return F}return null},H=(r=[],h)=>{for(let E=0;E<r.length;E++){const F=r[E];if(F.uniqueName===h.uniqueName)return F;let k=H(F.children,h);if(k!==null)return k}return null},u=async r=>{let h,E,F,k,q,_;r.name&&(h="schemaMembers",k=`${String(r.name)}.[(ALL)]`);const d={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:F,dimensionUniqueName:E,levelUniqueName:k,memberUniqueName:q,treeOp:_},command:h};return b.fetchDiscover({url:e.url},d)},A=async r=>{let h,E,F,k,q,_;r.uniqueName&&(h="schemaMembers",q=r.uniqueName.replace(/\&/g,"&amp;"),_=1);const d={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:F,dimensionUniqueName:E,levelUniqueName:k,memberUniqueName:q,treeOp:_},command:h};return b.fetchDiscover({url:e.url},d)},L=async r=>{let h,E,F,k,q,_;r.type===2?h="schemaMeasures":r.dimensionUniqueName?(h="schemaLevels",F=r.uniqueName):(h="schemaHierarchies",E=r.uniqueName);const d={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube,hierarchyUniqueName:F,dimensionUniqueName:E,levelUniqueName:k,memberUniqueName:q,treeOp:_},command:h};return b.fetchDiscover({url:e.url},d)},I=async()=>{const r={connection:{catalog:e.catalog,cube:e.cube},restrictions:{catalogName:e.catalog,cubeName:e.cube},command:"schemaKPIs"};return b.fetchDiscover({url:e.url},r)},y=async r=>{const h=s.slice(),E=H(h,r.value);if(E&&E.uniqueName==="[KPIs]"){const F=qt(await I());E.children=F}else if(E&&E.type==="kpi")E.children=b.buildKPIMeasures(E);else if(E&&!E.children){const F=await L(E);E.children=F}m(h)},X=async r=>{if(!r)return;const h={rowAxes:[f,v],columnAxes:[i,p],measureAxes:[w,O]},[E,F]=h[r.target.props.axes],k=E.slice(),q=U(k,r.target.props.dataItem);if(q&&!q.fields){const _=await u(q);q.fields=_,F(k)}},J=async r=>{if(!r)return;const h={rowAxes:[f,v],columnAxes:[i,p],measureAxes:[w,O]},[E,F]=h[r.target.props.axes],k=E.slice(),q=U(k,r.target.props.dataItem);if(q){const _=(q.fields||[]).slice(),d=H(_,r.value);if(d&&(!d.children||!d.children.length)){const G=await A(d);d.children=G,q.fields=_,F(k)}}};return{pivotProps:{rowAxes:f,columnAxes:i,data:a.data,rows:a.rows,columns:a.columns,onRowAxesChange:j,onColumnAxesChange:x},configuratorProps:{sort:M,onSortChange:g,filter:D,onFilterChange:K,data:s,rowAxes:f,columnAxes:i,measureAxes:w,onRowAxesChange:j,onColumnAxesChange:x,onMeasureAxesChange:N,onFieldsEditorFieldExpand:y,onAxisFilterFieldExpand:J,onAxisFilterFieldsExpandChange:X},state:{loading:o}}},Ot=e=>{const o=mt(e);return e.children(o)},qt=e=>{for(let o=0,n=e.length;o<n;o++)e[o].uniqueName=e[o].name,e[o].type="kpi";return e},Bt="aggregate",zt="columns",ot={dataField:Bt,columnsData:zt},xe="&",ft=e=>{const[o,n]=t.useState(!0),[a,l]=t.useState(e.defaultColumnAxes||[]),[s,m]=t.useState(e.defaultRowAxes||[]),[i,p]=t.useState(e.defaultMeasureAxes||[]),[f,v]=t.useState(e.defaultSort||[]),[w,O]=t.useState(e.defaultFilter||[]),[M,V]=t.useState(new Map),D=t.useCallback(y=>{m(y.value)},[]),$=t.useCallback(y=>{l(y.value)},[]),j=y=>{p(y.value)},x=y=>{v(y.value)},N=y=>{O(y.value)},g=t.useMemo(()=>Array.from(b.rootFields(a).keys()).join(xe),[a]),K=t.useMemo(()=>Array.from(b.rootFields(s).keys()).join(xe),[s]),U=t.useCallback(y=>({key:y,...e.dimensions[y]}),[e.dimensions]),H=t.useMemo(()=>g?g.split(xe).map(U):[],[g,U]),u=t.useMemo(()=>K?K.split(xe).map(U):[],[K,U]),A=t.useMemo(()=>i.map(y=>e.measures.find(X=>String(X.name)===String(y.name))).filter(Boolean),[i,e.measures]);t.useEffect(()=>{n(!0),setTimeout(()=>{const y=b.createDataTree(e.data,u,H,A,ot,w);V(y),n(!1)},0)},[e.data,u,H,A,w]);const L=t.useMemo(()=>b.createFlatSchemaDimensions(e.dimensions,e.measures),[e.dimensions,e.measures]),I=t.useMemo(()=>b.createLocalDataState({dataTree:M,rowSettings:u,columnSettings:H,rowAxes:s,columnAxes:a,measures:A,sort:f,fields:ot}),[a,H,M,s,u,f]);return{pivotProps:{rowAxes:s,columnAxes:a,data:I.data,rows:I.rows,columns:I.columns,onRowAxesChange:D,onColumnAxesChange:$},configuratorProps:{sort:f,onSortChange:x,filter:w,onFilterChange:N,data:L,rowAxes:s,columnAxes:a,measureAxes:i,onRowAxesChange:D,onColumnAxesChange:$,onMeasureAxesChange:j},state:{loading:o}}},Kt=e=>{const o=ft(e);return e.children(o)};Object.defineProperty(exports,"averageAggregate",{enumerable:!0,get:()=>b.averageAggregate});Object.defineProperty(exports,"maxAggregate",{enumerable:!0,get:()=>b.maxAggregate});Object.defineProperty(exports,"minAggregate",{enumerable:!0,get:()=>b.minAggregate});Object.defineProperty(exports,"sumAggregate",{enumerable:!0,get:()=>b.sumAggregate});exports.PivotGrid=lt;exports.PivotGridAxesEditor=le;exports.PivotGridAxisEditor=Re;exports.PivotGridAxisFilterFieldsEditor=Pe;exports.PivotGridCell=je;exports.PivotGridColumn=be;exports.PivotGridConfigurator=Je;exports.PivotGridConfiguratorButton=We;exports.PivotGridConfiguratorEditor=Se;exports.PivotGridContainer=Xe;exports.PivotGridFieldsEditor=Ie;exports.PivotGridHeaderCell=we;exports.PivotGridRow=$e;exports.PivotLocalDataService=Kt;exports.PivotOLAPService=Ot;exports.dataCells=Mt;exports.usePivotLocalDataService=ft;exports.usePivotOLAPService=mt;
package/index.mjs CHANGED
@@ -4,25 +4,25 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use client";
6
6
  import * as t from "react";
7
- import { useMouse as he, classNames as ee, useCustomComponent as I, IconWrap as ot, validatePackage as kt, setScrollbarWidth as Ye, noop as Mt, useDraggable as Tt, canUseRef as Fe, clone as Lt } from "@progress/kendo-react-common";
7
+ import { useMouse as he, classNames as ee, useCustomComponent as I, IconWrap as ot, validatePackage as kt, useIsomorphicLayoutEffect as Mt, setScrollbarWidth as Ye, noop as Tt, useDraggable as Lt, canUseRef as Fe, clone as Dt } from "@progress/kendo-react-common";
8
8
  import { useLocalization as xe } from "@progress/kendo-react-intl";
9
- import { headersReducer as Dt, toTree as pe, toRows as rt, toColumns as lt, toData as it, PivotGridNavigation as Ht, HEADERS_ACTION as We, PIVOT_CONFIGURATOR_ACTION as Gt, configuratorReducer as Ot, compareAxes as Qe, fetchData as qt, createDataState as Bt, fetchDiscover as de, addKPI as zt, buildKPIMeasures as Kt, rootFields as et, createDataTree as Ut, createFlatSchemaDimensions as Vt, createLocalDataState as $t } from "@progress/kendo-pivotgrid-common";
10
- import { averageAggregate as On, maxAggregate as qn, minAggregate as Bn, sumAggregate as zn } from "@progress/kendo-pivotgrid-common";
11
- import { chevronUpIcon as _t, chevronDownIcon as Xt, gridLayoutIcon as Zt, gearIcon as jt } from "@progress/kendo-svg-icons";
12
- import { Button as ye, Chip as Jt, ChipList as Yt } from "@progress/kendo-react-buttons";
13
- import { Field as se, Form as Wt, FormElement as Qt } from "@progress/kendo-react-form";
9
+ import { headersReducer as Ht, toTree as pe, toRows as rt, toColumns as lt, toData as it, PivotGridNavigation as Gt, HEADERS_ACTION as We, PIVOT_CONFIGURATOR_ACTION as Ot, configuratorReducer as qt, compareAxes as Qe, fetchData as Bt, createDataState as zt, fetchDiscover as de, addKPI as Kt, buildKPIMeasures as Ut, rootFields as et, createDataTree as Vt, createFlatSchemaDimensions as $t, createLocalDataState as _t } from "@progress/kendo-pivotgrid-common";
10
+ import { averageAggregate as qn, maxAggregate as Bn, minAggregate as zn, sumAggregate as Kn } from "@progress/kendo-pivotgrid-common";
11
+ import { chevronUpIcon as Xt, chevronDownIcon as Zt, gridLayoutIcon as jt, gearIcon as Jt } from "@progress/kendo-svg-icons";
12
+ import { Button as ye, Chip as Yt, ChipList as Wt } from "@progress/kendo-react-buttons";
13
+ import { Field as se, Form as Qt, FormElement as en } from "@progress/kendo-react-form";
14
14
  import { Label as me } from "@progress/kendo-react-labels";
15
- import { ColumnMenuItem as en, ColumnMenuForm as tn, ColumnMenuTextFilter as nn, ColumnMenuTextColumn as an } from "@progress/kendo-react-data-tools";
16
- import { TreeView as st, TreeViewItemPropsContext as on } from "@progress/kendo-react-treeview";
17
- import { Skeleton as rn } from "@progress/kendo-react-indicators";
18
- const ln = {
15
+ import { ColumnMenuItem as tn, ColumnMenuForm as nn, ColumnMenuTextFilter as an, ColumnMenuTextColumn as on } from "@progress/kendo-react-data-tools";
16
+ import { TreeView as st, TreeViewItemPropsContext as rn } from "@progress/kendo-react-treeview";
17
+ import { Skeleton as ln } from "@progress/kendo-react-indicators";
18
+ const sn = {
19
19
  name: "@progress/kendo-react-pivotgrid",
20
20
  productName: "KendoReact",
21
21
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
22
- publishDate: 1706027358,
22
+ publishDate: 1706772742,
23
23
  version: "",
24
24
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
25
- }, Re = "pivotgrid.emptyCellAriaLabel", Ne = "pivotgrid.fieldMenuReset", Se = "pivotgrid.fieldMenuApply", ke = "pivotgrid.configuratorTitle", Me = "pivotgrid.configuratorCancel", Te = "pivotgrid.configuratorApply", Le = "pivotgrid.configuratorColumnsTitle", De = "pivotgrid.configuratorRowsTitle", He = "pivotgrid.configuratorMeasuresTitle", Ge = "pivotgrid.configuratorEditorSearchTitle", sn = "pivotgrid.configuratorEditorSearchPlaceholder", ae = "pivotgrid.configuratorMissingFields", Oe = "pivotgrid.configuratorButtonLabel", Z = {
25
+ }, Re = "pivotgrid.emptyCellAriaLabel", Ne = "pivotgrid.fieldMenuReset", Se = "pivotgrid.fieldMenuApply", ke = "pivotgrid.configuratorTitle", Me = "pivotgrid.configuratorCancel", Te = "pivotgrid.configuratorApply", Le = "pivotgrid.configuratorColumnsTitle", De = "pivotgrid.configuratorRowsTitle", He = "pivotgrid.configuratorMeasuresTitle", Ge = "pivotgrid.configuratorEditorSearchTitle", cn = "pivotgrid.configuratorEditorSearchPlaceholder", ae = "pivotgrid.configuratorMissingFields", Oe = "pivotgrid.configuratorButtonLabel", Z = {
26
26
  [Re]: "PivotGrid component. Use the arrow keys to navigate.",
27
27
  [Ne]: "Reset",
28
28
  [Se]: "Apply",
@@ -30,7 +30,7 @@ const ln = {
30
30
  [Te]: "Apply",
31
31
  [ke]: "Settings",
32
32
  [Ge]: "Fields",
33
- [sn]: "Search...",
33
+ [cn]: "Search...",
34
34
  [Le]: "Columns",
35
35
  [De]: "Rows",
36
36
  [He]: "Values",
@@ -98,7 +98,7 @@ const dt = t.forwardRef((e, a) => {
98
98
  });
99
99
  dt.displayName = "KendoReactPivotGridCell";
100
100
  const tt = (e, a, n) => [e, (l, i) => {
101
- const u = Dt(e, { ...l, tree: a });
101
+ const u = Ht(e, { ...l, tree: a });
102
102
  n && n(u, i);
103
103
  }], Be = t.forwardRef((e, a) => {
104
104
  const n = t.useRef(null), o = t.useRef(null);
@@ -145,7 +145,7 @@ const tt = (e, a, n) => [e, (l, i) => {
145
145
  onClick: s,
146
146
  name: `chevron-${e.expanded ? "up" : "down"}`,
147
147
  "aria-hidden": !0,
148
- icon: e.expanded ? _t : Xt
148
+ icon: e.expanded ? Xt : Zt
149
149
  }
150
150
  ),
151
151
  e.children
@@ -155,7 +155,7 @@ const tt = (e, a, n) => [e, (l, i) => {
155
155
  };
156
156
  Be.defaultProps = ut;
157
157
  Be.displayName = "KendoReactPivotGridHeaderCell";
158
- const cn = (...e) => {
158
+ const dn = (...e) => {
159
159
  const a = t.useRef();
160
160
  return (o) => {
161
161
  a.current !== void 0 && window.cancelAnimationFrame(a.current);
@@ -167,7 +167,7 @@ const cn = (...e) => {
167
167
  }));
168
168
  });
169
169
  };
170
- }, dn = (...e) => {
170
+ }, un = (...e) => {
171
171
  const a = t.useRef();
172
172
  return (o) => {
173
173
  a.current !== void 0 && window.cancelAnimationFrame(a.current);
@@ -201,12 +201,12 @@ const cn = (...e) => {
201
201
  className: e.className
202
202
  }
203
203
  );
204
- }), un = {
204
+ }), mn = {
205
205
  path: []
206
206
  };
207
- ze.defaultProps = un;
207
+ ze.defaultProps = mn;
208
208
  ze.displayName = "KendoReactPivotGridColumn";
209
- const Tn = (e, a, n) => {
209
+ const Ln = (e, a, n) => {
210
210
  const o = JSON.parse(JSON.stringify(e || [])), l = JSON.parse(JSON.stringify(a || [])), i = JSON.parse(JSON.stringify(n || [])), u = pe(o), [, s, E] = rt(u), m = pe(l), [, x, , y] = lt(m);
211
211
  return it(
212
212
  i,
@@ -230,7 +230,7 @@ const Tn = (e, a, n) => {
230
230
  return e.forEach((n) => {
231
231
  a.add(String(n.name));
232
232
  }), Array.from(a);
233
- }, oe = (e = []) => `${e.join(",")}`, mn = (e, a) => `${oe(e.map((n) => n.name))}|${oe(a.map((n) => n.name))}`, fn = (e, a, n) => {
233
+ }, oe = (e = []) => `${e.join(",")}`, fn = (e, a) => `${oe(e.map((n) => n.name))}|${oe(a.map((n) => n.name))}`, gn = (e, a, n) => {
234
234
  if (!e)
235
235
  return;
236
236
  let o = 0, l, i = e.length, u;
@@ -244,8 +244,8 @@ const Tn = (e, a, n) => {
244
244
  for (; o < i; o++)
245
245
  u = e[o].operator, (!n && u !== "in" || u === n) && e[o].field === a && l.push(e[o]);
246
246
  return l;
247
- }, mt = (e, a) => e.uniqueName === a.uniqueName, gn = t.forwardRef((e, a) => {
248
- kt(ln);
247
+ }, mt = (e, a) => e.uniqueName === a.uniqueName, hn = t.forwardRef((e, a) => {
248
+ kt(sn);
249
249
  const {
250
250
  rows: n,
251
251
  rowAxes: o,
@@ -295,13 +295,13 @@ const Tn = (e, a, n) => {
295
295
  },
296
296
  h.syntheticEvent
297
297
  );
298
- }, Ze = cn(k, G), It = dn(k, y), Pt = (h) => {
298
+ }, Ze = dn(k, G), It = un(k, y), Pt = (h) => {
299
299
  Ze(h), It(h);
300
300
  }, je = t.useCallback(() => {
301
301
  s.current && x.current && (s.current.style.gridTemplateRows = "", s.current.style.gridTemplateRows = `${x.current.offsetHeight}px 1fr`);
302
302
  }, []), Je = t.useCallback(() => {
303
303
  s.current && m.current && (s.current.style.gridTemplateColumns = "", s.current.style.gridTemplateColumns = `${m.current.offsetWidth}px 1fr`);
304
- }, []), re = t.useRef(new Ht({ tabIndex: e.tabIndex || 0 }));
304
+ }, []), re = t.useRef(new Gt({ tabIndex: e.tabIndex || 0 }));
305
305
  t.useEffect(() => {
306
306
  if (s.current) {
307
307
  const h = e.tabIndex || 0;
@@ -330,7 +330,7 @@ const Tn = (e, a, n) => {
330
330
  h.disconnect();
331
331
  };
332
332
  }
333
- }, [Je]), t.useLayoutEffect(() => {
333
+ }, [Je]), Mt(() => {
334
334
  if (Ye(), m.current) {
335
335
  const h = new window.ResizeObserver(Ye);
336
336
  return h.observe(m.current), () => {
@@ -353,7 +353,7 @@ const Tn = (e, a, n) => {
353
353
  }
354
354
  });
355
355
  });
356
- const ve = p.map((h) => h.cells.map((R) => mn(R.rowTuple.members, R.columnTuple.members).replace(/\s/g, "-")));
356
+ const ve = p.map((h) => h.cells.map((R) => fn(R.rowTuple.members, R.columnTuple.members).replace(/\s/g, "-")));
357
357
  return /* @__PURE__ */ t.createElement(
358
358
  "div",
359
359
  {
@@ -470,7 +470,7 @@ const Tn = (e, a, n) => {
470
470
  cell: dt,
471
471
  headerCell: Be
472
472
  };
473
- gn.displayName = "KendoReactPivotGrid";
473
+ hn.displayName = "KendoReactPivotGrid";
474
474
  const ft = t.forwardRef((e, a) => {
475
475
  const n = t.useRef(null), o = t.useRef(null);
476
476
  return t.useImperativeHandle(o, () => ({ props: e, element: n.current })), t.useImperativeHandle(a, () => o.current), /* @__PURE__ */ t.createElement(
@@ -493,14 +493,14 @@ const ft = t.forwardRef((e, a) => {
493
493
  },
494
494
  e.children
495
495
  );
496
- }), hn = {
496
+ }), xn = {
497
497
  configuratorPosition: "right"
498
498
  };
499
- ft.defaultProps = hn;
499
+ ft.defaultProps = xn;
500
500
  ft.displayName = "KendoReactPivotGridContainer";
501
501
  const gt = t.createContext({ axes: null });
502
502
  var Ue = /* @__PURE__ */ ((e) => (e.toggle = "EXPAND_TOGGLE", e.expand = "EXPAND_EXPAND", e.collapse = "EXPAND_COLLAPSE", e))(Ue || {});
503
- const xn = (e, a, n) => {
503
+ const vn = (e, a, n) => {
504
504
  switch (a.type) {
505
505
  case "EXPAND_TOGGLE":
506
506
  return Array.isArray(e) ? e.find((o) => n(o, a.payload)) ? [...e.filter((o) => !n(o, a.payload))] : [...e, a.payload] : n(e, a.payload) ? null : a.payload;
@@ -524,7 +524,7 @@ const xn = (e, a, n) => {
524
524
  }, ht = (e = [], a, n, o = (l, i) => l === i) => {
525
525
  const [l, i] = t.useState(e);
526
526
  return [l, (s, E) => {
527
- const m = xn(l, s, o);
527
+ const m = vn(l, s, o);
528
528
  a && a.call(void 0, {
529
529
  value: m,
530
530
  target: n.current,
@@ -534,9 +534,9 @@ const xn = (e, a, n) => {
534
534
  };
535
535
  var xt = /* @__PURE__ */ ((e) => (e.toggleExpansion = "PIVOT_CONFIGURATOR_ACTION_TOGGLE_EXPANSION", e))(xt || {});
536
536
  const q = {
537
- ...Gt,
537
+ ...Ot,
538
538
  ...xt
539
- }, vn = (e, a) => {
539
+ }, Cn = (e, a) => {
540
540
  const n = e.valueGetter("rowAxes"), o = e.valueGetter("columnAxes"), l = e.valueGetter("measureAxes"), i = e.valueGetter("sort"), u = e.valueGetter("filter"), [s, E] = ht(
541
541
  [],
542
542
  void 0,
@@ -563,7 +563,7 @@ const q = {
563
563
  break;
564
564
  }
565
565
  default:
566
- const f = Ot(
566
+ const f = qt(
567
567
  {
568
568
  filter: v.override && v.override.filter !== void 0 ? v.override.filter : u,
569
569
  sort: v.override && v.override.sort !== void 0 ? v.override.sort : i,
@@ -594,7 +594,7 @@ const q = {
594
594
  dropDirection: null,
595
595
  dropTarget: null
596
596
  },
597
- Mt
597
+ Tt
598
598
  ]
599
599
  ), Ve = t.forwardRef(
600
600
  (e, a) => {
@@ -674,7 +674,7 @@ const q = {
674
674
  ...m,
675
675
  title: "Include Fields",
676
676
  iconClass: "k-i-grid-layout",
677
- svgIcon: Zt,
677
+ svgIcon: jt,
678
678
  onClick: C
679
679
  }
680
680
  ),
@@ -724,9 +724,9 @@ const q = {
724
724
  resetButton: ye,
725
725
  applyButton: ye,
726
726
  treeView: st,
727
- noData: () => /* @__PURE__ */ t.createElement(rn, { shape: "rectangle", style: { height: "20px", width: "calc(100% - 16px)", margin: 8 } }),
728
- columnMenuItem: en,
729
- columnMenuForm: tn
727
+ noData: () => /* @__PURE__ */ t.createElement(ln, { shape: "rectangle", style: { height: "20px", width: "calc(100% - 16px)", margin: 8 } }),
728
+ columnMenuItem: tn,
729
+ columnMenuForm: nn
730
730
  };
731
731
  Ve.defaultProps = te;
732
732
  Ve.displayName = "KendoReactPivotGridAxisFilterFieldsEditor";
@@ -749,7 +749,7 @@ const $e = t.forwardRef((e, a) => {
749
749
  }, c = (r) => {
750
750
  y({ type: q.remove, payload: e.dataItem }, r.syntheticEvent);
751
751
  }, A = (r) => {
752
- const g = r.slice(), C = fn(x.filter, String(e.dataItem.name), "in");
752
+ const g = r.slice(), C = gn(x.filter, String(e.dataItem.name), "in");
753
753
  return g.splice(1, 0, /* @__PURE__ */ t.createElement(
754
754
  v,
755
755
  {
@@ -775,7 +775,7 @@ const $e = t.forwardRef((e, a) => {
775
775
  y({ type: q.setDropDirection, payload: w }, r.syntheticEvent);
776
776
  }
777
777
  };
778
- return Tt(i, {
778
+ return Lt(i, {
779
779
  onPress: M,
780
780
  onDrag: P,
781
781
  onRelease: p
@@ -803,15 +803,15 @@ const $e = t.forwardRef((e, a) => {
803
803
  filter: z && z.length ? [{ logic: "and", filters: z }] : void 0,
804
804
  onFilterChange: D,
805
805
  filterContent: [
806
- nn
806
+ an
807
807
  ],
808
808
  ...$
809
809
  }
810
810
  )
811
811
  ), x.dropTarget && Qe(x.dropTarget, e.dataItem) && x.dropDirection === "after" && /* @__PURE__ */ t.createElement(U, { ...L }));
812
812
  }), fe = {
813
- chip: Jt,
814
- columnMenuTextColumn: an,
813
+ chip: Yt,
814
+ columnMenuTextColumn: on,
815
815
  filterFieldsEditor: Ve,
816
816
  dropClue: (e) => /* @__PURE__ */ t.createElement("div", { className: "k-grouping-dropclue", style: { position: "relative", zIndex: 1e4 }, ...e })
817
817
  };
@@ -840,7 +840,7 @@ const ce = t.forwardRef((e, a) => {
840
840
  ));
841
841
  }), qe = {
842
842
  value: [],
843
- chipList: Yt
843
+ chipList: Wt
844
844
  };
845
845
  ce.defaultProps = qe;
846
846
  ce.displayName = "KendoReactPivotGridAxesEditor";
@@ -880,7 +880,7 @@ const _e = t.forwardRef((e, a) => {
880
880
  syntheticEvent: c.syntheticEvent
881
881
  });
882
882
  }, D = we(e.data, f);
883
- return /* @__PURE__ */ t.createElement(on.Provider, { value: (c) => ({ ...c, checkboxes: c.item.selectable }) }, D && D.length ? /* @__PURE__ */ t.createElement(
883
+ return /* @__PURE__ */ t.createElement(rn.Provider, { value: (c) => ({ ...c, checkboxes: c.item.selectable }) }, D && D.length ? /* @__PURE__ */ t.createElement(
884
884
  x,
885
885
  {
886
886
  ref: Fe(x) ? E : void 0,
@@ -914,7 +914,7 @@ const Xe = t.forwardRef((e, a) => {
914
914
  onFieldsEditorFieldExpandAction: i,
915
915
  onAxisFilterFieldExpand: u,
916
916
  onAxisFilterFieldsExpandChange: s
917
- } = e, [E, m] = I(e.fieldsLabel || Q.fieldsLabel), [x, y] = I(e.fieldsEditor || Q.fieldsEditor), [G, k] = I(e.columnAxesLabel || Q.columnAxesLabel), [U, L] = I(e.columnAxesEditor || Q.columnAxesEditor), [V, $] = I(e.rowAxesLabel || Q.rowAxesLabel), [v, N] = I(e.rowAxesEditor || Q.rowAxesEditor), [f, z] = I(e.measureAxesLabel || Q.measureAxesLabel), [K, D] = I(e.measureAxesEditor || Q.measureAxesEditor), c = t.useRef(null), A = t.useRef(null), M = xe(), [P, p] = vn(e, A);
917
+ } = e, [E, m] = I(e.fieldsLabel || Q.fieldsLabel), [x, y] = I(e.fieldsEditor || Q.fieldsEditor), [G, k] = I(e.columnAxesLabel || Q.columnAxesLabel), [U, L] = I(e.columnAxesEditor || Q.columnAxesEditor), [V, $] = I(e.rowAxesLabel || Q.rowAxesLabel), [v, N] = I(e.rowAxesEditor || Q.rowAxesEditor), [f, z] = I(e.measureAxesLabel || Q.measureAxesLabel), [K, D] = I(e.measureAxesEditor || Q.measureAxesEditor), c = t.useRef(null), A = t.useRef(null), M = xe(), [P, p] = Cn(e, A);
918
918
  t.useImperativeHandle(A, () => ({
919
919
  element: c.current,
920
920
  props: e,
@@ -1229,8 +1229,8 @@ const Ct = t.forwardRef((e, a) => {
1229
1229
  )
1230
1230
  );
1231
1231
  }), ge = {
1232
- form: Wt,
1233
- formElement: Qt,
1232
+ form: Qt,
1233
+ formElement: en,
1234
1234
  editor: Xe,
1235
1235
  horizontal: !1,
1236
1236
  data: [],
@@ -1259,14 +1259,14 @@ const Et = t.forwardRef((e, a) => {
1259
1259
  tabIndex: e.tabIndex,
1260
1260
  ...E
1261
1261
  },
1262
- /* @__PURE__ */ t.createElement("span", null, l.toLanguageString(Oe, Z[Oe]), /* @__PURE__ */ t.createElement(i, { name: "gear", icon: jt, ...u }))
1262
+ /* @__PURE__ */ t.createElement("span", null, l.toLanguageString(Oe, Z[Oe]), /* @__PURE__ */ t.createElement(i, { name: "gear", icon: Jt, ...u }))
1263
1263
  );
1264
1264
  }), At = {
1265
1265
  icon: ot
1266
1266
  };
1267
1267
  Et.defaultProps = At;
1268
1268
  Et.displayName = "KendoReactPivotGridConfiguratorButton";
1269
- const Cn = (e) => {
1269
+ const En = (e) => {
1270
1270
  const [a, n] = t.useState(!0), [o, l] = t.useState({ data: [], columns: [], rows: [] }), [i, u] = t.useState([]), [s, E] = t.useState(e.defaultColumnAxes || []), [m, x] = t.useState(e.defaultRowAxes || []), [y, G] = t.useState(e.defaultMeasureAxes || []), [k, U] = t.useState(e.defaultSort || []), [L, V] = t.useState(e.defaultFilter || []), $ = (r) => {
1271
1271
  x(r.value);
1272
1272
  }, v = (r) => {
@@ -1292,7 +1292,7 @@ const Cn = (e) => {
1292
1292
  filter: L
1293
1293
  };
1294
1294
  setTimeout(() => {
1295
- qt({ url: e.url }, Lt(r)).then(Bt).then((g) => {
1295
+ Bt({ url: e.url }, Dt(r)).then(zt).then((g) => {
1296
1296
  l(g), n(!1);
1297
1297
  });
1298
1298
  });
@@ -1310,7 +1310,7 @@ const Cn = (e) => {
1310
1310
  command: "schemaDimensions"
1311
1311
  };
1312
1312
  de({ url: e.url }, r).then((g) => {
1313
- zt(g), u(g), n(!1);
1313
+ Kt(g), u(g), n(!1);
1314
1314
  });
1315
1315
  }, [e.catalog, e.cube, e.url]);
1316
1316
  const K = (r = [], g) => {
@@ -1406,10 +1406,10 @@ const Cn = (e) => {
1406
1406
  }, p = async (r) => {
1407
1407
  const g = i.slice(), C = D(g, r.value);
1408
1408
  if (C && C.uniqueName === "[KPIs]") {
1409
- const w = En(await P());
1409
+ const w = An(await P());
1410
1410
  C.children = w;
1411
1411
  } else if (C && C.type === "kpi")
1412
- C.children = Kt(C);
1412
+ C.children = Ut(C);
1413
1413
  else if (C && !C.children) {
1414
1414
  const w = await M(C);
1415
1415
  C.children = w;
@@ -1473,14 +1473,14 @@ const Cn = (e) => {
1473
1473
  loading: a
1474
1474
  }
1475
1475
  };
1476
- }, Ln = (e) => {
1477
- const a = Cn(e);
1476
+ }, Dn = (e) => {
1477
+ const a = En(e);
1478
1478
  return e.children(a);
1479
- }, En = (e) => {
1479
+ }, An = (e) => {
1480
1480
  for (let a = 0, n = e.length; a < n; a++)
1481
1481
  e[a].uniqueName = e[a].name, e[a].type = "kpi";
1482
1482
  return e;
1483
- }, An = "aggregate", pn = "columns", at = { dataField: An, columnsData: pn }, Ee = "&", yn = (e) => {
1483
+ }, pn = "aggregate", yn = "columns", at = { dataField: pn, columnsData: yn }, Ee = "&", wn = (e) => {
1484
1484
  const [a, n] = t.useState(!0), [o, l] = t.useState(e.defaultColumnAxes || []), [i, u] = t.useState(e.defaultRowAxes || []), [s, E] = t.useState(e.defaultMeasureAxes || []), [m, x] = t.useState(e.defaultSort || []), [y, G] = t.useState(e.defaultFilter || []), [k, U] = t.useState(/* @__PURE__ */ new Map()), L = t.useCallback((p) => {
1485
1485
  u(p.value);
1486
1486
  }, []), V = t.useCallback((p) => {
@@ -1507,17 +1507,17 @@ const Cn = (e) => {
1507
1507
  t.useEffect(
1508
1508
  () => {
1509
1509
  n(!0), setTimeout(() => {
1510
- const p = Ut(e.data, c, D, A, at, y);
1510
+ const p = Vt(e.data, c, D, A, at, y);
1511
1511
  U(p), n(!1);
1512
1512
  }, 0);
1513
1513
  },
1514
1514
  [e.data, c, D, A, y]
1515
1515
  );
1516
1516
  const M = t.useMemo(
1517
- () => Vt(e.dimensions, e.measures),
1517
+ () => $t(e.dimensions, e.measures),
1518
1518
  [e.dimensions, e.measures]
1519
1519
  ), P = t.useMemo(
1520
- () => $t({
1520
+ () => _t({
1521
1521
  dataTree: k,
1522
1522
  rowSettings: c,
1523
1523
  columnSettings: D,
@@ -1556,12 +1556,12 @@ const Cn = (e) => {
1556
1556
  loading: a
1557
1557
  }
1558
1558
  };
1559
- }, Dn = (e) => {
1560
- const a = yn(e);
1559
+ }, Hn = (e) => {
1560
+ const a = wn(e);
1561
1561
  return e.children(a);
1562
1562
  };
1563
1563
  export {
1564
- gn as PivotGrid,
1564
+ hn as PivotGrid,
1565
1565
  ce as PivotGridAxesEditor,
1566
1566
  $e as PivotGridAxisEditor,
1567
1567
  Ve as PivotGridAxisFilterFieldsEditor,
@@ -1574,13 +1574,13 @@ export {
1574
1574
  _e as PivotGridFieldsEditor,
1575
1575
  Be as PivotGridHeaderCell,
1576
1576
  ct as PivotGridRow,
1577
- Dn as PivotLocalDataService,
1578
- Ln as PivotOLAPService,
1579
- On as averageAggregate,
1580
- Tn as dataCells,
1581
- qn as maxAggregate,
1582
- Bn as minAggregate,
1583
- zn as sumAggregate,
1584
- yn as usePivotLocalDataService,
1585
- Cn as usePivotOLAPService
1577
+ Hn as PivotLocalDataService,
1578
+ Dn as PivotOLAPService,
1579
+ qn as averageAggregate,
1580
+ Ln as dataCells,
1581
+ Bn as maxAggregate,
1582
+ zn as minAggregate,
1583
+ Kn as sumAggregate,
1584
+ wn as usePivotLocalDataService,
1585
+ En as usePivotOLAPService
1586
1586
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-pivotgrid",
3
- "version": "7.1.0-develop.9",
3
+ "version": "7.1.1-develop.1",
4
4
  "description": "React PivotGrid (also called Pivot Table) can be data-bound to an OLAP service and customized extensively. KendoReact PivotGrid package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -25,14 +25,14 @@
25
25
  "@progress/kendo-data-query": "^1.5.5",
26
26
  "@progress/kendo-licensing": "^1.3.4",
27
27
  "@progress/kendo-pivotgrid-common": "0.5.3",
28
- "@progress/kendo-react-buttons": "7.1.0-develop.9",
29
- "@progress/kendo-react-common": "7.1.0-develop.9",
30
- "@progress/kendo-react-data-tools": "7.1.0-develop.9",
31
- "@progress/kendo-react-form": "7.1.0-develop.9",
32
- "@progress/kendo-react-indicators": "7.1.0-develop.9",
33
- "@progress/kendo-react-intl": "7.1.0-develop.9",
34
- "@progress/kendo-react-labels": "7.1.0-develop.9",
35
- "@progress/kendo-react-treeview": "7.1.0-develop.9",
28
+ "@progress/kendo-react-buttons": "7.1.1-develop.1",
29
+ "@progress/kendo-react-common": "7.1.1-develop.1",
30
+ "@progress/kendo-react-data-tools": "7.1.1-develop.1",
31
+ "@progress/kendo-react-form": "7.1.1-develop.1",
32
+ "@progress/kendo-react-indicators": "7.1.1-develop.1",
33
+ "@progress/kendo-react-intl": "7.1.1-develop.1",
34
+ "@progress/kendo-react-labels": "7.1.1-develop.1",
35
+ "@progress/kendo-react-treeview": "7.1.1-develop.1",
36
36
  "@progress/kendo-svg-icons": "^2.1.0",
37
37
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
38
38
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"