@progress/kendo-react-grid 9.0.0-develop.2 → 9.0.0-develop.21
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/Grid.js +1 -1
- package/Grid.mjs +927 -1042
- package/GridNoRecords.js +1 -1
- package/GridNoRecords.mjs +7 -14
- package/GridToolbar.js +1 -1
- package/GridToolbar.mjs +23 -28
- package/README.md +34 -33
- package/VirtualScroll.js +1 -1
- package/VirtualScroll.mjs +63 -58
- package/VirtualScrollFixed.js +1 -1
- package/VirtualScrollFixed.mjs +16 -14
- package/cells/GridCell.mjs +6 -3
- package/cells/GridDetailCell.mjs +6 -3
- package/cells/GridEditCell.mjs +10 -38
- package/cells/GridFilterCell.js +1 -1
- package/cells/GridFilterCell.mjs +99 -113
- package/cells/GridGroupCell.mjs +24 -30
- package/cells/GridHierarchyCell.mjs +2 -13
- package/cells/GridSelectionCell.mjs +3 -24
- package/columnMenu/GridColumnMenuCheckboxFilter.js +1 -1
- package/columnMenu/GridColumnMenuCheckboxFilter.mjs +132 -184
- package/columnMenu/GridColumnMenuFilter.js +1 -1
- package/columnMenu/GridColumnMenuFilter.mjs +127 -170
- package/columnMenu/GridColumnMenuFilterCell.js +1 -1
- package/columnMenu/GridColumnMenuFilterCell.mjs +42 -61
- package/columnMenu/GridColumnMenuFilterUI.js +1 -1
- package/columnMenu/GridColumnMenuFilterUI.mjs +15 -24
- package/columnMenu/GridColumnMenuGroup.js +1 -1
- package/columnMenu/GridColumnMenuGroup.mjs +29 -40
- package/columnMenu/GridColumnMenuItemContent.js +1 -1
- package/columnMenu/GridColumnMenuItemContent.mjs +7 -20
- package/columnMenu/GridColumnMenuItemGroup.js +1 -1
- package/columnMenu/GridColumnMenuItemGroup.mjs +7 -20
- package/columnMenu/GridColumnMenuSort.js +1 -1
- package/columnMenu/GridColumnMenuSort.mjs +42 -53
- package/columnMenu/GridColumnMenuWrapper.mjs +6 -18
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/ColumnDraggable.js +1 -1
- package/drag/ColumnDraggable.mjs +34 -33
- package/drag/ColumnResize.js +1 -1
- package/drag/ColumnResize.mjs +36 -44
- package/drag/GroupingIndicator.js +1 -1
- package/drag/GroupingIndicator.mjs +51 -83
- package/filterCommon.mjs +1 -3
- package/footer/Footer.js +1 -1
- package/footer/Footer.mjs +40 -57
- package/footer/FooterRow.mjs +6 -5
- package/header/FilterRow.js +1 -1
- package/header/FilterRow.mjs +69 -82
- package/header/GridHeaderSelectionCell.js +1 -1
- package/header/GridHeaderSelectionCell.mjs +28 -35
- package/header/GroupPanel.js +1 -1
- package/header/GroupPanel.mjs +43 -49
- package/header/Header.js +1 -1
- package/header/Header.mjs +70 -74
- package/header/HeaderRow.mjs +24 -27
- package/index.d.mts +259 -724
- package/index.d.ts +259 -724
- package/index.js +1 -1
- package/index.mjs +78 -80
- package/messages/index.mjs +4 -1
- package/package-metadata.mjs +1 -1
- package/package.json +11 -11
- package/rows/GridDetailRow.js +1 -1
- package/rows/GridDetailRow.mjs +2 -10
- package/rows/GridRow.mjs +10 -8
- package/utils/index.js +1 -1
- package/utils/index.mjs +35 -39
package/GridNoRecords.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@progress/kendo-react-intl"),e=require("./messages/index.js"),o=r=>{const n=t.useLocalization();return r.children||n.toLanguageString(e.noRecords,e.messages[e.noRecords])};o.displayName="KendoReactGridNoRecords";exports.GridNoRecords=o;
|
package/GridNoRecords.mjs
CHANGED
|
@@ -6,20 +6,13 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
render() {
|
|
17
|
-
return this.props.children || i(this).toLanguageString(o, a[o]);
|
|
18
|
-
}
|
|
9
|
+
import { useLocalization as i } from "@progress/kendo-react-intl";
|
|
10
|
+
import { noRecords as o, messages as t } from "./messages/index.mjs";
|
|
11
|
+
const n = (e) => {
|
|
12
|
+
const r = i();
|
|
13
|
+
return e.children || r.toLanguageString(o, t[o]);
|
|
19
14
|
};
|
|
20
|
-
|
|
21
|
-
let e = t;
|
|
22
|
-
s(e);
|
|
15
|
+
n.displayName = "KendoReactGridNoRecords";
|
|
23
16
|
export {
|
|
24
|
-
|
|
17
|
+
n as GridNoRecords
|
|
25
18
|
};
|
package/GridToolbar.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),r=require("@progress/kendo-react-common");function s(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:()=>o[t]})}}return e.default=o,Object.freeze(e)}const b=s(i),l=o=>{const{size:e,className:t,ariaLabel:a,ariaControls:n,children:c}=o;return b.createElement("div",{className:r.classNames("k-toolbar k-grid-toolbar k-toolbar-solid",{"k-toolbar-md":!e,[`k-toolbar-${r.kendoThemeMaps.sizeMap[e]||e}`]:e},t),"aria-label":a,"aria-controls":n,role:"toolbar"},c)};l.displayName="KendoReactGridToolbar";exports.GridToolbar=l;
|
package/GridToolbar.mjs
CHANGED
|
@@ -6,34 +6,29 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { classNames as
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
this.props.children
|
|
32
|
-
);
|
|
33
|
-
}
|
|
9
|
+
import * as s from "react";
|
|
10
|
+
import { classNames as i, kendoThemeMaps as c } from "@progress/kendo-react-common";
|
|
11
|
+
const m = (o) => {
|
|
12
|
+
const { size: a, className: r, ariaLabel: e, ariaControls: l, children: t } = o;
|
|
13
|
+
return /* @__PURE__ */ s.createElement(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: i(
|
|
17
|
+
"k-toolbar k-grid-toolbar k-toolbar-solid",
|
|
18
|
+
{
|
|
19
|
+
"k-toolbar-md": !a,
|
|
20
|
+
[`k-toolbar-${c.sizeMap[a] || a}`]: a
|
|
21
|
+
},
|
|
22
|
+
r
|
|
23
|
+
),
|
|
24
|
+
"aria-label": e,
|
|
25
|
+
"aria-controls": l,
|
|
26
|
+
role: "toolbar"
|
|
27
|
+
},
|
|
28
|
+
t
|
|
29
|
+
);
|
|
34
30
|
};
|
|
35
|
-
|
|
36
|
-
let e = s;
|
|
31
|
+
m.displayName = "KendoReactGridToolbar";
|
|
37
32
|
export {
|
|
38
|
-
|
|
33
|
+
m as GridToolbar
|
|
39
34
|
};
|
package/README.md
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
# KendoReact Data Grid (Table) Component for React
|
|
6
6
|
|
|
7
7
|
> **Important**
|
|
8
|
-
>
|
|
9
|
-
>
|
|
10
|
-
>
|
|
11
|
-
>
|
|
8
|
+
>
|
|
9
|
+
> - This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)—a commercial UI library.
|
|
10
|
+
> - You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid).
|
|
11
|
+
> - To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid).
|
|
12
|
+
> - The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team!
|
|
12
13
|
>
|
|
13
14
|
> [Start using KendoReact](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid) and speed up your development process!
|
|
14
15
|
|
|
@@ -22,45 +23,45 @@ The Grid is fully accessible and delivers support for WCAG 2.1, Section 508, and
|
|
|
22
23
|
|
|
23
24
|
Among the many features which the KendoReact Data Grid delivers are:
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
26
|
+
- [Paging](https://www.telerik.com/kendo-react-ui/components/grid/paging/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)—You also have the option to add a pager for easier navigation.
|
|
27
|
+
- [Sorting](https://www.telerik.com/kendo-react-ui/components/grid/sorting/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)—Apart from the sorting and unsorting options of multiple columns, you can also pre-sort the data records of the Grid.
|
|
28
|
+
- [Filtering](https://www.telerik.com/kendo-react-ui/components/grid/filtering/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)—Including additional cell customization options.
|
|
29
|
+
- [Grouping](https://www.telerik.com/kendo-react-ui/components/grid/grouping/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-native)—Out of the box, you can apply dynamic grouping to the data Grid records, set grouping by aggregate values, and in the same way as with the sorting functionality, pre-group the data.
|
|
30
|
+
- [Editing](https://www.telerik.com/kendo-react-ui/components/grid/editing/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)—Depending on your users' requirements, you can opt for the inline or the in-cell edit modes, provide editing from an external form or Redux Form and further customize the Grid.
|
|
31
|
+
- [Row selection](https://www.telerik.com/kendo-react-ui/components/grid/selection/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)—You can additionally configure it by enabling or disabling the checkbox and row selection options.
|
|
32
|
+
- [Export to PDF](https://www.telerik.com/kendo-react-ui/components/grid/pdf-export/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid) and [Excel](https://www.telerik.com/kendo-react-ui/components/grid/excel-export/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)—When implementing the Grid export to PDF, you can set the fonts, the exact portion and layout of the exported content, also customize the columns and other specifics of the output result. When exporting to Excel, you can export specific data and customize the exported columns.
|
|
33
|
+
- [Custom renderer](https://www.telerik.com/kendo-react-ui/components/grid/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)—Based on a value, you can also use conditional formatting (highlight a data table cell).
|
|
34
|
+
- [Locked columns](https://www.telerik.com/kendo-react-ui/components/grid/columns/locked/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)—When your Grid has to display large amounts of data, the frozen columns feature enables you to lock any of the Grid columns by just setting the locked column property.
|
|
35
|
+
- [Virtualization](https://www.telerik.com/kendo-react-ui/components/grid/scroll-modes/virtual/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)—The Grid supports virtualization of both column and row data. This feature boosts the performance of the component when displaying large data tables as it dynamically renders only a portion of the rows and the columns.
|
|
36
|
+
- [Column reordering](https://www.telerik.com/kendo-react-ui/components/grid/columns/reordering/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)—Reordering can be enabled for any column and is seamlessly integrated with the available Grid features, including locked columns.
|
|
37
|
+
- [Column resizing](https://www.telerik.com/kendo-react-ui/components/grid/columns/resizing/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)—Resizing takes place real-time but can also be controlled from the outside.
|
|
38
|
+
- [Detail templates](https://www.telerik.com/kendo-react-ui/components/grid/advanced-features/detail/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)—The detail rows of the Grid provide additional details about a particular row of table data through expanding or collapsing its content.
|
|
39
|
+
- [Globalization](https://www.telerik.com/kendo-react-ui/components/grid/globalization/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)—By using the available globalization options in KendoReact, you can translate the Grid messages by adapting them to specific culture locales.
|
|
40
|
+
- [Theme support](https://www.telerik.com/kendo-react-ui/components/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)—The KendoReact Grid, as well as all 100+ components in the KendoReact suite, are styled in three polished themes (Bootstrap, Material, and Default) and can be further customized to match your specific design guidelines.
|
|
40
41
|
|
|
41
42
|
## Support Options
|
|
42
43
|
|
|
43
44
|
For any issues you might encounter while working with the KendoReact Grid, use any of the available support channels:
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
- Industry-leading technical support—KendoReact paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated KendoReact support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid).
|
|
47
|
+
- Product forums—The [KendoReact forums](https://www.telerik.com/forums/kendo-ui-react?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid) are part of the free support you can get from the community and from the KendoReact team.
|
|
48
|
+
- Feedback portal—The [KendoReact feedback portal](https://feedback.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid) is where you can request and vote for new features to be added.
|
|
48
49
|
|
|
49
50
|
## Resources
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
- [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)
|
|
53
|
+
- [Get Started with the KendoReact Data Grid](https://www.telerik.com/kendo-react-ui/components/grid/get-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)
|
|
54
|
+
- [API Reference of the KendoReact Data Grid](https://www.telerik.com/kendo-react-ui/components/grid/api/GridProps/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)
|
|
55
|
+
- [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)
|
|
56
|
+
- [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)
|
|
57
|
+
- [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)
|
|
58
|
+
- [KendoReact pricing and licensing](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)
|
|
59
|
+
- [Changelog](https://www.telerik.com/kendo-react-ui/components/changelogs/ui-for-react/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)
|
|
59
60
|
|
|
60
61
|
High-level component overview pages
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
- [React Data Grid Component](https://www.telerik.com/kendo-react-ui/grid)
|
|
63
64
|
|
|
64
|
-
|
|
65
|
+
_Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
|
|
65
66
|
|
|
66
|
-
|
|
67
|
+
_Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._
|
package/VirtualScroll.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react");function g(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:()=>r[t]})}}return i.default=r,Object.freeze(i)}const u=g(p);class f{constructor(i){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=null,this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=null,this.tableTransform="",this.prevScrollPos=0,this.tableTranslate=0,this.scrollSyncing=!1,this.reactVersion=Number.parseFloat(u.version),this.topItems=(t,s)=>{if(!this.container||s)return{topItemsCount:0,topItemsHeight:0};const l=this.container.clientHeight,e=Math.ceil(l/t[0].line),n=Math.ceil((t.length-e)/2);let o=0;for(let a=0;a<n;a++)o+=t[a].line+t[a].acc;return{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:e+e/2}},this.horizontalScrollbarHeight=()=>this.container?this.container.offsetHeight-this.container.clientHeight:0,i&&(this.topCacheCount=4,this.attendedSkip=-this.topCacheCount),this.scrollHandler=this.scrollHandler.bind(this)}get container(){var i;return(i=this.containerRef)==null?void 0:i.current}get rowHeights(){var l,e;const i=[],t=((l=this.tableBodyRef)==null?void 0:l.current)&&((e=this.tableBodyRef)==null?void 0:e.current.children)||[];let s=0;for(let n=0;n<t.length;n++){if(t[n].className.indexOf("k-grouping-row")>-1){s+=t[n].scrollHeight;continue}t[n].className.indexOf("k-detail-row")>-1?i[i.length-1].line+=t[n].scrollHeight:(i.push({line:t[n].scrollHeight,acc:s}),s=0)}return i}changePage(i,t){this.attendedSkip=i-this.topCacheCount,this.PageChange&&this.PageChange({skip:Math.max(0,i-this.topCacheCount),take:this.pageSize},t)}translate(i,t){this.tableTranslate=i,this.scrollableVirtual&&this.table&&(this.reactVersion<=17||t?this.table.style.transform="translateY("+i+"px)":this.tableTransform="translateY("+i+"px)")}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}localScrollUp(i){if(!this.container)return;const t=this.rowHeights,s=this.container.scrollTop;let l=this.tableTranslate,e=0;const{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:a}=this.topItems(t,!!this.topCacheCount),h=s-l;if(!(h>o||t.length<=a)){for(;e<this.topCacheCount+this.attendedSkip-this.realSkip+n&&this.propsSkip-e>0&&!(l+(t[t.length-1-e].line+t[t.length-1-e].acc)+h<=s);)l-=t[t.length-1-e].line+t[t.length-1-e].acc,e++;if(e===0&&this.topCacheCount===0&&this.attendedSkip>0&&(l=Math.max(l-t[0].line,0),e=1),this.propsSkip-e<=0&&l>s){this.translate(0),this.changePage(0,i),this.container.scrollTop=0;return}if(l>s&&(l=s),l!==this.tableTranslate){this.translate(Math.max(0,l-o));const c=Math.max(0,this.propsSkip-e-n);this.changePage(c,i)}}}localScrollDown(i){if(!this.container)return;const t=this.rowHeights,s=this.container.scrollTop;let l=this.tableTranslate,e=0;const{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:a}=this.topItems(t,!!this.topCacheCount);for(;e<t.length-this.topCacheCount&&!(l+t[e].line+t[e].acc>s);)l+=t[e].line+t[e].acc,e++;n>this.propsSkip+e||t.length<=a||(e>=t.length-this.topCacheCount&&this.propsSkip+e>=this.total?(this.translate(l-o),this.changePage(this.total-1-n,i)):l!==this.tableTranslate&&this.propsSkip+e-n!==this.propsSkip&&(this.translate(l-o),this.changePage(this.propsSkip+e-n,i)))}scrollNonStrict(i){const t=this.total*this.prevScrollPos/this.containerHeight;let s=Math.floor(t);s>=this.total&&(s=this.total-1);const l=Math.min(t-s,1);let e=0;const n=s-this.propsSkip,o=this.rowHeights;n>=0&&n<=1?e=-((o[0].line+o[0].acc)*l):n===-1&&(e=-((o[o.length-1].line+o[o.length-1].acc)*l));const{topItemsCount:a,topItemsHeight:h}=this.topItems(o,!!this.topCacheCount);this.translate(Math.max(0,e-h-this.horizontalScrollbarHeight()+this.containerHeight*t/this.total)),this.changePage(s-a,i)}scrollHandler(i){if(!this.scrollableVirtual)return;if(this.scrollSyncing||!this.container||!this.table){this.scrollSyncing=!1;return}const t=this.container.scrollTop,s=this.prevScrollPos;if(this.prevScrollPos=t,this.askedSkip!==void 0){this.translate(this.containerHeight*this.askedSkip/this.total),this.changePage(this.askedSkip,i),this.prevScrollPos=t,this.askedSkip=void 0;return}t-s<0&&t>this.tableTranslate-this.table.scrollHeight/10?this.localScrollUp(i):t-s>0&&t<this.tableTranslate+this.table.scrollHeight*2/3?this.localScrollDown(i):this.scrollNonStrict(i),this.prevScrollPos=t}}exports.VirtualScroll=f;
|
package/VirtualScroll.mjs
CHANGED
|
@@ -6,109 +6,114 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
9
|
+
import * as c from "react";
|
|
10
10
|
class g {
|
|
11
|
-
constructor(
|
|
12
|
-
this.table = null, this.containerHeight = 0, this.topCacheCount = 0, this.attendedSkip = 0, this.propsSkip = 0, this.total = 0, this.scrollableVirtual = !1, this.realSkip = 0, this.pageSize = 0, this.PageChange = null, this.tableBodyRef =
|
|
11
|
+
constructor(i) {
|
|
12
|
+
this.table = null, this.containerHeight = 0, this.topCacheCount = 0, this.attendedSkip = 0, this.propsSkip = 0, this.total = 0, this.scrollableVirtual = !1, this.realSkip = 0, this.pageSize = 0, this.PageChange = null, this.tableBodyRef = null, this.fixedScroll = !1, this.askedSkip = void 0, this.containerRef = null, this.tableTransform = "", this.prevScrollPos = 0, this.tableTranslate = 0, this.scrollSyncing = !1, this.reactVersion = Number.parseFloat(c.version), this.topItems = (t, l) => {
|
|
13
13
|
if (!this.container || l)
|
|
14
14
|
return { topItemsCount: 0, topItemsHeight: 0 };
|
|
15
|
-
const
|
|
16
|
-
let
|
|
17
|
-
for (let a = 0; a <
|
|
18
|
-
|
|
15
|
+
const s = this.container.clientHeight, e = Math.ceil(s / t[0].line), o = Math.ceil((t.length - e) / 2);
|
|
16
|
+
let n = 0;
|
|
17
|
+
for (let a = 0; a < o; a++)
|
|
18
|
+
n += t[a].line + t[a].acc;
|
|
19
19
|
return {
|
|
20
|
-
topItemsCount:
|
|
21
|
-
topItemsHeight:
|
|
20
|
+
topItemsCount: o,
|
|
21
|
+
topItemsHeight: n,
|
|
22
22
|
itemsNeededOnScreen: e + e / 2
|
|
23
23
|
};
|
|
24
|
-
}, this.horizontalScrollbarHeight = () => this.container ? this.container.offsetHeight - this.container.clientHeight : 0,
|
|
24
|
+
}, this.horizontalScrollbarHeight = () => this.container ? this.container.offsetHeight - this.container.clientHeight : 0, i && (this.topCacheCount = 4, this.attendedSkip = -this.topCacheCount), this.scrollHandler = this.scrollHandler.bind(this);
|
|
25
25
|
}
|
|
26
26
|
get container() {
|
|
27
|
-
|
|
27
|
+
var i;
|
|
28
|
+
return (i = this.containerRef) == null ? void 0 : i.current;
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
31
|
* @return - The row heights in an array.
|
|
31
32
|
*/
|
|
32
33
|
get rowHeights() {
|
|
33
|
-
|
|
34
|
+
var s, e;
|
|
35
|
+
const i = [], t = ((s = this.tableBodyRef) == null ? void 0 : s.current) && ((e = this.tableBodyRef) == null ? void 0 : e.current.children) || [];
|
|
34
36
|
let l = 0;
|
|
35
|
-
for (let
|
|
36
|
-
if (t[
|
|
37
|
-
l += t[
|
|
37
|
+
for (let o = 0; o < t.length; o++) {
|
|
38
|
+
if (t[o].className.indexOf("k-grouping-row") > -1) {
|
|
39
|
+
l += t[o].scrollHeight;
|
|
38
40
|
continue;
|
|
39
41
|
}
|
|
40
|
-
t[
|
|
41
|
-
line: t[
|
|
42
|
+
t[o].className.indexOf("k-detail-row") > -1 ? i[i.length - 1].line += t[o].scrollHeight : (i.push({
|
|
43
|
+
line: t[o].scrollHeight,
|
|
42
44
|
acc: l
|
|
43
45
|
}), l = 0);
|
|
44
46
|
}
|
|
45
|
-
return
|
|
47
|
+
return i;
|
|
46
48
|
}
|
|
47
|
-
changePage(
|
|
48
|
-
this.attendedSkip =
|
|
49
|
+
changePage(i, t) {
|
|
50
|
+
this.attendedSkip = i - this.topCacheCount, this.PageChange && this.PageChange(
|
|
49
51
|
{
|
|
50
|
-
skip: Math.max(0,
|
|
52
|
+
skip: Math.max(0, i - this.topCacheCount),
|
|
51
53
|
take: this.pageSize
|
|
52
54
|
},
|
|
53
55
|
t
|
|
54
56
|
);
|
|
55
57
|
}
|
|
56
|
-
translate(
|
|
57
|
-
this.tableTranslate =
|
|
58
|
+
translate(i, t) {
|
|
59
|
+
this.tableTranslate = i, this.scrollableVirtual && this.table && (this.reactVersion <= 17 || t ? this.table.style.transform = "translateY(" + i + "px)" : this.tableTransform = "translateY(" + i + "px)");
|
|
58
60
|
}
|
|
59
61
|
reset() {
|
|
60
62
|
this.scrollSyncing = !0, !this.fixedScroll && (this.container && (this.container.scrollTop = 0), this.translate(0, !0));
|
|
61
63
|
}
|
|
62
|
-
localScrollUp(
|
|
64
|
+
localScrollUp(i) {
|
|
63
65
|
if (!this.container)
|
|
64
66
|
return;
|
|
65
67
|
const t = this.rowHeights, l = this.container.scrollTop;
|
|
66
|
-
let
|
|
67
|
-
const {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
this.translate(0), this.changePage(0, s), this.container.scrollTop = 0;
|
|
68
|
+
let s = this.tableTranslate, e = 0;
|
|
69
|
+
const { topItemsCount: o, topItemsHeight: n, itemsNeededOnScreen: a } = this.topItems(
|
|
70
|
+
t,
|
|
71
|
+
!!this.topCacheCount
|
|
72
|
+
), h = l - s;
|
|
73
|
+
if (!(h > n || t.length <= a)) {
|
|
74
|
+
for (; e < this.topCacheCount + this.attendedSkip - this.realSkip + o && this.propsSkip - e > 0 && !(s + (t[t.length - 1 - e].line + t[t.length - 1 - e].acc) + h <= l); )
|
|
75
|
+
s -= t[t.length - 1 - e].line + t[t.length - 1 - e].acc, e++;
|
|
76
|
+
if (e === 0 && this.topCacheCount === 0 && this.attendedSkip > 0 && (s = Math.max(s - t[0].line, 0), e = 1), this.propsSkip - e <= 0 && s > l) {
|
|
77
|
+
this.translate(0), this.changePage(0, i), this.container.scrollTop = 0;
|
|
77
78
|
return;
|
|
78
79
|
}
|
|
79
|
-
if (
|
|
80
|
-
this.translate(Math.max(0,
|
|
81
|
-
const
|
|
82
|
-
this.changePage(
|
|
80
|
+
if (s > l && (s = l), s !== this.tableTranslate) {
|
|
81
|
+
this.translate(Math.max(0, s - n));
|
|
82
|
+
const r = Math.max(0, this.propsSkip - e - o);
|
|
83
|
+
this.changePage(r, i);
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
|
-
localScrollDown(
|
|
87
|
+
localScrollDown(i) {
|
|
87
88
|
if (!this.container)
|
|
88
89
|
return;
|
|
89
90
|
const t = this.rowHeights, l = this.container.scrollTop;
|
|
90
|
-
let
|
|
91
|
-
const {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
n > this.propsSkip + e || t.length <= a || (e >= t.length - this.topCacheCount && this.propsSkip + e >= this.total ? (this.translate(i - o), this.changePage(this.total - 1 - n, s)) : i !== this.tableTranslate && this.propsSkip + e - n !== this.propsSkip && (this.translate(i - o), this.changePage(this.propsSkip + e - n, s)));
|
|
91
|
+
let s = this.tableTranslate, e = 0;
|
|
92
|
+
const { topItemsCount: o, topItemsHeight: n, itemsNeededOnScreen: a } = this.topItems(
|
|
93
|
+
t,
|
|
94
|
+
!!this.topCacheCount
|
|
95
|
+
);
|
|
96
|
+
for (; e < t.length - this.topCacheCount && !(s + t[e].line + t[e].acc > l); )
|
|
97
|
+
s += t[e].line + t[e].acc, e++;
|
|
98
|
+
o > this.propsSkip + e || t.length <= a || (e >= t.length - this.topCacheCount && this.propsSkip + e >= this.total ? (this.translate(s - n), this.changePage(this.total - 1 - o, i)) : s !== this.tableTranslate && this.propsSkip + e - o !== this.propsSkip && (this.translate(s - n), this.changePage(this.propsSkip + e - o, i)));
|
|
99
99
|
}
|
|
100
|
-
scrollNonStrict(
|
|
100
|
+
scrollNonStrict(i) {
|
|
101
101
|
const t = this.total * this.prevScrollPos / this.containerHeight;
|
|
102
102
|
let l = Math.floor(t);
|
|
103
103
|
l >= this.total && (l = this.total - 1);
|
|
104
|
-
const
|
|
104
|
+
const s = Math.min(t - l, 1);
|
|
105
105
|
let e = 0;
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
const { topItemsCount: a, topItemsHeight: h } = this.topItems(
|
|
109
|
-
this.translate(
|
|
106
|
+
const o = l - this.propsSkip, n = this.rowHeights;
|
|
107
|
+
o >= 0 && o <= 1 ? e = -((n[0].line + n[0].acc) * s) : o === -1 && (e = -((n[n.length - 1].line + n[n.length - 1].acc) * s));
|
|
108
|
+
const { topItemsCount: a, topItemsHeight: h } = this.topItems(n, !!this.topCacheCount);
|
|
109
|
+
this.translate(
|
|
110
|
+
Math.max(
|
|
111
|
+
0,
|
|
112
|
+
e - h - this.horizontalScrollbarHeight() + this.containerHeight * t / this.total
|
|
113
|
+
)
|
|
114
|
+
), this.changePage(l - a, i);
|
|
110
115
|
}
|
|
111
|
-
scrollHandler(
|
|
116
|
+
scrollHandler(i) {
|
|
112
117
|
if (!this.scrollableVirtual)
|
|
113
118
|
return;
|
|
114
119
|
if (this.scrollSyncing || !this.container || !this.table) {
|
|
@@ -117,10 +122,10 @@ class g {
|
|
|
117
122
|
}
|
|
118
123
|
const t = this.container.scrollTop, l = this.prevScrollPos;
|
|
119
124
|
if (this.prevScrollPos = t, this.askedSkip !== void 0) {
|
|
120
|
-
this.translate(this.containerHeight * this.askedSkip / this.total), this.changePage(this.askedSkip,
|
|
125
|
+
this.translate(this.containerHeight * this.askedSkip / this.total), this.changePage(this.askedSkip, i), this.prevScrollPos = t, this.askedSkip = void 0;
|
|
121
126
|
return;
|
|
122
127
|
}
|
|
123
|
-
t - l < 0 && t > this.tableTranslate - this.table.scrollHeight / 10 ? this.localScrollUp(
|
|
128
|
+
t - l < 0 && t > this.tableTranslate - this.table.scrollHeight / 10 ? this.localScrollUp(i) : t - l > 0 && t < this.tableTranslate + this.table.scrollHeight * 2 / 3 ? this.localScrollDown(i) : this.scrollNonStrict(i), this.prevScrollPos = t;
|
|
124
129
|
}
|
|
125
130
|
}
|
|
126
131
|
export {
|
package/VirtualScrollFixed.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),g=require("./utils/index.js");function u(s){const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),g=require("./utils/index.js");function u(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(t,e,a.get?a:{enumerable:!0,get:()=>s[e]})}}return t.default=s,Object.freeze(t)}const p=u(d);class S{constructor(t){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=null,this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=null,this.tableTransform="",this.scrollSyncing=!1,this.lastLoaded=0,this.firstLoaded=0,this.lastScrollTop=0,this.reactVersion=Number.parseFloat(p.version),this.firstLoaded=this.pageSize,this.lastLoaded=this.realSkip+this.pageSize,this.scrollHandler=this.scrollHandler.bind(this)}get container(){var t;return((t=this.containerRef)==null?void 0:t.current)||void 0}translate(t,e){this.scrollableVirtual&&this.table&&(g.firefox||this.reactVersion<=17||e?this.table.style.transform="translateY("+t+"px)":this.tableTransform="translateY("+t+"px)")}changePage(t,e){this.PageChange&&this.PageChange({skip:Math.max(0,t),take:this.pageSize},e)}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}scrollHandler(t){var o;if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!((o=this.containerRef)!=null&&o.current))return;if(this.scrollSyncing){this.scrollSyncing=!1;return}const e=this.container.scrollTop,a=this.lastScrollTop>=e,n=!a;this.lastScrollTop=e;let i=this.rowHeightService.index(e),l=this.rowHeightService.offset(i);const{offsetHeight:h}=this.containerRef.current,c=this.rowHeightService.index(e+h);if(n&&c>=this.lastLoaded&&this.lastLoaded<this.total){const r=i+this.pageSize-this.total;r>0&&(i=i-r,l=this.rowHeightService.offset(i)),this.firstLoaded=i,this.translate(l);const f=this.firstLoaded+this.pageSize;this.lastLoaded=Math.min(f,this.total),this.changePage(this.firstLoaded,t)}else if(a&&i<this.firstLoaded){const r=Math.floor(this.pageSize*.3);this.firstLoaded=Math.max(i-r,0),this.translate(this.rowHeightService.offset(this.firstLoaded)),this.lastLoaded=Math.min(this.firstLoaded+this.pageSize,this.total),this.changePage(this.firstLoaded,t)}}}exports.VirtualScrollFixed=S;
|
package/VirtualScrollFixed.mjs
CHANGED
|
@@ -6,17 +6,18 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { firefox as
|
|
11
|
-
class
|
|
9
|
+
import * as f from "react";
|
|
10
|
+
import { firefox as d } from "./utils/index.mjs";
|
|
11
|
+
class S {
|
|
12
12
|
constructor(t) {
|
|
13
|
-
this.table = null, this.containerHeight = 0, this.topCacheCount = 0, this.attendedSkip = 0, this.propsSkip = 0, this.total = 0, this.scrollableVirtual = !1, this.realSkip = 0, this.pageSize = 0, this.PageChange = null, this.tableBodyRef =
|
|
13
|
+
this.table = null, this.containerHeight = 0, this.topCacheCount = 0, this.attendedSkip = 0, this.propsSkip = 0, this.total = 0, this.scrollableVirtual = !1, this.realSkip = 0, this.pageSize = 0, this.PageChange = null, this.tableBodyRef = null, this.fixedScroll = !1, this.askedSkip = void 0, this.containerRef = null, this.tableTransform = "", this.scrollSyncing = !1, this.lastLoaded = 0, this.firstLoaded = 0, this.lastScrollTop = 0, this.reactVersion = Number.parseFloat(f.version), this.firstLoaded = this.pageSize, this.lastLoaded = this.realSkip + this.pageSize, this.scrollHandler = this.scrollHandler.bind(this);
|
|
14
14
|
}
|
|
15
15
|
get container() {
|
|
16
|
-
|
|
16
|
+
var t;
|
|
17
|
+
return ((t = this.containerRef) == null ? void 0 : t.current) || void 0;
|
|
17
18
|
}
|
|
18
19
|
translate(t, i) {
|
|
19
|
-
this.scrollableVirtual && this.table && (
|
|
20
|
+
this.scrollableVirtual && this.table && (d || this.reactVersion <= 17 || i ? this.table.style.transform = "translateY(" + t + "px)" : this.tableTransform = "translateY(" + t + "px)");
|
|
20
21
|
}
|
|
21
22
|
changePage(t, i) {
|
|
22
23
|
this.PageChange && this.PageChange({ skip: Math.max(0, t), take: this.pageSize }, i);
|
|
@@ -25,27 +26,28 @@ class p {
|
|
|
25
26
|
this.scrollSyncing = !0, !this.fixedScroll && (this.container && (this.container.scrollTop = 0), this.translate(0, !0));
|
|
26
27
|
}
|
|
27
28
|
scrollHandler(t) {
|
|
28
|
-
|
|
29
|
+
var h;
|
|
30
|
+
if (!this.scrollableVirtual || !this.container || !this.table || !this.rowHeightService || !((h = this.containerRef) != null && h.current))
|
|
29
31
|
return;
|
|
30
32
|
if (this.scrollSyncing) {
|
|
31
33
|
this.scrollSyncing = !1;
|
|
32
34
|
return;
|
|
33
35
|
}
|
|
34
|
-
const i = this.container.scrollTop,
|
|
36
|
+
const i = this.container.scrollTop, a = this.lastScrollTop >= i, l = !a;
|
|
35
37
|
this.lastScrollTop = i;
|
|
36
|
-
let e = this.rowHeightService.index(i),
|
|
37
|
-
const { offsetHeight:
|
|
38
|
-
if (
|
|
38
|
+
let e = this.rowHeightService.index(i), r = this.rowHeightService.offset(e);
|
|
39
|
+
const { offsetHeight: o } = this.containerRef.current, n = this.rowHeightService.index(i + o);
|
|
40
|
+
if (l && n >= this.lastLoaded && this.lastLoaded < this.total) {
|
|
39
41
|
const s = e + this.pageSize - this.total;
|
|
40
|
-
s > 0 && (e = e - s,
|
|
42
|
+
s > 0 && (e = e - s, r = this.rowHeightService.offset(e)), this.firstLoaded = e, this.translate(r);
|
|
41
43
|
const c = this.firstLoaded + this.pageSize;
|
|
42
44
|
this.lastLoaded = Math.min(c, this.total), this.changePage(this.firstLoaded, t);
|
|
43
|
-
} else if (
|
|
45
|
+
} else if (a && e < this.firstLoaded) {
|
|
44
46
|
const s = Math.floor(this.pageSize * 0.3);
|
|
45
47
|
this.firstLoaded = Math.max(e - s, 0), this.translate(this.rowHeightService.offset(this.firstLoaded)), this.lastLoaded = Math.min(this.firstLoaded + this.pageSize, this.total), this.changePage(this.firstLoaded, t);
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
export {
|
|
50
|
-
|
|
52
|
+
S as VirtualScrollFixed
|
|
51
53
|
};
|
package/cells/GridCell.mjs
CHANGED
|
@@ -14,9 +14,12 @@ import { GRID_COL_INDEX_ATTRIBUTE as I } from "../constants/index.mjs";
|
|
|
14
14
|
import { useUnstyled as x, uGrid as N, classNames as T } from "@progress/kendo-react-common";
|
|
15
15
|
const w = (e) => {
|
|
16
16
|
let n = null;
|
|
17
|
-
const f = g(), d = x(), s = d && d.uGrid ? d.uGrid : N, m = y(e.id), u = i.useCallback(
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const f = g(), d = x(), s = d && d.uGrid ? d.uGrid : N, m = y(e.id), u = i.useCallback(
|
|
18
|
+
(l) => {
|
|
19
|
+
e.onContextMenu && e.onContextMenu.call(void 0, l, e.dataItem, e.field);
|
|
20
|
+
},
|
|
21
|
+
[e.onContextMenu, e.dataItem, e.field]
|
|
22
|
+
);
|
|
20
23
|
let t = null, c = null;
|
|
21
24
|
if (e.rowType === "groupFooter")
|
|
22
25
|
t = {
|
package/cells/GridDetailCell.mjs
CHANGED
|
@@ -10,9 +10,12 @@ import { useTableKeyboardNavigation as m } from "@progress/kendo-react-data-tool
|
|
|
10
10
|
import * as a from "react";
|
|
11
11
|
import { useUnstyled as x, uGrid as C, classNames as I } from "@progress/kendo-react-common";
|
|
12
12
|
const g = (e) => {
|
|
13
|
-
const { colSpan: n, ariaColIndex: i, dataItem: l, dataIndex: o, id: d } = e, c = m(d), t = x(), r = t && t.uGrid ? t.uGrid : C, s = a.useCallback(
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const { colSpan: n, ariaColIndex: i, dataItem: l, dataIndex: o, id: d } = e, c = m(d), t = x(), r = t && t.uGrid ? t.uGrid : C, s = a.useCallback(
|
|
14
|
+
(u) => {
|
|
15
|
+
e.onContextMenu && e.onContextMenu.call(void 0, u, e.dataItem);
|
|
16
|
+
},
|
|
17
|
+
[e.onContextMenu, e.dataItem]
|
|
18
|
+
);
|
|
16
19
|
return /* @__PURE__ */ a.createElement(
|
|
17
20
|
"td",
|
|
18
21
|
{
|