@progress/kendo-react-grid 9.4.0-develop.14 → 9.4.0-develop.16

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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),s=require("../utils/index.js"),y=require("../constants/index.js"),m=require("./client/GridCellContainer.js"),f=require("@progress/kendo-react-common");function S(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const c=S(g),G=e=>{let n=null,t=null,l=null;const r=e.unstyled,C=r&&r.uGrid?r.uGrid:f.uGrid;if(e.rowType==="groupFooter")t={className:e.className},n=c.createElement("td",{...t},l);else if(e.rowType!=="groupHeader"){if(e.field!==void 0){const i=s.getNestedValue(e.field,e.dataItem);i!=null&&(l=e.intl&&e.format?e.intl.format(e.format,i):i.toString())}const a=f.classNames(C.td({selected:e.isSelected,sorted:e.isSorted,alt:e.isAlt}),e.className);t={colSpan:e.colSpan,style:e.style,className:a,role:"gridcell","aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[y.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex},n=c.createElement("td",{...t},l)}const d=s.getClientCellProps(e),u=e.rowType||"data",o=e.cells;if(o&&o[u]){const a=o[u],i=s.isClientReference(a);return c.createElement(m.GridCellContainer,{cellProps:d,tdProps:t,isCustom:!0,isClient:i},c.createElement(a,{...d,tdProps:t},l))}return c.createElement(m.GridCellContainer,{cellProps:d,content:l,tdProps:t},n)};exports.GridCell=G;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),u=require("../utils/index.js"),T=require("../constants/index.js"),g=require("./client/GridCellContainer.js"),S=require("@progress/kendo-react-common");function b(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=b(G),w=e=>{var m,f,C;let n=null,t=null,l=null;const r=e.unstyled,y=r&&r.uGrid?r.uGrid:S.uGrid;if(((m=e._rowSpan)==null?void 0:m.count)===null)return null;if(e.rowType==="groupFooter")t={className:e.className},n=a.createElement("td",{...t},l);else if(e.rowType!=="groupHeader"){if(e.field!==void 0){const i=u.getNestedValue(e.field,e.dataItem);i!=null&&(l=e.intl&&e.format?e.intl.format(e.format,i):i.toString())}const c=S.classNames(y.td({selected:e.isSelected,sorted:e.isSorted,alt:e.isAlt}),e.className);t={rowSpan:(C=(f=e._rowSpan)==null?void 0:f.count)!=null?C:void 0,colSpan:e.colSpan,style:e.style,className:c,role:"gridcell","aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[T.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex},n=a.createElement("td",{...t},l)}const o=u.getClientCellProps(e),s=e.rowType||"data",d=e.cells;if(d&&d[s]){const c=d[s],i=u.isClientReference(c);return a.createElement(g.GridCellContainer,{cellProps:o,tdProps:t,isCustom:!0,isClient:i},a.createElement(c,{...o,tdProps:t},l))}return a.createElement(g.GridCellContainer,{cellProps:o,content:l,tdProps:t},n)};exports.GridCell=w;
@@ -5,44 +5,48 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as i from "react";
9
- import { getNestedValue as f, getClientCellProps as C, isClientReference as g } from "../utils/index.mjs";
10
- import { GRID_COL_INDEX_ATTRIBUTE as y } from "../constants/index.mjs";
11
- import { GridCellContainer as s } from "./client/GridCellContainer.mjs";
12
- import { uGrid as E, classNames as N } from "@progress/kendo-react-common";
13
- const R = (e) => {
8
+ import * as a from "react";
9
+ import { getNestedValue as g, getClientCellProps as y, isClientReference as w } from "../utils/index.mjs";
10
+ import { GRID_COL_INDEX_ATTRIBUTE as E } from "../constants/index.mjs";
11
+ import { GridCellContainer as C } from "./client/GridCellContainer.mjs";
12
+ import { uGrid as N, classNames as T } from "@progress/kendo-react-common";
13
+ const x = (e) => {
14
+ var u, s, f;
14
15
  let c = null, t = null, n = null;
15
- const d = e.unstyled, u = d && d.uGrid ? d.uGrid : E;
16
+ const d = e.unstyled, S = d && d.uGrid ? d.uGrid : N;
17
+ if (((u = e._rowSpan) == null ? void 0 : u.count) === null)
18
+ return null;
16
19
  if (e.rowType === "groupFooter")
17
20
  t = {
18
21
  className: e.className
19
- }, c = /* @__PURE__ */ i.createElement("td", { ...t }, n);
22
+ }, c = /* @__PURE__ */ a.createElement("td", { ...t }, n);
20
23
  else if (e.rowType !== "groupHeader") {
21
24
  if (e.field !== void 0) {
22
- const l = f(e.field, e.dataItem);
25
+ const l = g(e.field, e.dataItem);
23
26
  l != null && (n = e.intl && e.format ? e.intl.format(e.format, l) : l.toString());
24
27
  }
25
- const a = N(
26
- u.td({ selected: e.isSelected, sorted: e.isSorted, alt: e.isAlt }),
28
+ const i = T(
29
+ S.td({ selected: e.isSelected, sorted: e.isSorted, alt: e.isAlt }),
27
30
  e.className
28
31
  );
29
32
  t = {
33
+ rowSpan: (f = (s = e._rowSpan) == null ? void 0 : s.count) != null ? f : void 0,
30
34
  colSpan: e.colSpan,
31
35
  style: e.style,
32
- className: a,
36
+ className: i,
33
37
  role: "gridcell",
34
38
  "aria-colindex": e.ariaColumnIndex,
35
39
  "aria-selected": e.isSelected,
36
- [y]: e.columnIndex
37
- }, c = /* @__PURE__ */ i.createElement("td", { ...t }, n);
40
+ [E]: e.columnIndex
41
+ }, c = /* @__PURE__ */ a.createElement("td", { ...t }, n);
38
42
  }
39
- const r = C(e), o = e.rowType || "data", m = e.cells;
40
- if (m && m[o]) {
41
- const a = m[o], l = g(a);
42
- return /* @__PURE__ */ i.createElement(s, { cellProps: r, tdProps: t, isCustom: !0, isClient: l }, /* @__PURE__ */ i.createElement(a, { ...r, tdProps: t }, n));
43
+ const o = y(e), m = e.rowType || "data", r = e.cells;
44
+ if (r && r[m]) {
45
+ const i = r[m], l = w(i);
46
+ return /* @__PURE__ */ a.createElement(C, { cellProps: o, tdProps: t, isCustom: !0, isClient: l }, /* @__PURE__ */ a.createElement(i, { ...o, tdProps: t }, n));
43
47
  }
44
- return /* @__PURE__ */ i.createElement(s, { cellProps: r, content: n, tdProps: t }, c);
48
+ return /* @__PURE__ */ a.createElement(C, { cellProps: o, content: n, tdProps: t }, c);
45
49
  };
46
50
  export {
47
- R as GridCell
51
+ x as GridCell
48
52
  };