@progress/kendo-react-pivotgrid 9.4.0-develop.5 → 9.4.0-develop.7
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/PivotGrid.js +1 -1
- package/PivotGrid.mjs +0 -1
- package/components/AxesEditor.js +1 -1
- package/components/AxesEditor.mjs +3 -4
- package/components/AxisEditor.js +1 -1
- package/components/AxisEditor.mjs +0 -1
- package/components/AxisFilterFieldsEditor.js +1 -1
- package/components/AxisFilterFieldsEditor.mjs +19 -20
- package/components/Cell.js +1 -1
- package/components/Cell.mjs +0 -1
- package/components/Column.js +1 -1
- package/components/Column.mjs +10 -11
- package/components/Configurator.js +1 -1
- package/components/Configurator.mjs +0 -1
- package/components/ConfiguratorButton.js +1 -1
- package/components/ConfiguratorButton.mjs +0 -1
- package/components/ConfiguratorEditor.js +1 -1
- package/components/ConfiguratorEditor.mjs +0 -1
- package/components/Container.js +1 -1
- package/components/Container.mjs +4 -5
- package/components/EditorContext.js +1 -1
- package/components/EditorContext.mjs +2 -3
- package/components/FieldsEditor.js +1 -1
- package/components/FieldsEditor.mjs +0 -1
- package/components/HeaderCell.js +1 -1
- package/components/HeaderCell.mjs +7 -8
- package/components/Row.js +1 -1
- package/components/Row.mjs +7 -8
- package/hooks/useExpansion.js +1 -1
- package/hooks/useExpansion.mjs +11 -12
- package/hooks/useHeaders.js +1 -1
- package/hooks/useHeaders.mjs +7 -8
- package/hooks/useHorizontalScrollSync.js +1 -1
- package/hooks/useHorizontalScrollSync.mjs +4 -5
- package/hooks/usePivotConfiguratorEditor.js +1 -1
- package/hooks/usePivotConfiguratorEditor.mjs +5 -6
- package/hooks/usePivotLocalDataService.js +1 -1
- package/hooks/usePivotLocalDataService.mjs +10 -11
- package/hooks/usePivotOLAPService.js +1 -1
- package/hooks/usePivotOLAPService.mjs +0 -1
- package/hooks/useVerticalScrollSync.js +1 -1
- package/hooks/useVerticalScrollSync.mjs +5 -6
- package/index.js +2 -1
- package/index.mjs +4 -4
- package/messages/index.js +1 -1
- package/messages/index.mjs +5 -6
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +10 -10
- package/shared/PivotGridConfiguratorEditorEventsContext.js +1 -1
- package/shared/PivotGridConfiguratorEditorEventsContext.mjs +0 -1
- package/shared/PivotGridConfiguratorEditorStateContext.js +1 -1
- package/shared/PivotGridConfiguratorEditorStateContext.mjs +2 -3
- package/utils/index.js +1 -1
- package/utils/index.mjs +0 -1
package/PivotGrid.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Re=require("react"),c=require("@progress/kendo-react-common"),He=require("./package-metadata.js"),Se=require("@progress/kendo-react-intl"),O=require("./messages/index.js"),ke=require("./components/Row.js"),Pe=require("./components/Cell.js"),J=require("./hooks/useHeaders.js"),xe=require("./components/HeaderCell.js"),Ae=require("./hooks/useHorizontalScrollSync.js"),Te=require("./hooks/useVerticalScrollSync.js"),Ne=require("./components/Column.js"),f=require("./utils/index.js"),u=require("@progress/kendo-pivotgrid-common");function De(n){const w=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const m in n)if(m!=="default"){const v=Object.getOwnPropertyDescriptor(n,m);Object.defineProperty(w,m,v.get?v:{enumerable:!0,get:()=>n[m]})}}return w.default=n,Object.freeze(w)}const t=De(Re),Q=t.forwardRef((n,w)=>{c.validatePackage(He.packageMetadata);const{rows:m,rowAxes:v,columns:U,columnAxes:Y,data:Z}={...y,...n},s=t.useRef(null),E=t.useRef(null),d=t.useRef(null),b=t.useRef(null),q=t.useRef(null),z=t.useRef(null),k=t.useRef(null),ee=Se.useLocalization(),te=(e,r)=>{n.onRowAxesChange&&n.onRowAxesChange({value:e,target:E.current,syntheticEvent:r})},ne=(e,r)=>{n.onColumnAxesChange&&n.onColumnAxesChange({value:e,target:E.current,syntheticEvent:r})},I=u.toTree((m||[]).slice()),[,ae]=J.useHeaders((v||[]).slice(),I,te),[L,C,oe,G]=u.toRows(I),j=u.toTree((U||[]).slice()),[,re]=J.useHeaders((Y||[]).slice(),j,ne),[R,i,,K]=u.toColumns(j),P=u.toData((Z||[]).slice(),i,C,K,oe);t.useImperativeHandle(E,()=>({props:n,element:s.current,columnHeaderRows:R,rowHeaderRows:L,dataCells:P,rowHeaderBreadth:G,columnHeaderBreadth:K})),t.useImperativeHandle(w,()=>E.current);const B=[],V=[],_=[],[x,A]=c.useCustomComponent(n.row||y.row),[T,N]=c.useCustomComponent(n.column||y.column),[le,se]=c.useCustomComponent(n.cell||y.cell),[M,W]=c.useCustomComponent(n.headerCell||y.headerCell),ce=n.columnHeadersRow||x,ie=n.columnHeadersColumn||T,ue=n.columnHeadersCell||M,de=n.rowHeadersRow||x,me=n.rowHeadersColumn||T,Ce=n.rowHeadersCell||M,pe=n.dataRow||x,he=n.dataColumn||T;for(let e=0;e<i.length;e++)B.push(t.createElement(he,{key:String(i[e].path),...N,path:i[e].path})),_.push(t.createElement(ie,{key:String(i[e].path),...N,path:i[e].path}));for(let e=0;e<G;e++)V.push(t.createElement(me,{key:e,...N}));const ge=e=>{e.target.props.expandable&&re({type:u.HEADERS_ACTION.toggle,payload:e.target.props.dataItem.path},e.syntheticEvent)},fe=e=>{e.target.props.expandable&&ae({type:u.HEADERS_ACTION.toggle,payload:e.target.props.dataItem.path},e.syntheticEvent)},X=Ae.useHorizontalScrollSync(k,z),we=Te.useVerticalScrollSync(k,q),be=e=>{X(e),we(e)},$=t.useCallback(()=>{s.current&&b.current&&(s.current.style.gridTemplateRows="",s.current.style.gridTemplateRows=`${b.current.offsetHeight}px 1fr`)},[]),F=t.useCallback(()=>{s.current&&d.current&&(s.current.style.gridTemplateColumns="",s.current.style.gridTemplateColumns=`${d.current.offsetWidth}px 1fr`)},[]),p=t.useRef(new u.PivotGridNavigation({tabIndex:n.tabIndex||0}));t.useEffect(()=>{if(s.current){const e=n.tabIndex||0;if(p.current.stop(),p.current.tabIndex=e,n.navigatable){p.current.start(s.current);const r=p.current.first;r&&r.setAttribute("tabindex",String(e))}}return()=>{p.current.stop()}},[n.tabIndex,n.navigatable]),t.useEffect(()=>{p.current.update()}),t.useEffect(()=>{if(b.current){const e=new window.ResizeObserver($);return e.observe(b.current),()=>{e.disconnect()}}},[$]),t.useEffect(()=>{if(d.current){const e=new window.ResizeObserver(F);return e.observe(d.current),()=>{e.disconnect()}}},[F]),c.useIsomorphicLayoutEffect(()=>{if(c.setScrollbarWidth(),d.current){const e=new window.ResizeObserver(()=>c.setScrollbarWidth());return e.observe(d.current),()=>{e.disconnect()}}},[]);const h=new Array(R.length).fill([]).map(()=>new Array(i.length));R.forEach((e,r)=>{let a=0;Array.from(e.cells).forEach(o=>{const l=!!(o&&o.children&&o.children.length),D=(o?f.generateKey(o.normalizedPath)+(o.total?"|[TOTAL]":"")+(l?"|[EXPANDED]":""):"").replace(/\s/g,"-");if(o)for(let S=0;S<(o.colSpan||1);S++){for(let g=0;g<(o.rowSpan||1);g++){const ye=h[r+g].findIndex((ve,Ee)=>Ee>=a&&!ve);h[r+g][ye]=D}a++}})});const H=P.map(e=>e.cells.map(r=>f.generateDataKey(r.rowTuple.members,r.columnTuple.members).replace(/\s/g,"-")));return t.createElement("div",{ref:s,id:n.id,style:n.style,tabIndex:n.navigatable?void 0:n.tabIndex,className:c.classNames("k-pivotgrid",n.className),role:"grid"},t.createElement("span",{className:"k-pivotgrid-empty-cell"},t.createElement("span",{className:"k-sr-only"},ee.toLanguageString(O.emptyCellAriaLabel,O.messages[O.emptyCellAriaLabel]))),t.createElement("div",{ref:z,className:"k-pivotgrid-column-headers",onScroll:X},t.createElement("table",{ref:b,className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,_),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},R.map((e,r)=>{let a=!1;return t.createElement(ce,{key:e.name,role:"row",...A},e.cells.map((o,l)=>{const D=l!==0&&!a;o&&(a=!0);const S=o&&!!(o.children&&o.children.length),g=o&&o.hasChildren&&(!o.total||o.total&&o.parent.total);return o?t.createElement(ue,{...W,key:h[r][l],"data-key":h[r][l],id:h[r][l],columnPath:o.normalizedPath,rowSpan:o.rowSpan||void 0,colSpan:o.colSpan||void 0,onIconClick:ge,dataItem:o,expanded:S,expandable:g,total:o.total,first:D,root:o.levelNum===0,role:"columnheader"},o.caption):null}))})))),t.createElement("div",{ref:q,className:"k-pivotgrid-row-headers"},t.createElement("table",{ref:d,className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,V),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},L.map((e,r)=>t.createElement(de,{key:f.generateKey(C[r].path),...A,path:C[r].path,role:"row",ariaOwns:H[r].join(" ")},e.cells.filter(Boolean).map(a=>a?t.createElement(Ce,{...W,key:f.generateKey(a.normalizedPath)+(a.total?"|[TOTAL]":"")+(a.children&&a.children.length?"|[EXPANDED]":""),"data-key":f.generateKey(a.normalizedPath)+(a.total?"|[TOTAL]":"")+(a.children&&a.children.length?"|[EXPANDED]":""),rowPath:a.normalizedPath,rowSpan:a.rowSpan||void 0,colSpan:a.colSpan||void 0,dataItem:a,expanded:!!(a.children&&a.children.length),expandable:a.hasChildren&&!a.total,total:a.total,onIconClick:fe,root:a.levelNum===0,role:"rowheader"},a.caption):null)))))),t.createElement("div",{ref:k,className:"k-pivotgrid-values",onScroll:be},t.createElement("table",{className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,B),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"none"},P.map((e,r)=>t.createElement(pe,{key:f.generateKey(C[r].path),...A,path:C[r].path,role:"none"},e.cells.map((a,o)=>t.createElement(le,{key:H[r][o],"data-key":H[r][o],id:H[r][o],...se,rowPath:a.rowTuple.members.map(l=>l.name),columnPath:a.columnTuple.members.map(l=>l.name),dataItem:a,total:C[r].total||i[o].total,role:"gridcell",ariaDescribedby:h.map(l=>l[o]).join(" ")},a&&a.data&&a.data.fmtValue?a.data.fmtValue:" "))))))))}),y={rowAxes:[],columnAxes:[],data:[],row:ke.PivotGridRow,column:Ne.PivotGridColumn,cell:Pe.PivotGridCell,headerCell:xe.PivotGridHeaderCell};Q.displayName="KendoReactPivotGrid";exports.PivotGrid=Q;
|
package/PivotGrid.mjs
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as t from "react";
|
|
10
9
|
import { validatePackage as He, useCustomComponent as y, useIsomorphicLayoutEffect as ke, setScrollbarWidth as $, classNames as Se } from "@progress/kendo-react-common";
|
|
11
10
|
import { packageMetadata as xe } from "./package-metadata.mjs";
|
package/components/AxesEditor.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),P=require("@progress/kendo-react-buttons"),m=require("@progress/kendo-react-common"),g=require("./EditorContext.js"),C=require("./AxisEditor.js");function R(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const t=R(x),c=t.forwardRef((e,r)=>{const{value:n,field:o}={...a,...e},s=t.useRef(null),l=t.useRef(null),u=t.useRef(null),[d,f]=m.useCustomComponent(e.chipList||a.chipList);t.useImperativeHandle(l,()=>s.current&&s.current.element),t.useImperativeHandle(u,()=>({props:e,element:l.current})),t.useImperativeHandle(r,()=>u.current);const p=n.filter(i=>i.name.length===1&&i.name.every(v=>v.indexOf("&")===-1)).map(i=>({...i,text:String(i.name)}));return t.createElement(g.PivotGridConfiguratorEditorAxesContext.Provider,{value:{axes:o}},t.createElement(d,{ref:m.canUseRef(d)?s:void 0,textField:"text",valueField:"name",data:p,chip:C.PivotGridAxisEditor,style:{position:"relative"},className:e.className,selection:"none",...f}))}),a={value:[],chipList:P.ChipList};c.defaultProps=a;c.displayName="KendoReactPivotGridAxesEditor";exports.PivotGridAxesEditor=c;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as e from "react";
|
|
10
9
|
import { ChipList as v } from "@progress/kendo-react-buttons";
|
|
11
10
|
import { useCustomComponent as x, canUseRef as h } from "@progress/kendo-react-common";
|
|
@@ -13,7 +12,7 @@ import { PivotGridConfiguratorEditorAxesContext as C } from "./EditorContext.mjs
|
|
|
13
12
|
import { PivotGridAxisEditor as P } from "./AxisEditor.mjs";
|
|
14
13
|
const l = e.forwardRef(
|
|
15
14
|
(i, m) => {
|
|
16
|
-
const { value: c, field:
|
|
15
|
+
const { value: c, field: d } = { ...n, ...i }, r = e.useRef(null), o = e.useRef(null), s = e.useRef(null), [a, u] = x(
|
|
17
16
|
i.chipList || n.chipList
|
|
18
17
|
);
|
|
19
18
|
e.useImperativeHandle(
|
|
@@ -24,7 +23,7 @@ const l = e.forwardRef(
|
|
|
24
23
|
() => s.current
|
|
25
24
|
);
|
|
26
25
|
const p = c.filter((t) => t.name.length === 1 && t.name.every((f) => f.indexOf("&") === -1)).map((t) => ({ ...t, text: String(t.name) }));
|
|
27
|
-
return /* @__PURE__ */ e.createElement(C.Provider, { value: { axes:
|
|
26
|
+
return /* @__PURE__ */ e.createElement(C.Provider, { value: { axes: d } }, /* @__PURE__ */ e.createElement(
|
|
28
27
|
a,
|
|
29
28
|
{
|
|
30
29
|
ref: h(a) ? r : void 0,
|
|
@@ -35,7 +34,7 @@ const l = e.forwardRef(
|
|
|
35
34
|
style: { position: "relative" },
|
|
36
35
|
className: i.className,
|
|
37
36
|
selection: "none",
|
|
38
|
-
...
|
|
37
|
+
...u
|
|
39
38
|
}
|
|
40
39
|
));
|
|
41
40
|
}
|
package/components/AxisEditor.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),v=require("@progress/kendo-pivotgrid-common"),u=require("@progress/kendo-react-common"),A=require("@progress/kendo-react-data-tools"),H=require("@progress/kendo-react-buttons"),T=require("../utils/index.js"),B=require("./EditorContext.js"),$=require("./AxisFilterFieldsEditor.js"),K=require("../shared/PivotGridConfiguratorEditorStateContext.js"),l=require("../hooks/usePivotConfiguratorEditor.js");function Z(e){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const c=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(d,s,c.get?c:{enumerable:!0,get:()=>e[s]})}}return d.default=e,Object.freeze(d)}const n=Z(z),p=n.forwardRef((e,d)=>{const s=n.useRef(0),c=n.useRef(0),f=n.useRef(null),i=n.useRef(null),R=n.useRef(null),{axes:I}=n.useContext(B.PivotGridConfiguratorEditorAxesContext),[y,x]=n.useState(!1),[r,a]=n.useContext(K.PivotGridConfiguratorEditorStateContext);n.useImperativeHandle(i,()=>f.current&&f.current.element),n.useImperativeHandle(R,()=>({props:e,element:i.current})),n.useImperativeHandle(d,()=>R.current);const[F,N]=u.useCustomComponent(e.chip||m.chip),[h,E]=u.useCustomComponent(e.dropClue||m.dropClue),[_,M]=u.useCustomComponent(e.columnMenuTextColumn||m.columnMenuTextColumn),[D,G]=u.useCustomComponent(e.filterFieldsEditor||m.filterFieldsEditor),P=T.findFilters(r.filter,String(e.value),"in"),g=T.findFilters(r.filter,String(e.value)),S=(t,o)=>{a({type:l.PIVOT_CONFIGURATOR_ACTION.setSort,payload:o},t)},b=(t,o)=>{o.length?a({type:l.PIVOT_CONFIGURATOR_ACTION.setFilter,payload:[...P||[],...o.reduce((C,O)=>[...C,...O.filters.filter(w=>w.value)],[])]},t):a({type:l.PIVOT_CONFIGURATOR_ACTION.setFilter,payload:P},t)},q=t=>{a({type:l.PIVOT_CONFIGURATOR_ACTION.remove,payload:e.dataItem},t.syntheticEvent)},U=t=>{const o=t.slice(),C=T.findFilter(r.filter,String(e.dataItem.name),"in");return o.splice(1,0,n.createElement(D,{key:"axis-filter-fields-editor",defaultFilter:C,dataItem:e.dataItem,data:e.dataItem.fields,axes:I,...G})),o},V=t=>{s.current=t.clientX,c.current=t.clientY},k=t=>{Math.abs(s.current-t.clientX)<10&&Math.abs(c.current-t.clientY)<10||(i.current&&(i.current.style.transform=`translate(${t.clientX-s.current}px, ${t.clientY-c.current}px)`),x(!0),a({type:l.PIVOT_CONFIGURATOR_ACTION.setDragItem,payload:e.dataItem}))},j=()=>{x(!1),r.dragItem&&(i.current&&(i.current.style.transform=""),a({type:l.PIVOT_CONFIGURATOR_ACTION.drop,payload:e.dataItem}))},X=t=>{r.dragItem&&(a({type:l.PIVOT_CONFIGURATOR_ACTION.setDropTarget,payload:e.dataItem},t.syntheticEvent),a({type:l.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:I},t.syntheticEvent))},Y=t=>{if(r.dragItem&&!y&&i.current){const o=i.current.getBoundingClientRect(),O=t.syntheticEvent.clientX-o.left<o.width/2?"before":"after";a({type:l.PIVOT_CONFIGURATOR_ACTION.setDropDirection,payload:O},t.syntheticEvent)}};return u.useDraggable(i,{onPress:V,onDrag:k,onRelease:j}),n.createElement(n.Fragment,null,r.dropTarget&&v.compareAxes(r.dropTarget,e.dataItem)&&r.dropDirection==="before"&&n.createElement(h,{...E}),n.createElement(F,{ref:u.canUseRef(F)?f:void 0,...e,removable:!0,onRemove:q,onMouseEnter:X,onMouseMove:Y,style:{pointerEvents:y?"none":void 0},rounded:"full",...N},e.text,I!=="measureAxes"&&n.createElement(_,{field:String(e.value),itemsRender:U,sort:r.sort,onSortChange:S,filter:g&&g.length?[{logic:"and",filters:g}]:void 0,onFilterChange:b,filterContent:[A.ColumnMenuTextFilter],...M})),r.dropTarget&&v.compareAxes(r.dropTarget,e.dataItem)&&r.dropDirection==="after"&&n.createElement(h,{...E}))}),m={chip:H.Chip,columnMenuTextColumn:A.ColumnMenuTextColumn,filterFieldsEditor:$.PivotGridAxisFilterFieldsEditor,dropClue:e=>n.createElement("div",{className:"k-grouping-dropclue",style:{position:"relative",zIndex:1e4},...e})};p.defaultProps=m;p.displayName="KendoReactPivotGridAxisEditor";exports.PivotGridAxisEditor=p;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as r from "react";
|
|
10
9
|
import { compareAxes as R } from "@progress/kendo-pivotgrid-common";
|
|
11
10
|
import { useCustomComponent as c, useDraggable as $, canUseRef as B } from "@progress/kendo-react-common";
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react"),Y=require("@progress/kendo-react-treeview"),P=require("@progress/kendo-react-buttons"),Z=require("@progress/kendo-react-indicators"),ee=require("@progress/kendo-react-intl"),N=require("@progress/kendo-react-data-tools"),i=require("@progress/kendo-react-common"),te=require("@progress/kendo-svg-icons"),C=require("../utils/index.js"),s=require("../messages/index.js"),ne=require("../shared/PivotGridConfiguratorEditorEventsContext.js"),oe=require("../shared/PivotGridConfiguratorEditorStateContext.js"),O=require("../hooks/useExpansion.js"),g=require("../hooks/usePivotConfiguratorEditor.js");function ae(n){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const l in n)if(l!=="default"){const d=Object.getOwnPropertyDescriptor(n,l);Object.defineProperty(u,l,d.get?d:{enumerable:!0,get:()=>n[l]})}}return u.default=n,Object.freeze(u)}const t=ae(W),S=t.forwardRef((n,u)=>{const{data:l,dataItem:d,defaultFilter:I}={...r,...n},F=t.useRef(null),m=t.useRef(null),y=ee.useLocalization(),[q,A]=i.useCustomComponent(n.columnMenuItem||r.columnMenuItem),[T,w]=i.useCustomComponent(n.columnMenuForm||r.columnMenuForm),[B,b]=i.useCustomComponent(n.resetButton||r.resetButton),[_,G]=i.useCustomComponent(n.applyButton||r.applyButton),[V,D]=i.useCustomComponent(n.treeView||r.treeView),[j,L]=i.useCustomComponent(n.noData||r.noData);t.useImperativeHandle(m,()=>({props:n,element:F.current})),t.useImperativeHandle(u,()=>m.current);const[h,f]=t.useState(!1),{onAxisFilterFieldsExpandChange:v,onAxisFilterFieldExpand:k}=t.useContext(ne.PivotGridConfiguratorEditorEventsContext),[,E]=t.useContext(oe.PivotGridConfiguratorEditorStateContext),[c,z]=t.useState(I),x=c?c.value.split(","):[],[H,U]=O.useExpansion([],void 0,m,C.compareFields),R={caption:e=>e.dataItem.caption,id:e=>e.dataItem.uniqueName,parent:(e,a)=>a&&a.value,value:e=>e.dataItem.defaultHierarchy||e.dataItem.uniqueName,expanded:e=>H.some(a=>a.uniqueName===e.id),checked:e=>!x.length||(x||[]).some(a=>a===e.dataItem.uniqueName),hasChildren:e=>parseInt(e.dataItem.childrenCardinality,10)>0,children:e=>C.recursiveMap(e.dataItem.children,R,e),checkIndeterminate:e=>{const a=(e.children||[]).length&&e.children.every(o=>o.checked);return a&&(e.checked=!0),(e.children||[]).some(o=>o.checked)&&!a}},p=C.recursiveMap(l,R),M=C.flatMap(p),K=e=>{f(!h),v&&v({value:!h,target:m.current,syntheticEvent:e})},X=e=>{U({type:O.EXPANSION_ACTION.toggle,payload:e.item.dataItem},e.syntheticEvent),k&&k({value:e.item.dataItem,target:m.current,syntheticEvent:e.syntheticEvent})},$=e=>{let a;e.item.checked?a={field:String(d.name),operator:"in",value:M.filter(o=>o.checked).map(o=>String(o.value)).filter(o=>o!==e.item.value&&o!==e.item.parent).join(",")}:a={field:String(d.name),operator:"in",value:M.filter(o=>o.checked).map(o=>String(o.value)).concat([e.item.value]).join(",")},z(a)},J=e=>{f(!1),c&&E({type:g.PIVOT_CONFIGURATOR_ACTION.removeFilter,payload:c},e)},Q=e=>{f(!1),c&&E({type:I?g.PIVOT_CONFIGURATOR_ACTION.changeFilter:g.PIVOT_CONFIGURATOR_ACTION.addFilter,payload:c},e)};return t.createElement("div",{ref:F,id:n.id,tabIndex:n.tabIndex,style:n.style,className:i.classNames("k-columnmenu-item-wrapper",n.className)},t.createElement(q,{...A,title:"Include Fields",iconClass:"k-i-grid-layout",svgIcon:te.gridLayoutIcon,onClick:K}),t.createElement(T,{show:h,actions:t.createElement(t.Fragment,null,t.createElement(B,{type:"reset",onClick:J,...b},y.toLanguageString(s.fieldMenuReset,s.messages[s.fieldMenuReset])),t.createElement(_,{themeColor:"primary",onClick:Q,...G},y.toLanguageString(s.fieldMenuApply,s.messages[s.fieldMenuApply]))),...w},p&&p.length?t.createElement(V,{data:p,checkboxes:!0,onExpandChange:X,onCheckChange:$,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...D}):t.createElement(j,{...L})))}),r={data:[],resetButton:P.Button,applyButton:P.Button,treeView:Y.TreeView,noData:()=>t.createElement(Z.Skeleton,{shape:"rectangle",style:{height:"20px",width:"calc(100% - 16px)",margin:8}}),columnMenuItem:N.ColumnMenuItem,columnMenuForm:N.ColumnMenuForm};S.displayName="KendoReactPivotGridAxisFilterFieldsEditor";exports.PivotGridAxisFilterFieldsEditor=S;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as t from "react";
|
|
10
9
|
import { TreeView as W } from "@progress/kendo-react-treeview";
|
|
11
10
|
import { Button as k } from "@progress/kendo-react-buttons";
|
|
@@ -18,10 +17,10 @@ import { recursiveMap as v, flatMap as ae, compareFields as oe } from "../utils/
|
|
|
18
17
|
import { fieldMenuReset as M, messages as N, fieldMenuApply as P } from "../messages/index.mjs";
|
|
19
18
|
import { PivotGridConfiguratorEditorEventsContext as ie } from "../shared/PivotGridConfiguratorEditorEventsContext.mjs";
|
|
20
19
|
import { PivotGridConfiguratorEditorStateContext as re } from "../shared/PivotGridConfiguratorEditorStateContext.mjs";
|
|
21
|
-
import { useExpansion as le, EXPANSION_ACTION as
|
|
20
|
+
import { useExpansion as le, EXPANSION_ACTION as me } from "../hooks/useExpansion.mjs";
|
|
22
21
|
import { PIVOT_CONFIGURATOR_ACTION as u } from "../hooks/usePivotConfiguratorEditor.mjs";
|
|
23
|
-
const
|
|
24
|
-
const { data: w, dataItem: p, defaultFilter: h } = { ...i, ...o }, f = t.useRef(null),
|
|
22
|
+
const ce = t.forwardRef((o, S) => {
|
|
23
|
+
const { data: w, dataItem: p, defaultFilter: h } = { ...i, ...o }, f = t.useRef(null), m = t.useRef(null), C = Z(), [A, B] = l(
|
|
25
24
|
o.columnMenuItem || i.columnMenuItem
|
|
26
25
|
), [R, T] = l(
|
|
27
26
|
o.columnMenuForm || i.columnMenuForm
|
|
@@ -32,10 +31,10 @@ const me = t.forwardRef((o, S) => {
|
|
|
32
31
|
), [q, L] = l(
|
|
33
32
|
o.treeView || i.treeView
|
|
34
33
|
), [_, b] = l(o.noData || i.noData);
|
|
35
|
-
t.useImperativeHandle(
|
|
36
|
-
const [
|
|
34
|
+
t.useImperativeHandle(m, () => ({ props: o, element: f.current })), t.useImperativeHandle(S, () => m.current);
|
|
35
|
+
const [d, s] = t.useState(!1), { onAxisFilterFieldsExpandChange: I, onAxisFilterFieldExpand: g } = t.useContext(
|
|
37
36
|
ie
|
|
38
|
-
), [, F] = t.useContext(re), [r, H] = t.useState(h), y = r ? r.value.split(",") : [], [j, z] = le([], void 0,
|
|
37
|
+
), [, F] = t.useContext(re), [r, H] = t.useState(h), y = r ? r.value.split(",") : [], [j, z] = le([], void 0, m, oe), x = {
|
|
39
38
|
caption: (e) => e.dataItem.caption,
|
|
40
39
|
id: (e) => e.dataItem.uniqueName,
|
|
41
40
|
parent: (e, a) => a && a.value,
|
|
@@ -48,16 +47,16 @@ const me = t.forwardRef((o, S) => {
|
|
|
48
47
|
const a = (e.children || []).length && e.children.every((n) => n.checked);
|
|
49
48
|
return a && (e.checked = !0), (e.children || []).some((n) => n.checked) && !a;
|
|
50
49
|
}
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
value: !
|
|
54
|
-
target:
|
|
50
|
+
}, c = v(w, x), E = ae(c), K = (e) => {
|
|
51
|
+
s(!d), I && I({
|
|
52
|
+
value: !d,
|
|
53
|
+
target: m.current,
|
|
55
54
|
syntheticEvent: e
|
|
56
55
|
});
|
|
57
56
|
}, U = (e) => {
|
|
58
|
-
z({ type:
|
|
57
|
+
z({ type: me.toggle, payload: e.item.dataItem }, e.syntheticEvent), g && g({
|
|
59
58
|
value: e.item.dataItem,
|
|
60
|
-
target:
|
|
59
|
+
target: m.current,
|
|
61
60
|
syntheticEvent: e.syntheticEvent
|
|
62
61
|
});
|
|
63
62
|
}, X = (e) => {
|
|
@@ -72,7 +71,7 @@ const me = t.forwardRef((o, S) => {
|
|
|
72
71
|
value: E.filter((n) => n.checked).map((n) => String(n.value)).concat([e.item.value]).join(",")
|
|
73
72
|
}, H(a);
|
|
74
73
|
}, J = (e) => {
|
|
75
|
-
|
|
74
|
+
s(!1), r && F(
|
|
76
75
|
{
|
|
77
76
|
type: u.removeFilter,
|
|
78
77
|
payload: r
|
|
@@ -80,7 +79,7 @@ const me = t.forwardRef((o, S) => {
|
|
|
80
79
|
e
|
|
81
80
|
);
|
|
82
81
|
}, Q = (e) => {
|
|
83
|
-
|
|
82
|
+
s(!1), r && F(
|
|
84
83
|
{
|
|
85
84
|
type: h ? u.changeFilter : u.addFilter,
|
|
86
85
|
payload: r
|
|
@@ -110,14 +109,14 @@ const me = t.forwardRef((o, S) => {
|
|
|
110
109
|
/* @__PURE__ */ t.createElement(
|
|
111
110
|
R,
|
|
112
111
|
{
|
|
113
|
-
show:
|
|
112
|
+
show: d,
|
|
114
113
|
actions: /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(V, { type: "reset", onClick: J, ...O }, C.toLanguageString(M, N[M])), /* @__PURE__ */ t.createElement(D, { themeColor: "primary", onClick: Q, ...G }, C.toLanguageString(P, N[P]))),
|
|
115
114
|
...T
|
|
116
115
|
},
|
|
117
|
-
|
|
116
|
+
c && c.length ? /* @__PURE__ */ t.createElement(
|
|
118
117
|
q,
|
|
119
118
|
{
|
|
120
|
-
data:
|
|
119
|
+
data: c,
|
|
121
120
|
checkboxes: !0,
|
|
122
121
|
onExpandChange: U,
|
|
123
122
|
onCheckChange: X,
|
|
@@ -140,7 +139,7 @@ const me = t.forwardRef((o, S) => {
|
|
|
140
139
|
columnMenuItem: $,
|
|
141
140
|
columnMenuForm: ee
|
|
142
141
|
};
|
|
143
|
-
|
|
142
|
+
ce.displayName = "KendoReactPivotGridAxisFilterFieldsEditor";
|
|
144
143
|
export {
|
|
145
|
-
|
|
144
|
+
ce as PivotGridAxisFilterFieldsEditor
|
|
146
145
|
};
|
package/components/Cell.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),n=require("@progress/kendo-react-common");function d(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const a=d(o),c=a.forwardRef((e,r)=>{const t=a.useRef(null),l=a.useRef(null);a.useImperativeHandle(t,()=>({element:l.current,props:e})),a.useImperativeHandle(r,()=>t.current);const i=n.useMouse(e,t);return a.createElement("td",{ref:l,...i,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,"aria-describedby":e.ariaDescribedby,className:n.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total},e.className)},e.children)});c.displayName="KendoReactPivotGridCell";exports.PivotGridCell=c;
|
package/components/Cell.mjs
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as t from "react";
|
|
10
9
|
import { useMouse as d, classNames as n } from "@progress/kendo-react-common";
|
|
11
10
|
const c = t.forwardRef((e, r) => {
|
package/components/Column.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),p=require("@progress/kendo-react-common");function b(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=b(f),a=n.forwardRef((e,r)=>{const t=n.useRef(null),o=n.useRef(null),{id:c,style:u,tabIndex:l,children:s,className:i,path:d=g.path}=e;n.useImperativeHandle(t,()=>({element:o.current,props:{path:d,...e}})),n.useImperativeHandle(r,()=>t.current);const m=p.useMouse(e,t);return n.createElement("col",{ref:o,...m,id:c,style:u,tabIndex:l,children:s,className:i})}),g={path:[]};a.displayName="KendoReactPivotGridColumn";exports.PivotGridColumn=a;
|
package/components/Column.mjs
CHANGED
|
@@ -5,23 +5,22 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as e from "react";
|
|
10
|
-
import { useMouse as
|
|
9
|
+
import { useMouse as i } from "@progress/kendo-react-common";
|
|
11
10
|
const p = e.forwardRef((t, o) => {
|
|
12
|
-
const
|
|
13
|
-
e.useImperativeHandle(
|
|
14
|
-
element:
|
|
11
|
+
const r = e.useRef(null), n = e.useRef(null), { id: a, style: s, tabIndex: l, children: u, className: c, path: m = f.path } = t;
|
|
12
|
+
e.useImperativeHandle(r, () => ({
|
|
13
|
+
element: n.current,
|
|
15
14
|
props: { path: m, ...t }
|
|
16
|
-
})), e.useImperativeHandle(o, () =>
|
|
17
|
-
const
|
|
15
|
+
})), e.useImperativeHandle(o, () => r.current);
|
|
16
|
+
const d = i(t, r);
|
|
18
17
|
return /* @__PURE__ */ e.createElement(
|
|
19
18
|
"col",
|
|
20
19
|
{
|
|
21
|
-
ref:
|
|
22
|
-
...
|
|
23
|
-
id:
|
|
24
|
-
style:
|
|
20
|
+
ref: n,
|
|
21
|
+
...d,
|
|
22
|
+
id: a,
|
|
23
|
+
style: s,
|
|
25
24
|
tabIndex: l,
|
|
26
25
|
children: u,
|
|
27
26
|
className: c
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),v=require("@progress/kendo-react-buttons"),l=require("@progress/kendo-react-common"),z=require("@progress/kendo-react-intl"),F=require("@progress/kendo-react-form"),q=require("./ConfiguratorEditor.js"),o=require("../messages/index.js");function j(e){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(u,a,s.get?s:{enumerable:!0,get:()=>e[a]})}}return u.default=e,Object.freeze(u)}const t=j(P),h=t.forwardRef((e,u)=>{const{horizontal:a,data:s,rowAxes:d,columnAxes:f,measureAxes:g}={...m,...e},E=t.useRef(null),i=t.useRef(null),n=t.useRef(null),C=z.useLocalization(),[A,k]=l.useCustomComponent(e.editor||m.editor),[x,b]=l.useCustomComponent(e.form||m.form),[R,S]=l.useCustomComponent(e.formElement||m.formElement);t.useImperativeHandle(i,()=>({props:e,element:E.current})),t.useImperativeHandle(u,()=>i.current);const N=(r,c)=>{e.onRowAxesChange&&e.onRowAxesChange({target:i.current,value:r.rowAxes,syntheticEvent:c}),e.onColumnAxesChange&&e.onColumnAxesChange({target:i.current,value:r.columnAxes,syntheticEvent:c}),e.onMeasureAxesChange&&e.onMeasureAxesChange({target:i.current,value:r.measureAxes,syntheticEvent:c}),e.onSortChange&&e.onSortChange({target:i.current,value:r.sort,syntheticEvent:c}),e.onFilterChange&&e.onFilterChange({target:i.current,value:r.filter,syntheticEvent:c})},y={rowAxes:d,columnAxes:f,measureAxes:g,sort:e.sort,filter:e.filter};return t.useEffect(()=>{n.current&&n.current.onChange("rowAxes",{value:d})},[d]),t.useEffect(()=>{n.current&&n.current.onChange("columnAxes",{value:f})},[f]),t.useEffect(()=>{n.current&&n.current.onChange("measureAxes",{value:g})},[g]),t.useEffect(()=>{n.current&&n.current.onChange("sort",{value:e.sort})},[e.sort]),t.useEffect(()=>{n.current&&n.current.onChange("filter",{value:e.filter})},[e.filter]),t.createElement("div",{ref:E,id:e.id,tabIndex:e.tabIndex,style:e.style,className:l.classNames("k-pivotgrid-configurator",e.className)},t.createElement("div",{className:l.classNames("k-pivotgrid-configurator-panel","k-pivotgrid-configurator-push",{"k-pivotgrid-configurator-horizontal":a,"k-pivotgrid-configurator-vertical":!a})},t.createElement("div",{className:"k-pivotgrid-configurator-header"},t.createElement("div",{className:"k-pivotgrid-configurator-header-text"},C.toLanguageString(o.configuratorTitle,o.messages[o.configuratorTitle]))),t.createElement(x,{ref:l.canUseRef(x)?n:void 0,initialValues:y,onSubmit:N,render:r=>t.createElement(t.Fragment,null,t.createElement("div",{className:"k-pivotgrid-configurator-content"},t.createElement(R,{horizontal:a,...S},t.createElement(A,{...r,horizontal:e.horizontal,onFieldsEditorFieldExpand:e.onFieldsEditorFieldExpand,onFieldsEditorFieldCheck:e.onFieldsEditorFieldCheck,onAxisFilterFieldExpand:e.onAxisFilterFieldExpand,onAxisFilterFieldsExpandChange:e.onAxisFilterFieldsExpandChange,data:s,...k}))),t.createElement("div",{className:"k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end"},t.createElement(v.Button,{type:"submit",onClick:r.onFormReset},C.toLanguageString(o.configuratorCancel,o.messages[o.configuratorCancel])),t.createElement(v.Button,{themeColor:"primary",type:"submit",onClick:r.onSubmit},C.toLanguageString(o.configuratorApply,o.messages[o.configuratorApply])))),...b})))}),m={form:F.Form,formElement:F.FormElement,editor:q.PivotGridConfiguratorEditor,horizontal:!1,data:[],columnAxes:[],rowAxes:[],measureAxes:[]};h.displayName="KendoReactPivotGridConfigurator";exports.PivotGridConfigurator=h;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as t from "react";
|
|
10
9
|
import { Button as x } from "@progress/kendo-react-buttons";
|
|
11
10
|
import { useCustomComponent as f, classNames as E, canUseRef as L } from "@progress/kendo-react-common";
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),a=require("@progress/kendo-react-common"),g=require("@progress/kendo-react-intl"),b=require("@progress/kendo-svg-icons"),c=require("../messages/index.js");function v(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const t=v(f),u=t.forwardRef((e,o)=>{const n=t.useRef(null),r=t.useRef(null),i=g.useLocalization();t.useImperativeHandle(n,()=>({props:e,element:r.current})),t.useImperativeHandle(o,()=>n.current);const[s,l]=a.useCustomComponent(e.icon||I.icon),d=t.useMemo(()=>a.classNames("k-pivotgrid-configurator-button",e.className),[e.className]),m=a.useMouse(e,n);return t.createElement("div",{ref:r,id:e.id,className:d,tabIndex:e.tabIndex,...m},t.createElement("span",null,i.toLanguageString(c.configuratorButtonLabel,c.messages[c.configuratorButtonLabel]),t.createElement(s,{name:"gear",icon:b.gearIcon,...l})))}),I={icon:a.IconWrap};u.displayName="KendoReactPivotGridConfiguratorButton";exports.PivotGridConfiguratorButton=u;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as e from "react";
|
|
10
9
|
import { useCustomComponent as l, classNames as f, useMouse as d, IconWrap as g } from "@progress/kendo-react-common";
|
|
11
10
|
import { useLocalization as I } from "@progress/kendo-react-intl";
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const te=require("react"),p=require("@progress/kendo-react-form"),C=require("@progress/kendo-react-labels"),oe=require("@progress/kendo-react-intl"),E=require("@progress/kendo-react-common"),v=require("./AxesEditor.js"),ne=require("./FieldsEditor.js"),o=require("../messages/index.js"),d=require("../hooks/usePivotConfiguratorEditor.js"),se=require("../shared/PivotGridConfiguratorEditorEventsContext.js"),re=require("../shared/PivotGridConfiguratorEditorStateContext.js");function ae(r){const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const c in r)if(c!=="default"){const A=Object.getOwnPropertyDescriptor(r,c);Object.defineProperty(x,c,A.get?A:{enumerable:!0,get:()=>r[c]})}}return x.default=r,Object.freeze(x)}const e=ae(te),w=e.forwardRef((r,x)=>{const{onFieldsEditorFieldCheck:c,onFieldsEditorFieldCheckAction:A=a.onFieldsEditorFieldCheckAction,onFieldsEditorFieldExpand:b,onFieldsEditorFieldExpandAction:R=a.onFieldsEditorFieldExpandAction,onAxisFilterFieldExpand:I,onAxisFilterFieldsExpandChange:N}=r,n={onFieldsEditorFieldCheck:c,onFieldsEditorFieldCheckAction:A,horizontal:a.horizontal,axesEditor:a.axesEditor,...r},[k,G]=E.useCustomComponent(n.fieldsLabel||a.fieldsLabel),[_,S]=E.useCustomComponent(n.fieldsEditor||a.fieldsEditor),[q,z]=E.useCustomComponent(n.columnAxesLabel||a.columnAxesLabel),[D,U]=E.useCustomComponent(n.columnAxesEditor||a.columnAxesEditor),[V,Z]=E.useCustomComponent(n.rowAxesLabel||a.rowAxesLabel),[j,B]=E.useCustomComponent(n.rowAxesEditor||a.rowAxesEditor),[H,K]=E.useCustomComponent(n.measureAxesLabel||a.measureAxesLabel),[J,Q]=E.useCustomComponent(n.measureAxesEditor||a.measureAxesEditor),W=e.useRef(null),u=e.useRef(null),g=oe.useLocalization(),[s,i]=d.usePivotConfiguratorEditor(n,u);e.useImperativeHandle(u,()=>({element:W.current,props:n,state:s})),e.useImperativeHandle(x,()=>u.current);const F=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:"columnAxes"})},L=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:null})},h=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:"rowAxes"})},y=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:null})},M=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:"measureAxes"})},T=()=>{s.dragItem&&i({type:d.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:null})},X=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};if(R){const l=R(m,n,s);l&&(Array.isArray(l)?l.filter(Boolean).map(f=>f&&i({...f},t.syntheticEvent)):i({...l},t.syntheticEvent))}b&&b({target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent})},Y=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};if(A){const l=A(m,n,s);l&&(Array.isArray(l)?l.filter(Boolean).map(f=>f&&i({...f},t.syntheticEvent)):i({...l},t.syntheticEvent))}c&&c(m)},$=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};I&&I(m)},ee=t=>{const m={target:t.target,currentTarget:u.current,value:t.value,syntheticEvent:t.syntheticEvent};N&&N(m)},O=n.horizontal?"div":e.Fragment,P=n.horizontal?{className:"k-form-field-wrapper"}:{};return e.createElement(se.PivotGridConfiguratorEditorEventsContext.Provider,{value:{onAxisFilterFieldExpand:$,onAxisFilterFieldsExpandChange:ee}},e.createElement(re.PivotGridConfiguratorEditorStateContext.Provider,{value:[s,i]},e.createElement(O,{...P},e.createElement("div",{className:"k-form-field"},e.createElement(k,{name:"",component:C.Label,...G},g.toLanguageString(o.configuratorEditorSearchTitle,o.messages[o.configuratorEditorSearchTitle]))),e.createElement("div",{className:"k-form-field"},e.createElement("div",{className:"k-fields-list-wrapper"},e.createElement(_,{data:n.data,onExpand:X,onCheck:Y,columnAxes:s.columnAxes,rowAxes:s.rowAxes,measureAxes:s.measureAxes,...S})))),e.createElement(O,{...P},e.createElement("div",{className:"k-form-field",onMouseEnter:F,onMouseLeave:L},e.createElement(p.Field,{name:"columnAxes",field:"columnAxes",component:q,...z},g.toLanguageString(o.configuratorColumnsTitle,o.messages[o.configuratorColumnsTitle]))),n.valueGetter("columnAxes").length?e.createElement(p.Field,{name:"columnAxes",field:"columnAxes",component:D,onMouseEnter:F,onMouseLeave:L,className:"k-column-fields",...U}):e.createElement("div",{className:"k-settings-description",onMouseEnter:F,onMouseLeave:L},g.toLanguageString(o.configuratorMissingFields,o.messages[o.configuratorMissingFields])),e.createElement("div",{className:"k-form-field",onMouseEnter:h,onMouseLeave:y},e.createElement(p.Field,{name:"rowAxes",field:"rowAxes",component:V,...Z},g.toLanguageString(o.configuratorRowsTitle,o.messages[o.configuratorRowsTitle]))),n.valueGetter("rowAxes").length?e.createElement(p.Field,{name:"rowAxes",field:"rowAxes",component:j,onMouseEnter:h,onMouseLeave:y,className:"k-column-fields",...B}):e.createElement("div",{className:"k-settings-description",onMouseEnter:h,onMouseLeave:y},g.toLanguageString(o.configuratorMissingFields,o.messages[o.configuratorMissingFields]))),e.createElement(O,{...P},e.createElement("div",{className:"k-form-field",onMouseEnter:M,onMouseLeave:T},e.createElement(p.Field,{name:"measureAxes",field:"measureAxes",component:H,...K},g.toLanguageString(o.configuratorMeasuresTitle,o.messages[o.configuratorMeasuresTitle]))),n.valueGetter("measureAxes").length?e.createElement(p.Field,{name:"measureAxes",field:"measureAxes",component:J,onMouseEnter:M,onMouseLeave:T,className:"k-column-fields",...Q}):e.createElement("div",{className:"k-settings-description",onMouseEnter:M,onMouseLeave:T},g.toLanguageString(o.configuratorMissingFields,o.messages[o.configuratorMissingFields])))))}),a={data:[],horizontal:!1,fieldsLabel:C.Label,fieldsEditor:ne.PivotGridFieldsEditor,columnAxesLabel:C.Label,columnAxesEditor:v.PivotGridAxesEditor,rowAxesLabel:C.Label,rowAxesEditor:v.PivotGridAxesEditor,measureAxesLabel:C.Label,measureAxesEditor:v.PivotGridAxesEditor,axesEditor:v.PivotGridAxesEditor,onFieldsEditorFieldCheckAction:r=>({type:d.PIVOT_CONFIGURATOR_ACTION.toggleSelection,payload:r.value}),onFieldsEditorFieldExpandAction:r=>({type:d.PIVOT_CONFIGURATOR_ACTION.toggleExpansion,payload:r.value})};w.displayName="KendoReactPivotGridConfiguratorEditor";exports.PivotGridConfiguratorEditor=w;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as e from "react";
|
|
10
9
|
import { Field as p } from "@progress/kendo-react-form";
|
|
11
10
|
import { Label as g } from "@progress/kendo-react-labels";
|
package/components/Container.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),m=require("@progress/kendo-react-common");function g(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=g(d),c=r.forwardRef((e,n)=>{const t=r.useRef(null),o=r.useRef(null);r.useImperativeHandle(o,()=>({props:e,element:t.current})),r.useImperativeHandle(n,()=>o.current);const{id:i,style:l,tabIndex:s,configuratorPosition:a,className:u,children:f}={...p,...e};return r.createElement("div",{ref:t,id:i,style:l,tabIndex:s,className:m.classNames("k-d-flex k-pos-relative",{"k-flex-row":a==="right","k-flex-row-reverse":a==="left","k-flex-column":a==="bottom","k-flex-column-reverse":a==="top"},u)},f)}),p={configuratorPosition:"right"};c.displayName="KendoReactPivotGridContainer";exports.PivotGridContainer=c;
|
package/components/Container.mjs
CHANGED
|
@@ -5,22 +5,21 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as e from "react";
|
|
10
9
|
import { classNames as m } from "@progress/kendo-react-common";
|
|
11
10
|
const u = e.forwardRef(
|
|
12
|
-
(r,
|
|
11
|
+
(r, a) => {
|
|
13
12
|
const o = e.useRef(null), n = e.useRef(null);
|
|
14
13
|
e.useImperativeHandle(n, () => ({ props: r, element: o.current })), e.useImperativeHandle(
|
|
15
|
-
|
|
14
|
+
a,
|
|
16
15
|
() => n.current
|
|
17
16
|
);
|
|
18
|
-
const { id:
|
|
17
|
+
const { id: l, style: s, tabIndex: i, configuratorPosition: t, className: c, children: f } = { ...d, ...r };
|
|
19
18
|
return /* @__PURE__ */ e.createElement(
|
|
20
19
|
"div",
|
|
21
20
|
{
|
|
22
21
|
ref: o,
|
|
23
|
-
id:
|
|
22
|
+
id: l,
|
|
24
23
|
style: s,
|
|
25
24
|
tabIndex: i,
|
|
26
25
|
className: m(
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react");function c(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const i=c(n),a=i.createContext({axes:null});exports.PivotGridConfiguratorEditorAxesContext=a;
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as t from "react";
|
|
10
|
-
const
|
|
9
|
+
const o = t.createContext({ axes: null });
|
|
11
10
|
export {
|
|
12
|
-
|
|
11
|
+
o as PivotGridConfiguratorEditorAxesContext
|
|
13
12
|
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("react"),x=require("@progress/kendo-react-treeview"),l=require("@progress/kendo-react-common"),i=require("../utils/index.js"),R=require("../shared/PivotGridConfiguratorEditorStateContext.js");function A(t){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(c,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return c.default=t,Object.freeze(c)}const a=A(H),g=a.forwardRef((t,c)=>{const{data:n,rowAxes:o,columnAxes:v,measureAxes:C,onExpand:h,onCheck:f}={...m,...t},s=a.useRef(null),d=a.useRef(null),[p,y]=l.useCustomComponent(t.treeView||m.treeView),[E,q]=l.useCustomComponent(t.noData||m.noData);a.useImperativeHandle(d,()=>({props:t,element:s.current&&s.current.element})),a.useImperativeHandle(c,()=>d.current);const[w]=a.useContext(R.PivotGridConfiguratorEditorStateContext),N=i.extractDefaultFields(v),P=i.extractDefaultFields(o),k=i.extractDefaultFields(C),b=i.flatMap(n).filter(e=>[...N,...P,...k].some(r=>r===e.uniqueName||r===e.defaultHierarchy)),I={caption:e=>e.dataItem.caption,id:e=>e.dataItem.uniqueName,value:e=>e.dataItem.defaultHierarchy||e.dataItem.uniqueName,expanded:e=>w.expanded.some(r=>r.uniqueName===e.dataItem.uniqueName),hasChildren:e=>!("hierarchyUniqueName"in e.dataItem)&&!("aggregator"in e.dataItem),selectable:e=>!(!e.hasChildren&&!e.dataItem.aggregator&&!e.dataItem.measure||e.dataItem.type===2||e.dataItem.uniqueName==="[KPIs]"),children:e=>i.recursiveMap(e.dataItem.children,I,e),checked:e=>b.some(r=>e.dataItem.defaultHierarchy?r.defaultHierarchy===e.dataItem.defaultHierarchy:r.uniqueName===e.dataItem.uniqueName)||e.children.length&&e.children.every(r=>r.checked)},F=e=>{h&&h({value:e.item.dataItem,target:d.current,syntheticEvent:e.syntheticEvent})},D=e=>{f&&f({value:e.item.dataItem,target:d.current,syntheticEvent:e.syntheticEvent})},u=i.recursiveMap(t.data,I);return a.createElement(x.TreeViewItemPropsContext.Provider,{value:e=>({...e,checkboxes:e.item.selectable})},u&&u.length?a.createElement(p,{ref:l.canUseRef(p)?s:void 0,data:u,checkboxes:!0,onExpandChange:F,onCheckChange:D,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...y}):a.createElement(E,{...q}))}),m={data:[],rowAxes:[],columnAxes:[],measureAxes:[],treeView:x.TreeView,noData:()=>a.createElement("div",null,"NO DATA")};g.displayName="KendoReactPivotGridFieldsEditor";exports.PivotGridFieldsEditor=g;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as t from "react";
|
|
10
9
|
import { TreeViewItemPropsContext as A, TreeView as V } from "@progress/kendo-react-treeview";
|
|
11
10
|
import { useCustomComponent as h, canUseRef as D } from "@progress/kendo-react-common";
|
package/components/HeaderCell.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),o=require("@progress/kendo-react-common"),l=require("@progress/kendo-svg-icons");function v(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const c=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(a,n,c.get?c:{enumerable:!0,get:()=>e[n]})}}return a.default=e,Object.freeze(a)}const t=v(f),r=t.forwardRef((e,a)=>{const n=t.useRef(null),c=t.useRef(null);t.useImperativeHandle(n,()=>({element:c.current,props:e})),t.useImperativeHandle(a,()=>n.current);const[d,i]=o.useCustomComponent(e.icon||g.icon),u=o.useMouse(e,n),s=m=>{e.onIconClick&&e.onIconClick.call(void 0,{syntheticEvent:m.syntheticEvent,target:n.current})};return t.createElement("th",{ref:c,...u,colSpan:e.colSpan,rowSpan:e.rowSpan,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,...e.expandable?{"aria-expanded":e.expanded}:{},className:o.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total,"k-pivotgrid-header-root":e.root,"k-pivotgrid-expanded":e.expanded,"k-first":e.first},e.className)},e.expandable&&t.createElement(d,{...i,onClick:s,name:`chevron-${e.expanded?"up":"down"}`,"aria-hidden":!0,icon:e.expanded?l.chevronUpIcon:l.chevronDownIcon}),e.children)}),g={icon:o.IconWrap};r.displayName="KendoReactPivotGridHeaderCell";exports.PivotGridHeaderCell=r;
|
|
@@ -5,21 +5,20 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as n from "react";
|
|
10
|
-
import { useCustomComponent as m, useMouse as u, classNames as
|
|
9
|
+
import { useCustomComponent as m, useMouse as u, classNames as v, IconWrap as s } from "@progress/kendo-react-common";
|
|
11
10
|
import { chevronUpIcon as f, chevronDownIcon as I } from "@progress/kendo-svg-icons";
|
|
12
11
|
const h = n.forwardRef(
|
|
13
|
-
(e,
|
|
12
|
+
(e, o) => {
|
|
14
13
|
const t = n.useRef(null), a = n.useRef(null);
|
|
15
14
|
n.useImperativeHandle(t, () => ({
|
|
16
15
|
element: a.current,
|
|
17
16
|
props: e
|
|
18
17
|
})), n.useImperativeHandle(
|
|
19
|
-
|
|
18
|
+
o,
|
|
20
19
|
() => t.current
|
|
21
20
|
);
|
|
22
|
-
const [
|
|
21
|
+
const [c, d] = m(e.icon || x.icon), l = u(
|
|
23
22
|
e,
|
|
24
23
|
t
|
|
25
24
|
), i = (r) => {
|
|
@@ -40,7 +39,7 @@ const h = n.forwardRef(
|
|
|
40
39
|
tabIndex: e.tabIndex,
|
|
41
40
|
role: e.role,
|
|
42
41
|
...e.expandable ? { "aria-expanded": e.expanded } : {},
|
|
43
|
-
className:
|
|
42
|
+
className: v(
|
|
44
43
|
"k-pivotgrid-cell",
|
|
45
44
|
{
|
|
46
45
|
"k-pivotgrid-header-total": e.total,
|
|
@@ -52,7 +51,7 @@ const h = n.forwardRef(
|
|
|
52
51
|
)
|
|
53
52
|
},
|
|
54
53
|
e.expandable && /* @__PURE__ */ n.createElement(
|
|
55
|
-
|
|
54
|
+
c,
|
|
56
55
|
{
|
|
57
56
|
...d,
|
|
58
57
|
onClick: i,
|
|
@@ -65,7 +64,7 @@ const h = n.forwardRef(
|
|
|
65
64
|
);
|
|
66
65
|
}
|
|
67
66
|
), x = {
|
|
68
|
-
icon:
|
|
67
|
+
icon: s
|
|
69
68
|
};
|
|
70
69
|
h.displayName = "KendoReactPivotGridHeaderCell";
|
|
71
70
|
export {
|
package/components/Row.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),o=require("@progress/kendo-react-common");function s(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=s(i),c=n.forwardRef((e,r)=>{const t=n.useRef(null),a=n.useRef(null);n.useImperativeHandle(t,()=>({element:a.current,props:e})),n.useImperativeHandle(r,()=>t.current);const l=o.useMouse(e,t);return n.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:o.classNames("k-pivotgrid-row",e.className)})});c.displayName="KendoReactPivotGridRow";exports.PivotGridRow=c;
|