@progress/kendo-react-grid 15.0.1-develop.9 → 15.1.0-develop.2

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.
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),y=require("../../utils/GridContext.js"),u=require("@progress/kendo-react-data-tools"),m=require("@progress/kendo-react-common"),r=require("../hooks.js");function b(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 d=b(f),p=(e,n)=>{const t=d.useContext(y.GridContext),a=u.useTableKeyboardNavigation(e.id),i=r.useContextMenuHandler(e.dataItem,e.field),s=r.usePositionStyle(e),c=d.useCallback(o=>{o.isDefaultPrevented()||o.keyCode===m.Keys.enter&&(t!=null&&t.itemChange)&&(o.preventDefault(),t.itemChange({dataItem:e.dataItem,dataIndex:e.dataIndex,syntheticEvent:o,field:void 0,value:!e.expanded}),t==null||t.dispatchGroupExpand({type:u.GROUP_EXPAND_ACTION.TOGGLE,group:e.group},o))},[t,e.dataItem,e.dataIndex,e.expanded,e.group]);return{...a,...n?{onKeyDown:c}:{},onContextMenu:i,style:s}};exports.useGroupCellClientTdProps=p;
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),y=require("../../utils/GridContext.js"),r=require("@progress/kendo-react-data-tools"),C=require("@progress/kendo-react-common"),u=require("../hooks.js");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 d=g(f),m=(e,n)=>{const t=d.useContext(y.GridContext),a=r.useTableKeyboardNavigation(e.id),i=u.useContextMenuHandler(e.dataItem,e.field),s=u.usePositionStyle(e),c=d.useCallback(o=>{o.isDefaultPrevented()||o.keyCode===C.Keys.enter&&(t!=null&&t.itemChange)&&(o.preventDefault(),t.itemChange({dataItem:e.dataItem,dataIndex:e.dataIndex,syntheticEvent:o,field:void 0,value:!e.expanded}),t.dispatchGroupExpand({type:r.GROUP_EXPAND_ACTION.TOGGLE,group:e.group},o))},[t,e.dataItem,e.dataIndex,e.expanded,e.group]);return{...a,...n?{onKeyDown:c}:{},onContextMenu:i,style:s}};exports.useGroupCellClientTdProps=m;
@@ -10,9 +10,9 @@ import * as a from "react";
10
10
  import { GridContext as m } from "../../utils/GridContext.mjs";
11
11
  import { useTableKeyboardNavigation as s, GROUP_EXPAND_ACTION as f } from "@progress/kendo-react-data-tools";
12
12
  import { Keys as y } from "@progress/kendo-react-common";
