@progress/kendo-react-grid 7.2.4-develop.2 → 7.2.4-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.
Files changed (174) hide show
  1. package/Grid.js +8 -0
  2. package/Grid.mjs +1108 -0
  3. package/GridColumn.js +8 -0
  4. package/GridColumn.mjs +53 -0
  5. package/GridNoRecords.js +8 -0
  6. package/GridNoRecords.mjs +25 -0
  7. package/GridToolbar.js +8 -0
  8. package/GridToolbar.mjs +39 -0
  9. package/StatusBar.js +8 -0
  10. package/StatusBar.mjs +53 -0
  11. package/VirtualScroll.js +8 -0
  12. package/VirtualScroll.mjs +128 -0
  13. package/VirtualScrollFixed.js +8 -0
  14. package/VirtualScrollFixed.mjs +86 -0
  15. package/cells/GridCell.js +8 -0
  16. package/cells/GridCell.mjs +57 -0
  17. package/cells/GridDetailCell.js +8 -0
  18. package/cells/GridDetailCell.mjs +30 -0
  19. package/cells/GridDetailHierarchyCell.js +8 -0
  20. package/cells/GridDetailHierarchyCell.mjs +17 -0
  21. package/cells/GridEditCell.js +8 -0
  22. package/cells/GridEditCell.mjs +172 -0
  23. package/cells/GridFilterCell.js +8 -0
  24. package/cells/GridFilterCell.mjs +145 -0
  25. package/cells/GridGroupCell.js +8 -0
  26. package/cells/GridGroupCell.mjs +115 -0
  27. package/cells/GridHierarchyCell.js +8 -0
  28. package/cells/GridHierarchyCell.mjs +84 -0
  29. package/cells/GridSelectionCell.js +8 -0
  30. package/cells/GridSelectionCell.mjs +54 -0
  31. package/columnMenu/GridColumnMenuCheckboxFilter.js +8 -0
  32. package/columnMenu/GridColumnMenuCheckboxFilter.mjs +199 -0
  33. package/columnMenu/GridColumnMenuColumnsList.js +8 -0
  34. package/columnMenu/GridColumnMenuColumnsList.mjs +60 -0
  35. package/columnMenu/GridColumnMenuFilter.js +8 -0
  36. package/columnMenu/GridColumnMenuFilter.mjs +188 -0
  37. package/columnMenu/GridColumnMenuFilterCell.js +8 -0
  38. package/columnMenu/GridColumnMenuFilterCell.mjs +96 -0
  39. package/columnMenu/GridColumnMenuFilterUI.js +8 -0
  40. package/columnMenu/GridColumnMenuFilterUI.mjs +36 -0
  41. package/columnMenu/GridColumnMenuGroup.js +8 -0
  42. package/columnMenu/GridColumnMenuGroup.mjs +50 -0
  43. package/columnMenu/GridColumnMenuItem.js +8 -0
  44. package/columnMenu/GridColumnMenuItem.mjs +22 -0
  45. package/columnMenu/GridColumnMenuItemContent.js +8 -0
  46. package/columnMenu/GridColumnMenuItemContent.mjs +30 -0
  47. package/columnMenu/GridColumnMenuItemGroup.js +8 -0
  48. package/columnMenu/GridColumnMenuItemGroup.mjs +30 -0
  49. package/columnMenu/GridColumnMenuSort.js +8 -0
  50. package/columnMenu/GridColumnMenuSort.mjs +75 -0
  51. package/columnMenu/GridColumnMenuWrapper.js +8 -0
  52. package/columnMenu/GridColumnMenuWrapper.mjs +91 -0
  53. package/constants/index.js +8 -0
  54. package/constants/index.mjs +15 -0
  55. package/dist/cdn/js/kendo-react-grid.js +8 -5
  56. package/drag/ColumnDraggable.js +8 -0
  57. package/drag/ColumnDraggable.mjs +43 -0
  58. package/drag/ColumnResize.js +8 -0
  59. package/drag/ColumnResize.mjs +128 -0
  60. package/drag/CommonDragLogic.js +8 -0
  61. package/drag/CommonDragLogic.mjs +104 -0
  62. package/drag/GroupingIndicator.js +8 -0
  63. package/drag/GroupingIndicator.mjs +91 -0
  64. package/filterCommon.js +8 -0
  65. package/filterCommon.mjs +103 -0
  66. package/footer/Footer.js +8 -0
  67. package/footer/Footer.mjs +76 -0
  68. package/footer/FooterRow.js +8 -0
  69. package/footer/FooterRow.mjs +46 -0
  70. package/header/FilterRow.js +8 -0
  71. package/header/FilterRow.mjs +96 -0
  72. package/header/GridHeaderCell.js +8 -0
  73. package/header/GridHeaderCell.mjs +38 -0
  74. package/header/GridHeaderSelectionCell.js +8 -0
  75. package/header/GridHeaderSelectionCell.mjs +44 -0
  76. package/header/GroupPanel.js +8 -0
  77. package/header/GroupPanel.mjs +60 -0
  78. package/header/Header.js +8 -0
  79. package/header/Header.mjs +107 -0
  80. package/header/HeaderRow.js +8 -0
  81. package/header/HeaderRow.mjs +155 -0
  82. package/index.d.mts +2771 -5
  83. package/index.d.ts +2771 -57
  84. package/index.js +8 -5
  85. package/index.mjs +89 -3845
  86. package/interfaces/GridSortSettings.js +8 -0
  87. package/interfaces/GridSortSettings.mjs +12 -0
  88. package/messages/index.js +8 -0
  89. package/messages/index.mjs +105 -0
  90. package/package-metadata.js +8 -0
  91. package/package-metadata.mjs +19 -0
  92. package/package.json +10 -10
  93. package/paging/GridPagerSettings.js +8 -0
  94. package/paging/GridPagerSettings.mjs +28 -0
  95. package/rows/GridDetailRow.js +8 -0
  96. package/rows/GridDetailRow.mjs +20 -0
  97. package/rows/GridRow.js +8 -0
  98. package/rows/GridRow.mjs +51 -0
  99. package/utils/index.js +8 -0
  100. package/utils/index.mjs +180 -0
  101. package/Grid.d.ts +0 -267
  102. package/GridColumn.d.ts +0 -28
  103. package/GridNoRecords.d.ts +0 -40
  104. package/GridToolbar.d.ts +0 -54
  105. package/ScrollMode.d.ts +0 -5
  106. package/StatusBar.d.ts +0 -51
  107. package/VirtualScroll.d.ts +0 -51
  108. package/VirtualScrollFixed.d.ts +0 -53
  109. package/cells/GridCell.d.ts +0 -6
  110. package/cells/GridDetailCell.d.ts +0 -18
  111. package/cells/GridDetailHierarchyCell.d.ts +0 -10
  112. package/cells/GridEditCell.d.ts +0 -9
  113. package/cells/GridFilterCell.d.ts +0 -20
  114. package/cells/GridGroupCell.d.ts +0 -9
  115. package/cells/GridHierarchyCell.d.ts +0 -9
  116. package/cells/GridSelectionCell.d.ts +0 -9
  117. package/columnMenu/GridColumnMenuCheckboxFilter.d.ts +0 -122
  118. package/columnMenu/GridColumnMenuColumnsList.d.ts +0 -31
  119. package/columnMenu/GridColumnMenuFilter.d.ts +0 -165
  120. package/columnMenu/GridColumnMenuFilterCell.d.ts +0 -37
  121. package/columnMenu/GridColumnMenuFilterUI.d.ts +0 -12
  122. package/columnMenu/GridColumnMenuGroup.d.ts +0 -77
  123. package/columnMenu/GridColumnMenuItem.d.ts +0 -40
  124. package/columnMenu/GridColumnMenuItemContent.d.ts +0 -24
  125. package/columnMenu/GridColumnMenuItemGroup.d.ts +0 -20
  126. package/columnMenu/GridColumnMenuSort.d.ts +0 -89
  127. package/columnMenu/GridColumnMenuWrapper.d.ts +0 -49
  128. package/constants/index.d.ts +0 -10
  129. package/drag/ColumnDraggable.d.ts +0 -38
  130. package/drag/ColumnResize.d.ts +0 -37
  131. package/drag/CommonDragLogic.d.ts +0 -44
  132. package/drag/GroupingIndicator.d.ts +0 -41
  133. package/filterCommon.d.ts +0 -73
  134. package/footer/Footer.d.ts +0 -38
  135. package/footer/FooterRow.d.ts +0 -25
  136. package/header/FilterRow.d.ts +0 -38
  137. package/header/GridHeaderCell.d.ts +0 -56
  138. package/header/GridHeaderSelectionCell.d.ts +0 -10
  139. package/header/GroupPanel.d.ts +0 -26
  140. package/header/Header.d.ts +0 -46
  141. package/header/HeaderRow.d.ts +0 -51
  142. package/interfaces/GridCellProps.d.ts +0 -73
  143. package/interfaces/GridCellsSettings.d.ts +0 -115
  144. package/interfaces/GridColumnMenuBaseProps.d.ts +0 -18
  145. package/interfaces/GridColumnMenuColumnProps.d.ts +0 -29
  146. package/interfaces/GridColumnMenuFilterBaseProps.d.ts +0 -28
  147. package/interfaces/GridColumnMenuFilterUIProps.d.ts +0 -35
  148. package/interfaces/GridColumnMenuGroupBaseProps.d.ts +0 -23
  149. package/interfaces/GridColumnMenuProps.d.ts +0 -12
  150. package/interfaces/GridColumnMenuSortBaseProps.d.ts +0 -24
  151. package/interfaces/GridColumnProps.d.ts +0 -92
  152. package/interfaces/GridDetailRowProps.d.ts +0 -17
  153. package/interfaces/GridFilterCellProps.d.ts +0 -68
  154. package/interfaces/GridFilterOperator.d.ts +0 -10
  155. package/interfaces/GridFilterOperators.d.ts +0 -53
  156. package/interfaces/GridFooterCellProps.d.ts +0 -26
  157. package/interfaces/GridGroupableSettings.d.ts +0 -17
  158. package/interfaces/GridHeaderCellProps.d.ts +0 -24
  159. package/interfaces/GridNoRecordsProps.d.ts +0 -13
  160. package/interfaces/GridProps.d.ts +0 -333
  161. package/interfaces/GridRowProps.d.ts +0 -67
  162. package/interfaces/GridRowType.d.ts +0 -13
  163. package/interfaces/GridSelectableSettings.d.ts +0 -22
  164. package/interfaces/GridSortSettings.d.ts +0 -17
  165. package/interfaces/GridToolbarProps.d.ts +0 -37
  166. package/interfaces/VirtualScrollInterface.d.ts +0 -31
  167. package/interfaces/events.d.ts +0 -232
  168. package/messages/index.d.ts +0 -199
  169. package/package-metadata.d.ts +0 -9
  170. package/paging/GridPagerSettings.d.ts +0 -71
  171. package/paging/Page.d.ts +0 -17
  172. package/rows/GridDetailRow.d.ts +0 -55
  173. package/rows/GridRow.d.ts +0 -15
  174. package/utils/index.d.ts +0 -73
