@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/GridComponent.js +1 -1
- package/GridComponent.mjs +337 -327
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +24 -20
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/index.d.mts +42 -1
- package/index.d.ts +42 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
- package/utils/index.js +1 -1
- package/utils/index.mjs +122 -116
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
|
|
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;
|
package/cells/GridCell.mjs
CHANGED
|
@@ -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
|
|
9
|
-
import { getNestedValue as
|
|
10
|
-
import { GRID_COL_INDEX_ATTRIBUTE as
|
|
11
|
-
import { GridCellContainer as
|
|
12
|
-
import { uGrid as
|
|
13
|
-
const
|
|
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,
|
|
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__ */
|
|
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 =
|
|
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
|
|
26
|
-
|
|
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:
|
|
36
|
+
className: i,
|
|
33
37
|
role: "gridcell",
|
|
34
38
|
"aria-colindex": e.ariaColumnIndex,
|
|
35
39
|
"aria-selected": e.isSelected,
|
|
36
|
-
[
|
|
37
|
-
}, c = /* @__PURE__ */
|
|
40
|
+
[E]: e.columnIndex
|
|
41
|
+
}, c = /* @__PURE__ */ a.createElement("td", { ...t }, n);
|
|
38
42
|
}
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
const
|
|
42
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
48
|
+
return /* @__PURE__ */ a.createElement(C, { cellProps: o, content: n, tdProps: t }, c);
|
|
45
49
|
};
|
|
46
50
|
export {
|
|
47
|
-
|
|
51
|
+
x as GridCell
|
|
48
52
|
};
|