@progress/kendo-react-grid 9.0.0-develop.1 → 9.0.0-develop.3

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/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.mjs CHANGED
@@ -64,11 +64,10 @@ class g {
64
64
  return;
65
65
  const t = this.rowHeights, l = this.container.scrollTop;
66
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;
67
+ const { topItemsCount: n, topItemsHeight: o, itemsNeededOnScreen: a } = this.topItems(
68
+ t,
69
+ !!this.topCacheCount
70
+ ), h = l - i;
72
71
  if (!(h > o || t.length <= a)) {
73
72
  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
73
  i -= t[t.length - 1 - e].line + t[t.length - 1 - e].acc, e++;
@@ -88,11 +87,10 @@ class g {
88
87
  return;
89
88
  const t = this.rowHeights, l = this.container.scrollTop;
90
89
  let i = this.tableTranslate, e = 0;
91
- const {
92
- topItemsCount: n,
93
- topItemsHeight: o,
94
- itemsNeededOnScreen: a
95
- } = this.topItems(t, !!this.topCacheCount);
90
+ const { topItemsCount: n, topItemsHeight: o, itemsNeededOnScreen: a } = this.topItems(
91
+ t,
92
+ !!this.topCacheCount
93
+ );
96
94
  for (; e < t.length - this.topCacheCount && !(i + t[e].line + t[e].acc > l); )
97
95
  i += t[e].line + t[e].acc, e++;
98
96
  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)));
@@ -106,7 +104,12 @@ class g {
106
104
  const n = l - this.propsSkip, o = this.rowHeights;
107
105
  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
106
  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);
107
+ this.translate(
108
+ Math.max(
109
+ 0,
110
+ e - h - this.horizontalScrollbarHeight() + this.containerHeight * t / this.total
111
+ )
112
+ ), this.changePage(l - a, s);
110
113
  }
111
114
  scrollHandler(s) {
112
115
  if (!this.scrollableVirtual)
@@ -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
  {
@@ -32,9 +32,12 @@ const B = (e) => {
32
32
  }
33
33
  },
34
34
  [e.onChange, e.dataItem, e.dataIndex, e.field]
35
- ), o = a.useCallback((t) => {
36
- e.onContextMenu && e.onContextMenu.call(void 0, t, e.dataItem, e.field);
37
- }, [e.onContextMenu, e.dataItem, e.field]), g = a.useCallback(
35
+ ), o = a.useCallback(
36
+ (t) => {
37
+ e.onContextMenu && e.onContextMenu.call(void 0, t, e.dataItem, e.field);
38
+ },
39
+ [e.onContextMenu, e.dataItem, e.field]
40
+ ), g = a.useCallback(
38
41
  (t) => {
39
42
  e.onChange && e.onChange({
40
43
  dataItem: e.dataItem,
@@ -65,13 +68,7 @@ const B = (e) => {
65
68
  onChange: g,
66
69
  [I]: !0
67
70
  }
68
- ), d = /* @__PURE__ */ a.createElement(
69
- "td",
70
- {
71
- ...l
72
- },
73
- n
74
- );
71
+ ), d = /* @__PURE__ */ a.createElement("td", { ...l }, n);
75
72
  break;
76
73
  }
77
74
  case "date":
@@ -85,20 +82,7 @@ const B = (e) => {
85
82
  [x]: e.columnIndex,
86
83
  role: "gridcell",
87
84
  ...u
88
- }, n = /* @__PURE__ */ a.createElement(
89
- N,
90
- {
91
- value: i,
92
- onChange: g,
93
- [I]: !0
94
- }
95
- ), d = /* @__PURE__ */ a.createElement(
96
- "td",
97
- {
98
- ...l
99
- },
100
- n
101
- );
85
+ }, n = /* @__PURE__ */ a.createElement(N, { value: i, onChange: g, [I]: !0 }), d = /* @__PURE__ */ a.createElement("td", { ...l }, n);
102
86
  break;
103
87
  case "boolean":
