@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.
Files changed (68) hide show
  1. package/Grid.js +1 -1
  2. package/Grid.mjs +927 -1042
  3. package/GridNoRecords.js +1 -1
  4. package/GridNoRecords.mjs +7 -14
  5. package/GridToolbar.js +1 -1
  6. package/GridToolbar.mjs +23 -28
  7. package/README.md +34 -33
  8. package/VirtualScroll.js +1 -1
  9. package/VirtualScroll.mjs +63 -58
  10. package/VirtualScrollFixed.js +1 -1
  11. package/VirtualScrollFixed.mjs +16 -14
  12. package/cells/GridCell.mjs +6 -3
  13. package/cells/GridDetailCell.mjs +6 -3
  14. package/cells/GridEditCell.mjs +10 -38
  15. package/cells/GridFilterCell.js +1 -1
  16. package/cells/GridFilterCell.mjs +99 -113
  17. package/cells/GridGroupCell.mjs +24 -30
  18. package/cells/GridHierarchyCell.mjs +2 -13
  19. package/cells/GridSelectionCell.mjs +3 -24
  20. package/columnMenu/GridColumnMenuCheckboxFilter.js +1 -1
  21. package/columnMenu/GridColumnMenuCheckboxFilter.mjs +132 -184
  22. package/columnMenu/GridColumnMenuFilter.js +1 -1
  23. package/columnMenu/GridColumnMenuFilter.mjs +127 -170
  24. package/columnMenu/GridColumnMenuFilterCell.js +1 -1
  25. package/columnMenu/GridColumnMenuFilterCell.mjs +42 -61
  26. package/columnMenu/GridColumnMenuFilterUI.js +1 -1
  27. package/columnMenu/GridColumnMenuFilterUI.mjs +15 -24
  28. package/columnMenu/GridColumnMenuGroup.js +1 -1
  29. package/columnMenu/GridColumnMenuGroup.mjs +29 -40
  30. package/columnMenu/GridColumnMenuItemContent.js +1 -1
  31. package/columnMenu/GridColumnMenuItemContent.mjs +7 -20
  32. package/columnMenu/GridColumnMenuItemGroup.js +1 -1
  33. package/columnMenu/GridColumnMenuItemGroup.mjs +7 -20
  34. package/columnMenu/GridColumnMenuSort.js +1 -1
  35. package/columnMenu/GridColumnMenuSort.mjs +42 -53
  36. package/columnMenu/GridColumnMenuWrapper.mjs +6 -18
  37. package/dist/cdn/js/kendo-react-grid.js +1 -1
  38. package/drag/ColumnDraggable.js +1 -1
  39. package/drag/ColumnDraggable.mjs +34 -33
  40. package/drag/ColumnResize.js +1 -1
  41. package/drag/ColumnResize.mjs +36 -44
  42. package/drag/GroupingIndicator.js +1 -1
  43. package/drag/GroupingIndicator.mjs +51 -83
  44. package/filterCommon.mjs +1 -3
  45. package/footer/Footer.js +1 -1
  46. package/footer/Footer.mjs +40 -57
  47. package/footer/FooterRow.mjs +6 -5
  48. package/header/FilterRow.js +1 -1
  49. package/header/FilterRow.mjs +69 -82
  50. package/header/GridHeaderSelectionCell.js +1 -1
  51. package/header/GridHeaderSelectionCell.mjs +28 -35
  52. package/header/GroupPanel.js +1 -1
  53. package/header/GroupPanel.mjs +43 -49
  54. package/header/Header.js +1 -1
  55. package/header/Header.mjs +70 -74
  56. package/header/HeaderRow.mjs +24 -27
  57. package/index.d.mts +259 -724
  58. package/index.d.ts +259 -724
  59. package/index.js +1 -1
  60. package/index.mjs +78 -80
  61. package/messages/index.mjs +4 -1
  62. package/package-metadata.mjs +1 -1
  63. package/package.json +11 -11
  64. package/rows/GridDetailRow.js +1 -1
  65. package/rows/GridDetailRow.mjs +2 -10
  66. package/rows/GridRow.mjs +10 -8
  67. package/utils/index.js +1 -1
  68. 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 s=require("react"),a=require("@progress/kendo-react-intl"),o=require("./messages/index.js");function l(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const u=l(s),c=class c extends u.Component{render(){return this.props.children||a.provideLocalizationService(this).toLanguageString(o.noRecords,o.messages[o.noRecords])}};c.displayName="KendoReactGridNoRecords";let r=c;a.registerForLocalization(r);exports.GridNoRecords=r;
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 * as r from "react";
10
- import { provideLocalizationService as i, registerForLocalization as s } from "@progress/kendo-react-intl";
11
- import { noRecords as o, messages as a } from "./messages/index.mjs";
12
- const t = class t extends r.Component {
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
- t.displayName = "KendoReactGridNoRecords";
21
- let e = t;
22
- s(e);
15
+ n.displayName = "KendoReactGridNoRecords";
23
16
  export {
24
- e as GridNoRecords
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 l=require("react"),i=require("@progress/kendo-react-common");function c(e){const o=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(o,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const n=c(l),s=class s extends n.Component{render(){return n.createElement("div",{className:i.classNames("k-toolbar k-grid-toolbar k-toolbar-solid",{"k-toolbar-md":!this.props.size,[`k-toolbar-${i.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),"aria-label":this.props.ariaLabel,"aria-controls":this.props.ariaControls,role:"toolbar"},this.props.children)}};s.displayName="KendoReactGridToolbar";let r=s;exports.GridToolbar=r;
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 o from "react";
10
- import { classNames as a, kendoThemeMaps as r } from "@progress/kendo-react-common";
11
- const s = class s extends o.Component {
12
- /**
13
- * @hidden
14
- */
15
- render() {
16
- return /* @__PURE__ */ o.createElement(
17
- "div",
18
- {
19
- className: a(
20
- "k-toolbar k-grid-toolbar k-toolbar-solid",
21
- {
22
- "k-toolbar-md": !this.props.size,
23
- [`k-toolbar-${r.sizeMap[this.props.size] || this.props.size}`]: this.props.size
24
- },
25
- this.props.className
26
- ),
27
- "aria-label": this.props.ariaLabel,
28
- "aria-controls": this.props.ariaControls,
29
- role: "toolbar"
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
- s.displayName = "KendoReactGridToolbar";
36
- let e = s;
31
+ m.displayName = "KendoReactGridToolbar";
37
32
  export {
38
- e as GridToolbar
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
- > * 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.
9
- > * 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).
10
- > * 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).
11
- > * 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!
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
- * [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.
26
- * [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.
27
- * [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.
28
- * [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.
29
- * [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.
30
- * [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.
31
- * [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.
32
- * [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).
33
- * [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.
34
- * [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.
35
- * [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.
36
- * [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.
37
- * [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.
38
- * [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.
39
- * [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.
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
- * 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).
46
- * 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.
47
- * 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.
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
- * [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)
52
- * [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)
53
- * [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)
54
- * [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)
55
- * [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-grid)
56
- * [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)
57
- * [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)
58
- * [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)
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
- * [React Data Grid Component](https://www.telerik.com/kendo-react-ui/grid)
63
+ - [React Data Grid Component](https://www.telerik.com/kendo-react-ui/grid)
63
64
 
64
- *Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.*
65
+ _Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
65
66
 
66
- *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.*
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 g=require("react");function u(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(i,t,l.get?l:{enumerable:!0,get:()=>r[t]})}}return i.default=r,Object.freeze(i)}const c=u(g);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=c.createRef(),this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=c.createRef(),this.tableTransform="",this.prevScrollPos=0,this.tableTranslate=0,this.scrollSyncing=!1,this.reactVersion=Number.parseFloat(c.version),this.topItems=(t,l)=>{if(!this.container||l)return{topItemsCount:0,topItemsHeight:0};const s=this.container.clientHeight,e=Math.ceil(s/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(){return this.containerRef.current}get rowHeights(){const i=[],t=this.tableBodyRef.current&&this.tableBodyRef.current.children||[];let l=0;for(let s=0;s<t.length;s++){if(t[s].className.indexOf("k-grouping-row")>-1){l+=t[s].scrollHeight;continue}t[s].className.indexOf("k-detail-row")>-1?i[i.length-1].line+=t[s].scrollHeight:(i.push({line:t[s].scrollHeight,acc:l}),l=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,l=this.container.scrollTop;let s=this.tableTranslate,e=0;const{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:a}=this.topItems(t,!!this.topCacheCount),h=l-s;if(!(h>o||t.length<=a)){for(;e<this.topCacheCount+this.attendedSkip-this.realSkip+n&&this.propsSkip-e>0&&!(s+(t[t.length-1-e].line+t[t.length-1-e].acc)+h<=l);)s-=t[t.length-1-e].line+t[t.length-1-e].acc,e++;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){this.translate(0),this.changePage(0,i),this.container.scrollTop=0;return}if(s>l&&(s=l),s!==this.tableTranslate){this.translate(Math.max(0,s-o));const p=Math.max(0,this.propsSkip-e-n);this.changePage(p,i)}}}localScrollDown(i){if(!this.container)return;const t=this.rowHeights,l=this.container.scrollTop;let s=this.tableTranslate,e=0;const{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:a}=this.topItems(t,!!this.topCacheCount);for(;e<t.length-this.topCacheCount&&!(s+t[e].line+t[e].acc>l);)s+=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(s-o),this.changePage(this.total-1-n,i)):s!==this.tableTranslate&&this.propsSkip+e-n!==this.propsSkip&&(this.translate(s-o),this.changePage(this.propsSkip+e-n,i)))}scrollNonStrict(i){const t=this.total*this.prevScrollPos/this.containerHeight;let l=Math.floor(t);l>=this.total&&(l=this.total-1);const s=Math.min(t-l,1);let e=0;const n=l-this.propsSkip,o=this.rowHeights;n>=0&&n<=1?e=-((o[0].line+o[0].acc)*s):n===-1&&(e=-((o[o.length-1].line+o[o.length-1].acc)*s));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(l-a,i)}scrollHandler(i){if(!this.scrollableVirtual)return;if(this.scrollSyncing||!this.container||!this.table){this.scrollSyncing=!1;return}const t=this.container.scrollTop,l=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-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}}exports.VirtualScroll=f;
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 r from "react";
9
+ import * as c from "react";
10
10
  class g {
11
- constructor(s) {
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 = r.createRef(), this.fixedScroll = !1, this.askedSkip = void 0, this.containerRef = r.createRef(), this.tableTransform = "", this.prevScrollPos = 0, this.tableTranslate = 0, this.scrollSyncing = !1, this.reactVersion = Number.parseFloat(r.version), this.topItems = (t, l) => {
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 i = this.container.clientHeight, e = Math.ceil(i / t[0].line), n = Math.ceil((t.length - e) / 2);
16
- let o = 0;
17
- for (let a = 0; a < n; a++)
18
- o += t[a].line + t[a].acc;
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: n,
21
- topItemsHeight: o,
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, s && (this.topCacheCount = 4, this.attendedSkip = -this.topCacheCount), this.scrollHandler = this.scrollHandler.bind(this);
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
- return this.containerRef.current;
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
- const s = [], t = this.tableBodyRef.current && this.tableBodyRef.current.children || [];
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 i = 0; i < t.length; i++) {
36
- if (t[i].className.indexOf("k-grouping-row") > -1) {
37
- l += t[i].scrollHeight;
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[i].className.indexOf("k-detail-row") > -1 ? s[s.length - 1].line += t[i].scrollHeight : (s.push({
41
- line: t[i].scrollHeight,
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 s;
47
+ return i;
46
48
  }
47
- changePage(s, t) {
48
- this.attendedSkip = s - this.topCacheCount, this.PageChange && this.PageChange(
49
+ changePage(i, t) {
50
+ this.attendedSkip = i - this.topCacheCount, this.PageChange && this.PageChange(
49
51
  {
50
- skip: Math.max(0, s - this.topCacheCount),
52
+ skip: Math.max(0, i - this.topCacheCount),
51
53
  take: this.pageSize
52
54
  },
53
55
  t
54
56
  );
55
57
  }
56
- translate(s, t) {
57
- this.tableTranslate = s, this.scrollableVirtual && this.table && (this.reactVersion <= 17 || t ? this.table.style.transform = "translateY(" + s + "px)" : this.tableTransform = "translateY(" + s + "px)");
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(s) {
64
+ localScrollUp(i) {
63
65
  if (!this.container)
64
66
  return;
65
67
  const t = this.rowHeights, l = this.container.scrollTop;
66
- let i = this.tableTranslate, e = 0;
67
- const {
68
- topItemsCount: n,
69
- topItemsHeight: o,
70
- itemsNeededOnScreen: a
71
- } = this.topItems(t, !!this.topCacheCount), h = l - i;
72
- if (!(h > o || t.length <= a)) {
73
- for (; e < this.topCacheCount + this.attendedSkip - this.realSkip + n && this.propsSkip - e > 0 && !(i + (t[t.length - 1 - e].line + t[t.length - 1 - e].acc) + h <= l); )
74
- i -= t[t.length - 1 - e].line + t[t.length - 1 - e].acc, e++;
75
- if (e === 0 && this.topCacheCount === 0 && this.attendedSkip > 0 && (i = Math.max(i - t[0].line, 0), e = 1), this.propsSkip - e <= 0 && i > l) {
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 (i > l && (i = l), i !== this.tableTranslate) {
80
- this.translate(Math.max(0, i - o));
81
- const c = Math.max(0, this.propsSkip - e - n);
82
- this.changePage(c, s);
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(s) {
87
+ localScrollDown(i) {
87
88
  if (!this.container)
88
89
  return;
89
90
  const t = this.rowHeights, l = this.container.scrollTop;
90
- let i = this.tableTranslate, e = 0;
91
- const {
92
- topItemsCount: n,
93
- topItemsHeight: o,
94
- itemsNeededOnScreen: a
95
- } = this.topItems(t, !!this.topCacheCount);
96
- for (; e < t.length - this.topCacheCount && !(i + t[e].line + t[e].acc > l); )
97
- i += t[e].line + t[e].acc, e++;
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(s) {
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 i = Math.min(t - l, 1);
104
+ const s = Math.min(t - l, 1);
105
105
  let e = 0;
106
- const n = l - this.propsSkip, o = this.rowHeights;
107
- n >= 0 && n <= 1 ? e = -((o[0].line + o[0].acc) * i) : n === -1 && (e = -((o[o.length - 1].line + o[o.length - 1].acc) * i));
108
- const { topItemsCount: a, topItemsHeight: h } = this.topItems(o, !!this.topCacheCount);
109
- this.translate(Math.max(0, e - h - this.horizontalScrollbarHeight() + this.containerHeight * t / this.total)), this.changePage(l - a, s);
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(s) {
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, s), this.prevScrollPos = t, this.askedSkip = void 0;
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(s) : t - l > 0 && t < this.tableTranslate + this.table.scrollHeight * 2 / 3 ? this.localScrollDown(s) : this.scrollNonStrict(s), this.prevScrollPos = t;
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 {
@@ -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 e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:()=>s[t]})}}return e.default=s,Object.freeze(e)}const o=u(d);class p{constructor(e){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=o.createRef(),this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=o.createRef(),this.tableTransform="",this.scrollSyncing=!1,this.lastLoaded=0,this.firstLoaded=0,this.lastScrollTop=0,this.reactVersion=Number.parseFloat(o.version),this.firstLoaded=this.pageSize,this.lastLoaded=this.realSkip+this.pageSize,this.scrollHandler=this.scrollHandler.bind(this)}get container(){return this.containerRef.current}translate(e,t){this.scrollableVirtual&&this.table&&(g.firefox||this.reactVersion<=17||t?this.table.style.transform="translateY("+e+"px)":this.tableTransform="translateY("+e+"px)")}changePage(e,t){this.PageChange&&this.PageChange({skip:Math.max(0,e),take:this.pageSize},t)}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}scrollHandler(e){if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!this.containerRef.current)return;if(this.scrollSyncing){this.scrollSyncing=!1;return}const t=this.container.scrollTop,a=this.lastScrollTop>=t,h=!a;this.lastScrollTop=t;let i=this.rowHeightService.index(t),l=this.rowHeightService.offset(i);const{offsetHeight:n}=this.containerRef.current,c=this.rowHeightService.index(t+n);if(h&&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,e)}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,e)}}}exports.VirtualScrollFixed=p;
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;
@@ -6,17 +6,18 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as a from "react";
10
- import { firefox as f } from "./utils/index.mjs";
11
- class p {
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 = a.createRef(), this.fixedScroll = !1, this.askedSkip = void 0, this.containerRef = a.createRef(), this.tableTransform = "", this.scrollSyncing = !1, this.lastLoaded = 0, this.firstLoaded = 0, this.lastScrollTop = 0, this.reactVersion = Number.parseFloat(a.version), this.firstLoaded = this.pageSize, this.lastLoaded = this.realSkip + this.pageSize, this.scrollHandler = this.scrollHandler.bind(this);
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
- return this.containerRef.current;
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 && (f || this.reactVersion <= 17 || i ? this.table.style.transform = "translateY(" + t + "px)" : this.tableTransform = "translateY(" + t + "px)");
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
- if (!this.scrollableVirtual || !this.container || !this.table || !this.rowHeightService || !this.containerRef.current)
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, r = this.lastScrollTop >= i, o = !r;
36
+ const i = this.container.scrollTop, a = this.lastScrollTop >= i, l = !a;
35
37
  this.lastScrollTop = i;
36
- let e = this.rowHeightService.index(i), h = this.rowHeightService.offset(e);
37
- const { offsetHeight: l } = this.containerRef.current, n = this.rowHeightService.index(i + l);
38
- if (o && n >= this.lastLoaded && this.lastLoaded < this.total) {
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, h = this.rowHeightService.offset(e)), this.firstLoaded = e, this.translate(h);
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 (r && e < this.firstLoaded) {
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
- p as VirtualScrollFixed
52
+ S as VirtualScrollFixed
51
53
  };
@@ -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((l) => {
18
- e.onContextMenu && e.onContextMenu.call(void 0, l, e.dataItem, e.field);
19
- }, [e.onContextMenu, e.dataItem, e.field]);
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 = {
@@ -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((u) => {
14
- e.onContextMenu && e.onContextMenu.call(void 0, u, e.dataItem);
15
- }, [e.onContextMenu, e.dataItem]);
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
  {