13
- import { useContextMenuHandler as p, usePositionStyle as x } from "../hooks.mjs";
14
- const b = (t, o) => {
15
- const e = a.useContext(m), d = s(t.id), i = p(t.dataItem, t.field), u = x(t), r = a.useCallback(
13
+ import { useContextMenuHandler as x, usePositionStyle as C } from "../hooks.mjs";
14
+ const K = (t, o) => {
15
+ const e = a.useContext(m), d = s(t.id), i = x(t.dataItem, t.field), r = C(t), u = a.useCallback(
16
16
  (n) => {
17
17
  n.isDefaultPrevented() || n.keyCode === y.enter && (e != null && e.itemChange) && (n.preventDefault(), e.itemChange({
18
18
  dataItem: t.dataItem,
@@ -20,7 +20,7 @@ const b = (t, o) => {
20
20
  syntheticEvent: n,
21
21
  field: void 0,
22
22
  value: !t.expanded
23
- }), e == null || e.dispatchGroupExpand(
23
+ }), e.dispatchGroupExpand(
24
24
  {
25
25
  type: f.TOGGLE,
26
26
  group: t.group
@@ -33,12 +33,12 @@ const b = (t, o) => {
33
33
  return {
34
34
  ...d,
35
35
  ...o ? {
36
- onKeyDown: r
36
+ onKeyDown: u
37
37
  } : {},
38
38
  onContextMenu: i,
39
- style: u
39
+ style: r
40
40
  };
41
41
  };
42
42
  export {
43
- b as useGroupCellClientTdProps
43
+ K as useGroupCellClientTdProps
44
44
  };
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),u=require("../../utils/GridContext.js"),m=require("@progress/kendo-react-common"),l=require("@progress/kendo-svg-icons"),g=require("@progress/kendo-react-intl"),o=require("../../messages/index.js"),f=require("@progress/kendo-react-data-tools");function I(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const c=I(s),b=t=>{const e=c.useContext(u.GridContext),n=g.useLocalization(),a=t.expanded,i=a?o.detailCollapse:o.detailExpand,d=n.toLanguageString(i,o.messages[i]);return c.createElement("a",{onClick:r=>{r.preventDefault(),e!=null&&e.itemChange&&e.itemChange({dataItem:t.dataItem,dataIndex:t.dataIndex,syntheticEvent:r,field:t.field,value:!a,_expand:!0}),t.dataItem[e.dataItemKey]!==void 0&&(e==null||e.dispatchDetailExpand({type:f.DETAIL_EXPAND_ACTION.TOGGLE,id:t.dataItem[e.dataItemKey]}))},"aria-label":d,href:"#",tabIndex:-1},c.createElement(m.IconWrap,{name:a?"minus":"plus",icon:a?l.minusIcon:l.plusIcon}))};exports.GridHierarchyCellToggle=b;
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),u=require("../../utils/GridContext.js"),m=require("@progress/kendo-react-common"),d=require("@progress/kendo-svg-icons"),g=require("@progress/kendo-react-intl"),o=require("../../messages/index.js"),f=require("@progress/kendo-react-data-tools");function I(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=I(s),b=e=>{const t=c.useContext(u.GridContext),n=g.useLocalization(),a=e.expanded,i=a?o.detailCollapse:o.detailExpand,l=n.toLanguageString(i,o.messages[i]);return c.createElement("a",{onClick:r=>{r.preventDefault(),t!=null&&t.itemChange&&t.itemChange({dataItem:e.dataItem,dataIndex:e.dataIndex,syntheticEvent:r,field:e.field,value:!a,_expand:!0}),t&&e.dataItem[t.dataItemKey]!==void 0&&t.dispatchDetailExpand({type:f.DETAIL_EXPAND_ACTION.TOGGLE,id:e.dataItem[t.dataItemKey]})},"aria-label":l,href:"#",tabIndex:-1},c.createElement(m.IconWrap,{name:a?"minus":"plus",icon:a?d.minusIcon:d.plusIcon}))};exports.GridHierarchyCellToggle=b;
@@ -7,35 +7,35 @@
7
7
  */
8
8
  "use client";
9
9
  import * as n from "react";
10
- import { GridContext as l } from "../../utils/GridContext.mjs";
11
- import { IconWrap as r } from "@progress/kendo-react-common";
10
+ import { GridContext as r } from "../../utils/GridContext.mjs";
11
+ import { IconWrap as l } from "@progress/kendo-react-common";
12
12
  import { minusIcon as c, plusIcon as s } from "@progress/kendo-svg-icons";
13
13
  import { useLocalization as I } from "@progress/kendo-react-intl";
14
14
  import { detailCollapse as f, detailExpand as u, messages as p } from "../../messages/index.mjs";
15
15
  import { DETAIL_EXPAND_ACTION as x } from "@progress/kendo-react-data-tools";
16
- const D = (a) => {
17
- const e = n.useContext(l), o = I(), t = a.expanded, i = t ? f : u, d = o.toLanguageString(i, p[i]);
16
+ const D = (t) => {
17
+ const e = n.useContext(r), m = I(), a = t.expanded, i = a ? f : u, d = m.toLanguageString(i, p[i]);
18
18
  return /* @__PURE__ */ n.createElement(
19
19
  "a",
20
20
  {
21
- onClick: (m) => {
22
- m.preventDefault(), e != null && e.itemChange && e.itemChange({
23
- dataItem: a.dataItem,
24
- dataIndex: a.dataIndex,
25
- syntheticEvent: m,
26
- field: a.field,
27
- value: !t,
21
+ onClick: (o) => {
22
+ o.preventDefault(), e != null && e.itemChange && e.itemChange({
23
+ dataItem: t.dataItem,
24
+ dataIndex: t.dataIndex,
25
+ syntheticEvent: o,
26
+ field: t.field,
27
+ value: !a,
28
28
  _expand: !0
29
- }), a.dataItem[e.dataItemKey] !== void 0 && (e == null || e.dispatchDetailExpand({
29
+ }), e && t.dataItem[e.dataItemKey] !== void 0 && e.dispatchDetailExpand({
30
30
  type: x.TOGGLE,
31
- id: a.dataItem[e.dataItemKey]
32
- }));
31
+ id: t.dataItem[e.dataItemKey]
32
+ });
33
33
  },
34
34
  "aria-label": d,
35
35
  href: "#",
36
36
  tabIndex: -1
37
37
  },
38
- /* @__PURE__ */ n.createElement(r, { name: t ? "minus" : "plus", icon: t ? c : s })
38
+ /* @__PURE__ */ n.createElement(l, { name: a ? "minus" : "plus", icon: a ? c : s })
39
39
  );
40
40
  };
41
41
  export {
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),a=require("./GridSelectionCellInput.js"),s=require("./utils.js"),p=require("../hooks.js"),d=require("./useSelectionCellClientTdProps.js");function C(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const l in t)if(l!=="default"){const o=Object.getOwnPropertyDescriptor(t,l);Object.defineProperty(e,l,o.get?o:{enumerable:!0,get:()=>t[l]})}}return e.default=t,Object.freeze(e)}const r=C(u),g=t=>{const{cellProps:e}=t,{tdProps:l}=s.getSelectionCellTdProps(e),o=d.useSelectionCellClientTdProps(e),i=p.useLegacyCellProps(e),n=r.createElement(a.GridSelectionCellInput,{key:1,...e}),c=s.getCustomCell(e);return c?r.createElement(c,{...e,...i,tdProps:{...l,...o}},n):e.rowType!=="groupHeader"?r.createElement("td",{...l,...o},n):null};exports.GridSelectionCell=g;
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),P=require("@progress/kendo-react-common"),S=require("../../utils/GridContext.js"),y=require("./GridSelectionCellInput.js"),m=require("./utils.js"),b=require("../hooks.js"),I=require("./useSelectionCellClientTdProps.js");function T(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const l=T(f),k=t=>{var p;const{cellProps:e}=t,{tdProps:n}=m.getSelectionCellTdProps(e),o=I.useSelectionCellClientTdProps(e),g=b.useLegacyCellProps(e),c=l.useContext(S.GridContext),s=(p=e.isSelected)!=null?p:P.getNestedValue(e.field,e.dataItem),i=typeof s=="boolean"&&s,a=r=>{c==null||c.selectionChange({event:r,dataItem:e.dataItem,dataIndex:e.rowDataIndex,columnIndex:e.columnIndex})},u=r=>{i||a(r)},d=l.createElement(y.GridSelectionCellInput,{key:1,selected:i,onToggle:a}),C=m.getCustomCell(e);return C?l.createElement(C,{onClick:u,...e,...g,tdProps:{...n,...o}},d):e.rowType!=="groupHeader"?l.createElement("td",{onClick:u,...n,...o},d):null};exports.GridSelectionCell=k;
@@ -7,14 +7,35 @@
7
7
  */
8
8
  "use client";
9
9
  import * as t from "react";
10
- import { GridSelectionCellInput as p } from "./GridSelectionCellInput.mjs";
11
- import { getSelectionCellTdProps as m, getCustomCell as i } from "./utils.mjs";
12
- import { useLegacyCellProps as C } from "../hooks.mjs";
13
- import { useSelectionCellClientTdProps as d } from "./useSelectionCellClientTdProps.mjs";
14
- const g = (c) => {
15
- const { cellProps: e } = c, { tdProps: o } = m(e), r = d(e), s = C(e), l = /* @__PURE__ */ t.createElement(p, { key: 1, ...e }), n = i(e);
16
- return n ? /* @__PURE__ */ t.createElement(n, { ...e, ...s, tdProps: { ...o, ...r } }, l) : e.rowType !== "groupHeader" ? /* @__PURE__ */ t.createElement("td", { ...o, ...r }, l) : null;
10
+ import { getNestedValue as f } from "@progress/kendo-react-common";
11
+ import { GridContext as g } from "../../utils/GridContext.mjs";
12
+ import { GridSelectionCellInput as I } from "./GridSelectionCellInput.mjs";
13
+ import { getSelectionCellTdProps as P, getCustomCell as x } from "./utils.mjs";
14
+ import { useLegacyCellProps as y } from "../hooks.mjs";
15
+ import { useSelectionCellClientTdProps as S } from "./useSelectionCellClientTdProps.mjs";
16
+ const V = (C) => {
17
+ var p;
18
+ const { cellProps: e } = C, { tdProps: n } = P(e), r = S(e), u = y(e), o = t.useContext(g), c = (p = e.isSelected) != null ? p : f(e.field, e.dataItem), s = typeof c == "boolean" && c, a = (l) => {
19
+ o == null || o.selectionChange({
20
+ event: l,
21
+ dataItem: e.dataItem,
22
+ dataIndex: e.rowDataIndex,
23
+ columnIndex: e.columnIndex
24
+ });
25
+ }, d = (l) => {
26
+ s || a(l);
27
+ }, m = /* @__PURE__ */ t.createElement(I, { key: 1, selected: s, onToggle: a }), i = x(e);
28
+ return i ? /* @__PURE__ */ t.createElement(
29
+ i,
30
+ {
31
+ onClick: d,
32
+ ...e,
33
+ ...u,
34
+ tdProps: { ...n, ...r }
35
+ },
36
+ m
37
+ ) : e.rowType !== "groupHeader" ? /* @__PURE__ */ t.createElement("td", { onClick: d, ...n, ...r }, m) : null;
17
38
  };
18
39
  export {
19
- g as GridSelectionCell
40
+ V as GridSelectionCell
20
41
  };
@@ -5,9 +5,13 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { GridCellProps } from '../../interfaces/GridCellProps';
9
8
  import * as React from 'react';
9
+ interface GridSelectionCellInputProps {
10
+ selected: boolean;
11
+ onToggle?: (e: React.SyntheticEvent<HTMLElement>) => void;
12
+ }
10
13
  /**
11
14
  * @hidden
12
15
  */
13
- export declare const GridSelectionCellInput: (props: GridCellProps) => React.JSX.Element;
16
+ export declare const GridSelectionCellInput: (props: GridSelectionCellInputProps) => React.JSX.Element;
17
+ export {};
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),b=require("../../utils/GridContext.js"),r=require("@progress/kendo-react-common"),I=require("@progress/kendo-react-intl"),o=require("../../messages/index.js");function g(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=g(m),k=e=>{var i;const t=c.useContext(b.GridContext),n=r.useId(),a=I.useLocalization(),l=(i=e.isSelected)!=null?i:r.getNestedValue(e.field,e.dataItem),d=typeof l=="boolean"&&l,u=c.useCallback(s=>{t==null||t.selectionChange({event:s,dataItem:e.dataItem,dataIndex:e.rowDataIndex,columnIndex:e.columnIndex})},[t,e.columnIndex,e.rowDataIndex,e.dataItem]);return c.createElement("span",{className:"k-checkbox-wrap"},c.createElement("input",{id:n,tabIndex:-1,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md","aria-label":a.toLanguageString(o.selectRow,o.messages[o.selectRow]),"aria-checked":d,checked:d,onChange:u}))};exports.GridSelectionCellInput=k;
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),u=require("@progress/kendo-react-common"),d=require("@progress/kendo-react-intl"),o=require("../../messages/index.js");function p(t){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(c,e,n.get?n:{enumerable:!0,get:()=>t[e]})}}return c.default=t,Object.freeze(c)}const r=p(s),k=t=>{const{selected:c,onToggle:e}=t,n=u.useId(),l=d.useLocalization(),i=a=>{a.stopPropagation(),e==null||e(a)};return r.createElement("span",{className:"k-checkbox-wrap"},r.createElement("input",{id:n,tabIndex:-1,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md","aria-label":l.toLanguageString(o.selectRow,o.messages[o.selectRow]),"aria-checked":c,checked:c,readOnly:!0,onClick:i}))};exports.GridSelectionCellInput=k;
@@ -6,38 +6,29 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as a from "react";
10
- import { GridContext as r } from "../../utils/GridContext.mjs";
11
- import { useId as u, getNestedValue as I } from "@progress/kendo-react-common";
12
- import { useLocalization as x } from "@progress/kendo-react-intl";
13
- import { selectRow as d, messages as k } from "../../messages/index.mjs";
14
- const C = (e) => {
15
- var o;
16
- const t = a.useContext(r), l = u(), m = x(), n = (o = e.isSelected) != null ? o : I(e.field, e.dataItem), c = typeof n == "boolean" && n, i = a.useCallback(
17
- (s) => {
18
- t == null || t.selectionChange({
19
- event: s,
20
- dataItem: e.dataItem,
21
- dataIndex: e.rowDataIndex,
22
- columnIndex: e.columnIndex
23
- });
24
- },
25
- [t, e.columnIndex, e.rowDataIndex, e.dataItem]
26
- );
27
- return /* @__PURE__ */ a.createElement("span", { className: "k-checkbox-wrap" }, /* @__PURE__ */ a.createElement(
9
+ import * as o from "react";
10
+ import { useId as l } from "@progress/kendo-react-common";
11
+ import { useLocalization as m } from "@progress/kendo-react-intl";
12
+ import { selectRow as a, messages as d } from "../../messages/index.mjs";
13
+ const h = (n) => {
14
+ const { selected: t, onToggle: e } = n, r = l(), i = m(), s = (c) => {
15
+ c.stopPropagation(), e == null || e(c);
16
+ };
17
+ return /* @__PURE__ */ o.createElement("span", { className: "k-checkbox-wrap" }, /* @__PURE__ */ o.createElement(
28
18
  "input",
29
19
  {
30
- id: l,
20
+ id: r,
31
21
  tabIndex: -1,
32
22
  type: "checkbox",
33
23
  className: "k-checkbox k-checkbox-md k-rounded-md",
34
- "aria-label": m.toLanguageString(d, k[d]),
35
- "aria-checked": c,
36
- checked: c,
37
- onChange: i
24
+ "aria-label": i.toLanguageString(a, d[a]),
25
+ "aria-checked": t,
26
+ checked: t,
27
+ readOnly: !0,
28
+ onClick: s
38
29
  }
39
30
  ));
40
31
  };
41
32
  export {
42
- C as GridSelectionCellInput
33
+ h as GridSelectionCellInput
43
34
  };
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),p=require("./GridSelectionCellInput.js"),i=require("./GridSelectionCellServerContainer.js"),s=require("../../utils/index.js"),u=require("./utils.js");function S(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const l=S(C),f=r=>{const{cellProps:e}=r,{tdProps:t}=u.getSelectionCellTdProps(e),n=l.createElement(p.GridSelectionCellInput,{key:1,...e}),o=s.getClientCellProps(e),c=u.getCustomCell(e);if(c){const d=s.isClientReference(c);return l.createElement(i.GridSelectionCellServerContainer,{cellProps:o,tdProps:t,isCustom:!0,isClient:d},l.createElement(c,{...o,tdProps:t},n))}const a=e.rowType!=="groupHeader"?l.createElement("td",{...t},n):null;return l.createElement(i.GridSelectionCellServerContainer,{cellProps:o,tdProps:t},a)};exports.GridSelectionCellServer=f;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),f=require("@progress/kendo-react-common"),g=require("./GridSelectionCellInput.js"),u=require("./GridSelectionCellServerContainer.js"),a=require("../../utils/index.js"),d=require("./utils.js");function P(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const l=P(m),b=r=>{var s;const{cellProps:e}=r,{tdProps:t}=d.getSelectionCellTdProps(e),n=(s=e.isSelected)!=null?s:f.getNestedValue(e.field,e.dataItem),C=typeof n=="boolean"&&n,i=l.createElement(g.GridSelectionCellInput,{key:1,selected:C}),o=a.getClientCellProps(e),c=d.getCustomCell(e);if(c){const S=a.isClientReference(c);return l.createElement(u.GridSelectionCellServerContainer,{cellProps:o,tdProps:t,isCustom:!0,isClient:S},l.createElement(c,{...o,tdProps:t},i))}const p=e.rowType!=="groupHeader"?l.createElement("td",{...t},i):null;return l.createElement(u.GridSelectionCellServerContainer,{cellProps:o,tdProps:t},p)};exports.GridSelectionCellServer=b;
@@ -6,28 +6,30 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as t from "react";
9
- import { GridSelectionCellInput as p } from "./GridSelectionCellInput.mjs";
10
- import { GridSelectionCellServerContainer as c } from "./GridSelectionCellServerContainer.mjs";
11
- import { getClientCellProps as C, isClientReference as a } from "../../utils/index.mjs";
12
- import { getSelectionCellTdProps as u, getCustomCell as d } from "./utils.mjs";
13
- const E = (i) => {
14
- const { cellProps: e } = i, { tdProps: r } = u(e), n = /* @__PURE__ */ t.createElement(p, { key: 1, ...e }), l = C(e), o = d(e);
15
- if (o) {
16
- const m = a(o);
9
+ import { getNestedValue as C } from "@progress/kendo-react-common";
10
+ import { GridSelectionCellInput as u } from "./GridSelectionCellInput.mjs";
11
+ import { GridSelectionCellServerContainer as i } from "./GridSelectionCellServerContainer.mjs";
12
+ import { getClientCellProps as f, isClientReference as P } from "../../utils/index.mjs";
13
+ import { getSelectionCellTdProps as S, getCustomCell as g } from "./utils.mjs";
14
+ const I = (m) => {
15
+ var s;
16
+ const { cellProps: e } = m, { tdProps: l } = S(e), n = (s = e.isSelected) != null ? s : C(e.field, e.dataItem), p = typeof n == "boolean" && n, c = /* @__PURE__ */ t.createElement(u, { key: 1, selected: p }), o = f(e), r = g(e);
17
+ if (r) {
18
+ const d = P(r);
17
19
  return /* @__PURE__ */ t.createElement(
18
- c,
20
+ i,
19
21
  {
20
- cellProps: l,
21
- tdProps: r,
22
+ cellProps: o,
23
+ tdProps: l,
22
24
  isCustom: !0,
23
- isClient: m
25
+ isClient: d
24
26
  },
25
- /* @__PURE__ */ t.createElement(o, { ...l, tdProps: r }, n)
27
+ /* @__PURE__ */ t.createElement(r, { ...o, tdProps: l }, c)
26
28
  );
27
29
  }
28
- const s = e.rowType !== "groupHeader" ? /* @__PURE__ */ t.createElement("td", { ...r }, n) : null;
29
- return /* @__PURE__ */ t.createElement(c, { cellProps: l, tdProps: r }, s);
30
+ const a = e.rowType !== "groupHeader" ? /* @__PURE__ */ t.createElement("td", { ...l }, c) : null;
31
+ return /* @__PURE__ */ t.createElement(i, { cellProps: o, tdProps: l }, a);
30
32
  };
31
33
  export {
32
- E as GridSelectionCellServer
34
+ I as GridSelectionCellServer
33
35
  };
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),x=require("react-dom"),I=require("@progress/kendo-react-layout"),u=require("@progress/kendo-react-buttons"),r=require("@progress/kendo-react-labels"),M=require("@progress/kendo-react-intl"),_=require("@progress/kendo-react-dateinputs"),O=require("@progress/kendo-react-common"),E=require("@progress/kendo-svg-icons"),D=require("@progress/kendo-react-inputs"),C=require("@progress/kendo-react-data-tools"),B=require("@progress/kendo-react-dialogs"),c=require("@progress/kendo-react-form"),w=require("../utils/GridContext.js"),o=require("../messages/index.js");function z(n){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const l in n)if(l!=="default"){const i=Object.getOwnPropertyDescriptor(n,l);Object.defineProperty(d,l,i.get?i:{enumerable:!0,get:()=>n[l]})}}return d.default=n,Object.freeze(d)}const e=z(q),A=n=>{var h;const d=M.useLocalization(),l=O.useAdaptiveModeContext(),i=e.useContext(w.GridContext),g=(a,t)=>{i.onDialogEditSubmit&&i.onDialogEditSubmit({dataItem:a,syntheticEvent:t})},s=a=>{i.onDialogEditCancel&&i.onDialogEditCancel({syntheticEvent:a})},N=a=>{const{validationMessage:t,visited:P,id:f,valid:V,editor:F,value:b,label:k,...S}=a,T=i.mobileMode?"large":"medium";switch(F){case"numeric":return e.createElement(e.Fragment,null,e.createElement(r.Label,{editorId:f,className:"k-form-label"},k,":"),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(D.NumericTextBox,{...S,size:T,value:b,[C.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),t&&e.createElement(r.Error,null,t)));case"date":return e.createElement(e.Fragment,null,e.createElement(r.Label,{editorId:f,className:"k-form-label"},k,":"),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(_.DatePicker,{valid:!0,...S,value:b,adaptive:i.mobileMode,size:T,[C.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),t&&e.createElement(r.Error,null,t)));case"boolean":return e.createElement("div",{className:"k-form-field-wrap"},e.createElement(r.Label,{editorId:f,className:"k-form-label"},k,":  ",e.createElement(D.Checkbox,{...S,size:T,value:b,[C.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),t&&e.createElement(r.Error,null,t)));default:return e.createElement(e.Fragment,null,e.createElement(r.Label,{editorId:f,className:"k-form-label"},k,":"),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(D.TextBox,{...S,size:T,value:b||"",[C.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),t&&e.createElement(r.Error,null,t)))}},p=d.toLanguageString(o.editDialogTitle,o.messages[o.editDialogTitle]),L=d.toLanguageString(o.editDialogSaveButtonTitle,o.messages[o.editDialogSaveButtonTitle]),y=d.toLanguageString(o.editDialogCancelButtonTitle,o.messages[o.editDialogCancelButtonTitle]),R={animation:!0,navigatable:!1,navigatableElements:[],expand:!0,title:i.adpativeTitle||p,suffixActions:e.createElement(u.Button,{svgIcon:E.xIcon,onClick:s,fillMode:"flat"}),animationStyles:l&&i.adaptiveColumnMenuRef<=l.small?{top:0,width:"100%",height:"100%"}:void 0,className:"k-adaptive-actionsheet",position:l&&i.adaptiveColumnMenuRef<=l.small?"fullscreen":void 0},{customEditDialog:v}=n,m=(h=n.columns)==null?void 0:h.filter(a=>a.editable);return e.createElement(e.Fragment,null,x.createPortal(e.createElement(e.Fragment,null,i.mobileMode?e.createElement(e.Fragment,null,v?e.createElement(v,{columns:n.columns,dataItem:n.dataItem,onSubmit:g,onCancel:s}):e.createElement(c.Form,{initialValues:n.dataItem,onSubmit:g,id:"kendo-grid-edit-dialog",render:a=>e.createElement(I.ActionSheet,{...R},e.createElement(I.ActionSheetContent,null,e.createElement(c.FormElement,null,m==null?void 0:m.map(t=>e.createElement(c.FieldWrapper,{key:t.field},e.createElement(c.Field,{name:t.field,id:t.field,editor:t.editor,component:N,label:t.title||t.field,validator:t==null?void 0:t.validator}))))),e.createElement(I.ActionSheetFooter,null,e.createElement(u.Button,{onClick:s,type:"reset",icon:"cancel",size:"large",svgIcon:E.cancelIcon},y),e.createElement(u.Button,{type:"submit",themeColor:"primary",size:"large",disabled:!a.allowSubmit||!a.valid,onClick:a.onSubmit,icon:"save",svgIcon:E.saveIcon},L)))})):v?e.createElement(v,{columns:n.columns,dataItem:n.dataItem,onSubmit:g,onCancel:s}):e.createElement(c.Form,{initialValues:n.dataItem,onSubmit:g,id:"kendo-grid-edit-dialog",render:a=>e.createElement(B.Dialog,{title:p,width:450,onClose:t=>s(t.syntheticEvent)},e.createElement(c.FormElement,null,m==null?void 0:m.map(t=>e.createElement(c.FieldWrapper,{key:t.field},e.createElement(c.Field,{name:t.field,id:t.field,editor:t.editor,component:N,label:t.title||t.field,validator:t==null?void 0:t.validator})))),e.createElement(B.DialogActionsBar,{layout:"start"},e.createElement(u.Button,{type:"submit",themeColor:"primary",disabled:!a.allowSubmit||!a.valid,onClick:a.onSubmit,icon:"save",svgIcon:E.saveIcon},L),e.createElement(u.Button,{onClick:s,type:"reset",icon:"cancel",svgIcon:E.cancelIcon},y)))})),document.body))};exports.GridEditDialog=A;
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),x=require("react-dom"),I=require("@progress/kendo-react-layout"),u=require("@progress/kendo-react-buttons"),r=require("@progress/kendo-react-labels"),M=require("@progress/kendo-react-intl"),_=require("@progress/kendo-react-dateinputs"),O=require("@progress/kendo-react-common"),E=require("@progress/kendo-svg-icons"),D=require("@progress/kendo-react-inputs"),C=require("@progress/kendo-react-data-tools"),B=require("@progress/kendo-react-dialogs"),c=require("@progress/kendo-react-form"),w=require("../utils/GridContext.js"),o=require("../messages/index.js");function z(n){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const i in n)if(i!=="default"){const l=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(d,i,l.get?l:{enumerable:!0,get:()=>n[i]})}}return d.default=n,Object.freeze(d)}const e=z(q),A=n=>{var h;const d=M.useLocalization(),i=O.useAdaptiveModeContext(),l=e.useContext(w.GridContext),g=(a,t)=>{l.onDialogEditSubmit&&l.onDialogEditSubmit({dataItem:a,syntheticEvent:t})},m=a=>{l.onDialogEditCancel&&l.onDialogEditCancel({syntheticEvent:a})},N=a=>{const{validationMessage:t,visited:P,id:f,valid:V,editor:F,value:b,label:k,...S}=a,T=l.mobileMode?"large":"medium";switch(F){case"numeric":return e.createElement(e.Fragment,null,e.createElement(r.Label,{editorId:f,className:"k-form-label"},k,":"),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(D.NumericTextBox,{...S,size:T,value:b,[C.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),t&&e.createElement(r.Error,null,t)));case"date":return e.createElement(e.Fragment,null,e.createElement(r.Label,{editorId:f,className:"k-form-label"},k,":"),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(_.DatePicker,{valid:!0,...S,value:b,adaptive:l.mobileMode,size:T,[C.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),t&&e.createElement(r.Error,null,t)));case"boolean":return e.createElement("div",{className:"k-form-field-wrap"},e.createElement(r.Label,{editorId:f,className:"k-form-label"},k,":  ",e.createElement(D.Checkbox,{...S,size:T,value:b,[C.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),t&&e.createElement(r.Error,null,t)));default:return e.createElement(e.Fragment,null,e.createElement(r.Label,{editorId:f,className:"k-form-label"},k,":"),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(D.TextBox,{...S,size:T,value:b||"",[C.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),t&&e.createElement(r.Error,null,t)))}},p=d.toLanguageString(o.editDialogTitle,o.messages[o.editDialogTitle]),L=d.toLanguageString(o.editDialogSaveButtonTitle,o.messages[o.editDialogSaveButtonTitle]),y=d.toLanguageString(o.editDialogCancelButtonTitle,o.messages[o.editDialogCancelButtonTitle]),R={animation:!0,navigatable:!1,navigatableElements:[],expand:!0,title:l.adpativeTitle||p,suffixActions:e.createElement(u.Button,{svgIcon:E.xIcon,onClick:m,fillMode:"flat"}),animationStyles:i&&l.adaptiveColumnMenuRef<=i.small?{top:0,width:"100%",height:"100%"}:void 0,className:"k-adaptive-actionsheet",position:i&&l.adaptiveColumnMenuRef<=i.small?"fullscreen":void 0},{customEditDialog:v}=n,s=(h=n.columns)==null?void 0:h.filter(a=>a.editable);return e.createElement(e.Fragment,null,x.createPortal(e.createElement(e.Fragment,null,l.mobileMode?e.createElement(e.Fragment,null,v?e.createElement(v,{columns:n.columns,dataItem:n.dataItem,onSubmit:g,onCancel:m}):e.createElement(c.Form,{initialValues:n.dataItem,onSubmit:g,id:"kendo-grid-edit-dialog",render:a=>e.createElement(I.ActionSheet,{...R},e.createElement(I.ActionSheetContent,null,e.createElement(c.FormElement,null,s==null?void 0:s.map(t=>e.createElement(c.FieldWrapper,{key:t.field},e.createElement(c.Field,{name:t.field,id:t.field,editor:t.editor,component:N,label:t.title||t.field,validator:t.validator}))))),e.createElement(I.ActionSheetFooter,null,e.createElement(u.Button,{onClick:m,type:"reset",icon:"cancel",size:"large",svgIcon:E.cancelIcon},y),e.createElement(u.Button,{type:"submit",themeColor:"primary",size:"large",disabled:!a.allowSubmit||!a.valid,onClick:a.onSubmit,icon:"save",svgIcon:E.saveIcon},L)))})):v?e.createElement(v,{columns:n.columns,dataItem:n.dataItem,onSubmit:g,onCancel:m}):e.createElement(c.Form,{initialValues:n.dataItem,onSubmit:g,id:"kendo-grid-edit-dialog",render:a=>e.createElement(B.Dialog,{title:p,width:450,onClose:t=>m(t.syntheticEvent)},e.createElement(c.FormElement,null,s==null?void 0:s.map(t=>e.createElement(c.FieldWrapper,{key:t.field},e.createElement(c.Field,{name:t.field,id:t.field,editor:t.editor,component:N,label:t.title||t.field,validator:t.validator})))),e.createElement(B.DialogActionsBar,{layout:"start"},e.createElement(u.Button,{type:"submit",themeColor:"primary",disabled:!a.allowSubmit||!a.valid,onClick:a.onSubmit,icon:"save",svgIcon:E.saveIcon},L),e.createElement(u.Button,{onClick:m,type:"reset",icon:"cancel",svgIcon:E.cancelIcon},y)))})),document.body))};exports.GridEditDialog=A;
@@ -21,14 +21,14 @@ import { Dialog as Q, DialogActionsBar as U } from "@progress/kendo-react-dialog
21
21
  import { Form as T, FormElement as F, FieldWrapper as M, Field as w } from "@progress/kendo-react-form";
22
22
  import { GridContext as X } from "../utils/GridContext.mjs";
23
23
  import { editDialogTitle as z, messages as S, editDialogSaveButtonTitle as B, editDialogCancelButtonTitle as L } from "../messages/index.mjs";
24
- const ue = (l) => {
24
+ const ue = (i) => {
25
25
  var y;
26
- const C = W(), m = q(), i = e.useContext(X), c = (a, t) => {
27
- i.onDialogEditSubmit && i.onDialogEditSubmit({ dataItem: a, syntheticEvent: t });
26
+ const C = W(), m = q(), l = e.useContext(X), c = (a, t) => {
27
+ l.onDialogEditSubmit && l.onDialogEditSubmit({ dataItem: a, syntheticEvent: t });
28
28
  }, n = (a) => {
29
- i.onDialogEditCancel && i.onDialogEditCancel({ syntheticEvent: a });
29
+ l.onDialogEditCancel && l.onDialogEditCancel({ syntheticEvent: a });
30
30
  }, k = (a) => {
31
- const { validationMessage: t, visited: Y, id: s, valid: Z, editor: R, value: E, label: u, ...f } = a, g = i.mobileMode ? "large" : "medium";
31
+ const { validationMessage: t, visited: Y, id: s, valid: Z, editor: R, value: E, label: u, ...f } = a, g = l.mobileMode ? "large" : "medium";
32
32
  switch (R) {
33
33
  case "numeric":
34
34
  return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(v, { editorId: s, className: "k-form-label" }, u, ":"), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(
@@ -47,7 +47,7 @@ const ue = (l) => {
47
47
  valid: !0,
48
48
  ...f,
49
49
  value: E,
50
- adaptive: i.mobileMode,
50
+ adaptive: l.mobileMode,
51
51
  size: g,
52
52
  [p]: !0
53
53
  }
@@ -84,28 +84,28 @@ const ue = (l) => {
84
84
  navigatable: !1,
85
85
  navigatableElements: [],
86
86
  expand: !0,
87
- title: i.adpativeTitle || I,
87
+ title: l.adpativeTitle || I,
88
88
  suffixActions: /* @__PURE__ */ e.createElement(r, { svgIcon: H, onClick: n, fillMode: "flat" }),
89
- animationStyles: m && i.adaptiveColumnMenuRef <= m.small ? { top: 0, width: "100%", height: "100%" } : void 0,
89
+ animationStyles: m && l.adaptiveColumnMenuRef <= m.small ? { top: 0, width: "100%", height: "100%" } : void 0,
90
90
  className: "k-adaptive-actionsheet",
91
- position: m && i.adaptiveColumnMenuRef <= m.small ? "fullscreen" : void 0
92
- }, { customEditDialog: d } = l, o = (y = l.columns) == null ? void 0 : y.filter((a) => a.editable);
91
+ position: m && l.adaptiveColumnMenuRef <= m.small ? "fullscreen" : void 0
92
+ }, { customEditDialog: d } = i, o = (y = i.columns) == null ? void 0 : y.filter((a) => a.editable);
93
93
  return /* @__PURE__ */ e.createElement(e.Fragment, null, O.createPortal(
94
94
  // eslint-disable-next-line react/jsx-no-useless-fragment
95
- /* @__PURE__ */ e.createElement(e.Fragment, null, i.mobileMode ? (
95
+ /* @__PURE__ */ e.createElement(e.Fragment, null, l.mobileMode ? (
96
96
  // eslint-disable-next-line react/jsx-no-useless-fragment
97
97
  /* @__PURE__ */ e.createElement(e.Fragment, null, d ? /* @__PURE__ */ e.createElement(
98
98
  d,
99
99
  {
100
- columns: l.columns,
101
- dataItem: l.dataItem,
100
+ columns: i.columns,
101
+ dataItem: i.dataItem,
102
102
  onSubmit: c,
103
103
  onCancel: n
104
104
  }
105
105
  ) : /* @__PURE__ */ e.createElement(
106
106
  T,
107
107
  {
108
- initialValues: l.dataItem,
108
+ initialValues: i.dataItem,
109
109
  onSubmit: c,
110
110
  id: "kendo-grid-edit-dialog",
111
111
  render: (a) => /* @__PURE__ */ e.createElement(V, { ...A }, /* @__PURE__ */ e.createElement(_, null, /* @__PURE__ */ e.createElement(F, null, o == null ? void 0 : o.map((t) => /* @__PURE__ */ e.createElement(M, { key: t.field }, /* @__PURE__ */ e.createElement(
@@ -116,7 +116,7 @@ const ue = (l) => {
116
116
  editor: t.editor,
117
117
  component: k,
118
118
  label: t.title || t.field,
119
- validator: t == null ? void 0 : t.validator
119
+ validator: t.validator
120
120
  }
121
121
  ))))), /* @__PURE__ */ e.createElement(G, null, /* @__PURE__ */ e.createElement(
122
122
  r,
@@ -146,15 +146,15 @@ const ue = (l) => {
146
146
  ) : d ? /* @__PURE__ */ e.createElement(
147
147
  d,
148
148
  {
149
- columns: l.columns,
150
- dataItem: l.dataItem,
149
+ columns: i.columns,
150
+ dataItem: i.dataItem,
151
151
  onSubmit: c,
152
152
  onCancel: n
153
153
  }
154
154
  ) : /* @__PURE__ */ e.createElement(
155
155
  T,
156
156
  {
157
- initialValues: l.dataItem,
157
+ initialValues: i.dataItem,
158
158
  onSubmit: c,
159
159
  id: "kendo-grid-edit-dialog",
160
160
  render: (a) => /* @__PURE__ */ e.createElement(
@@ -172,7 +172,7 @@ const ue = (l) => {
172
172
  editor: t.editor,
173
173
  component: k,
174
174
  label: t.title || t.field,
175
- validator: t == null ? void 0 : t.validator
175
+ validator: t.validator
176
176
  }
177
177
  )))),
178
178
  /* @__PURE__ */ e.createElement(U, { layout: "start" }, /* @__PURE__ */ e.createElement(