104
88
  l = {
@@ -123,13 +107,7 @@ const B = (e) => {
123
107
  }
124
108
  )),
125
109
  /* @__PURE__ */ a.createElement("label", { className: "k-checkbox-label", htmlFor: s, key: 2 })
126
- ], d = /* @__PURE__ */ a.createElement(
127
- "td",
128
- {
129
- ...l
130
- },
131
- n
132
- );
110
+ ], d = /* @__PURE__ */ a.createElement("td", { ...l }, n);
133
111
  break;
134
112
  default:
135
113
  l = {
@@ -151,13 +129,7 @@ const B = (e) => {
151
129
  onChange: f,
152
130
  [I]: !0
153
131
  }
154
- ), d = /* @__PURE__ */ a.createElement(
155
- "td",
156
- {
157
- ...l
158
- },
159
- n
160
- );
132
+ ), d = /* @__PURE__ */ a.createElement("td", { ...l }, n);
161
133
  }
162
134
  const r = e.editor || "text", c = e.cells;
163
135
  if (c) {
@@ -14,7 +14,20 @@ import * as t from "react";
14
14
  import { messages as H, groupCollapse as j, groupExpand as q } from "../messages/index.mjs";
15
15
  const V = (e) => {
16
16
  let c = null;
17
- const { columnIndex: a, level: s, columnsCount: m, rowType: w, dataItem: n, field: D, onChange: r, expanded: o, render: C, dataIndex: f, ariaColumnIndex: N, isRtl: v } = e, d = D || "", x = z(e.id), S = P();
17
+ const {
18
+ columnIndex: a,
19
+ level: s,
20
+ columnsCount: m,
21
+ rowType: w,
22
+ dataItem: n,
23
+ field: D,
24
+ onChange: r,
25
+ expanded: o,
26
+ render: C,
27
+ dataIndex: f,
28
+ ariaColumnIndex: N,
29
+ isRtl: v
30
+ } = e, d = D || "", x = z(e.id), S = P();
18
31
  let i = null, g = null, y = null;
19
32
  const M = t.useCallback(
20
33
  (l) => {
@@ -27,9 +40,12 @@ const V = (e) => {
27
40
  }));
28
41
  },
29
42
  [o, r, n, f]
30
- ), k = t.useCallback((l) => {
31
- e.onContextMenu && e.onContextMenu.call(void 0, l, e.dataItem, e.field);
32
- }, [e.onContextMenu, e.dataItem, e.field]), b = (l, R) => {
43
+ ), k = t.useCallback(
44
+ (l) => {
45
+ e.onContextMenu && e.onContextMenu.call(void 0, l, e.dataItem, e.field);
46
+ },
47
+ [e.onContextMenu, e.dataItem, e.field]
48
+ ), b = (l, R) => {
33
49
  const E = o ? j : q, A = S.toLanguageString(E, H[E]);
34
50
  return i = {
35
51
  className: "k-table-td",
@@ -66,44 +82,22 @@ const V = (e) => {
66
82
  icon: o ? W : v ? F : G
67
83
  }
68
84
  )
69
- ), n[d] instanceof Date && n[d].toString ? n[d].toString() : n[d]), /* @__PURE__ */ t.createElement(
70
- "td",
71
- {
72
- ...i,
73
- key: i.key
74
- },
75
- y
76
- );
85
+ ), n[d] instanceof Date && n[d].toString ? n[d].toString() : n[d]), /* @__PURE__ */ t.createElement("td", { ...i, key: i.key }, y);
77
86
  };
