@progress/kendo-react-grid 10.2.0-develop.1 → 10.2.0-develop.11
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/GridClientContextReader.js +1 -1
- package/GridClientContextReader.mjs +14 -13
- package/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +354 -353
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +387 -384
- package/cells/GridFilterCell.js +1 -1
- package/cells/GridFilterCell.mjs +4 -2
- package/columnMenu/GridColumnMenuWrapper.js +1 -1
- package/columnMenu/GridColumnMenuWrapper.mjs +4 -4
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/CommonDragLogic.js +1 -1
- package/drag/CommonDragLogic.mjs +1 -1
- package/index.d.mts +669 -91
- package/index.d.ts +669 -91
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
- package/utils/virtualColumns.js +8 -0
- package/utils/virtualColumns.mjs +32 -0
package/drag/CommonDragLogic.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),h=require("@progress/kendo-react-data-tools");function p(l){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const r in l)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(l,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:()=>l[r]})}}return e.default=l,Object.freeze(e)}const c=p(g);class d{constructor(e,r,i){this.refDragElementClue=c.createRef(),this.refDropElementClue=c.createRef(),this.columns=[],this.reorderable=!1,this.groupable=!1,this.startColumn=-1,this.startGroup=-1,this.currentColumn=-1,this.currentGroup=-1,this.groupPanelDivElement=null,this.refGroupPanelDiv=t=>{this.groupPanelDivElement=t&&t.children?t.children[0]:t},this.pressHandler=(t,n)=>{const s=this.getColumnIndex(t,n);if(this.startGroup=this.getGroupIndex(t),s>=0){const u=this.columns[s];(u.reorderable&&this.reorderable||u.groupable&&this.groupable)&&(this.startColumn=s)}},this.dragHandler=(t,n)=>{if(t.isTouch||t.originalEvent.preventDefault(),t.originalEvent.stopPropagation(),this.startColumn===-1&&this.startGroup===-1)return;this.currentColumn=this.getColumnIndex(t,n),this.currentGroup=this.isTargetGroupingContainer(t)?this.getCurrentGroupsLength:this.getGroupIndex(t);const s=!this.isValid();s&&(this.currentColumn=-1,this.currentGroup=-1);const u=this.currentColumn>=0?n.children[this.columns[this.currentColumn].index]:this.isTargetGroupingContainer(t)?t.originalEvent.target:this.groupPanelDivElement&&this.groupPanelDivElement.children[this.currentGroup];this.updateDragElementClue(t,n,u,s),this.updateDropElementClue(t,n,u,s)},this.releaseHandler=t=>{const n=this.startColumn,s=this.currentColumn,u=this.startGroup,o=this.currentGroup;t.originalEvent.preventDefault(),this.dropElementClue&&this.dropElementClue.setState({visible:!1}),this.dragElementClue&&this.dragElementClue.setState({visible:!1});const a=this.isValid();this.startColumn=this.startGroup=this.currentColumn=this.currentGroup=-1,a&&(n>=0&&s>=0?this.columnReorder(n,s,t.originalEvent):u>=0&&o>=0?this.groupReorder(u,o,t.originalEvent):n>=0&&o>=0&&this.columnToGroup(n,o,t.originalEvent))},this.columnReorder=e,this.groupReorder=r,this.columnToGroup=i}get dragClueRef(){return this.refDragElementClue}get dropClueRef(){return this.refDropElementClue}get getCurrentGroupsLength(){const e=this.groupPanelDivElement&&this.groupPanelDivElement.children;return e&&e.length||0}get dragElementClue(){return this.refDragElementClue.current}get dropElementClue(){return this.refDropElementClue.current}getColumnIndex(e,r){if(!r||r.parentElement===this.groupPanelDivElement)return-1;const i=h.getIndex(e,r);if(i===-1)return-1;for(let t=0;t<r.parentNode.children.length;t++)if(r.parentNode.children[t]===r)return this.columns.findIndex(n=>n.index===i&&n.depth===t);return-1}isTargetGroupingContainer(e){const r=e.originalEvent.target;return r.className.indexOf?r.className.indexOf("k-grouping-drop-container")!==-1:!1}getGroupIndex(e){return h.getIndex(e,this.groupPanelDivElement)}isValid(){return this.startGroup>=0?this.currentGroup>=0&&this.currentGroup!==this.startGroup:this.startColumn===-1?!1:this.currentGroup>=0?this.columns[this.startColumn].groupable===!0&&this.groupable===!0:this.reorderable===!0&&this.currentColumn>=0&&this.currentColumn!==this.startColumn&&this.columns[this.startColumn].reorderable===!0&&this.columns[this.currentColumn].parentIndex===this.columns[this.startColumn].parentIndex}updateDragElementClue(e,r,i,t){if(!this.dragElementClue)return;const n=this.startColumn>=0?r.children[this.columns[this.startColumn].index].innerText:r.innerText;this.dragElementClue.setState({visible:!0,top:e.pageY+10,left:e.pageX,innerText:n,status:t||!i?"k-i-cancel":"k-i-plus"})}updateDropElementClue(e,r,i,t){if(!this.dropElementClue)return;if(t||!i){this.dropElementClue.setState({visible:!1});return}const n=i.getBoundingClientRect(),u=(i.closest(".k-grouping-header")||i).getBoundingClientRect();let o=n.left+e.pageX-e.clientX-6;!this.isTargetGroupingContainer(e)&&(this.currentColumn>this.startColumn||this.currentGroup>this.startGroup&&this.startGroup!==-1)&&(o+=n.width);const a=u.top+e.pageY-e.clientY;this.dropElementClue.setState({visible:!0,top:a,left:o,height:this.currentColumn>=0?r.clientHeight:u.height})}}exports.CommonDragLogic=d;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),h=require("@progress/kendo-react-data-tools");function p(l){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const r in l)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(l,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:()=>l[r]})}}return e.default=l,Object.freeze(e)}const c=p(g);class d{constructor(e,r,i){this.refDragElementClue=c.createRef(),this.refDropElementClue=c.createRef(),this.columns=[],this.reorderable=!1,this.groupable=!1,this.startColumn=-1,this.startGroup=-1,this.currentColumn=-1,this.currentGroup=-1,this.groupPanelDivElement=null,this.refGroupPanelDiv=t=>{this.groupPanelDivElement=t&&t.children?t.children[0]:t},this.pressHandler=(t,n)=>{const s=this.getColumnIndex(t,n);if(this.startGroup=this.getGroupIndex(t),s>=0){const u=this.columns[s];(u.reorderable&&this.reorderable||u.groupable&&this.groupable)&&(this.startColumn=s)}},this.dragHandler=(t,n)=>{if(t.isTouch||t.originalEvent.preventDefault(),t.originalEvent.stopPropagation(),this.startColumn===-1&&this.startGroup===-1)return;this.currentColumn=this.getColumnIndex(t,n),this.currentGroup=this.isTargetGroupingContainer(t)?this.getCurrentGroupsLength:this.getGroupIndex(t);const s=!this.isValid();s&&(this.currentColumn=-1,this.currentGroup=-1);const u=this.currentColumn>=0?n.children[this.columns[this.currentColumn].index]:this.isTargetGroupingContainer(t)?t.originalEvent.target:this.groupPanelDivElement&&this.groupPanelDivElement.children[this.currentGroup];this.updateDragElementClue(t,n,u,s),this.updateDropElementClue(t,n,u,s)},this.releaseHandler=t=>{const n=this.startColumn,s=this.currentColumn,u=this.startGroup,o=this.currentGroup;t.originalEvent.preventDefault(),this.dropElementClue&&this.dropElementClue.setState({visible:!1}),this.dragElementClue&&this.dragElementClue.setState({visible:!1});const a=this.isValid();this.startColumn=this.startGroup=this.currentColumn=this.currentGroup=-1,a&&(n>=0&&s>=0?this.columnReorder(n,s,t.originalEvent):u>=0&&o>=0?this.groupReorder(u,o,t.originalEvent):n>=0&&o>=0&&this.columnToGroup(n,o,t.originalEvent))},this.columnReorder=e,this.groupReorder=r,this.columnToGroup=i}get dragClueRef(){return this.refDragElementClue}get dropClueRef(){return this.refDropElementClue}get getCurrentGroupsLength(){const e=this.groupPanelDivElement&&this.groupPanelDivElement.children;return e&&e.length||0}get dragElementClue(){return this.refDragElementClue.current}get dropElementClue(){return this.refDropElementClue.current}getColumnIndex(e,r){if(!r||r.parentElement===this.groupPanelDivElement)return-1;const i=h.getIndex(e,r);if(i===-1)return-1;for(let t=0;t<r.parentNode.children.length;t++)if(r.parentNode.children[t]===r)return this.columns.findIndex(n=>n.index===i&&n.depth===t);return-1}isTargetGroupingContainer(e){const r=e.originalEvent.target;return r.className.indexOf?r.className.indexOf("k-grouping-drop-container")!==-1:!1}getGroupIndex(e){return h.getIndex(e,this.groupPanelDivElement)}isValid(){return this.startGroup>=0?this.currentGroup>=0&&this.currentGroup!==this.startGroup:this.startColumn===-1?!1:this.currentGroup>=0?this.columns[this.startColumn].groupable===!0&&this.groupable===!0:this.reorderable===!0&&this.currentColumn>=0&&this.currentColumn!==this.startColumn&&this.columns[this.startColumn].reorderable===!0&&this.columns[this.currentColumn].parentIndex===this.columns[this.startColumn].parentIndex}updateDragElementClue(e,r,i,t){if(!this.dragElementClue)return;const n=this.startColumn>=0?r.children[this.columns[this.startColumn].index].innerText:r.innerText;this.dragElementClue.setState({visible:!0,top:e.pageY+10,left:e.pageX,innerText:n,status:t||!i?"k-i-cancel":"k-i-plus"})}updateDropElementClue(e,r,i,t){if(!this.dropElementClue)return;if(t||!i){this.dropElementClue.setState({visible:!1});return}const n=i.getBoundingClientRect(),u=(i.closest(".k-grouping-header")||i).getBoundingClientRect();let o=n.left+e.pageX-e.clientX-6;!this.isTargetGroupingContainer(e)&&(this.currentColumn>this.startColumn||this.currentGroup>this.startGroup&&this.startGroup!==-1)&&this.dir!=="rtl"&&(o+=n.width);const a=u.top+e.pageY-e.clientY;this.dropElementClue.setState({visible:!0,top:a,left:o,height:this.currentColumn>=0?r.clientHeight:u.height})}}exports.CommonDragLogic=d;
|
package/drag/CommonDragLogic.mjs
CHANGED
|
@@ -90,7 +90,7 @@ class g {
|
|
|
90
90
|
}
|
|
91
91
|
const r = n.getBoundingClientRect(), u = (n.closest(".k-grouping-header") || n).getBoundingClientRect();
|
|
92
92
|
let l = r.left + e.pageX - e.clientX - 6;
|
|
93
|
-
!this.isTargetGroupingContainer(e) && (this.currentColumn > this.startColumn || this.currentGroup > this.startGroup && this.startGroup !== -1) && (l += r.width);
|
|
93
|
+
!this.isTargetGroupingContainer(e) && (this.currentColumn > this.startColumn || this.currentGroup > this.startGroup && this.startGroup !== -1) && this.dir !== "rtl" && (l += r.width);
|
|
94
94
|
const o = u.top + e.pageY - e.clientY;
|
|
95
95
|
this.dropElementClue.setState({
|
|
96
96
|
visible: !0,
|