@progress/kendo-react-grid 8.3.0-develop.2 → 8.3.0-develop.4

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/cells/GridCell.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 m=require("react"),f=require("../utils/index.js"),g=require("@progress/kendo-react-intl"),b=require("@progress/kendo-react-data-tools"),C=require("../constants/index.js"),y=require("@progress/kendo-react-common");function T(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const o=T(m),I=e=>{let t=null;const n=g.useInternationalization(),l=b.useTableKeyboardNavigation(e.id),r=o.useCallback(c=>{e.onContextMenu&&e.onContextMenu.call(void 0,c,e.dataItem,e.field)},[e.onContextMenu,e.dataItem,e.field]);let a=null,d=null;if(e.rowType==="groupFooter")a={onContextMenu:r,className:e.className,...l},t=o.createElement("td",{...a});else if(e.rowType!=="groupHeader"){if(e.field!==void 0){const i=f.getNestedValue(e.field,e.dataItem);i!=null&&(d=e.format?n.format(e.format,i):i.toString())}const c=y.classNames("k-table-td",e.className,{"k-selected":e.isSelected});a={onContextMenu:r,colSpan:e.colSpan,style:e.style,className:c,role:"gridcell","aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[C.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex,...l},t=o.createElement("td",{...a},d)}const s=e.rowType||"data",u=e.cells;if(u&&u[s]){const c=u[s];return o.createElement(c,{...e,tdProps:a},d)}return e.render?e.render.call(void 0,t,e):t};exports.GridCell=I;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),C=require("../utils/index.js"),b=require("@progress/kendo-react-intl"),S=require("@progress/kendo-react-data-tools"),T=require("../constants/index.js"),r=require("@progress/kendo-react-common");function I(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const d=I(y),x=e=>{let t=null;const n=b.useInternationalization(),l=r.useUnstyled(),g=l&&l.uGrid?l.uGrid:r.uGrid,s=S.useTableKeyboardNavigation(e.id),m=d.useCallback(i=>{e.onContextMenu&&e.onContextMenu.call(void 0,i,e.dataItem,e.field)},[e.onContextMenu,e.dataItem,e.field]);let a=null,o=null;if(e.rowType==="groupFooter")a={onContextMenu:m,className:e.className,...s},t=d.createElement("td",{...a});else if(e.rowType!=="groupHeader"){if(e.field!==void 0){const c=C.getNestedValue(e.field,e.dataItem);c!=null&&(o=e.format?n.format(e.format,c):c.toString())}const i=r.classNames(g.td({selected:e.isSelected,sorted:e.isSorted,alt:e.isAlt}),e.className);a={onContextMenu:m,colSpan:e.colSpan,style:e.style,className:i,role:"gridcell","aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[T.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex,...s},t=d.createElement("td",{...a},o)}const f=e.rowType||"data",u=e.cells;if(u&&u[f]){const i=u[f];return d.createElement(i,{...e,tdProps:a},o)}return e.render?e.render.call(void 0,t,e):t};exports.GridCell=x;
@@ -7,52 +7,51 @@
7
7
  */
8
8
  "use client";
9
9
  import * as i from "react";
10
- import { getNestedValue as r } from "../utils/index.mjs";
11
- import { useInternationalization as s } from "@progress/kendo-react-intl";
12
- import { useTableKeyboardNavigation as C } from "@progress/kendo-react-data-tools";
13
- import { GRID_COL_INDEX_ATTRIBUTE as g } from "../constants/index.mjs";
14
- import { classNames as I } from "@progress/kendo-react-common";
15
- const S = (e) => {
10
+ import { getNestedValue as C } from "../utils/index.mjs";
11
+ import { useInternationalization as g } from "@progress/kendo-react-intl";
12
+ import { useTableKeyboardNavigation as y } from "@progress/kendo-react-data-tools";
13
+ import { GRID_COL_INDEX_ATTRIBUTE as I } from "../constants/index.mjs";
14
+ import { useUnstyled as x, uGrid as N, classNames as T } from "@progress/kendo-react-common";
15
+ const w = (e) => {
16
16
  let n = null;
17
- const f = s(), o = C(e.id), m = i.useCallback((l) => {
17
+ const f = g(), d = x(), s = d && d.uGrid ? d.uGrid : N, m = y(e.id), u = i.useCallback((l) => {
18
18
  e.onContextMenu && e.onContextMenu.call(void 0, l, e.dataItem, e.field);
19
19
  }, [e.onContextMenu, e.dataItem, e.field]);
20
20
  let t = null, c = null;
21
21
  if (e.rowType === "groupFooter")
22
22
  t = {
23
- onContextMenu: m,
23
+ onContextMenu: u,
24
24
  className: e.className,
25
- ...o
25
+ ...m
26
26
  }, n = /* @__PURE__ */ i.createElement("td", { ...t });
27
27
  else if (e.rowType !== "groupHeader") {
28
28
  if (e.field !== void 0) {
29
- const a = r(e.field, e.dataItem);
29
+ const a = C(e.field, e.dataItem);
30
30
  a != null && (c = e.format ? f.format(e.format, a) : a.toString());
31
31
  }
32
- const l = I(
33
- "k-table-td",
34
- e.className,
35
- { "k-selected": e.isSelected }
32
+ const l = T(
33
+ s.td({ selected: e.isSelected, sorted: e.isSorted, alt: e.isAlt }),
34
+ e.className
36
35
  );
37
36
  t = {
38
- onContextMenu: m,
37
+ onContextMenu: u,
39
38
  colSpan: e.colSpan,
40
39
  style: e.style,
41
40
  className: l,
42
41
  role: "gridcell",
43
42
  "aria-colindex": e.ariaColumnIndex,
44
43
  "aria-selected": e.isSelected,
45
- [g]: e.columnIndex,
46
- ...o
44
+ [I]: e.columnIndex,
45
+ ...m
47
46
  }, n = /* @__PURE__ */ i.createElement("td", { ...t }, c);
48
47
  }
49
- const u = e.rowType || "data", d = e.cells;
50
- if (d && d[u]) {
51
- const l = d[u];
48
+ const r = e.rowType || "data", o = e.cells;
49
+ if (o && o[r]) {
50
+ const l = o[r];
52
51
  return /* @__PURE__ */ i.createElement(l, { ...e, tdProps: t }, c);
53
52
  }
54
53
  return e.render ? e.render.call(void 0, n, e) : n;
55
54
  };
56
55
  export {
57
- S as GridCell
56
+ w as GridCell
58
57
  };
@@ -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 u=require("@progress/kendo-react-data-tools"),s=require("react");function b(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const l=b(s),f=e=>{const{colSpan:a,ariaColIndex:t,dataItem:n,dataIndex:o,id:c}=e,i=u.useTableKeyboardNavigation(c),r=l.useCallback(d=>{e.onContextMenu&&e.onContextMenu.call(void 0,d,e.dataItem)},[e.onContextMenu,e.dataItem]);return l.createElement("td",{onContextMenu:r,className:"k-table-td k-detail-cell",colSpan:a,"aria-colindex":t,role:"gridcell",...i},l.createElement(e.detail,{dataItem:n,dataIndex:o}))};exports.GridDetailCell=f;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("@progress/kendo-react-data-tools"),f=require("react"),l=require("@progress/kendo-react-common");function g(e){const n=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(n,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const c=g(f),C=e=>{const{colSpan:n,ariaColIndex:t,dataItem:a,dataIndex:i,id:r}=e,d=b.useTableKeyboardNavigation(r),o=l.useUnstyled(),u=o&&o.uGrid?o.uGrid:l.uGrid,s=c.useCallback(m=>{e.onContextMenu&&e.onContextMenu.call(void 0,m,e.dataItem)},[e.onContextMenu,e.dataItem]);return c.createElement("td",{onContextMenu:s,className:l.classNames(u.detailTd({})),colSpan:n,"aria-colindex":t,role:"gridcell",...d},c.createElement(e.detail,{dataItem:a,dataIndex:i}))};exports.GridDetailCell=C;
@@ -6,25 +6,26 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import { useTableKeyboardNavigation as r } from "@progress/kendo-react-data-tools";
10
- import * as t from "react";
11
- const x = (e) => {
12
- const { colSpan: a, ariaColIndex: n, dataItem: l, dataIndex: i, id: o } = e, d = r(o), c = t.useCallback((m) => {
13
- e.onContextMenu && e.onContextMenu.call(void 0, m, e.dataItem);
9
+ import { useTableKeyboardNavigation as m } from "@progress/kendo-react-data-tools";
10
+ import * as a from "react";
11
+ import { useUnstyled as x, uGrid as C, classNames as I } from "@progress/kendo-react-common";
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);
14
15
  }, [e.onContextMenu, e.dataItem]);
15
- return /* @__PURE__ */ t.createElement(
16
+ return /* @__PURE__ */ a.createElement(
16
17
  "td",
17
18
  {
18
- onContextMenu: c,
19
- className: "k-table-td k-detail-cell",
20
- colSpan: a,
21
- "aria-colindex": n,
19
+ onContextMenu: s,
20
+ className: I(r.detailTd({})),
21
+ colSpan: n,
22
+ "aria-colindex": i,
22
23
  role: "gridcell",
23
- ...d
24
+ ...c
24
25
  },
25
- /* @__PURE__ */ t.createElement(e.detail, { dataItem: l, dataIndex: i })
26
+ /* @__PURE__ */ a.createElement(e.detail, { dataItem: l, dataIndex: o })
26
27
  );
27
28
  };
28
29
  export {
29
- x as GridDetailCell
30
+ g as GridDetailCell
30
31
  };
@@ -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");function a(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,c.get?c:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=a(l),i=e=>n.createElement("td",{className:"k-table-td k-hierarchy-cell",role:"gridcell"});exports.GridDetailHierarchyCell=i;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@progress/kendo-react-common"),l=require("react");function a(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const o=a(l),s=t=>{const e=c.useUnstyled(),r=e&&e.uGrid?e.uGrid:c.uGrid;return o.createElement("td",{className:c.classNames(r.hierarchyTd({})),role:"gridcell"})};exports.GridDetailHierarchyCell=s;
@@ -6,8 +6,12 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as e from "react";
10
- const l = (r) => /* @__PURE__ */ e.createElement("td", { className: "k-table-td k-hierarchy-cell", role: "gridcell" });
9
+ import { useUnstyled as s, uGrid as t, classNames as l } from "@progress/kendo-react-common";
10
+ import * as i from "react";
11
+ const d = (a) => {
12
+ const e = s(), r = e && e.uGrid ? e.uGrid : t;
13
+ return /* @__PURE__ */ i.createElement("td", { className: l(r.hierarchyTd({})), role: "gridcell" });
14
+ };
11
15
  export {
12
- l as GridDetailHierarchyCell
16
+ d as GridDetailHierarchyCell
13
17
  };
@@ -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 T=require("react"),f=require("../utils/index.js"),b=require("@progress/kendo-react-inputs"),N=require("@progress/kendo-react-dateinputs"),g=require("@progress/kendo-react-common"),E=require("@progress/kendo-react-data-tools"),r=require("../constants/index.js");function _(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const i=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(n,l,i.get?i:{enumerable:!0,get:()=>e[l]})}}return n.default=e,Object.freeze(n)}const t=_(T),h=e=>{const n=f.getNestedValue(e.field,e.dataItem);let l=null;const i=g.classNames("k-table-td","k-grid-edit-cell",{"k-selected":e.isSelected},e.className),I=g.useId(),o=E.useTableKeyboardNavigation(e.id);let c=null,d=null;const C=t.useCallback(a=>{if(e.onChange){const k=a.target.type==="checkbox"?a.target.checked:a.target.value;e.onChange({dataItem:e.dataItem,dataIndex:e.dataIndex,field:e.field,syntheticEvent:a,value:k})}},[e.onChange,e.dataItem,e.dataIndex,e.field]),m=t.useCallback(a=>{e.onContextMenu&&e.onContextMenu.call(void 0,a,e.dataItem,e.field)},[e.onContextMenu,e.dataItem,e.field]),s=t.useCallback(a=>{e.onChange&&e.onChange({dataItem:e.dataItem,dataIndex:e.dataIndex,field:e.field,syntheticEvent:a.syntheticEvent,value:a.value})},[e.onChange,e.dataItem,e.dataIndex,e.field]);switch(e.editor){case"numeric":{c={onContextMenu:m,colSpan:e.colSpan,style:e.style,className:i,"aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[r.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex,role:"gridcell",...o},d=t.createElement(b.NumericTextBox,{value:n===void 0?null:n,onChange:s,[E.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),l=t.createElement("td",{...c},d);break}case"date":c={onContextMenu:m,colSpan:e.colSpan,style:e.style,className:i,"aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[r.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex,role:"gridcell",...o},d=t.createElement(N.DatePicker,{value:n,onChange:s,[E.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),l=t.createElement("td",{...c},d);break;case"boolean":c={onContextMenu:m,colSpan:e.colSpan,style:e.style,className:i,"aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[r.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex,role:"gridcell",...o},d=[t.createElement("span",{key:1,className:"k-checkbox-wrap"},t.createElement("input",{checked:n||!1,id:I,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md",onChange:C})),t.createElement("label",{className:"k-checkbox-label",htmlFor:I,key:2})],l=t.createElement("td",{...c},d);break;default:c={onContextMenu:m,colSpan:e.colSpan,style:e.style,className:i,"aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[r.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex,role:"gridcell",...o},d=t.createElement("input",{style:{width:"100%"},className:"k-input",value:n||"",onChange:C,[E.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),l=t.createElement("td",{...c},d)}const x=e.editor||"text",u=e.cells;if(u){let a;return u.edit&&u.edit[x]?a=u.edit[x]:u.data&&(a=u.data),t.createElement(a,{...e,tdProps:c},d)}return e.render?e.render.call(void 0,l,e):l};exports.GridEditCell=h;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),b=require("../utils/index.js"),_=require("@progress/kendo-react-inputs"),h=require("@progress/kendo-react-dateinputs"),E=require("@progress/kendo-react-common"),I=require("@progress/kendo-react-data-tools"),C=require("../constants/index.js");function S(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const d in e)if(d!=="default"){const o=Object.getOwnPropertyDescriptor(e,d);Object.defineProperty(n,d,o.get?o:{enumerable:!0,get:()=>e[d]})}}return n.default=e,Object.freeze(n)}const t=S(N),y=e=>{const n=b.getNestedValue(e.field,e.dataItem),d=E.useUnstyled(),o=d&&d.uGrid?d.uGrid:E.uGrid;let i=null;const m=E.classNames(o.editTd({selected:e.isSelected}),e.className),x=E.useId(),r=I.useTableKeyboardNavigation(e.id);let l=null,c=null;const g=t.useCallback(a=>{if(e.onChange){const k=a.target.type==="checkbox"?a.target.checked:a.target.value;e.onChange({dataItem:e.dataItem,dataIndex:e.dataIndex,field:e.field,syntheticEvent:a,value:k})}},[e.onChange,e.dataItem,e.dataIndex,e.field]),s=t.useCallback(a=>{e.onContextMenu&&e.onContextMenu.call(void 0,a,e.dataItem,e.field)},[e.onContextMenu,e.dataItem,e.field]),T=t.useCallback(a=>{e.onChange&&e.onChange({dataItem:e.dataItem,dataIndex:e.dataIndex,field:e.field,syntheticEvent:a.syntheticEvent,value:a.value})},[e.onChange,e.dataItem,e.dataIndex,e.field]);switch(e.editor){case"numeric":{l={onContextMenu:s,colSpan:e.colSpan,style:e.style,className:m,"aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[C.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex,role:"gridcell",...r},c=t.createElement(_.NumericTextBox,{value:n===void 0?null:n,onChange:T,[I.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),i=t.createElement("td",{...l},c);break}case"date":l={onContextMenu:s,colSpan:e.colSpan,style:e.style,className:m,"aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[C.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex,role:"gridcell",...r},c=t.createElement(h.DatePicker,{value:n,onChange:T,[I.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),i=t.createElement("td",{...l},c);break;case"boolean":l={onContextMenu:s,colSpan:e.colSpan,style:e.style,className:m,"aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[C.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex,role:"gridcell",...r},c=[t.createElement("span",{key:1,className:"k-checkbox-wrap"},t.createElement("input",{checked:n||!1,id:x,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md",onChange:g})),t.createElement("label",{className:"k-checkbox-label",htmlFor:x,key:2})],i=t.createElement("td",{...l},c);break;default:l={onContextMenu:s,colSpan:e.colSpan,style:e.style,className:m,"aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[C.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex,role:"gridcell",...r},c=t.createElement("input",{style:{width:"100%"},className:"k-input",value:n||"",onChange:g,[I.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),i=t.createElement("td",{...l},c)}const f=e.editor||"text",u=e.cells;if(u){let a;return u.edit&&u.edit[f]?a=u.edit[f]:u.data&&(a=u.data),t.createElement(a,{...e,tdProps:l},c)}return e.render?e.render.call(void 0,i,e):i};exports.GridEditCell=y;
@@ -7,36 +7,34 @@
7
7
  */
8
8
  "use client";
9
9
  import * as a from "react";
10
- import { getNestedValue as r } from "../utils/index.mjs";
11
- import { NumericTextBox as E } from "@progress/kendo-react-inputs";
12
- import { DatePicker as b } from "@progress/kendo-react-dateinputs";
13
- import { classNames as s, useId as N } from "@progress/kendo-react-common";
14
- import { useTableKeyboardNavigation as S, TABLE_PREVENT_SELECTION_ELEMENT as C } from "@progress/kendo-react-data-tools";
10
+ import { getNestedValue as E } from "../utils/index.mjs";
11
+ import { NumericTextBox as b } from "@progress/kendo-react-inputs";
12
+ import { DatePicker as N } from "@progress/kendo-react-dateinputs";
13
+ import { useUnstyled as y, uGrid as S, classNames as v, useId as T } from "@progress/kendo-react-common";
14
+ import { useTableKeyboardNavigation as _, TABLE_PREVENT_SELECTION_ELEMENT as I } from "@progress/kendo-react-data-tools";
15
15
  import { GRID_COL_INDEX_ATTRIBUTE as x } from "../constants/index.mjs";
16
- const L = (e) => {
17
- const i = r(e.field, e.dataItem);
16
+ const B = (e) => {
17
+ const i = E(e.field, e.dataItem), C = y(), h = C && C.uGrid ? C.uGrid : S;
18
18
  let d = null;
19
- const m = s("k-table-td", "k-grid-edit-cell", {
20
- "k-selected": e.isSelected
21
- }, e.className), I = N(), u = S(e.id);
19
+ const m = v(h.editTd({ selected: e.isSelected }), e.className), s = T(), u = _(e.id);
22
20
  let l = null, n = null;
23
- const k = a.useCallback(
21
+ const f = a.useCallback(
24
22
  (t) => {
25
23
  if (e.onChange) {
26
- const h = t.target.type === "checkbox" ? t.target.checked : t.target.value;
24
+ const k = t.target.type === "checkbox" ? t.target.checked : t.target.value;
27
25
  e.onChange({
28
26
  dataItem: e.dataItem,
29
27
  dataIndex: e.dataIndex,
30
28
  field: e.field,
31
29
  syntheticEvent: t,
32
- value: h
30
+ value: k
33
31
  });
34
32
  }
35
33
  },
36
34
  [e.onChange, e.dataItem, e.dataIndex, e.field]
37
35
  ), o = a.useCallback((t) => {
38
36
  e.onContextMenu && e.onContextMenu.call(void 0, t, e.dataItem, e.field);
39
- }, [e.onContextMenu, e.dataItem, e.field]), f = a.useCallback(
37
+ }, [e.onContextMenu, e.dataItem, e.field]), g = a.useCallback(
40
38
  (t) => {
41
39
  e.onChange && e.onChange({
42
40
  dataItem: e.dataItem,
@@ -61,11 +59,11 @@ const L = (e) => {
61
59
  role: "gridcell",
62
60
  ...u
63
61
  }, n = /* @__PURE__ */ a.createElement(
64
- E,
62
+ b,
65
63
  {
66
64
  value: i === void 0 ? null : i,
67
- onChange: f,
68
- [C]: !0
65
+ onChange: g,
66
+ [I]: !0
69
67
  }
70
68
  ), d = /* @__PURE__ */ a.createElement(
71
69
  "td",
@@ -88,11 +86,11 @@ const L = (e) => {
88
86
  role: "gridcell",
89
87
  ...u
90
88
  }, n = /* @__PURE__ */ a.createElement(
91
- b,
89
+ N,
92
90
  {
93
91
  value: i,
94
- onChange: f,
95
- [C]: !0
92
+ onChange: g,
93
+ [I]: !0
96
94
  }
97
95
  ), d = /* @__PURE__ */ a.createElement(
98
96
  "td",
@@ -118,13 +116,13 @@ const L = (e) => {
118
116
  "input",
119
117
  {
120
118
  checked: i || !1,
121
- id: I,
119
+ id: s,
122
120
  type: "checkbox",
123
121
  className: "k-checkbox k-checkbox-md k-rounded-md",
124
- onChange: k
122
+ onChange: f
125
123
  }
126
124
  )),
127
- /* @__PURE__ */ a.createElement("label", { className: "k-checkbox-label", htmlFor: I, key: 2 })
125
+ /* @__PURE__ */ a.createElement("label", { className: "k-checkbox-label", htmlFor: s, key: 2 })
128
126
  ], d = /* @__PURE__ */ a.createElement(
129
127
  "td",
130
128
  {
@@ -150,8 +148,8 @@ const L = (e) => {
150
148
  style: { width: "100%" },
151
149
  className: "k-input",
152
150
  value: i || "",
153
- onChange: k,
154
- [C]: !0
151
+ onChange: f,
152
+ [I]: !0
155
153
  }
156
154
  ), d = /* @__PURE__ */ a.createElement(
157
155
  "td",
@@ -161,13 +159,13 @@ const L = (e) => {
161
159
  n
162
160
  );
163
161
  }
164
- const g = e.editor || "text", c = e.cells;
162
+ const r = e.editor || "text", c = e.cells;
165
163
  if (c) {
166
164
  let t;
167
- return c.edit && c.edit[g] ? t = c.edit[g] : c.data && (t = c.data), /* @__PURE__ */ a.createElement(t, { ...e, tdProps: l }, n);
165
+ return c.edit && c.edit[r] ? t = c.edit[r] : c.data && (t = c.data), /* @__PURE__ */ a.createElement(t, { ...e, tdProps: l }, n);
168
166
  }
169
167
  return e.render ? e.render.call(void 0, d, e) : d;
170
168
  };
171
169
  export {
172
- L as GridEditCell
170
+ B as GridEditCell
173
171
  };
@@ -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 v=require("react"),m=require("@progress/kendo-react-inputs"),M=require("@progress/kendo-react-common"),N=require("@progress/kendo-svg-icons"),C=require("@progress/kendo-react-buttons");function x(n){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const s in n)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(o,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}return o.default=n,Object.freeze(o)}const t=x(v),f=n=>{const[o,s]=t.useState(""),i=n.columns.reduce((e,l)=>({...e,[l.id||""]:!!n.columnsState.find(a=>a.id===l.id)}),{}),[c,d]=t.useState(i),h=t.useMemo(()=>n.columns.filter(e=>{var l;return(l=e.title||e.field)==null?void 0:l.toLowerCase().includes(o.toLowerCase())}),[n.columns,o]),b=t.useCallback(()=>{const e=n.columns.filter(l=>c[l.id||""]);n.onColumnsChange.call(void 0,e),n.onCloseMenu.call(void 0)},[c,n.columns,n.onColumnsChange,n.onCloseMenu]),g=()=>{d(i)},r=t.useMemo(()=>Object.values(c).filter(e=>e).length,[c]),u=t.useMemo(()=>r===n.columns.length,[n.columns,r]),S=t.useCallback(()=>{const e={...c};Object.keys(e).forEach((l,a)=>e[l]=u&&a===0?!0:!u),d(e)},[c,u]),E=t.useCallback((e,l)=>{const a={...c};a[l||""]=e,d(a)},[c]),y=e=>{s(String(e.target.value))};return t.createElement("form",{className:"k-filter-menu"},t.createElement("div",{className:"k-filter-menu-container"},t.createElement(m.TextBox,{className:"k-searchbox",value:o,onChange:y,prefix:()=>t.createElement(m.InputPrefix,null,t.createElement(M.IconWrap,{name:"search",icon:N.searchIcon}))}),t.createElement("ul",{className:"k-reset k-multicheck-wrap"},!o&&t.createElement("li",{className:"k-item k-check-all-wrap"},t.createElement(m.Checkbox,{checked:u,onChange:S,label:"(Select all)"})),h.map((e,l)=>t.createElement("li",{key:e.id,className:"k-item"},t.createElement(m.Checkbox,{disabled:c[e.id||""]&&r===1,checked:c[e.id||""],onChange:a=>{var k;return E(!!((k=a.target.element)!=null&&k.checked),e.id)},label:e.title||e.field})))),t.createElement("div",{className:"k-filter-selected-items"},r," selected items"),t.createElement("div",{className:"k-actions k-actions-start k-actions-horizontal"},t.createElement(C.Button,{type:"button",themeColor:"primary",onClick:b},"Apply"),t.createElement(C.Button,{type:"button",onClick:g},"Reset"))))};f.displayName="GridColumnMenuColumnsList";exports.GridColumnMenuColumnsList=f;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),d=require("@progress/kendo-react-inputs"),x=require("@progress/kendo-react-common"),B=require("@progress/kendo-svg-icons"),g=require("@progress/kendo-react-buttons"),L=require("@progress/kendo-react-intl"),o=require("../messages/index.js");function R(n){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const i in n)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(a,i,r.get?r:{enumerable:!0,get:()=>n[i]})}}return a.default=n,Object.freeze(a)}const t=R(N),h=n=>{const[a,i]=t.useState(""),r=n.columns.reduce((e,l)=>({...e,[l.id||""]:!!n.columnsState.find(s=>s.id===l.id)}),{}),[c,k]=t.useState(r),b=t.useMemo(()=>n.columns.filter(e=>{var l;return(l=e.title||e.field)==null?void 0:l.toLowerCase().includes(a.toLowerCase())}),[n.columns,a]),C=L.useLocalization(),S=t.useCallback(()=>{const e=n.columns.filter(l=>c[l.id||""]);n.onColumnsChange.call(void 0,e),n.onCloseMenu.call(void 0)},[c,n.columns,n.onColumnsChange,n.onCloseMenu]),E=()=>{k(r)},u=t.useMemo(()=>Object.values(c).filter(e=>e).length,[c]),m=t.useMemo(()=>u===n.columns.length,[n.columns,u]),y=t.useCallback(()=>{const e={...c};Object.keys(e).forEach((l,s)=>e[l]=m&&s===0?!0:!m),k(e)},[c,m]),v=t.useCallback((e,l)=>{const s={...c};s[l||""]=e,k(s)},[c]),M=e=>{i(String(e.target.value))};return t.createElement("form",{className:"k-filter-menu"},t.createElement("div",{className:"k-filter-menu-container"},t.createElement(d.TextBox,{className:"k-searchbox",value:a,onChange:M,prefix:()=>t.createElement(d.InputPrefix,null,t.createElement(x.IconWrap,{name:"search",icon:B.searchIcon}))}),t.createElement("ul",{className:"k-reset k-multicheck-wrap"},!a&&t.createElement("li",{className:"k-item k-check-all-wrap"},t.createElement(d.Checkbox,{checked:m,onChange:y,label:C.toLanguageString(o.filterSelectAll,o.messages[o.filterSelectAll])})),b.map((e,l)=>t.createElement("li",{key:e.id,className:"k-item"},t.createElement(d.Checkbox,{disabled:c[e.id||""]&&u===1,checked:c[e.id||""],onChange:s=>{var f;return v(!!((f=s.target.element)!=null&&f.checked),e.id)},label:e.title||e.field})))),t.createElement("div",{className:"k-filter-selected-items"},u," selected items"),t.createElement("div",{className:"k-actions k-actions-start k-actions-horizontal"},t.createElement(g.Button,{type:"button",themeColor:"primary",onClick:S},C.toLanguageString(o.filterApplyButton,o.messages[o.filterApplyButton])),t.createElement(g.Button,{type:"button",onClick:E},C.toLanguageString(o.filterResetButton,o.messages[o.filterResetButton])))))};h.displayName="GridColumnMenuColumnsList";exports.GridColumnMenuColumnsList=h;
@@ -7,57 +7,59 @@
7
7
  */
8
8
  "use client";
9
9
  import * as t from "react";
10
- import { TextBox as N, InputPrefix as x, Checkbox as d } from "@progress/kendo-react-inputs";
11
- import { IconWrap as y } from "@progress/kendo-react-common";
12
- import { searchIcon as v } from "@progress/kendo-svg-icons";
13
- import { Button as C } from "@progress/kendo-react-buttons";
14
- const M = (l) => {
15
- const [o, k] = t.useState(""), r = l.columns.reduce((e, n) => ({ ...e, [n.id || ""]: !!l.columnsState.find((a) => a.id === n.id) }), {}), [c, i] = t.useState(r), h = t.useMemo(() => l.columns.filter((e) => {
10
+ import { TextBox as M, InputPrefix as B, Checkbox as k } from "@progress/kendo-react-inputs";
11
+ import { IconWrap as w } from "@progress/kendo-react-common";
12
+ import { searchIcon as A } from "@progress/kendo-svg-icons";
13
+ import { Button as f } from "@progress/kendo-react-buttons";
14
+ import { useLocalization as I } from "@progress/kendo-react-intl";
15
+ import { filterSelectAll as h, messages as u, filterApplyButton as g, filterResetButton as E } from "../messages/index.mjs";
16
+ const R = (l) => {
17
+ const [a, S] = t.useState(""), d = l.columns.reduce((e, n) => ({ ...e, [n.id || ""]: !!l.columnsState.find((o) => o.id === n.id) }), {}), [c, m] = t.useState(d), b = t.useMemo(() => l.columns.filter((e) => {
16
18
  var n;
17
- return (n = e.title || e.field) == null ? void 0 : n.toLowerCase().includes(o.toLowerCase());
18
- }), [l.columns, o]), f = t.useCallback(() => {
19
+ return (n = e.title || e.field) == null ? void 0 : n.toLowerCase().includes(a.toLowerCase());
20
+ }), [l.columns, a]), r = I(), N = t.useCallback(() => {
19
21
  const e = l.columns.filter((n) => c[n.id || ""]);
20
22
  l.onColumnsChange.call(void 0, e), l.onCloseMenu.call(void 0);
21
- }, [c, l.columns, l.onColumnsChange, l.onCloseMenu]), E = () => {
22
- i(r);
23
- }, s = t.useMemo(() => Object.values(c).filter((e) => e).length, [c]), m = t.useMemo(() => s === l.columns.length, [l.columns, s]), b = t.useCallback(() => {
23
+ }, [c, l.columns, l.onColumnsChange, l.onCloseMenu]), x = () => {
24
+ m(d);
25
+ }, s = t.useMemo(() => Object.values(c).filter((e) => e).length, [c]), i = t.useMemo(() => s === l.columns.length, [l.columns, s]), y = t.useCallback(() => {
24
26
  const e = { ...c };
25
- Object.keys(e).forEach((n, a) => e[n] = m && a === 0 ? !0 : !m), i(e);
26
- }, [c, m]), g = t.useCallback((e, n) => {
27
- const a = { ...c };
28
- a[n || ""] = e, i(a);
29
- }, [c]), S = (e) => {
30
- k(String(e.target.value));
27
+ Object.keys(e).forEach((n, o) => e[n] = i && o === 0 ? !0 : !i), m(e);
28
+ }, [c, i]), L = t.useCallback((e, n) => {
29
+ const o = { ...c };
30
+ o[n || ""] = e, m(o);
31
+ }, [c]), v = (e) => {
32
+ S(String(e.target.value));
31
33
  };
32
34
  return /* @__PURE__ */ t.createElement("form", { className: "k-filter-menu" }, /* @__PURE__ */ t.createElement("div", { className: "k-filter-menu-container" }, /* @__PURE__ */ t.createElement(
33
- N,
35
+ M,
34
36
  {
35
37
  className: "k-searchbox",
36
- value: o,
37
- onChange: S,
38
- prefix: () => /* @__PURE__ */ t.createElement(x, null, /* @__PURE__ */ t.createElement(y, { name: "search", icon: v }))
38
+ value: a,
39
+ onChange: v,
40
+ prefix: () => /* @__PURE__ */ t.createElement(B, null, /* @__PURE__ */ t.createElement(w, { name: "search", icon: A }))
39
41
  }
40
- ), /* @__PURE__ */ t.createElement("ul", { className: "k-reset k-multicheck-wrap" }, !o && /* @__PURE__ */ t.createElement("li", { className: "k-item k-check-all-wrap" }, /* @__PURE__ */ t.createElement(
41
- d,
42
+ ), /* @__PURE__ */ t.createElement("ul", { className: "k-reset k-multicheck-wrap" }, !a && /* @__PURE__ */ t.createElement("li", { className: "k-item k-check-all-wrap" }, /* @__PURE__ */ t.createElement(
43
+ k,
42
44
  {
43
- checked: m,
44
- onChange: b,
45
- label: "(Select all)"
45
+ checked: i,
46
+ onChange: y,
47
+ label: r.toLanguageString(h, u[h])
46
48
  }
47
- )), h.map((e, n) => /* @__PURE__ */ t.createElement("li", { key: e.id, className: "k-item" }, /* @__PURE__ */ t.createElement(
48
- d,
49
+ )), b.map((e, n) => /* @__PURE__ */ t.createElement("li", { key: e.id, className: "k-item" }, /* @__PURE__ */ t.createElement(
50
+ k,
49
51
  {
50
52
  disabled: c[e.id || ""] && s === 1,
51
53
  checked: c[e.id || ""],
52
- onChange: (a) => {
53
- var u;
54
- return g(!!((u = a.target.element) != null && u.checked), e.id);
54
+ onChange: (o) => {
55
+ var C;
56
+ return L(!!((C = o.target.element) != null && C.checked), e.id);
55
57
  },
56
58
  label: e.title || e.field
57
59
  }
58
- )))), /* @__PURE__ */ t.createElement("div", { className: "k-filter-selected-items" }, s, " selected items"), /* @__PURE__ */ t.createElement("div", { className: "k-actions k-actions-start k-actions-horizontal" }, /* @__PURE__ */ t.createElement(C, { type: "button", themeColor: "primary", onClick: f }, "Apply"), /* @__PURE__ */ t.createElement(C, { type: "button", onClick: E }, "Reset"))));
60
+ )))), /* @__PURE__ */ t.createElement("div", { className: "k-filter-selected-items" }, s, " selected items"), /* @__PURE__ */ t.createElement("div", { className: "k-actions k-actions-start k-actions-horizontal" }, /* @__PURE__ */ t.createElement(f, { type: "button", themeColor: "primary", onClick: N }, r.toLanguageString(g, u[g])), /* @__PURE__ */ t.createElement(f, { type: "button", onClick: x }, r.toLanguageString(E, u[E])))));
59
61
  };
60
- M.displayName = "GridColumnMenuColumnsList";
62
+ R.displayName = "GridColumnMenuColumnsList";
61
63
  export {
62
- M as GridColumnMenuColumnsList
64
+ R as GridColumnMenuColumnsList
63
65
  };