78
87
  a === void 0 || s === void 0 || a < s || m === void 0 || w !== "groupHeader" || n[d] === void 0 ? (i = {
79
88
  style: e.style,
80
89
  key: "g" + a,
81
- className: L(
82
- "k-table-td",
83
- "k-group-cell",
84
- { "k-grid-content-sticky": e.locked }
85
- ),
90
+ className: L("k-table-td", "k-group-cell", { "k-grid-content-sticky": e.locked }),
86
91
  role: "gridcell",
87
92
  onContextMenu: k,
88
93
  ...x
89
- }, c = /* @__PURE__ */ t.createElement(
90
- "td",
91
- {
92
- ...i,
93
- key: i.key
94
- }
95
- )) : a <= s && !e.locked ? c = b(m - a, {}) : a <= s && e.locked && (g = {
94
+ }, c = /* @__PURE__ */ t.createElement("td", { ...i, key: i.key })) : a <= s && !e.locked ? c = b(m - a, {}) : a <= s && e.locked && (g = {
96
95
  className: "k-table-td",
97
96
  role: "gridcell",
98
97
  colSpan: m - a,
99
98
  style: { borderLeftWidth: 0, borderRightWidth: 0 },
100
99
  onContextMenu: k
101
- }, c = /* @__PURE__ */ t.createElement(t.Fragment, null, b(0, { position: "sticky", zIndex: 2 }), /* @__PURE__ */ t.createElement(
102
- "td",
103
- {
104
- ...g
105
- }
106
- )));
100
+ }, c = /* @__PURE__ */ t.createElement(t.Fragment, null, b(0, { position: "sticky", zIndex: 2 }), /* @__PURE__ */ t.createElement("td", { ...g })));
107
101
  const I = e.rowType || "data", u = e.cells;
108
102
  if (u && u.group && u.group[I]) {
109
103
  const l = u.group[I];
@@ -32,12 +32,7 @@ const z = (e) => {
32
32
  className: "k-table-td k-hierarchy-cell",
33
33
  role: "gridcell",
34
34
  ...c
35
- }, i = /* @__PURE__ */ n.createElement(
36
- "td",
37
- {
38
- ...l
39
- }
40
- );
35
+ }, i = /* @__PURE__ */ n.createElement("td", { ...l });
41
36
  else if (e.rowType !== "groupHeader") {
42
37
  const a = t ? b : E, g = u.toLanguageString(a, x[a]);
43
38
  l = {
@@ -64,13 +59,7 @@ const z = (e) => {
64
59
  tabIndex: -1
65
60
  },
66
61
  /* @__PURE__ */ n.createElement(C, { name: t ? "minus" : "plus", icon: t ? k : v })
67
- ), i = /* @__PURE__ */ n.createElement(
68
- "td",
69
- {
70
- ...l
71
- },
72
- r
73
- );
62
+ ), i = /* @__PURE__ */ n.createElement("td", { ...l }, r);
74
63
  }
75
64
  const o = e.rowType || "data", d = e.cells;