package/GridColumn.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("prop-types"),l=r=>null;l.displayName="KendoReactGridColumn";l.defaultProps={filterable:!0,editable:!0,sortable:!0,resizable:!0,reorderable:!0,groupable:!0};l.propTypes={field:e.string,title:e.string,editable:e.bool,sortable:e.oneOfType([e.bool,e.shape({allowUnsort:e.bool.isRequired})]),cell:e.any,filterCell:e.any,filterTitle:e.string,filterable:e.bool,filter:e.oneOf(["text","numeric","boolean","date"]),editor:e.oneOf(["text","numeric","boolean","date"]),width:e.oneOfType([e.string,e.number]),minResizableWidth:e.number,headerCell:e.any,footerCell:e.any,headerSelectionValue:e.bool,format:e.string,headerClassName:e.string,className:e.string,reorderable:e.bool,resizable:e.bool,orderIndex:e.number,groupable:e.bool,columnMenu:e.any,locked:e.bool};exports.GridColumn=l;
package/GridColumn.mjs ADDED
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import e from "prop-types";
10
+ const l = (r) => null;
11
+ l.displayName = "KendoReactGridColumn";
12
+ l.defaultProps = {
13
+ filterable: !0,
14
+ editable: !0,
15
+ sortable: !0,
16
+ resizable: !0,
17
+ reorderable: !0,
18
+ groupable: !0
19
+ };
20
+ l.propTypes = {
21
+ field: e.string,
22
+ title: e.string,
23
+ editable: e.bool,
24
+ sortable: e.oneOfType([
25
+ e.bool,
26
+ e.shape({
27
+ allowUnsort: e.bool.isRequired
28
+ })
29
+ ]),
30
+ cell: e.any,
31
+ filterCell: e.any,
32
+ filterTitle: e.string,
33
+ filterable: e.bool,
34
+ filter: e.oneOf(["text", "numeric", "boolean", "date"]),
35
+ editor: e.oneOf(["text", "numeric", "boolean", "date"]),
36
+ width: e.oneOfType([e.string, e.number]),
37
+ minResizableWidth: e.number,
38
+ headerCell: e.any,
39
+ footerCell: e.any,
40
+ headerSelectionValue: e.bool,
41
+ format: e.string,
42
+ headerClassName: e.string,
43
+ className: e.string,
44
+ reorderable: e.bool,
45
+ resizable: e.bool,
46
+ orderIndex: e.number,
47
+ groupable: e.bool,
48
+ columnMenu: e.any,
49
+ locked: e.bool
50
+ };
51
+ export {
52
+ l as GridColumn
53
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),a=require("@progress/kendo-react-intl"),o=require("./messages/index.js");function l(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const u=l(s),c=class c extends u.Component{render(){return this.props.children||a.provideLocalizationService(this).toLanguageString(o.noRecords,o.messages[o.noRecords])}};c.displayName="KendoReactGridNoRecords";let r=c;a.registerForLocalization(r);exports.GridNoRecords=r;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as r from "react";
10
+ import { provideLocalizationService as i, registerForLocalization as s } from "@progress/kendo-react-intl";
11
+ import { noRecords as o, messages as a } from "./messages/index.mjs";
12
+ const t = class t extends r.Component {
13
+ /**
14
+ * @hidden
15
+ */
16
+ render() {
17
+ return this.props.children || i(this).toLanguageString(o, a[o]);
18
+ }
19
+ };
20
+ t.displayName = "KendoReactGridNoRecords";
21
+ let e = t;
22
+ s(e);
23
+ export {
24
+ e as GridNoRecords
25
+ };
package/GridToolbar.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),i=require("@progress/kendo-react-common");function c(e){const r=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(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=c(l),s=class s extends n.Component{render(){return n.createElement("div",{className:i.classNames("k-toolbar k-grid-toolbar",{"k-toolbar-md":!this.props.size,[`k-toolbar-${i.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),"aria-label":this.props.ariaLabel,"aria-controls":this.props.ariaControls,role:"toolbar"},this.props.children)}};s.displayName="KendoReactGridToolbar";let o=s;exports.GridToolbar=o;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as e from "react";
10
+ import { classNames as o, kendoThemeMaps as r } from "@progress/kendo-react-common";
11
+ const s = class s extends e.Component {
12
+ /**
13
+ * @hidden
14
+ */
15
+ render() {
16
+ return /* @__PURE__ */ e.createElement(
17
+ "div",
18
+ {
19
+ className: o(
20
+ "k-toolbar k-grid-toolbar",
21
+ {
22
+ "k-toolbar-md": !this.props.size,
23
+ [`k-toolbar-${r.sizeMap[this.props.size] || this.props.size}`]: this.props.size
24
+ },
25
+ this.props.className
26
+ ),
27
+ "aria-label": this.props.ariaLabel,
28
+ "aria-controls": this.props.ariaControls,
29
+ role: "toolbar"
30
+ },
31
+ this.props.children
32
+ );
33
+ }
34
+ };
35
+ s.displayName = "KendoReactGridToolbar";
36
+ let a = s;
37
+ export {
38
+ a as GridToolbar
39
+ };
package/StatusBar.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),h=require("@progress/kendo-react-common");function O(r){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const o in r)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(r,o);Object.defineProperty(s,o,n.get?n:{enumerable:!0,get:()=>r[o]})}}return s.default=r,Object.freeze(s)}const c=O(E),b=r=>{const{data:s=[]}=r;return c.createElement("div",{className:"k-selection-aggregates k-grid-selection-aggregates"},s.map((o,n)=>c.createElement("div",{key:n},c.createElement("span",{className:"k-selection-aggregates-item-text"},o.type,": "),c.createElement("span",{className:"k-selection-aggregates-item-value"},o.formattedValue))))};b.displayName="KendoReactGridStatusBar";const p=r=>{var o;const s=r.slice();for(let n=0;n<s.length;n++)for(;s[n]&&((o=s[n].children)!=null&&o.length);)s.splice(n,1,...s[n].children);return s},j=r=>{const{dataItems:s,target:o,selectedField:n}=r,y=p(o.columns).map(e=>e.field).filter(e=>e&&typeof e=="string").map(e=>h.getter(e)),S=h.getter(n),t={dates:[],numbers:[],booleans:[],others:[]},D=e=>{typeof e=="number"?t.numbers.push(e):typeof e=="boolean"?t.booleans.push(e):e instanceof Date?t.dates.push(e):t.others.push(e)};s.forEach(e=>{const a=S(e);a&&a.forEach(l=>{D(y[l](e))})});const u=t.dates.map(e=>e.getTime()),g=t.booleans.filter(e=>e).length,m=t.booleans.filter(e=>!e).length,i=t.numbers.length?t.numbers.reduce((e,a)=>e+=a,0):void 0,d={sum:i,average:typeof i=="number"?i/t.numbers.length:void 0,min:t.numbers.length?Math.min(...t.numbers):void 0,max:t.numbers.length?Math.max(...t.numbers):void 0,count:t.numbers.length+t.booleans.length+t.dates.length+t.others.length,isTrue:g>0?g:void 0,isFalse:m>0?m:void 0,earliest:t.dates.length?new Date(Math.min(...u)):void 0,latest:t.dates.length?new Date(Math.max(...u)):void 0},v=(e,a)=>(a==="sum"||a==="average")&&typeof e=="number"?e.toFixed(2):(a==="earliest"||a==="latest")&&e instanceof Date?e.toLocaleDateString():String(e),f=[];return Object.keys(d).forEach(e=>{const a=e,l=d[a];l!==void 0&&f.push({type:a,value:l,formattedValue:v(l,a)})}),f};exports.StatusBar=b;exports.getStatusData=j;exports.leafColumns=p;
package/StatusBar.mjs ADDED
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as i from "react";
10
+ import { getter as f } from "@progress/kendo-react-common";
11
+ const x = (r) => {
12
+ const { data: n = [] } = r;
13
+ return /* @__PURE__ */ i.createElement("div", { className: "k-selection-aggregates k-grid-selection-aggregates" }, n.map((o, a) => /* @__PURE__ */ i.createElement("div", { key: a }, /* @__PURE__ */ i.createElement("span", { className: "k-selection-aggregates-item-text" }, o.type, ": "), /* @__PURE__ */ i.createElement("span", { className: "k-selection-aggregates-item-value" }, o.formattedValue))));
14
+ };
15
+ x.displayName = "KendoReactGridStatusBar";
16
+ const D = (r) => {
17
+ var o;
18
+ const n = r.slice();
19
+ for (let a = 0; a < n.length; a++)
20
+ for (; n[a] && ((o = n[a].children) != null && o.length); )
21
+ n.splice(a, 1, ...n[a].children);
22
+ return n;
23
+ }, N = (r) => {
24
+ const { dataItems: n, target: o, selectedField: a } = r, p = D(o.columns).map((e) => e.field).filter((e) => e && typeof e == "string").map((e) => f(e)), b = f(a), t = { dates: [], numbers: [], booleans: [], others: [] }, y = (e) => {
25
+ typeof e == "number" ? t.numbers.push(e) : typeof e == "boolean" ? t.booleans.push(e) : e instanceof Date ? t.dates.push(e) : t.others.push(e);
26
+ };
27
+ n.forEach((e) => {
28
+ const s = b(e);
29
+ s && s.forEach((l) => {
30
+ y(p[l](e));
31
+ });
32
+ });
33
+ const m = t.dates.map((e) => e.getTime()), g = t.booleans.filter((e) => e).length, d = t.booleans.filter((e) => !e).length, c = t.numbers.length ? t.numbers.reduce((e, s) => e += s, 0) : void 0, u = {
34
+ sum: c,
35
+ average: typeof c == "number" ? c / t.numbers.length : void 0,
36
+ min: t.numbers.length ? Math.min(...t.numbers) : void 0,
37
+ max: t.numbers.length ? Math.max(...t.numbers) : void 0,
38
+ count: t.numbers.length + t.booleans.length + t.dates.length + t.others.length,
39
+ isTrue: g > 0 ? g : void 0,
40
+ isFalse: d > 0 ? d : void 0,
41
+ earliest: t.dates.length ? new Date(Math.min(...m)) : void 0,
42
+ latest: t.dates.length ? new Date(Math.max(...m)) : void 0
43
+ }, E = (e, s) => (s === "sum" || s === "average") && typeof e == "number" ? e.toFixed(2) : (s === "earliest" || s === "latest") && e instanceof Date ? e.toLocaleDateString() : String(e), h = [];
44
+ return Object.keys(u).forEach((e) => {
45
+ const s = e, l = u[s];
46
+ l !== void 0 && h.push({ type: s, value: l, formattedValue: E(l, s) });
47
+ }), h;
48
+ };
49
+ export {
50
+ x as StatusBar,
51
+ N as getStatusData,
52
+ D as leafColumns
53
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react");function u(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(i,t,l.get?l:{enumerable:!0,get:()=>r[t]})}}return i.default=r,Object.freeze(i)}const c=u(g);class f{constructor(i){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=c.createRef(),this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=c.createRef(),this.tableTransform="",this.prevScrollPos=0,this.tableTranslate=0,this.scrollSyncing=!1,this.reactVersion=Number.parseFloat(c.version),this.topItems=(t,l)=>{if(!this.container||l)return{topItemsCount:0,topItemsHeight:0};const s=this.container.clientHeight,e=Math.ceil(s/t[0].line),n=Math.ceil((t.length-e)/2);let o=0;for(let a=0;a<n;a++)o+=t[a].line+t[a].acc;return{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:e+e/2}},this.horizontalScrollbarHeight=()=>this.container?this.container.offsetHeight-this.container.clientHeight:0,i&&(this.topCacheCount=4,this.attendedSkip=-this.topCacheCount),this.scrollHandler=this.scrollHandler.bind(this)}get container(){return this.containerRef.current}get rowHeights(){const i=[],t=this.tableBodyRef.current&&this.tableBodyRef.current.children||[];let l=0;for(let s=0;s<t.length;s++){if(t[s].className.indexOf("k-grouping-row")>-1){l+=t[s].scrollHeight;continue}t[s].className.indexOf("k-detail-row")>-1?i[i.length-1].line+=t[s].scrollHeight:(i.push({line:t[s].scrollHeight,acc:l}),l=0)}return i}changePage(i,t){this.attendedSkip=i-this.topCacheCount,this.PageChange&&this.PageChange({skip:Math.max(0,i-this.topCacheCount),take:this.pageSize},t)}translate(i,t){this.tableTranslate=i,this.scrollableVirtual&&this.table&&(this.reactVersion<=17||t?this.table.style.transform="translateY("+i+"px)":this.tableTransform="translateY("+i+"px)")}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}localScrollUp(i){if(!this.container)return;const t=this.rowHeights,l=this.container.scrollTop;let s=this.tableTranslate,e=0;const{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:a}=this.topItems(t,!!this.topCacheCount),h=l-s;if(!(h>o||t.length<=a)){for(;e<this.topCacheCount+this.attendedSkip-this.realSkip+n&&this.propsSkip-e>0&&!(s+(t[t.length-1-e].line+t[t.length-1-e].acc)+h<=l);)s-=t[t.length-1-e].line+t[t.length-1-e].acc,e++;if(e===0&&this.topCacheCount===0&&this.attendedSkip>0&&(s=Math.max(s-t[0].line,0),e=1),this.propsSkip-e<=0&&s>l){this.translate(0),this.changePage(0,i),this.container.scrollTop=0;return}if(s>l&&(s=l),s!==this.tableTranslate){this.translate(Math.max(0,s-o));const p=Math.max(0,this.propsSkip-e-n);this.changePage(p,i)}}}localScrollDown(i){if(!this.container)return;const t=this.rowHeights,l=this.container.scrollTop;let s=this.tableTranslate,e=0;const{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:a}=this.topItems(t,!!this.topCacheCount);for(;e<t.length-this.topCacheCount&&!(s+t[e].line+t[e].acc>l);)s+=t[e].line+t[e].acc,e++;n>this.propsSkip+e||t.length<=a||(e>=t.length-this.topCacheCount&&this.propsSkip+e>=this.total?(this.translate(s-o),this.changePage(this.total-1-n,i)):s!==this.tableTranslate&&this.propsSkip+e-n!==this.propsSkip&&(this.translate(s-o),this.changePage(this.propsSkip+e-n,i)))}scrollNonStrict(i){const t=this.total*this.prevScrollPos/this.containerHeight;let l=Math.floor(t);l>=this.total&&(l=this.total-1);const s=Math.min(t-l,1);let e=0;const n=l-this.propsSkip,o=this.rowHeights;n>=0&&n<=1?e=-((o[0].line+o[0].acc)*s):n===-1&&(e=-((o[o.length-1].line+o[o.length-1].acc)*s));const{topItemsCount:a,topItemsHeight:h}=this.topItems(o,!!this.topCacheCount);this.translate(Math.max(0,e-h-this.horizontalScrollbarHeight()+this.containerHeight*t/this.total)),this.changePage(l-a,i)}scrollHandler(i){if(!this.scrollableVirtual)return;if(this.scrollSyncing||!this.container||!this.table){this.scrollSyncing=!1;return}const t=this.container.scrollTop,l=this.prevScrollPos;if(this.prevScrollPos=t,this.askedSkip!==void 0){this.translate(this.containerHeight*this.askedSkip/this.total),this.changePage(this.askedSkip,i),this.prevScrollPos=t,this.askedSkip=void 0;return}t-l<0&&t>this.tableTranslate-this.table.scrollHeight/10?this.localScrollUp(i):t-l>0&&t<this.tableTranslate+this.table.scrollHeight*2/3?this.localScrollDown(i):this.scrollNonStrict(i),this.prevScrollPos=t}}exports.VirtualScroll=f;
@@ -0,0 +1,128 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as r from "react";
10
+ class g {
11
+ constructor(s) {
12
+ this.table = null, this.containerHeight = 0, this.topCacheCount = 0, this.attendedSkip = 0, this.propsSkip = 0, this.total = 0, this.scrollableVirtual = !1, this.realSkip = 0, this.pageSize = 0, this.PageChange = null, this.tableBodyRef = r.createRef(), this.fixedScroll = !1, this.askedSkip = void 0, this.containerRef = r.createRef(), this.tableTransform = "", this.prevScrollPos = 0, this.tableTranslate = 0, this.scrollSyncing = !1, this.reactVersion = Number.parseFloat(r.version), this.topItems = (t, l) => {
13
+ if (!this.container || l)
14
+ return { topItemsCount: 0, topItemsHeight: 0 };
15
+ const i = this.container.clientHeight, e = Math.ceil(i / t[0].line), n = Math.ceil((t.length - e) / 2);
16
+ let o = 0;
17
+ for (let a = 0; a < n; a++)
18
+ o += t[a].line + t[a].acc;
19
+ return {
20
+ topItemsCount: n,
21
+ topItemsHeight: o,
22
+ itemsNeededOnScreen: e + e / 2
23
+ };
24
+ }, this.horizontalScrollbarHeight = () => this.container ? this.container.offsetHeight - this.container.clientHeight : 0, s && (this.topCacheCount = 4, this.attendedSkip = -this.topCacheCount), this.scrollHandler = this.scrollHandler.bind(this);
25
+ }
26
+ get container() {
27
+ return this.containerRef.current;
28
+ }
29
+ /**
30
+ * @return - The row heights in an array.
31
+ */
32
+ get rowHeights() {
33
+ const s = [], t = this.tableBodyRef.current && this.tableBodyRef.current.children || [];
34
+ let l = 0;
35
+ for (let i = 0; i < t.length; i++) {
36
+ if (t[i].className.indexOf("k-grouping-row") > -1) {
37
+ l += t[i].scrollHeight;
38
+ continue;
39
+ }
40
+ t[i].className.indexOf("k-detail-row") > -1 ? s[s.length - 1].line += t[i].scrollHeight : (s.push({
41
+ line: t[i].scrollHeight,
42
+ acc: l
43
+ }), l = 0);
44
+ }
45
+ return s;
46
+ }
47
+ changePage(s, t) {
48
+ this.attendedSkip = s - this.topCacheCount, this.PageChange && this.PageChange(
49
+ {
50
+ skip: Math.max(0, s - this.topCacheCount),
51
+ take: this.pageSize
52
+ },
53
+ t
54
+ );
55
+ }
56
+ translate(s, t) {
57
+ this.tableTranslate = s, this.scrollableVirtual && this.table && (this.reactVersion <= 17 || t ? this.table.style.transform = "translateY(" + s + "px)" : this.tableTransform = "translateY(" + s + "px)");
58
+ }
59
+ reset() {
60
+ this.scrollSyncing = !0, !this.fixedScroll && (this.container && (this.container.scrollTop = 0), this.translate(0, !0));
61
+ }
62
+ localScrollUp(s) {
63
+ if (!this.container)
64
+ return;
65
+ const t = this.rowHeights, l = this.container.scrollTop;
66
+ let i = this.tableTranslate, e = 0;
67
+ const {
68
+ topItemsCount: n,
69
+ topItemsHeight: o,
70
+ itemsNeededOnScreen: a
71
+ } = this.topItems(t, !!this.topCacheCount), h = l - i;
72
+ if (!(h > o || t.length <= a)) {
73
+ for (; e < this.topCacheCount + this.attendedSkip - this.realSkip + n && this.propsSkip - e > 0 && !(i + (t[t.length - 1 - e].line + t[t.length - 1 - e].acc) + h <= l); )
74
+ i -= t[t.length - 1 - e].line + t[t.length - 1 - e].acc, e++;
75
+ if (e === 0 && this.topCacheCount === 0 && this.attendedSkip > 0 && (i = Math.max(i - t[0].line, 0), e = 1), this.propsSkip - e <= 0 && i > l) {
76
+ this.translate(0), this.changePage(0, s), this.container.scrollTop = 0;
77
+ return;
78
+ }
79
+ if (i > l && (i = l), i !== this.tableTranslate) {
80
+ this.translate(Math.max(0, i - o));
81
+ const c = Math.max(0, this.propsSkip - e - n);
82
+ this.changePage(c, s);
83
+ }
84
+ }
85
+ }
86
+ localScrollDown(s) {
87
+ if (!this.container)
88
+ return;
89
+ const t = this.rowHeights, l = this.container.scrollTop;
90
+ let i = this.tableTranslate, e = 0;
91
+ const {
92
+ topItemsCount: n,
93
+ topItemsHeight: o,
94
+ itemsNeededOnScreen: a
95
+ } = this.topItems(t, !!this.topCacheCount);
96
+ for (; e < t.length - this.topCacheCount && !(i + t[e].line + t[e].acc > l); )
97
+ i += t[e].line + t[e].acc, e++;
98
+ n > this.propsSkip + e || t.length <= a || (e >= t.length - this.topCacheCount && this.propsSkip + e >= this.total ? (this.translate(i - o), this.changePage(this.total - 1 - n, s)) : i !== this.tableTranslate && this.propsSkip + e - n !== this.propsSkip && (this.translate(i - o), this.changePage(this.propsSkip + e - n, s)));
99
+ }
100
+ scrollNonStrict(s) {
101
+ const t = this.total * this.prevScrollPos / this.containerHeight;
102
+ let l = Math.floor(t);
103
+ l >= this.total && (l = this.total - 1);
104
+ const i = Math.min(t - l, 1);
105
+ let e = 0;
106
+ const n = l - this.propsSkip, o = this.rowHeights;
107
+ n >= 0 && n <= 1 ? e = -((o[0].line + o[0].acc) * i) : n === -1 && (e = -((o[o.length - 1].line + o[o.length - 1].acc) * i));
108
+ const { topItemsCount: a, topItemsHeight: h } = this.topItems(o, !!this.topCacheCount);
109
+ this.translate(Math.max(0, e - h - this.horizontalScrollbarHeight() + this.containerHeight * t / this.total)), this.changePage(l - a, s);
110
+ }
111
+ scrollHandler(s) {
112
+ if (!this.scrollableVirtual)
113
+ return;
114
+ if (this.scrollSyncing || !this.container || !this.table) {
115
+ this.scrollSyncing = !1;
116
+ return;
117
+ }
118
+ const t = this.container.scrollTop, l = this.prevScrollPos;
119
+ if (this.prevScrollPos = t, this.askedSkip !== void 0) {
120
+ this.translate(this.containerHeight * this.askedSkip / this.total), this.changePage(this.askedSkip, s), this.prevScrollPos = t, this.askedSkip = void 0;
121
+ return;
122
+ }
123
+ t - l < 0 && t > this.tableTranslate - this.table.scrollHeight / 10 ? this.localScrollUp(s) : t - l > 0 && t < this.tableTranslate + this.table.scrollHeight * 2 / 3 ? this.localScrollDown(s) : this.scrollNonStrict(s), this.prevScrollPos = t;
124
+ }
125
+ }
126
+ export {
127
+ g as VirtualScroll
128
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),g=require("./utils/index.js");function u(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const n=u(d);class S{constructor(t=0,e,s,r){this.total=t,this.offsets=[],this.heights=[];let i=0;for(let h=0;h<t;h++){this.offsets.push(i);const o=r&&r[h].expanded&&r[h].rowType==="data"?s:e;i+=o,this.heights.push(o)}}height(t){return this.heights[t]}index(t){if(t<0)return;const e=this.offsets.reduce((s,r,i)=>{if(s!==void 0)return s;if(r===t)return i;if(r>t)return i-1},void 0);return e===void 0?this.total-1:e}offset(t){return this.offsets[t]}totalHeight(){const t=this.offsets[this.offsets.length-1],e=this.heights[this.heights.length-1];return t+e}}class p{constructor(t){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=n.createRef(),this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=n.createRef(),this.tableTransform="",this.scrollSyncing=!1,this.lastLoaded=0,this.firstLoaded=0,this.lastScrollTop=0,this.reactVersion=Number.parseFloat(n.version),this.firstLoaded=this.pageSize,this.lastLoaded=this.realSkip+this.pageSize,this.scrollHandler=this.scrollHandler.bind(this)}get container(){return this.containerRef.current}translate(t,e){this.scrollableVirtual&&this.table&&(g.firefox||this.reactVersion<=17||e?this.table.style.transform="translateY("+t+"px)":this.tableTransform="translateY("+t+"px)")}changePage(t,e){this.PageChange&&this.PageChange({skip:Math.max(0,t),take:this.pageSize},e)}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}scrollHandler(t){if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!this.containerRef.current)return;if(this.scrollSyncing){this.scrollSyncing=!1;return}const e=this.container.scrollTop,s=this.lastScrollTop>=e,r=!s;this.lastScrollTop=e;let i=this.rowHeightService.index(e),h=this.rowHeightService.offset(i);const{offsetHeight:o}=this.containerRef.current,c=this.rowHeightService.index(e+o);if(r&&c>=this.lastLoaded&&this.lastLoaded<this.total){const l=i+this.pageSize-this.total;l>0&&(i=i-l,h=this.rowHeightService.offset(i)),this.firstLoaded=i,this.translate(h);let f=this.firstLoaded+this.pageSize;this.lastLoaded=Math.min(f,this.total),this.changePage(this.firstLoaded,t)}else if(s&&i<this.firstLoaded){const l=Math.floor(this.pageSize*.3);this.firstLoaded=Math.max(i-l,0),this.translate(this.rowHeightService.offset(this.firstLoaded)),this.lastLoaded=Math.min(this.firstLoaded+this.pageSize,this.total),this.changePage(this.firstLoaded,t)}}}exports.RowHeightService=S;exports.VirtualScrollFixed=p;
@@ -0,0 +1,86 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as l from "react";
10
+ import { firefox as d } from "./utils/index.mjs";
11
+ class u {
12
+ constructor(t = 0, e, h, i) {
13
+ this.total = t, this.offsets = [], this.heights = [];
14
+ let s = 0;
15
+ for (let r = 0; r < t; r++) {
16
+ this.offsets.push(s);
17
+ const a = i && i[r].expanded && i[r].rowType === "data" ? h : e;
18
+ s += a, this.heights.push(a);
19
+ }
20
+ }
21
+ height(t) {
22
+ return this.heights[t];
23
+ }
24
+ index(t) {
25
+ if (t < 0)
26
+ return;
27
+ const e = this.offsets.reduce((h, i, s) => {
28
+ if (h !== void 0)
29
+ return h;
30
+ if (i === t)
31
+ return s;
32
+ if (i > t)
33
+ return s - 1;
34
+ }, void 0);
35
+ return e === void 0 ? this.total - 1 : e;
36
+ }
37
+ offset(t) {
38
+ return this.offsets[t];
39
+ }
40
+ totalHeight() {
41
+ const t = this.offsets[this.offsets.length - 1], e = this.heights[this.heights.length - 1];
42
+ return t + e;
43
+ }
44
+ }
45
+ class p {
46
+ constructor(t) {
47
+ this.table = null, this.containerHeight = 0, this.topCacheCount = 0, this.attendedSkip = 0, this.propsSkip = 0, this.total = 0, this.scrollableVirtual = !1, this.realSkip = 0, this.pageSize = 0, this.PageChange = null, this.tableBodyRef = l.createRef(), this.fixedScroll = !1, this.askedSkip = void 0, this.containerRef = l.createRef(), this.tableTransform = "", this.scrollSyncing = !1, this.lastLoaded = 0, this.firstLoaded = 0, this.lastScrollTop = 0, this.reactVersion = Number.parseFloat(l.version), this.firstLoaded = this.pageSize, this.lastLoaded = this.realSkip + this.pageSize, this.scrollHandler = this.scrollHandler.bind(this);
48
+ }
49
+ get container() {
50
+ return this.containerRef.current;
51
+ }
52
+ translate(t, e) {
53
+ this.scrollableVirtual && this.table && (d || this.reactVersion <= 17 || e ? this.table.style.transform = "translateY(" + t + "px)" : this.tableTransform = "translateY(" + t + "px)");
54
+ }
55
+ changePage(t, e) {
56
+ this.PageChange && this.PageChange({ skip: Math.max(0, t), take: this.pageSize }, e);
57
+ }
58
+ reset() {
59
+ this.scrollSyncing = !0, !this.fixedScroll && (this.container && (this.container.scrollTop = 0), this.translate(0, !0));
60
+ }
61
+ scrollHandler(t) {
62
+ if (!this.scrollableVirtual || !this.container || !this.table || !this.rowHeightService || !this.containerRef.current)
63
+ return;
64
+ if (this.scrollSyncing) {
65
+ this.scrollSyncing = !1;
66
+ return;
67
+ }
68
+ const e = this.container.scrollTop, h = this.lastScrollTop >= e, i = !h;
69
+ this.lastScrollTop = e;
70
+ let s = this.rowHeightService.index(e), r = this.rowHeightService.offset(s);
71
+ const { offsetHeight: a } = this.containerRef.current, f = this.rowHeightService.index(e + a);
72
+ if (i && f >= this.lastLoaded && this.lastLoaded < this.total) {
73
+ const o = s + this.pageSize - this.total;
74
+ o > 0 && (s = s - o, r = this.rowHeightService.offset(s)), this.firstLoaded = s, this.translate(r);
75
+ let c = this.firstLoaded + this.pageSize;
76
+ this.lastLoaded = Math.min(c, this.total), this.changePage(this.firstLoaded, t);
77
+ } else if (h && s < this.firstLoaded) {
78
+ const o = Math.floor(this.pageSize * 0.3);
79
+ this.firstLoaded = Math.max(s - o, 0), this.translate(this.rowHeightService.offset(this.firstLoaded)), this.lastLoaded = Math.min(this.firstLoaded + this.pageSize, this.total), this.changePage(this.firstLoaded, t);
80
+ }
81
+ }
82
+ }
83
+ export {
84
+ u as RowHeightService,
85
+ p as VirtualScrollFixed
86
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
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 c=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,c.get?c:{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(),c=b.useTableKeyboardNavigation(e.id),r=o.useCallback(a=>{e.onContextMenu&&e.onContextMenu.call(void 0,a,e.dataItem,e.field)},[e.onContextMenu,e.dataItem,e.field]);let l=null,d=null;if(e.rowType==="groupFooter")l={onContextMenu:r,className:e.className},t=o.createElement("td",{...l});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 a=y.classNames("k-table-td",e.className,{"k-selected":e.isSelected});l={onContextMenu:r,colSpan:e.colSpan,style:e.style,className:a,role:"gridcell","aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[C.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex,...c},t=o.createElement("td",{...l},d)}const s=e.rowType||"data",u=e.cells;if(u&&u[s]){const a=u[s];return o.createElement(a,{...e,tdProps:l},d)}return e.render?e.render.call(void 0,t,e):t};exports.GridCell=I;
@@ -0,0 +1,57 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
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) => {
16
+ let n = null;
17
+ const u = s(), f = C(e.id), o = i.useCallback((l) => {
18
+ e.onContextMenu && e.onContextMenu.call(void 0, l, e.dataItem, e.field);
19
+ }, [e.onContextMenu, e.dataItem, e.field]);
20
+ let t = null, c = null;
21
+ if (e.rowType === "groupFooter")
22
+ t = {
23
+ onContextMenu: o,
24
+ className: e.className
25
+ }, n = /* @__PURE__ */ i.createElement("td", { ...t });
26
+ else if (e.rowType !== "groupHeader") {
27
+ if (e.field !== void 0) {
28
+ const a = r(e.field, e.dataItem);
29
+ a != null && (c = e.format ? u.format(e.format, a) : a.toString());
30
+ }
31
+ const l = I(
32
+ "k-table-td",
33
+ e.className,
34
+ { "k-selected": e.isSelected }
35
+ );
36
+ t = {
37
+ onContextMenu: o,
38
+ colSpan: e.colSpan,
39
+ style: e.style,
40
+ className: l,
41
+ role: "gridcell",
42
+ "aria-colindex": e.ariaColumnIndex,
43
+ "aria-selected": e.isSelected,
44
+ [g]: e.columnIndex,
45
+ ...f
46
+ }, n = /* @__PURE__ */ i.createElement("td", { ...t }, c);
47
+ }
48
+ const m = e.rowType || "data", d = e.cells;
49
+ if (d && d[m]) {
50
+ const l = d[m];
51
+ return /* @__PURE__ */ i.createElement(l, { ...e, tdProps: t }, c);
52
+ }
53
+ return e.render ? e.render.call(void 0, n, e) : n;
54
+ };
55
+ export {
56
+ S as GridCell
57
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
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;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
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);
14
+ }, [e.onContextMenu, e.dataItem]);
15
+ return /* @__PURE__ */ t.createElement(
16
+ "td",
17
+ {
18
+ onContextMenu: c,
19
+ className: "k-table-td k-detail-cell",
20
+ colSpan: a,
21
+ "aria-colindex": n,
22
+ role: "gridcell",
23
+ ...d
24
+ },
25
+ /* @__PURE__ */ t.createElement(e.detail, { dataItem: l, dataIndex: i })
26
+ );
27
+ };
28
+ export {
29
+ x as GridDetailCell
30
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@progress/kendo-react-data-tools"),l=require("react");function n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const i=n(l),o=e=>{const t=c.useTableKeyboardNavigation(e.id);return i.createElement("td",{className:"k-table-td k-hierarchy-cell",...t,role:"gridcell"})};exports.GridDetailHierarchyCell=o;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import { useTableKeyboardNavigation as r } from "@progress/kendo-react-data-tools";
10
+ import * as a from "react";
11
+ const l = (e) => {
12
+ const t = r(e.id);
13
+ return /* @__PURE__ */ a.createElement("td", { className: "k-table-td k-hierarchy-cell", ...t, role: "gridcell" });
14
+ };
15
+ export {
16
+ l as GridDetailHierarchyCell
17
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),f=require("../utils/index.js"),h=require("@progress/kendo-react-inputs"),E=require("@progress/kendo-react-dateinputs"),g=require("@progress/kendo-react-common"),y=require("@progress/kendo-react-data-tools"),r=require("../constants/index.js");function N(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,i.get?i:{enumerable:!0,get:()=>e[a]})}}return n.default=e,Object.freeze(n)}const t=N(b),S=e=>{const n=f.getNestedValue(e.field,e.dataItem);let a=null;const i=g.classNames("k-table-td","k-grid-edit-cell",{"k-selected":e.isSelected},e.className),I=g.useId(),u=y.useTableKeyboardNavigation(e.id);let c=null,d=null;const s=t.useCallback(l=>{if(e.onChange){const k=l.target.type==="checkbox"?l.target.checked:l.target.value;e.onChange({dataItem:e.dataItem,dataIndex:e.dataIndex,field:e.field,syntheticEvent:l,value:k})}},[e.onChange,e.dataItem,e.dataIndex,e.field]),o=t.useCallback(l=>{e.onContextMenu&&e.onContextMenu.call(void 0,l,e.dataItem,e.field)},[e.onContextMenu,e.dataItem,e.field]),C=t.useCallback(l=>{e.onChange&&e.onChange({dataItem:e.dataItem,dataIndex:e.dataIndex,field:e.field,syntheticEvent:l.syntheticEvent,value:l.value})},[e.onChange,e.dataItem,e.dataIndex,e.field]);switch(e.editor){case"numeric":{c={onContextMenu:o,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",...u},d=t.createElement(h.NumericTextBox,{width:"100%",value:n===void 0?null:n,onChange:C}),a=t.createElement("td",{...c},d);break}case"date":c={onContextMenu:o,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",...u},d=t.createElement(E.DatePicker,{width:"100%",value:n,onChange:C}),a=t.createElement("td",{...c},d);break;case"boolean":c={onContextMenu:o,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",...u},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:s})),t.createElement("label",{className:"k-checkbox-label",htmlFor:I,key:2})],a=t.createElement("td",{...c},d);break;default:c={onContextMenu:o,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",...u},d=t.createElement("input",{style:{width:"100%"},className:"k-input",value:n||"",onChange:s}),a=t.createElement("td",{...c},d)}const x=e.editor||"text",m=e.cells;if(m&&m.edit&&m.edit[x]){const l=m.edit[x];return t.createElement(l,{...e,tdProps:c},d)}return e.render?e.render.call(void 0,a,e):a};exports.GridEditCell=S;