@progress/kendo-react-grid 7.5.0-develop.19 → 7.5.0-develop.20

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.
@@ -7,77 +7,77 @@
7
7
  */
8
8
  "use client";
9
9
  import * as r from "react";
10
- import { normalize as G } from "../interfaces/GridSortSettings.mjs";
11
- import { ColumnDraggable as L } from "../drag/ColumnDraggable.mjs";
12
- import { GridHeaderCell as O } from "./GridHeaderCell.mjs";
13
- import { classNames as P, Keys as u, IconWrap as V } from "@progress/kendo-react-common";
14
- import { ColumnResizer as W, HeaderThElement as q } from "@progress/kendo-react-data-tools";
15
- import { useLocalization as B } from "@progress/kendo-react-intl";
16
- import { sortAriaLabel as z, messages as T } from "../messages/index.mjs";
17
- import { sortAscSmallIcon as U, sortDescSmallIcon as j } from "@progress/kendo-svg-icons";
18
- import { resolveCells as J } from "../utils/index.mjs";
19
- const Q = {
10
+ import { normalize as L } from "../interfaces/GridSortSettings.mjs";
11
+ import { ColumnDraggable as O } from "../drag/ColumnDraggable.mjs";
12
+ import { GridHeaderCell as P } from "./GridHeaderCell.mjs";
13
+ import { classNames as V, Keys as f, IconWrap as W } from "@progress/kendo-react-common";
14
+ import { ColumnResizer as q, HeaderThElement as B } from "@progress/kendo-react-data-tools";
15
+ import { useLocalization as T } from "@progress/kendo-react-intl";
16
+ import { sortAriaLabel as M, messages as U } from "../messages/index.mjs";
17
+ import { sortAscSmallIcon as j, sortDescSmallIcon as J } from "@progress/kendo-svg-icons";
18
+ import { resolveCells as Q } from "../utils/index.mjs";
19
+ const X = {
20
20
  true: { asc: "desc", desc: "", "": "asc" },
21
21
  false: { asc: "desc", desc: "asc", "": "asc" }
22
- }, X = {
22
+ }, Y = {
23
23
  none: "none",
24
24
  asc: "ascending",
25
25
  desc: "descending"
26
- }, ne = (e) => {
27
- const [H, b] = r.useState(), D = B(), f = r.useRef(null);
28
- let E = 0, M = -1;
29
- const k = (t, a) => {
26
+ }, re = (e) => {
27
+ const [z, b] = r.useState(), H = T(), u = r.useRef(null);
28
+ let D = 0, E = -1;
29
+ const k = (t, n) => {
30
30
  if (t.preventDefault(), !e.sortChange)
31
31
  return;
32
- const { allowUnsort: l, mode: c } = G(e.sortable || !1, a.sortable || !1), o = (e.sort || []).filter((i) => i.field === a.field)[0], d = Q[l][o && o.dir || ""], s = c === "single" ? [] : (e.sort || []).filter((i) => i.field !== a.field);
33
- d !== "" && a.field && s.push({ field: a.field, dir: d }), e.sortChange(s, t);
34
- }, x = (t, a) => {
32
+ const { allowUnsort: l, mode: c } = L(e.sortable || !1, n.sortable || !1), o = (e.sort || []).filter((i) => i.field === n.field)[0], d = X[l][o && o.dir || ""], s = c === "single" ? [] : (e.sort || []).filter((i) => i.field !== n.field);
33
+ d !== "" && n.field && s.push({ field: n.field, dir: d }), e.sortChange(s, t);
34
+ }, I = (t, n) => {
35
35
  if (t.isDefaultPrevented())
36
36
  return;
37
- const { keyCode: l, metaKey: c, ctrlKey: o, altKey: d } = t, s = e.sortable && a.sortable, i = t.target;
38
- if (s && t.keyCode === u.enter && i.className.indexOf("k-table-th") !== -1 && k(t, a), e.navigatable) {
39
- if (e.groupable && (c && l === u.enter || o && l === u.space)) {
37
+ const { keyCode: l, metaKey: c, ctrlKey: o, altKey: d } = t, s = e.sortable && n.sortable, i = t.target;
38
+ if (s && t.keyCode === f.enter && i.className.indexOf("k-table-th") !== -1 && k(t, n), e.navigatable) {
39
+ if (e.groupable && (c && l === f.enter || o && l === f.space)) {
40
40
  t.preventDefault();
41
- const m = e.columns.findIndex((g) => g.field === a.field);
41
+ const m = e.columns.findIndex((g) => g.field === n.field);
42
42
  e.columnGroupChange && e.columnGroupChange(m, t);
43
43
  }
44
- d && l === u.down && (t.preventDefault(), b(a.field), f.current = i);
44
+ d && l === f.down && (t.preventDefault(), b(n.field), u.current = i);
45
45
  }
46
- }, I = () => {
47
- b(void 0), f.current && f.current.getAttribute("tabindex") !== "-1" && f.current.focus();
46
+ }, x = () => {
47
+ b(void 0), u.current && u.current.getAttribute("tabindex") !== "-1" && u.current.focus();
48
48
  }, v = (t) => e.sort ? t >= 0 && [
49
49
  /* @__PURE__ */ r.createElement("span", { key: 1, className: "k-sort-icon" }, /* @__PURE__ */ r.createElement(
50
- V,
50
+ W,
51
51
  {
52
52
  name: "sort-" + e.sort[t].dir + "-small",
53
- icon: e.sort[t].dir === "asc" ? U : j
53
+ icon: e.sort[t].dir === "asc" ? j : J
54
54
  }
55
55
  )),
56
56
  e.sort.length > 1 && /* @__PURE__ */ r.createElement("span", { key: 2, className: "k-sort-icon" }, /* @__PURE__ */ r.createElement("span", { className: "k-sort-order" }, t + 1))
57
- ] : null, y = (t) => t.map((a) => {
58
- const l = e.columns[a], c = e.sortable && l.sortable, o = e.sort ? e.sort.findIndex((n) => n.field === l.field) : -1, d = o >= 0 && e.sort[o].dir || "none", s = l.columnMenu === null ? null : l.columnMenu || e.columnMenu, i = P({
57
+ ] : null, y = (t) => t.map((n) => {
58
+ const l = e.columns[n], c = e.sortable && l.sortable, o = e.sort ? e.sort.findIndex((a) => a.field === l.field) : -1, d = o >= 0 && e.sort[o].dir || "none", s = l.columnMenu === null ? null : l.columnMenu || e.columnMenu, i = l.menuIcon || e.columnMenuIcon, m = V({
59
59
  "k-first": l.kFirst,
60
60
  "k-filterable": !!s,
61
61
  "k-table-th": !0,
62
62
  "k-header": !0,
63
63
  "k-grid-header-sticky": l.locked,
64
- "k-sorted": e.sort && e.sort.some((n) => n.field === l.field)
64
+ "k-sorted": e.sort && e.sort.some((a) => a.field === l.field)
65
65
  }, l.headerClassName);
66
66
  l.locked === !1 && (l.left = 0);
67
- const m = l.left !== void 0 ? e.isRtl ? { left: l.right, right: l.left } : { left: l.left, right: l.right } : {}, g = D.toLanguageString(z, T[z]), N = l.isAccessible ? {
68
- ariaSort: X[d],
67
+ const g = l.left !== void 0 ? e.isRtl ? { left: l.right, right: l.left } : { left: l.left, right: l.right } : {}, N = H.toLanguageString(M, U[M]), K = l.isAccessible ? {
68
+ ariaSort: Y[d],
69
69
  role: "columnheader",
70
70
  ariaColumnIndex: l.ariaColumnIndex,
71
71
  ariaSelected: !1,
72
- ariaDescription: c ? g : ""
72
+ ariaDescription: c ? N : ""
73
73
  } : {
74
74
  role: "presentation"
75
- }, h = l.declarationIndex >= 0 ? ++M : --E, K = l.headerCell ? l.headerCell : O, R = /* @__PURE__ */ r.createElement(
76
- K,
75
+ }, h = l.declarationIndex >= 0 ? ++E : --D, A = l.headerCell ? l.headerCell : P, R = /* @__PURE__ */ r.createElement(
76
+ A,
77
77
  {
78
78
  key: 1,
79
79
  field: l.field,
80
- onClick: c && ((n) => k(n, l)) || void 0,
80
+ onClick: c && ((a) => k(a, l)) || void 0,
81
81
  selectionChange: e.selectionChange,
82
82
  title: l.title,
83
83
  selectionValue: l.headerSelectionValue,
@@ -98,43 +98,44 @@ const Q = {
98
98
  filterable: e.filterable && l.filterable,
99
99
  filterOperators: e.filterOperators,
100
100
  onFilterChange: e.filterChange,
101
- show: H === l.field ? !0 : void 0,
102
- onCloseMenu: I,
101
+ show: z === l.field ? !0 : void 0,
102
+ onCloseMenu: x,
103
103
  navigatable: e.navigatable,
104
104
  group: e.group,
105
105
  groupable: e.groupable,
106
106
  onGroupChange: e.groupChange,
107
- columnMenu: s
107
+ columnMenu: s,
108
+ columnMenuIcon: i
108
109
  }
109
110
  }
110
111
  ), S = {
111
- ...N,
112
+ ...K,
112
113
  key: h,
113
114
  colSpan: l.colSpan,
114
115
  rowSpan: l.rowSpan,
115
- className: i,
116
- style: m,
116
+ className: m,
117
+ style: g,
117
118
  columnId: l.id,
118
119
  navigatable: l.navigatable,
119
- onKeyDown: (n) => x(n, l),
120
+ onKeyDown: (a) => I(a, l),
120
121
  role: "columnheader"
121
122
  }, w = [
122
123
  R,
123
124
  e.columnResize && e.columnResize.resizable && l.resizable && /* @__PURE__ */ r.createElement(
124
- W,
125
+ q,
125
126
  {
126
127
  key: 2,
127
- resize: (n, A, F) => e.columnResize && e.columnResize.dragHandler(n, l, A, F),
128
- autofit: (n) => e.columnResize && e.columnResize.dblClickHandler(n, [l.id])
128
+ resize: (a, F, G) => e.columnResize && e.columnResize.dragHandler(a, l, F, G),
129
+ autofit: (a) => e.columnResize && e.columnResize.dblClickHandler(a, [l.id])
129
130
  }
130
131
  )
131
- ], C = J(e.cells, l.cells);
132
+ ], C = Q(e.cells, l.cells);
132
133
  if (C && C.headerCell) {
133
- const n = C.headerCell;
134
- return /* @__PURE__ */ r.createElement(n, { ...R.props, key: h, thProps: S, index: a }, w);
134
+ const a = C.headerCell;
135
+ return /* @__PURE__ */ r.createElement(a, { ...R.props, key: h, thProps: S, index: n }, w);
135
136
  }
136
137
  return /* @__PURE__ */ r.createElement(
137
- q,
138
+ B,
138
139
  {
139
140
  ...S,
140
141
  key: h
@@ -142,21 +143,21 @@ const Q = {
142
143
  w
143
144
  );
144
145
  });
145
- return e.columnsMap.map((t, a) => e.pressHandler && /* @__PURE__ */ r.createElement(
146
- L,
146
+ return e.columnsMap.map((t, n) => e.pressHandler && /* @__PURE__ */ r.createElement(
147
+ O,
147
148
  {
148
- key: a,
149
+ key: n,
149
150
  pressHandler: e.pressHandler,
150
151
  dragHandler: e.dragHandler,
151
152
  releaseHandler: e.releaseHandler,
152
- ariaRowIndex: a + 1,
153
+ ariaRowIndex: n + 1,
153
154
  dragClue: e.dragClue,
154
155
  headerRef: e.headerRef,
155
156
  containerRef: e.containerRef
156
157
  },
157
158
  y(t)
158
- ) || /* @__PURE__ */ r.createElement("tr", { key: a, className: "k-table-row", role: "row", "aria-rowindex": a + 1 }, y(t)));
159
+ ) || /* @__PURE__ */ r.createElement("tr", { key: n, className: "k-table-row", role: "row", "aria-rowindex": n + 1 }, y(t)));
159
160
  };
160
161
  export {
161
- ne as HeaderRow
162
+ re as HeaderRow
162
163
  };
package/index.d.mts CHANGED
@@ -36,6 +36,7 @@ import { SortDescriptor } from '@progress/kendo-data-query';
36
36
  import { SortSettings } from '@progress/kendo-react-data-tools';
37
37
  import { State } from '@progress/kendo-data-query';
38
38
  import { SVGIcon } from '@progress/kendo-react-common';
39
+ import { SVGIcon as SVGIcon_2 } from '@progress/kendo-svg-icons';
39
40
  import { TABLE_COL_INDEX_ATTRIBUTE } from '@progress/kendo-react-data-tools';
40
41
  import { TableDragSelectionReleaseEvent } from '@progress/kendo-react-data-tools';
41
42
  import { TableKeyboardNavigationContextType } from '@progress/kendo-react-data-tools';
@@ -1194,6 +1195,10 @@ export declare interface GridColumnMenuWrapperProps extends GridColumnMenuProps
1194
1195
  * The component to be rendered as content of the Grid column menu.
1195
1196
  */
1196
1197
  columnMenu?: React_2.ComponentType<GridColumnMenuProps> | null;
1198
+ /**
1199
+ * The icon that overrides the default(three vertical dots) icon displayed in the column menu of each column.
1200
+ */
1201
+ columnMenuIcon?: SVGIcon;
1197
1202
  }
1198
1203
 
1199
1204
  /**
@@ -1244,6 +1249,10 @@ export declare interface GridColumnProps extends Omit<ColumnBaseProps, 'cell'> {
1244
1249
  * Defines the editor type. Used when the column enters the edit mode ([more information and examples]({% slug editing_inline_grid %})). Defaults to `text`.
1245
1250
  */
1246
1251
  editor?: 'text' | 'numeric' | 'boolean' | 'date';
1252
+ /**
1253
+ * Overrides the default(three vertical dots) column menu icon or the icon set through the ([`columnMenuIcon`]({% slug api_grid_gridprops %}#toc-columnmenuicon)) property.
1254
+ */
1255
+ menuIcon?: SVGIcon;
1247
1256
  /**
1248
1257
  * Defines the component that will be rendered as a cell. If not set, a `GridCell` will be rendered by default.
1249
1258
  */
@@ -2147,6 +2156,10 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
2147
2156
  * Specifies a React element that will be cloned and rendered inside the column menu of the Grid. Can be overridden on column level.
2148
2157
  */
2149
2158
  columnMenu?: null | ComponentType<GridColumnMenuProps>;
2159
+ /**
2160
+ * Globally overrides the default(three vertical dots) column menu icon for the whole Grid. If set, the prop can be overridden on column level using the ([menuIcon]({% slug api_grid_gridcolumnprops %}#toc-menuicon)) property.
2161
+ */
2162
+ columnMenuIcon?: SVGIcon_2;
2150
2163
  /**
2151
2164
  * The [descriptors]({% slug api_kendo-data-query_groupdescriptor %})[] by which the data will be grouped
2152
2165
  * ([more information and examples]({% slug groupingbasics_grid %})).
package/index.d.ts CHANGED
@@ -36,6 +36,7 @@ import { SortDescriptor } from '@progress/kendo-data-query';
36
36
  import { SortSettings } from '@progress/kendo-react-data-tools';
37
37
  import { State } from '@progress/kendo-data-query';
38
38
  import { SVGIcon } from '@progress/kendo-react-common';
39
+ import { SVGIcon as SVGIcon_2 } from '@progress/kendo-svg-icons';
39
40
  import { TABLE_COL_INDEX_ATTRIBUTE } from '@progress/kendo-react-data-tools';
40
41
  import { TableDragSelectionReleaseEvent } from '@progress/kendo-react-data-tools';
41
42
  import { TableKeyboardNavigationContextType } from '@progress/kendo-react-data-tools';
@@ -1194,6 +1195,10 @@ export declare interface GridColumnMenuWrapperProps extends GridColumnMenuProps
1194
1195
  * The component to be rendered as content of the Grid column menu.
1195
1196
  */
1196
1197
  columnMenu?: React_2.ComponentType<GridColumnMenuProps> | null;
1198
+ /**
1199
+ * The icon that overrides the default(three vertical dots) icon displayed in the column menu of each column.
1200
+ */
1201
+ columnMenuIcon?: SVGIcon;
1197
1202
  }
1198
1203
 
1199
1204
  /**
@@ -1244,6 +1249,10 @@ export declare interface GridColumnProps extends Omit<ColumnBaseProps, 'cell'> {
1244
1249
  * Defines the editor type. Used when the column enters the edit mode ([more information and examples]({% slug editing_inline_grid %})). Defaults to `text`.
1245
1250
  */
1246
1251
  editor?: 'text' | 'numeric' | 'boolean' | 'date';
1252
+ /**
1253
+ * Overrides the default(three vertical dots) column menu icon or the icon set through the ([`columnMenuIcon`]({% slug api_grid_gridprops %}#toc-columnmenuicon)) property.
1254
+ */
1255
+ menuIcon?: SVGIcon;
1247
1256
  /**
1248
1257
  * Defines the component that will be rendered as a cell. If not set, a `GridCell` will be rendered by default.
1249
1258
  */
@@ -2147,6 +2156,10 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
2147
2156
  * Specifies a React element that will be cloned and rendered inside the column menu of the Grid. Can be overridden on column level.
2148
2157
  */
2149
2158
  columnMenu?: null | ComponentType<GridColumnMenuProps>;
2159
+ /**
2160
+ * Globally overrides the default(three vertical dots) column menu icon for the whole Grid. If set, the prop can be overridden on column level using the ([menuIcon]({% slug api_grid_gridcolumnprops %}#toc-menuicon)) property.
2161
+ */
2162
+ columnMenuIcon?: SVGIcon_2;
2150
2163
  /**
2151
2164
  * The [descriptors]({% slug api_kendo-data-query_groupdescriptor %})[] by which the data will be grouped
2152
2165
  * ([more information and examples]({% slug groupingbasics_grid %})).
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-grid",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1715342506,
13
+ publishDate: 1715351893,
14
14
  version: "",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-grid",
3
- "version": "7.5.0-develop.19",
3
+ "version": "7.5.0-develop.20",
4
4
  "description": "React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -25,15 +25,15 @@
25
25
  "@progress/kendo-data-query": "^1.0.0",
26
26
  "@progress/kendo-drawing": "^1.20.1",
27
27
  "@progress/kendo-licensing": "^1.3.4",
28
- "@progress/kendo-react-animation": "7.5.0-develop.19",
29
- "@progress/kendo-react-buttons": "7.5.0-develop.19",
30
- "@progress/kendo-react-common": "7.5.0-develop.19",
31
- "@progress/kendo-react-data-tools": "7.5.0-develop.19",
32
- "@progress/kendo-react-dateinputs": "7.5.0-develop.19",
33
- "@progress/kendo-react-dropdowns": "7.5.0-develop.19",
34
- "@progress/kendo-react-inputs": "7.5.0-develop.19",
35
- "@progress/kendo-react-intl": "7.5.0-develop.19",
36
- "@progress/kendo-react-popup": "7.5.0-develop.19",
28
+ "@progress/kendo-react-animation": "7.5.0-develop.20",
29
+ "@progress/kendo-react-buttons": "7.5.0-develop.20",
30
+ "@progress/kendo-react-common": "7.5.0-develop.20",
31
+ "@progress/kendo-react-data-tools": "7.5.0-develop.20",
32
+ "@progress/kendo-react-dateinputs": "7.5.0-develop.20",
33
+ "@progress/kendo-react-dropdowns": "7.5.0-develop.20",
34
+ "@progress/kendo-react-inputs": "7.5.0-develop.20",
35
+ "@progress/kendo-react-intl": "7.5.0-develop.20",
36
+ "@progress/kendo-react-popup": "7.5.0-develop.20",
37
37
  "@progress/kendo-svg-icons": "^3.0.0",
38
38
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
39
39
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"