76
65
  if (d && d.hierarchy && d.hierarchy[o]) {
@@ -13,27 +13,12 @@ import { useLocalization as T } from "@progress/kendo-react-intl";
13
13
  import { useTableKeyboardNavigation as z } from "@progress/kendo-react-data-tools";
14
14
  import { useId as L, classNames as V } from "@progress/kendo-react-common";
15
15
  const P = (a) => {
16
- const {
17
- selectionChange: o,
18
- field: p,
19
- dataItem: k,
20
- id: b,
21
- className: f,
22
- colSpan: h,
23
- style: C,
24
- ariaColumnIndex: x,
25
- rowType: l,
26
- cells: N,
27
- render: n
28
- } = a, y = T(), I = e.useCallback(
16
+ const { selectionChange: o, field: p, dataItem: k, id: b, className: f, colSpan: h, style: C, ariaColumnIndex: x, rowType: l, cells: N, render: n } = a, y = T(), I = e.useCallback(
29
17
  (c) => {
30
18
  o && o({ syntheticEvent: c });
31
19
  },
32
20
  [o]
33
- ), S = L(), s = v(p, k), w = z(b), E = V(
34
- "k-table-td",
35
- f
36
- ), r = {
21
+ ), S = L(), s = v(p, k), w = z(b), E = V("k-table-td", f), r = {
37
22
  colSpan: h,
38
23
  style: C,
39
24
  className: E,
@@ -52,13 +37,7 @@ const P = (a) => {
52
37
  checked: i,
53
38
  onChange: I
54
39
  }
55
- )), m = l !== "groupHeader" ? /* @__PURE__ */ e.createElement(
56
- "td",
57
- {
58
- ...r
59
- },
60
- d
61
- ) : null, u = l || "data", t = N;
40
+ )), m = l !== "groupHeader" ? /* @__PURE__ */ e.createElement("td", { ...r }, d) : null, u = l || "data", t = N;
62
41
  if (t && t.select && t.select[u]) {
63
42
  const c = t.select[u];
64
43
  return /* @__PURE__ */ e.createElement(c, { ...a, tdProps: r }, d);
@@ -25,7 +25,9 @@ const P = (f, o) => f.length !== o.length ? !1 : f.every((e, t) => e === o[t]),
25
25
  return t ? r.filter((a, i) => r.indexOf(a) === i) : r;
26
26
  }, this.getFilterIndex = () => {
27
27
  const e = this.props.column.field;
28
- return this.defaultFilter().filters.findIndex((r) => r.filters && r.filters.length > 0 && r.filters[0].field === e);
28
+ return this.defaultFilter().filters.findIndex(
29
+ (r) => r.filters && r.filters.length > 0 && r.filters[0].field === e
30
+ );
29
31
  }, this.onFilterExpand = () => {
30
32
  const e = this.isControlled(), t = !(e ? this.props.expanded : this.state.expanded);
31
33
  this.props.onExpandChange && this.props.onExpandChange(t), e || this.setState({
@@ -45,9 +47,7 @@ const P = (f, o) => f.length !== o.length ? !1 : f.every((e, t) => e === o[t]),
45
47
  }, this.handleClear = () => {
46
48
  const e = this.props.searchBoxFilterOperator ? this.props.searchBoxFilterOperator : "startswith", t = {
47
49
  logic: "and",
48
- filters: [
49
- { field: this.props.column.field, operator: e, value: "", ignoreCase: !0 }
50
- ]
50
+ filters: [{ field: this.props.column.field, operator: e, value: "", ignoreCase: !0 }]
51
51
  };
52
52
  this.setState({
53
53
  value: "",
@@ -87,7 +87,9 @@ const P = (f, o) => f.length !== o.length ? !1 : f.every((e, t) => e === o[t]),
87
87
  let e = !1;
88
88
  if (this.state.currentFilter) {
89
89
  const t = [...this.state.currentFilter.filters];
90
- return this.compositeFilterIndex === -1 ? !1 : (e = this.state.data.every((n) => this.compositeFilterIndex !== -1 && t[this.compositeFilterIndex].filters ? t[this.compositeFilterIndex].filters.findIndex((a) => a.value === n) >= 0 : !1), e);
90
+ return this.compositeFilterIndex === -1 ? !1 : (e = this.state.data.every((n) => this.compositeFilterIndex !== -1 && t[this.compositeFilterIndex].filters ? t[this.compositeFilterIndex].filters.findIndex(
91
+ (a) => a.value === n
92
+ ) >= 0 : !1), e);
91
93
  }
92
94
  return e;
93
95
  }, this.compositeFilterIndex = this.getFilterIndex(), this.state = {
@@ -141,7 +143,9 @@ const P = (f, o) => f.length !== o.length ? !1 : f.every((e, t) => e === o[t]),
141
143
  icon: "x",
142
144
  svgIcon: w
143
145
  }
144
- )), a = n.filter((i, l) => n.indexOf(i) === l);
146
+ )), a = n.filter(
147
+ (i, l) => n.indexOf(i) === l
148
+ );
145
149
  return /* @__PURE__ */ s.createElement(B, null, /* @__PURE__ */ s.createElement(
146
150
  S,
147
151
  {
@@ -150,43 +154,33 @@ const P = (f, o) => f.length !== o.length ? !1 : f.every((e, t) => e === o[t]),
150
154
  svgIcon: M,
151
155
  onClick: this.onFilterExpand
152
156
  }
153
- ), /* @__PURE__ */ s.createElement(N, { show: !!t }, /* @__PURE__ */ s.createElement(
154
- "form",
157
+ ), /* @__PURE__ */ s.createElement(N, { show: !!t }, /* @__PURE__ */ s.createElement("form", { className: "k-filter-menu", onSubmit: this.submit, onReset: this.clear }, /* @__PURE__ */ s.createElement("div", { className: "k-filter-menu-container" }, r, /* @__PURE__ */ s.createElement("ul", { className: "k-reset k-multicheck-wrap" }, /* @__PURE__ */ s.createElement("li", { className: "k-item k-check-all-wrap" }, /* @__PURE__ */ s.createElement(
158
+ m,
155
159
  {
156
- className: "k-filter-menu",
157
- onSubmit: this.submit,
158
- onReset: this.clear
159
- },
160
- /* @__PURE__ */ s.createElement("div", { className: "k-filter-menu-container" }, r, /* @__PURE__ */ s.createElement("ul", { className: "k-reset k-multicheck-wrap" }, /* @__PURE__ */ s.createElement("li", { className: "k-item k-check-all-wrap" }, /* @__PURE__ */ s.createElement(
161
- m,
162
- {
163
- label: e.toLanguageString(F, h[F]),
164
- onChange: (i) => this.handleCheckBoxChange(i, "all"),
165
- checked: this.isAllSelected()
166
- }
167
- )), this.state.data.map((i, l) => /* @__PURE__ */ s.createElement("li", { className: "k-item", key: l }, /* @__PURE__ */ s.createElement(
168
- m,
169
- {
170
- label: String(i),
171
- onChange: (c) => this.handleCheckBoxChange(c, i),
172
- checked: a.includes(i)
173
- }
174
- )))), /* @__PURE__ */ s.createElement("div", { className: "k-filter-selected-items" }, a.length + " " + e.toLanguageString(C, h[C])), /* @__PURE__ */ s.createElement("div", { className: "k-actions k-hstack k-justify-content-stretch" }, /* @__PURE__ */ s.createElement(
175
- p,
176
- {
177
- themeColor: "primary",
178
- type: "submit"
179
- },
180
- e.toLanguageString(I, h[I])
181
- ), /* @__PURE__ */ s.createElement(
182
- p,
183
- {
184
- className: "k-button",
185
- type: "reset"
186
- },
187
- e.toLanguageString(k, h[k])
188
- )))
189
- )));
160
+ label: e.toLanguageString(
161
+ F,
162
+ h[F]
163
+ ),
164
+ onChange: (i) => this.handleCheckBoxChange(i, "all"),
165
+ checked: this.isAllSelected()
166
+ }
167
+ )), this.state.data.map((i, l) => /* @__PURE__ */ s.createElement("li", { className: "k-item", key: l }, /* @__PURE__ */ s.createElement(
168
+ m,
169
+ {
170
+ label: String(i),
171
+ onChange: (c) => this.handleCheckBoxChange(c, i),
172
+ checked: a.includes(i)
173
+ }
174
+ )))), /* @__PURE__ */ s.createElement("div", { className: "k-filter-selected-items" }, a.length + " " + e.toLanguageString(
175
+ C,
176
+ h[C]
177
+ )), /* @__PURE__ */ s.createElement("div", { className: "k-actions k-hstack k-justify-content-stretch" }, /* @__PURE__ */ s.createElement(p, { themeColor: "primary", type: "submit" }, e.toLanguageString(
178
+ I,
179
+ h[I]
180
+ )), /* @__PURE__ */ s.createElement(p, { className: "k-button", type: "reset" }, e.toLanguageString(
181
+ k,
182
+ h[k]
183
+ )))))));
190
184
  }
191
185
  };
192
186
  u.defaultProps = {
@@ -27,10 +27,7 @@ const C = (h) => h || { filters: [], logic: "and" }, u = (h, i) => C(i).filters.
27
27
  };
28
28
  }, this.insertGroup = (e, t) => ({
29
29
  ...t,
30
- filters: [
31
- e,
32
- ...t.filters
33
- ]
30
+ filters: [e, ...t.filters]
34
31
  }), this.isControlled = () => this.props.expanded !== void 0, this.onFilterExpand = () => {
35
32
  const e = this.isControlled(), t = !(e ? this.props.expanded : this.state.expanded);
36
33
  this.props.onExpandChange && this.props.onExpandChange(t), e || this.setState({
@@ -100,8 +97,16 @@ const C = (h) => h || { filters: [], logic: "and" }, u = (h, i) => C(i).filters.
100
97
  } : {
101
98
  logic: "and",
102
99
  filters: [
103
- { field: i.column.field, operator: t, value: c(t) ? null : void 0 },
104
- { field: i.column.field, operator: t, value: c(t) ? null : void 0 }
100
+ {
101
+ field: i.column.field,
102
+ operator: t,
103
+ value: c(t) ? null : void 0
104
+ },
105
+ {
106
+ field: i.column.field,
107
+ operator: t,
108
+ value: c(t) ? null : void 0
109
+ }
105
110
  ]
106
111
  }, o.filters.filter((r) => r.field === i.column.field).length === 1 && o.filters.splice(1, 0, { field: i.column.field, operator: t });
107
112
  }
@@ -153,28 +158,13 @@ const C = (h) => h || { filters: [], logic: "and" }, u = (h, i) => C(i).filters.
153
158
  svgIcon: K,
154
159
  onClick: this.onFilterExpand
155
160
  }
156
- ), /* @__PURE__ */ a.createElement(z, { show: I || !!V }, /* @__PURE__ */ a.createElement(
157
- "form",
158
- {
159
- className: "k-filter-menu",
160
- onSubmit: this.submit,
161
- onReset: this.clear
162
- },
163
- /* @__PURE__ */ a.createElement("div", { className: "k-filter-menu-container" }, E ? /* @__PURE__ */ a.createElement(E, { ...S }) : /* @__PURE__ */ a.createElement(J, { ...S }), /* @__PURE__ */ a.createElement("div", { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ a.createElement(
164
- k,
165
- {
166
- themeColor: "primary",
167
- disabled: !U
168
- },
169
- l.toLanguageString(D, g[D])
170
- ), /* @__PURE__ */ a.createElement(
171
- k,
172
- {
173
- type: "reset"
174
- },
175
- l.toLanguageString(M, g[M])
176
- )))
177
- )));
161
+ ), /* @__PURE__ */ a.createElement(z, { show: I || !!V }, /* @__PURE__ */ a.createElement("form", { className: "k-filter-menu", onSubmit: this.submit, onReset: this.clear }, /* @__PURE__ */ a.createElement("div", { className: "k-filter-menu-container" }, E ? /* @__PURE__ */ a.createElement(E, { ...S }) : /* @__PURE__ */ a.createElement(J, { ...S }), /* @__PURE__ */ a.createElement("div", { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ a.createElement(k, { themeColor: "primary", disabled: !U }, l.toLanguageString(
162
+ D,
163
+ g[D]
164
+ )), /* @__PURE__ */ a.createElement(k, { type: "reset" }, l.toLanguageString(
165
+ M,
166
+ g[M]
167
+ )))))));
178
168
  }
179
169
  };
180
170
  v.active = (i, o) => !!u(i, o);
@@ -17,15 +17,7 @@ class E extends r.Component {
17
17
  if (this.props.filterType === "boolean")
18
18
  return;
19
19
  const n = this.props.operators.find((o) => o.operator === this.props.operator) || null;
20
- return /* @__PURE__ */ r.createElement(
21
- i,
22
- {
23
- value: n,
24
- onChange: this.operatorChange,
25
- data: this.props.operators,
26
- textField: "text"
27
- }
28
- );
20
+ return /* @__PURE__ */ r.createElement(i, { value: n, onChange: this.operatorChange, data: this.props.operators, textField: "text" });
29
21
  }, this.inputChange = this.inputChange.bind(this), this.operatorChange = this.operatorChange.bind(this), this.boolDropdownChange = this.boolDropdownChange.bind(this);
30
22
  }
31
23
  /**