@progress/kendo-react-grid 6.1.1 → 7.0.0-develop.10

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 (328) hide show
  1. package/{dist/es/Grid.d.ts → Grid.d.ts} +5 -1
  2. package/{dist/npm/GridColumn.d.ts → GridColumn.d.ts} +4 -0
  3. package/{dist/npm/GridNoRecords.d.ts → GridNoRecords.d.ts} +4 -0
  4. package/{dist/npm/GridToolbar.d.ts → GridToolbar.d.ts} +5 -1
  5. package/LICENSE.md +1 -1
  6. package/ScrollMode.d.ts +5 -0
  7. package/{dist/es/StatusBar.d.ts → StatusBar.d.ts} +4 -0
  8. package/{dist/npm/VirtualScroll.d.ts → VirtualScroll.d.ts} +4 -0
  9. package/{dist/es/VirtualScrollFixed.d.ts → VirtualScrollFixed.d.ts} +4 -0
  10. package/cells/GridCell.d.ts +6 -0
  11. package/{dist/es/cells → cells}/GridDetailCell.d.ts +5 -1
  12. package/cells/GridDetailHierarchyCell.d.ts +10 -0
  13. package/cells/GridEditCell.d.ts +9 -0
  14. package/cells/GridFilterCell.d.ts +20 -0
  15. package/cells/GridGroupCell.d.ts +9 -0
  16. package/cells/GridHierarchyCell.d.ts +9 -0
  17. package/cells/GridSelectionCell.d.ts +9 -0
  18. package/{dist/npm/columnMenu → columnMenu}/GridColumnMenuCheckboxFilter.d.ts +5 -1
  19. package/{dist/npm/columnMenu → columnMenu}/GridColumnMenuColumnsList.d.ts +4 -0
  20. package/{dist/npm/columnMenu → columnMenu}/GridColumnMenuFilter.d.ts +5 -1
  21. package/{dist/npm/columnMenu → columnMenu}/GridColumnMenuFilterCell.d.ts +5 -1
  22. package/columnMenu/GridColumnMenuFilterUI.d.ts +12 -0
  23. package/{dist/es/columnMenu → columnMenu}/GridColumnMenuGroup.d.ts +5 -1
  24. package/{dist/es/columnMenu → columnMenu}/GridColumnMenuItem.d.ts +5 -1
  25. package/{dist/es/columnMenu → columnMenu}/GridColumnMenuItemContent.d.ts +5 -1
  26. package/{dist/es/columnMenu → columnMenu}/GridColumnMenuItemGroup.d.ts +5 -1
  27. package/{dist/es/columnMenu → columnMenu}/GridColumnMenuSort.d.ts +5 -1
  28. package/{dist/npm/columnMenu → columnMenu}/GridColumnMenuWrapper.d.ts +5 -1
  29. package/{dist/es/constants → constants}/index.d.ts +4 -0
  30. package/dist/cdn/js/kendo-react-grid.js +5 -1
  31. package/{dist/npm/drag → drag}/ColumnDraggable.d.ts +5 -1
  32. package/{dist/es/drag → drag}/ColumnResize.d.ts +4 -0
  33. package/{dist/es/drag → drag}/CommonDragLogic.d.ts +5 -1
  34. package/{dist/npm/drag → drag}/GroupingIndicator.d.ts +5 -1
  35. package/{dist/es/filterCommon.d.ts → filterCommon.d.ts} +5 -1
  36. package/{dist/npm/footer → footer}/Footer.d.ts +5 -1
  37. package/{dist/npm/footer → footer}/FooterRow.d.ts +5 -1
  38. package/{dist/npm/header → header}/FilterRow.d.ts +5 -1
  39. package/{dist/npm/header → header}/GridHeaderCell.d.ts +5 -1
  40. package/header/GridHeaderSelectionCell.d.ts +13 -0
  41. package/{dist/npm/header → header}/GroupPanel.d.ts +5 -1
  42. package/{dist/es/header → header}/Header.d.ts +5 -1
  43. package/{dist/npm/header → header}/HeaderRow.d.ts +6 -2
  44. package/{dist/es/main.d.ts → index.d.ts} +31 -27
  45. package/index.js +5 -0
  46. package/index.mjs +3814 -0
  47. package/{dist/npm/interfaces → interfaces}/GridCellProps.d.ts +4 -1
  48. package/{dist/es/interfaces → interfaces}/GridCellsSettings.d.ts +4 -0
  49. package/interfaces/GridColumnMenuBaseProps.d.ts +18 -0
  50. package/{dist/es/interfaces → interfaces}/GridColumnMenuColumnProps.d.ts +4 -0
  51. package/{dist/es/interfaces → interfaces}/GridColumnMenuFilterBaseProps.d.ts +4 -1
  52. package/{dist/es/interfaces → interfaces}/GridColumnMenuFilterUIProps.d.ts +4 -0
  53. package/{dist/npm/interfaces → interfaces}/GridColumnMenuGroupBaseProps.d.ts +4 -1
  54. package/{dist/es/interfaces → interfaces}/GridColumnMenuProps.d.ts +4 -0
  55. package/{dist/npm/interfaces → interfaces}/GridColumnMenuSortBaseProps.d.ts +4 -1
  56. package/{dist/es/interfaces → interfaces}/GridColumnProps.d.ts +4 -0
  57. package/interfaces/GridDetailRowProps.d.ts +17 -0
  58. package/{dist/npm/interfaces → interfaces}/GridFilterCellProps.d.ts +4 -1
  59. package/interfaces/GridFilterOperator.d.ts +10 -0
  60. package/{dist/es/interfaces → interfaces}/GridFilterOperators.d.ts +4 -0
  61. package/{dist/npm/interfaces → interfaces}/GridFooterCellProps.d.ts +4 -1
  62. package/{dist/es/interfaces → interfaces}/GridGroupableSettings.d.ts +4 -0
  63. package/{dist/npm/interfaces → interfaces}/GridHeaderCellProps.d.ts +4 -1
  64. package/interfaces/GridNoRecordsProps.d.ts +13 -0
  65. package/{dist/npm/interfaces → interfaces}/GridProps.d.ts +4 -0
  66. package/{dist/es/interfaces → interfaces}/GridRowProps.d.ts +4 -1
  67. package/interfaces/GridRowType.d.ts +13 -0
  68. package/{dist/npm/interfaces → interfaces}/GridSelectableSettings.d.ts +5 -1
  69. package/interfaces/GridSortSettings.d.ts +17 -0
  70. package/{dist/es/interfaces → interfaces}/GridToolbarProps.d.ts +4 -1
  71. package/{dist/es/interfaces → interfaces}/VirtualScrollInterface.d.ts +4 -0
  72. package/{dist/npm/interfaces → interfaces}/events.d.ts +4 -1
  73. package/{dist/npm/messages → messages}/index.d.ts +4 -0
  74. package/package-metadata.d.ts +9 -0
  75. package/package.json +36 -59
  76. package/{dist/es/paging → paging}/GridPagerSettings.d.ts +6 -2
  77. package/paging/Page.d.ts +17 -0
  78. package/{dist/npm/rows → rows}/GridDetailRow.d.ts +4 -0
  79. package/rows/GridRow.d.ts +15 -0
  80. package/{dist/es/utils → utils}/index.d.ts +11 -7
  81. package/about.md +0 -3
  82. package/dist/es/Grid.js +0 -1042
  83. package/dist/es/GridColumn.d.ts +0 -24
  84. package/dist/es/GridColumn.js +0 -54
  85. package/dist/es/GridNoRecords.d.ts +0 -36
  86. package/dist/es/GridNoRecords.js +0 -63
  87. package/dist/es/GridToolbar.d.ts +0 -50
  88. package/dist/es/GridToolbar.js +0 -78
  89. package/dist/es/ScrollMode.d.ts +0 -1
  90. package/dist/es/ScrollMode.js +0 -1
  91. package/dist/es/StatusBar.js +0 -109
  92. package/dist/es/VirtualScroll.d.ts +0 -47
  93. package/dist/es/VirtualScroll.js +0 -243
  94. package/dist/es/VirtualScrollFixed.js +0 -153
  95. package/dist/es/cells/GridCell.d.ts +0 -3
  96. package/dist/es/cells/GridCell.js +0 -59
  97. package/dist/es/cells/GridDetailCell.js +0 -25
  98. package/dist/es/cells/GridDetailHierarchyCell.d.ts +0 -7
  99. package/dist/es/cells/GridDetailHierarchyCell.js +0 -18
  100. package/dist/es/cells/GridEditCell.d.ts +0 -6
  101. package/dist/es/cells/GridEditCell.js +0 -96
  102. package/dist/es/cells/GridFilterCell.d.ts +0 -16
  103. package/dist/es/cells/GridFilterCell.js +0 -102
  104. package/dist/es/cells/GridGroupCell.d.ts +0 -6
  105. package/dist/es/cells/GridGroupCell.js +0 -114
  106. package/dist/es/cells/GridHierarchyCell.d.ts +0 -6
  107. package/dist/es/cells/GridHierarchyCell.js +0 -77
  108. package/dist/es/cells/GridSelectionCell.d.ts +0 -6
  109. package/dist/es/cells/GridSelectionCell.js +0 -44
  110. package/dist/es/columnMenu/GridColumnMenuCheckboxFilter.d.ts +0 -118
  111. package/dist/es/columnMenu/GridColumnMenuCheckboxFilter.js +0 -328
  112. package/dist/es/columnMenu/GridColumnMenuColumnsList.d.ts +0 -27
  113. package/dist/es/columnMenu/GridColumnMenuColumnsList.js +0 -57
  114. package/dist/es/columnMenu/GridColumnMenuFilter.d.ts +0 -161
  115. package/dist/es/columnMenu/GridColumnMenuFilter.js +0 -377
  116. package/dist/es/columnMenu/GridColumnMenuFilterCell.d.ts +0 -33
  117. package/dist/es/columnMenu/GridColumnMenuFilterCell.js +0 -72
  118. package/dist/es/columnMenu/GridColumnMenuFilterUI.d.ts +0 -8
  119. package/dist/es/columnMenu/GridColumnMenuFilterUI.js +0 -48
  120. package/dist/es/columnMenu/GridColumnMenuGroup.js +0 -125
  121. package/dist/es/columnMenu/GridColumnMenuItem.js +0 -37
  122. package/dist/es/columnMenu/GridColumnMenuItemContent.js +0 -36
  123. package/dist/es/columnMenu/GridColumnMenuItemGroup.js +0 -35
  124. package/dist/es/columnMenu/GridColumnMenuSort.js +0 -189
  125. package/dist/es/columnMenu/GridColumnMenuWrapper.d.ts +0 -45
  126. package/dist/es/columnMenu/GridColumnMenuWrapper.js +0 -120
  127. package/dist/es/constants/index.js +0 -7
  128. package/dist/es/drag/ColumnDraggable.d.ts +0 -34
  129. package/dist/es/drag/ColumnDraggable.js +0 -62
  130. package/dist/es/drag/ColumnResize.js +0 -234
  131. package/dist/es/drag/CommonDragLogic.js +0 -209
  132. package/dist/es/drag/GroupingIndicator.d.ts +0 -37
  133. package/dist/es/drag/GroupingIndicator.js +0 -107
  134. package/dist/es/filterCommon.js +0 -165
  135. package/dist/es/footer/Footer.d.ts +0 -34
  136. package/dist/es/footer/Footer.js +0 -70
  137. package/dist/es/footer/FooterRow.d.ts +0 -21
  138. package/dist/es/footer/FooterRow.js +0 -75
  139. package/dist/es/header/FilterRow.d.ts +0 -34
  140. package/dist/es/header/FilterRow.js +0 -139
  141. package/dist/es/header/GridHeaderCell.d.ts +0 -52
  142. package/dist/es/header/GridHeaderCell.js +0 -101
  143. package/dist/es/header/GridHeaderSelectionCell.d.ts +0 -9
  144. package/dist/es/header/GridHeaderSelectionCell.js +0 -59
  145. package/dist/es/header/GroupPanel.d.ts +0 -22
  146. package/dist/es/header/GroupPanel.js +0 -57
  147. package/dist/es/header/Header.js +0 -112
  148. package/dist/es/header/HeaderRow.d.ts +0 -47
  149. package/dist/es/header/HeaderRow.js +0 -180
  150. package/dist/es/interfaces/GridCellProps.d.ts +0 -70
  151. package/dist/es/interfaces/GridCellProps.js +0 -2
  152. package/dist/es/interfaces/GridCellsSettings.js +0 -1
  153. package/dist/es/interfaces/GridColumnMenuBaseProps.d.ts +0 -14
  154. package/dist/es/interfaces/GridColumnMenuBaseProps.js +0 -1
  155. package/dist/es/interfaces/GridColumnMenuColumnProps.js +0 -1
  156. package/dist/es/interfaces/GridColumnMenuFilterBaseProps.js +0 -1
  157. package/dist/es/interfaces/GridColumnMenuFilterUIProps.js +0 -1
  158. package/dist/es/interfaces/GridColumnMenuGroupBaseProps.d.ts +0 -20
  159. package/dist/es/interfaces/GridColumnMenuGroupBaseProps.js +0 -1
  160. package/dist/es/interfaces/GridColumnMenuProps.js +0 -1
  161. package/dist/es/interfaces/GridColumnMenuSortBaseProps.d.ts +0 -21
  162. package/dist/es/interfaces/GridColumnMenuSortBaseProps.js +0 -1
  163. package/dist/es/interfaces/GridColumnProps.js +0 -2
  164. package/dist/es/interfaces/GridDetailRowProps.d.ts +0 -13
  165. package/dist/es/interfaces/GridDetailRowProps.js +0 -1
  166. package/dist/es/interfaces/GridFilterCellProps.d.ts +0 -65
  167. package/dist/es/interfaces/GridFilterCellProps.js +0 -1
  168. package/dist/es/interfaces/GridFilterOperator.d.ts +0 -6
  169. package/dist/es/interfaces/GridFilterOperator.js +0 -1
  170. package/dist/es/interfaces/GridFilterOperators.js +0 -1
  171. package/dist/es/interfaces/GridFooterCellProps.d.ts +0 -23
  172. package/dist/es/interfaces/GridFooterCellProps.js +0 -1
  173. package/dist/es/interfaces/GridGroupableSettings.js +0 -1
  174. package/dist/es/interfaces/GridHeaderCellProps.d.ts +0 -17
  175. package/dist/es/interfaces/GridHeaderCellProps.js +0 -1
  176. package/dist/es/interfaces/GridNoRecordsProps.d.ts +0 -10
  177. package/dist/es/interfaces/GridNoRecordsProps.js +0 -1
  178. package/dist/es/interfaces/GridProps.d.ts +0 -317
  179. package/dist/es/interfaces/GridProps.js +0 -2
  180. package/dist/es/interfaces/GridRowProps.js +0 -2
  181. package/dist/es/interfaces/GridRowType.d.ts +0 -9
  182. package/dist/es/interfaces/GridRowType.js +0 -1
  183. package/dist/es/interfaces/GridSelectableSettings.d.ts +0 -18
  184. package/dist/es/interfaces/GridSelectableSettings.js +0 -2
  185. package/dist/es/interfaces/GridSortSettings.d.ts +0 -13
  186. package/dist/es/interfaces/GridSortSettings.js +0 -19
  187. package/dist/es/interfaces/GridToolbarProps.js +0 -1
  188. package/dist/es/interfaces/VirtualScrollInterface.js +0 -1
  189. package/dist/es/interfaces/events.d.ts +0 -229
  190. package/dist/es/interfaces/events.js +0 -1
  191. package/dist/es/main.js +0 -33
  192. package/dist/es/messages/index.d.ts +0 -190
  193. package/dist/es/messages/index.js +0 -191
  194. package/dist/es/package-metadata.d.ts +0 -5
  195. package/dist/es/package-metadata.js +0 -11
  196. package/dist/es/paging/GridPagerSettings.js +0 -21
  197. package/dist/es/paging/Page.d.ts +0 -13
  198. package/dist/es/paging/Page.js +0 -1
  199. package/dist/es/rows/GridDetailRow.d.ts +0 -51
  200. package/dist/es/rows/GridDetailRow.js +0 -75
  201. package/dist/es/rows/GridRow.d.ts +0 -11
  202. package/dist/es/rows/GridRow.js +0 -64
  203. package/dist/es/utils/index.js +0 -263
  204. package/dist/npm/Grid.d.ts +0 -255
  205. package/dist/npm/Grid.js +0 -1045
  206. package/dist/npm/GridColumn.js +0 -58
  207. package/dist/npm/GridNoRecords.js +0 -66
  208. package/dist/npm/GridToolbar.js +0 -81
  209. package/dist/npm/ScrollMode.d.ts +0 -1
  210. package/dist/npm/ScrollMode.js +0 -2
  211. package/dist/npm/StatusBar.d.ts +0 -47
  212. package/dist/npm/StatusBar.js +0 -115
  213. package/dist/npm/VirtualScroll.js +0 -246
  214. package/dist/npm/VirtualScrollFixed.d.ts +0 -49
  215. package/dist/npm/VirtualScrollFixed.js +0 -156
  216. package/dist/npm/cells/GridCell.d.ts +0 -3
  217. package/dist/npm/cells/GridCell.js +0 -63
  218. package/dist/npm/cells/GridDetailCell.d.ts +0 -14
  219. package/dist/npm/cells/GridDetailCell.js +0 -29
  220. package/dist/npm/cells/GridDetailHierarchyCell.d.ts +0 -7
  221. package/dist/npm/cells/GridDetailHierarchyCell.js +0 -22
  222. package/dist/npm/cells/GridEditCell.d.ts +0 -6
  223. package/dist/npm/cells/GridEditCell.js +0 -100
  224. package/dist/npm/cells/GridFilterCell.d.ts +0 -16
  225. package/dist/npm/cells/GridFilterCell.js +0 -105
  226. package/dist/npm/cells/GridGroupCell.d.ts +0 -6
  227. package/dist/npm/cells/GridGroupCell.js +0 -118
  228. package/dist/npm/cells/GridHierarchyCell.d.ts +0 -6
  229. package/dist/npm/cells/GridHierarchyCell.js +0 -81
  230. package/dist/npm/cells/GridSelectionCell.d.ts +0 -6
  231. package/dist/npm/cells/GridSelectionCell.js +0 -48
  232. package/dist/npm/columnMenu/GridColumnMenuCheckboxFilter.js +0 -331
  233. package/dist/npm/columnMenu/GridColumnMenuColumnsList.js +0 -61
  234. package/dist/npm/columnMenu/GridColumnMenuFilter.js +0 -382
  235. package/dist/npm/columnMenu/GridColumnMenuFilterCell.js +0 -75
  236. package/dist/npm/columnMenu/GridColumnMenuFilterUI.d.ts +0 -8
  237. package/dist/npm/columnMenu/GridColumnMenuFilterUI.js +0 -51
  238. package/dist/npm/columnMenu/GridColumnMenuGroup.d.ts +0 -73
  239. package/dist/npm/columnMenu/GridColumnMenuGroup.js +0 -128
  240. package/dist/npm/columnMenu/GridColumnMenuItem.d.ts +0 -36
  241. package/dist/npm/columnMenu/GridColumnMenuItem.js +0 -40
  242. package/dist/npm/columnMenu/GridColumnMenuItemContent.d.ts +0 -20
  243. package/dist/npm/columnMenu/GridColumnMenuItemContent.js +0 -39
  244. package/dist/npm/columnMenu/GridColumnMenuItemGroup.d.ts +0 -16
  245. package/dist/npm/columnMenu/GridColumnMenuItemGroup.js +0 -38
  246. package/dist/npm/columnMenu/GridColumnMenuSort.d.ts +0 -85
  247. package/dist/npm/columnMenu/GridColumnMenuSort.js +0 -192
  248. package/dist/npm/columnMenu/GridColumnMenuWrapper.js +0 -123
  249. package/dist/npm/constants/index.d.ts +0 -6
  250. package/dist/npm/constants/index.js +0 -10
  251. package/dist/npm/drag/ColumnDraggable.js +0 -65
  252. package/dist/npm/drag/ColumnResize.d.ts +0 -33
  253. package/dist/npm/drag/ColumnResize.js +0 -237
  254. package/dist/npm/drag/CommonDragLogic.d.ts +0 -40
  255. package/dist/npm/drag/CommonDragLogic.js +0 -212
  256. package/dist/npm/drag/GroupingIndicator.js +0 -110
  257. package/dist/npm/filterCommon.d.ts +0 -69
  258. package/dist/npm/filterCommon.js +0 -175
  259. package/dist/npm/footer/Footer.js +0 -73
  260. package/dist/npm/footer/FooterRow.js +0 -78
  261. package/dist/npm/header/FilterRow.js +0 -142
  262. package/dist/npm/header/GridHeaderCell.js +0 -104
  263. package/dist/npm/header/GridHeaderSelectionCell.d.ts +0 -9
  264. package/dist/npm/header/GridHeaderSelectionCell.js +0 -62
  265. package/dist/npm/header/GroupPanel.js +0 -60
  266. package/dist/npm/header/Header.d.ts +0 -42
  267. package/dist/npm/header/Header.js +0 -115
  268. package/dist/npm/header/HeaderRow.js +0 -183
  269. package/dist/npm/interfaces/GridCellProps.js +0 -3
  270. package/dist/npm/interfaces/GridCellsSettings.d.ts +0 -111
  271. package/dist/npm/interfaces/GridCellsSettings.js +0 -3
  272. package/dist/npm/interfaces/GridColumnMenuBaseProps.d.ts +0 -14
  273. package/dist/npm/interfaces/GridColumnMenuBaseProps.js +0 -2
  274. package/dist/npm/interfaces/GridColumnMenuColumnProps.d.ts +0 -25
  275. package/dist/npm/interfaces/GridColumnMenuColumnProps.js +0 -2
  276. package/dist/npm/interfaces/GridColumnMenuFilterBaseProps.d.ts +0 -25
  277. package/dist/npm/interfaces/GridColumnMenuFilterBaseProps.js +0 -2
  278. package/dist/npm/interfaces/GridColumnMenuFilterUIProps.d.ts +0 -31
  279. package/dist/npm/interfaces/GridColumnMenuFilterUIProps.js +0 -2
  280. package/dist/npm/interfaces/GridColumnMenuGroupBaseProps.js +0 -2
  281. package/dist/npm/interfaces/GridColumnMenuProps.d.ts +0 -8
  282. package/dist/npm/interfaces/GridColumnMenuProps.js +0 -2
  283. package/dist/npm/interfaces/GridColumnMenuSortBaseProps.js +0 -2
  284. package/dist/npm/interfaces/GridColumnProps.d.ts +0 -88
  285. package/dist/npm/interfaces/GridColumnProps.js +0 -3
  286. package/dist/npm/interfaces/GridDetailRowProps.d.ts +0 -13
  287. package/dist/npm/interfaces/GridDetailRowProps.js +0 -2
  288. package/dist/npm/interfaces/GridFilterCellProps.js +0 -2
  289. package/dist/npm/interfaces/GridFilterOperator.d.ts +0 -6
  290. package/dist/npm/interfaces/GridFilterOperator.js +0 -2
  291. package/dist/npm/interfaces/GridFilterOperators.d.ts +0 -49
  292. package/dist/npm/interfaces/GridFilterOperators.js +0 -2
  293. package/dist/npm/interfaces/GridFooterCellProps.js +0 -2
  294. package/dist/npm/interfaces/GridGroupableSettings.d.ts +0 -13
  295. package/dist/npm/interfaces/GridGroupableSettings.js +0 -2
  296. package/dist/npm/interfaces/GridHeaderCellProps.js +0 -2
  297. package/dist/npm/interfaces/GridNoRecordsProps.d.ts +0 -10
  298. package/dist/npm/interfaces/GridNoRecordsProps.js +0 -2
  299. package/dist/npm/interfaces/GridProps.js +0 -3
  300. package/dist/npm/interfaces/GridRowProps.d.ts +0 -64
  301. package/dist/npm/interfaces/GridRowProps.js +0 -3
  302. package/dist/npm/interfaces/GridRowType.d.ts +0 -9
  303. package/dist/npm/interfaces/GridRowType.js +0 -2
  304. package/dist/npm/interfaces/GridSelectableSettings.js +0 -3
  305. package/dist/npm/interfaces/GridSortSettings.d.ts +0 -13
  306. package/dist/npm/interfaces/GridSortSettings.js +0 -23
  307. package/dist/npm/interfaces/GridToolbarProps.d.ts +0 -34
  308. package/dist/npm/interfaces/GridToolbarProps.js +0 -2
  309. package/dist/npm/interfaces/VirtualScrollInterface.d.ts +0 -27
  310. package/dist/npm/interfaces/VirtualScrollInterface.js +0 -2
  311. package/dist/npm/interfaces/events.js +0 -2
  312. package/dist/npm/main.d.ts +0 -51
  313. package/dist/npm/main.js +0 -90
  314. package/dist/npm/messages/index.js +0 -195
  315. package/dist/npm/package-metadata.d.ts +0 -5
  316. package/dist/npm/package-metadata.js +0 -14
  317. package/dist/npm/paging/GridPagerSettings.d.ts +0 -67
  318. package/dist/npm/paging/GridPagerSettings.js +0 -25
  319. package/dist/npm/paging/Page.d.ts +0 -13
  320. package/dist/npm/paging/Page.js +0 -2
  321. package/dist/npm/rows/GridDetailRow.js +0 -78
  322. package/dist/npm/rows/GridRow.d.ts +0 -11
  323. package/dist/npm/rows/GridRow.js +0 -67
  324. package/dist/npm/utils/index.d.ts +0 -69
  325. package/dist/npm/utils/index.js +0 -275
  326. package/dist/systemjs/kendo-react-grid.js +0 -1
  327. package/e2e-legacy/snapshots/column-menu.png +0 -0
  328. package/e2e-next/basic.tests.ts +0 -25
package/index.mjs ADDED
@@ -0,0 +1,3814 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as l from "react";
6
+ import * as p from "prop-types";
7
+ import { guid as oe, Keys as me, IconWrap as O, classNames as y, getScrollbarWidth as St, kendoThemeMaps as K, Draggable as yt, dispatchEvent as ps, memoizeOne as B, validatePackage as us, shouldShowValidationUI as gs, canUseDOM as ot, setScrollbarWidth as lt, getter as ye, WatermarkOverlay as fs, toIconName as ms, clone as Cs } from "@progress/kendo-react-common";
8
+ import { tableKeyboardNavigationTools as z, useTableKeyboardNavigation as q, TABLE_ROW_INDEX_ATTRIBUTE as bs, TABLE_COL_INDEX_ATTRIBUTE as xs, isRtl as wt, tableKeyboardNavigationHeaderAttributes as nt, ColumnResizer as ks, HeaderThElement as Rt, getIndex as at, tableKeyboardNavigation as X, getSelectionOptions as ht, mapColumns as vs, tableColumnsVirtualization as Es, Pager as Is, TableKeyboardNavigationContext as we, tableKeyboardNavigationScopeAttributes as ct, TableSelection as dt, tableKeyboardNavigationBodyAttributes as pt, DropClue as ut, DragClue as gt, updateLeft as Ss, updateRight as ys } from "@progress/kendo-react-data-tools";
9
+ import { getSelectedState as Yr, getSelectedStateFromKeyDown as Jr, setSelectedState as Qr } from "@progress/kendo-react-data-tools";
10
+ import { useLocalization as Ft, provideLocalizationService as T, registerForLocalization as G, useInternationalization as ws, registerForIntl as Nt } from "@progress/kendo-react-intl";
11
+ import { minusIcon as Rs, plusIcon as Fs, moreVerticalIcon as Ns, sortAscSmallIcon as We, sortDescSmallIcon as Ve, filterIcon as Ke, filterClearIcon as Ds, xCircleIcon as Ms, caretAltDownIcon as Ts, caretAltLeftIcon as Gs, caretAltRightIcon as Hs, groupIcon as zs, ungroupIcon as Ls, searchIcon as Dt, xIcon as Os } from "@progress/kendo-svg-icons";
12
+ import { NumericTextBox as Ue, TextBox as Mt, Input as Tt, Checkbox as fe, InputPrefix as _s } from "@progress/kendo-react-inputs";
13
+ import { DatePicker as qe } from "@progress/kendo-react-dateinputs";
14
+ import { Popup as Ps } from "@progress/kendo-react-popup";
15
+ import { Button as W } from "@progress/kendo-react-buttons";
16
+ import { DropDownList as le } from "@progress/kendo-react-dropdowns";
17
+ import { isCompositeFilterDescriptor as ft, filterBy as mt } from "@progress/kendo-data-query";
18
+ import { Reveal as As } from "@progress/kendo-react-animation";
19
+ const ce = (r) => null;
20
+ ce.displayName = "KendoReactGridColumn";
21
+ ce.defaultProps = {
22
+ filterable: !0,
23
+ editable: !0,
24
+ sortable: !0,
25
+ resizable: !0,
26
+ reorderable: !0,
27
+ groupable: !0
28
+ };
29
+ ce.propTypes = {
30
+ field: p.string,
31
+ title: p.string,
32
+ editable: p.bool,
33
+ sortable: p.oneOfType([
34
+ p.bool,
35
+ p.shape({
36
+ allowUnsort: p.bool.isRequired
37
+ })
38
+ ]),
39
+ cell: p.any,
40
+ filterCell: p.any,
41
+ filterTitle: p.string,
42
+ filterable: p.bool,
43
+ filter: p.oneOf(["text", "numeric", "boolean", "date"]),
44
+ editor: p.oneOf(["text", "numeric", "boolean", "date"]),
45
+ width: p.oneOfType([p.string, p.number]),
46
+ minResizableWidth: p.number,
47
+ headerCell: p.any,
48
+ footerCell: p.any,
49
+ headerSelectionValue: p.bool,
50
+ format: p.string,
51
+ headerClassName: p.string,
52
+ className: p.string,
53
+ reorderable: p.bool,
54
+ resizable: p.bool,
55
+ orderIndex: p.number,
56
+ groupable: p.bool,
57
+ columnMenu: p.any,
58
+ locked: p.bool
59
+ };
60
+ function M(r, t) {
61
+ const s = (r || "").split(".");
62
+ let o = t;
63
+ return s.forEach((e) => {
64
+ o = o ? o[e] : void 0;
65
+ }), o;
66
+ }
67
+ function Gt(r, t, s, o, e, i, n = 0) {
68
+ let a = n;
69
+ for (let h = 0; h < t.length; h++) {
70
+ if (!e || t[h].value === void 0 || t[h].items === void 0) {
71
+ r[r.length] = {
72
+ dataIndex: o.index,
73
+ dataItem: t[h],
74
+ rowType: "data",
75
+ level: n,
76
+ expanded: i === void 0 || M(i, t[h])
77
+ }, o.index++;
78
+ continue;
79
+ }
80
+ a = Math.max(a, n + 1);
81
+ const c = i === void 0 || M(i, t[h]) === void 0 || M(i, t[h]);
82
+ r[r.length] = {
83
+ dataIndex: -1,
84
+ dataItem: t[h],
85
+ level: n,
86
+ rowType: "groupHeader",
87
+ expanded: c
88
+ }, c && (a = Math.max(
89
+ Gt(r, t[h].items, s, o, e, i, n + 1),
90
+ a
91
+ )), (s === "always" || c && s === "visible") && (r[r.length] = {
92
+ dataIndex: -1,
93
+ dataItem: t[h],
94
+ rowType: "groupFooter",
95
+ level: n,
96
+ expanded: c
97
+ });
98
+ }
99
+ return a;
100
+ }
101
+ function Ht(r, t, s, o = 0) {
102
+ let e = [];
103
+ if (!r)
104
+ return [];
105
+ r && r.length === void 0 && (r = [r]), r.forEach((n, a) => {
106
+ n = n.props ? n.props : n;
107
+ const h = t[a] || null, c = Ht(n.children, h && h.children || [], s, o + 1);
108
+ e.push(
109
+ Object.assign(
110
+ { depth: o },
111
+ ce.defaultProps,
112
+ c.length ? { cell: () => null, filterCell: () => null } : {},
113
+ h ? { width: h.width, orderIndex: h.orderIndex } : {},
114
+ n,
115
+ {
116
+ id: n.id ? n.id : z.generateNavigatableId(`${s.prevId++}`, s.idPrefix, "column"),
117
+ declarationIndex: e.length,
118
+ children: c,
119
+ rowSpan: 0,
120
+ colSpan: 0,
121
+ isAccessible: !0,
122
+ left: h && Math.floor(h.left),
123
+ right: h && Math.floor(h.right)
124
+ }
125
+ )
126
+ );
127
+ });
128
+ const i = (n, a) => n.orderIndex === a.orderIndex ? n.declarationIndex - a.declarationIndex : (n.orderIndex || 0) - (a.orderIndex || 0);
129
+ if (e.sort(i), o === 0) {
130
+ let n = [];
131
+ const a = (h, c) => h.forEach((d) => {
132
+ d.parentIndex = c, a(d.children, n.push(d) - 1);
133
+ });
134
+ return a(e, -1), n;
135
+ }
136
+ return e;
137
+ }
138
+ function Bs(r, t, s, o) {
139
+ let e = [];
140
+ Array.isArray(r) ? e = r : r && (e = r.data);
141
+ const i = [];
142
+ if (e.length > 0) {
143
+ let n = e[0];
144
+ if (t)
145
+ for (let h = 0; h < t.length; h++)
146
+ n = n.items && n.items[0];
147
+ Object.getOwnPropertyNames(n).forEach((h) => {
148
+ h !== s && i.push(Object.assign(
149
+ {
150
+ id: z.generateNavigatableId(`${o.prevId++}`, o.idPrefix, "column"),
151
+ declarationIndex: -1,
152
+ parentIndex: -1,
153
+ depth: 0,
154
+ colSpan: 0,
155
+ rowSpan: 0,
156
+ index: 0,
157
+ left: 0,
158
+ right: 0,
159
+ rightBorder: !1,
160
+ children: [],
161
+ ariaColumnIndex: 0,
162
+ isAccessible: !0
163
+ },
164
+ ce.defaultProps,
165
+ { field: h }
166
+ ));
167
+ });
168
+ }
169
+ return i;
170
+ }
171
+ const Ws = (r, t) => {
172
+ let s = r[t.parentIndex];
173
+ for (; s; ) {
174
+ if (s.footerCell)
175
+ return !0;
176
+ s = r[s.parentIndex];
177
+ }
178
+ return !1;
179
+ }, Vs = (r) => r.filter((t) => Ws(r, t) ? !1 : !!t.footerCell || !(t.children && t.children.length > 0)), Se = (r) => r.width !== void 0 ? Math.floor(parseFloat(r.width.toString())) + "px" : void 0, zt = (r) => (r.sort((t, s) => t.declarationIndex - s.declarationIndex), r.map((t) => {
180
+ const {
181
+ declarationIndex: s,
182
+ parentIndex: o,
183
+ depth: e,
184
+ colSpan: i,
185
+ rowSpan: n,
186
+ index: a,
187
+ kFirst: h,
188
+ children: c,
189
+ ...d
190
+ } = t;
191
+ return c.length ? {
192
+ children: zt(c),
193
+ ...d
194
+ } : d;
195
+ })), Re = typeof window < "u" && /Firefox/.test(window.navigator.userAgent), Ct = 17895697, Ce = (r, t) => {
196
+ if (!(!r && !t))
197
+ return t ? r ? {
198
+ ...r,
199
+ ...t,
200
+ select: {
201
+ ...r.select || {},
202
+ ...t.select || {}
203
+ },
204
+ hierarchy: {
205
+ ...r.hierarchy || {},
206
+ ...t.hierarchy || {}
207
+ },
208
+ group: {
209
+ ...r.group || {},
210
+ ...t.group || {}
211
+ },
212
+ edit: {
213
+ ...r.edit || {},
214
+ ...t.edit || {}
215
+ }
216
+ } : t : r;
217
+ }, Ks = (r) => {
218
+ const t = l.useCallback(
219
+ (d) => {
220
+ r.selectionChange && r.selectionChange({ syntheticEvent: d });
221
+ },
222
+ [r.selectionChange]
223
+ ), s = l.useMemo(() => oe(), []), o = M(r.field, r.dataItem), e = q(r.id);
224
+ let i = {
225
+ colSpan: r.colSpan,
226
+ style: r.style,
227
+ className: r.className,
228
+ ["aria-colindex"]: r.ariaColumnIndex,
229
+ role: "gridcell",
230
+ ...e
231
+ }, n = [
232
+ /* @__PURE__ */ l.createElement(
233
+ "input",
234
+ {
235
+ key: "1",
236
+ checked: typeof o == "boolean" && o,
237
+ id: s,
238
+ type: "checkbox",
239
+ className: "k-checkbox k-checkbox-md k-rounded-md",
240
+ onChange: t
241
+ }
242
+ ),
243
+ /* @__PURE__ */ l.createElement("label", { className: "k-checkbox-label", htmlFor: s, key: "2" })
244
+ ];
245
+ const a = r.rowType !== "groupHeader" ? /* @__PURE__ */ l.createElement(
246
+ "td",
247
+ {
248
+ ...i
249
+ },
250
+ n
251
+ ) : null, h = r.rowType || "data", c = r.cells;
252
+ if (c && c.select && c.select[h]) {
253
+ const d = c.select[h];
254
+ return /* @__PURE__ */ l.createElement(d, { ...r, tdProps: i }, n);
255
+ }
256
+ return r.render ? r.render.call(void 0, a, r) : a;
257
+ }, Fe = "grid.noRecords", Us = "grid.pagerInfo", qs = "grid.pagerFirstPage", $s = "grid.pagerPreviousPage", js = "grid.pagerNextPage", Xs = "grid.pagerLastPage", Ys = "grid.pagerItemsPerPage", Js = "grid.pagerPage", Qs = "grid.pagerPageSizeAriaLabel", Zs = "grid.pagerOf", er = "grid.pagerTotalPages", Ne = "grid.groupPanelEmpty", Lt = "grid.groupColumn", Ot = "grid.ungroupColumn", De = "grid.columnMenu", U = "grid.filterClearButton", ne = "grid.filterSubmitButton", ae = "grid.filterTitle", Me = "grid.sortAscending", Te = "grid.sortDescending", Ge = "grid.searchPlaceholder", He = "grid.filterCheckAll", ze = "grid.filterChooseOperator", Le = "grid.filterSelectedItems", Oe = "grid.sortAriaLabel", _e = "grid.filterAriaLabel", Pe = "grid.groupPanelAriaLabel", _t = "grid.groupExpand", Pt = "grid.groupCollapse", At = "grid.detailExpand", Bt = "grid.detailCollapse", v = {
258
+ [At]: "Expand detail row",
259
+ [Bt]: "Collapse detail row",
260
+ [_t]: "Expand group",
261
+ [Pt]: "Collapse Group",
262
+ [Fe]: "No records available",
263
+ [Ne]: "Drag a column header and drop it here to group by that column",
264
+ [U]: "Clear",
265
+ [ne]: "Filter",
266
+ [ae]: "Filter",
267
+ [Me]: "Sort Ascending",
268
+ [Te]: "Sort Descending",
269
+ [Oe]: "Sortable",
270
+ [Lt]: "Group Column",
271
+ [Ot]: "Ungroup Column",
272
+ [De]: "Column menu",
273
+ [Ys]: "items per page",
274
+ [Us]: "{0} - {1} of {2} items",
275
+ [qs]: "Go to the first page",
276
+ [$s]: "Go to the previous page",
277
+ [js]: "Go to the next page",
278
+ [Xs]: "Go to the last page",
279
+ [Js]: "Page",
280
+ [Qs]: "Page size",
281
+ [Zs]: "of",
282
+ [er]: "{0}",
283
+ [Ge]: "Search",
284
+ [He]: "Check All",
285
+ [ze]: "Choose Operator",
286
+ [Le]: "selected items",
287
+ [_e]: "Filter",
288
+ [Pe]: "Group panel",
289
+ "grid.filterEqOperator": "Is equal to",
290
+ "grid.filterNotEqOperator": "Is not equal to",
291
+ "grid.filterIsNullOperator": "Is null",
292
+ "grid.filterIsNotNullOperator": "Is not null",
293
+ "grid.filterIsEmptyOperator": "Is empty",
294
+ "grid.filterIsNotEmptyOperator": "Is not empty",
295
+ "grid.filterStartsWithOperator": "Starts with",
296
+ "grid.filterContainsOperator": "Contains",
297
+ "grid.filterNotContainsOperator": "Does not contain",
298
+ "grid.filterEndsWithOperator": "Ends with",
299
+ "grid.filterGteOperator": "Is greater than or equal to",
300
+ "grid.filterGtOperator": "Is greater than",
301
+ "grid.filterLteOperator": "Is less than or equal to",
302
+ "grid.filterLtOperator": "Is less than",
303
+ "grid.filterIsTrue": "Is true",
304
+ "grid.filterIsFalse": "Is false",
305
+ "grid.filterBooleanAll": "(All)",
306
+ "grid.filterAfterOrEqualOperator": "Is after or equal to",
307
+ "grid.filterAfterOperator": "Is after",
308
+ "grid.filterBeforeOperator": "Is before",
309
+ "grid.filterBeforeOrEqualOperator": "Is before or equal to",
310
+ "grid.filterAndLogic": "And",
311
+ "grid.filterOrLogic": "Or"
312
+ };
313
+ function tr(r) {
314
+ const t = r.replace(/^pager\.([a-z])/, (s, o) => "grid.pager" + o.toUpperCase());
315
+ return { messageKey: t, defaultMessage: v[t] };
316
+ }
317
+ const sr = (r) => {
318
+ let t = null, s = null, o = null;
319
+ const e = M(r.field, r.dataItem), i = q(r.id), n = Ft(), a = l.useCallback(
320
+ (d) => {
321
+ d.isDefaultPrevented() || d.keyCode === me.enter && r.onChange && (d.preventDefault(), r.onChange({
322
+ dataItem: r.dataItem,
323
+ dataIndex: r.dataIndex,
324
+ syntheticEvent: d,
325
+ field: r.field,
326
+ value: !e
327
+ }));
328
+ },
329
+ [r.dataItem, r.dataIndex, r.field, r.onChange, e]
330
+ );
331
+ if (r.rowType === "groupFooter")
332
+ s = {
333
+ className: "k-table-td k-hierarchy-cell",
334
+ role: "gridcell",
335
+ ...i
336
+ }, t = /* @__PURE__ */ l.createElement(
337
+ "td",
338
+ {
339
+ ...s
340
+ }
341
+ );
342
+ else if (r.rowType !== "groupHeader") {
343
+ const d = e ? Bt : At, g = n.toLanguageString(d, v[d]);
344
+ s = {
345
+ className: "k-table-td k-hierarchy-cell",
346
+ onKeyDown: a,
347
+ "aria-expanded": !!e,
348
+ role: "gridcell",
349
+ "aria-colindex": r.ariaColumnIndex,
350
+ ...i
351
+ }, o = /* @__PURE__ */ l.createElement(
352
+ "a",
353
+ {
354
+ onClick: (m) => {
355
+ m.preventDefault(), r.onChange && r.onChange({
356
+ dataItem: r.dataItem,
357
+ dataIndex: r.dataIndex,
358
+ syntheticEvent: m,
359
+ field: r.field,
360
+ value: !e
361
+ });
362
+ },
363
+ "aria-label": g,
364
+ href: "#",
365
+ tabIndex: -1
366
+ },
367
+ /* @__PURE__ */ l.createElement(O, { name: e ? "minus" : "plus", icon: e ? Rs : Fs })
368
+ ), t = /* @__PURE__ */ l.createElement(
369
+ "td",
370
+ {
371
+ ...s
372
+ },
373
+ o
374
+ );
375
+ }
376
+ const h = r.rowType || "data", c = r.cells;
377
+ if (c && c.hierarchy && c.hierarchy[h]) {
378
+ const d = c.hierarchy[h];
379
+ return /* @__PURE__ */ l.createElement(d, { ...r, tdProps: s }, o);
380
+ }
381
+ return r.render ? r.render.call(void 0, t, r) : t;
382
+ }, rr = bs, re = xs, ir = (r) => {
383
+ const t = M(r.field, r.dataItem);
384
+ let s = null;
385
+ const o = y("k-table-td", "k-grid-edit-cell", {
386
+ ["k-selected"]: r.isSelected
387
+ }, r.className), e = l.useMemo(() => oe(), []), i = q(r.id);
388
+ let n = null, a = null;
389
+ const h = l.useCallback(
390
+ (u) => {
391
+ if (r.onChange) {
392
+ const b = u.target.type === "checkbox" ? u.target.checked : u.target.value;
393
+ r.onChange({
394
+ dataItem: r.dataItem,
395
+ dataIndex: r.dataIndex,
396
+ field: r.field,
397
+ syntheticEvent: u,
398
+ value: b
399
+ });
400
+ }
401
+ },
402
+ [r.onChange, r.dataItem, r.dataIndex, r.field]
403
+ ), c = l.useCallback((u) => {
404
+ r.onContextMenu && r.onContextMenu.call(void 0, u, r.dataItem, r.field);
405
+ }, [r.onContextMenu, r.dataItem, r.field]), d = l.useCallback(
406
+ (u) => {
407
+ r.onChange && r.onChange({
408
+ dataItem: r.dataItem,
409
+ dataIndex: r.dataIndex,
410
+ field: r.field,
411
+ syntheticEvent: u.syntheticEvent,
412
+ value: u.value
413
+ });
414
+ },
415
+ [r.onChange, r.dataItem, r.dataIndex, r.field]
416
+ );
417
+ switch (r.editor) {
418
+ case "numeric": {
419
+ n = {
420
+ onContextMenu: c,
421
+ colSpan: r.colSpan,
422
+ style: r.style,
423
+ className: o,
424
+ ["aria-colindex"]: r.ariaColumnIndex,
425
+ ["aria-selected"]: r.isSelected,
426
+ [re]: r.columnIndex,
427
+ role: "gridcell",
428
+ ...i
429
+ }, a = /* @__PURE__ */ l.createElement(
430
+ Ue,
431
+ {
432
+ width: "100%",
433
+ value: t === void 0 ? null : t,
434
+ onChange: d
435
+ }
436
+ ), s = /* @__PURE__ */ l.createElement(
437
+ "td",
438
+ {
439
+ ...n
440
+ },
441
+ a
442
+ );
443
+ break;
444
+ }
445
+ case "date":
446
+ n = {
447
+ onContextMenu: c,
448
+ colSpan: r.colSpan,
449
+ style: r.style,
450
+ className: o,
451
+ ["aria-colindex"]: r.ariaColumnIndex,
452
+ ["aria-selected"]: r.isSelected,
453
+ [re]: r.columnIndex,
454
+ role: "gridcell",
455
+ ...i
456
+ }, a = /* @__PURE__ */ l.createElement(
457
+ qe,
458
+ {
459
+ width: "100%",
460
+ value: t,
461
+ onChange: d
462
+ }
463
+ ), s = /* @__PURE__ */ l.createElement(
464
+ "td",
465
+ {
466
+ ...n
467
+ },
468
+ a
469
+ );
470
+ break;
471
+ case "boolean":
472
+ n = {
473
+ onContextMenu: c,
474
+ colSpan: r.colSpan,
475
+ style: r.style,
476
+ className: o,
477
+ ["aria-colindex"]: r.ariaColumnIndex,
478
+ ["aria-selected"]: r.isSelected,
479
+ [re]: r.columnIndex,
480
+ role: "gridcell",
481
+ ...i
482
+ }, a = [
483
+ /* @__PURE__ */ l.createElement(
484
+ "input",
485
+ {
486
+ checked: t || !1,
487
+ id: e,
488
+ type: "checkbox",
489
+ className: "k-checkbox k-checkbox-md k-rounded-md",
490
+ onChange: h,
491
+ key: 1
492
+ }
493
+ ),
494
+ /* @__PURE__ */ l.createElement("label", { className: "k-checkbox-label", htmlFor: e, key: 2 })
495
+ ], s = /* @__PURE__ */ l.createElement(
496
+ "td",
497
+ {
498
+ ...n
499
+ },
500
+ a
501
+ );
502
+ break;
503
+ default:
504
+ n = {
505
+ onContextMenu: c,
506
+ colSpan: r.colSpan,
507
+ style: r.style,
508
+ className: o,
509
+ ["aria-colindex"]: r.ariaColumnIndex,
510
+ ["aria-selected"]: r.isSelected,
511
+ [re]: r.columnIndex,
512
+ role: "gridcell",
513
+ ...i
514
+ }, a = /* @__PURE__ */ l.createElement(
515
+ "input",
516
+ {
517
+ style: { width: "100%" },
518
+ className: "k-input",
519
+ value: t || "",
520
+ onChange: h
521
+ }
522
+ ), s = /* @__PURE__ */ l.createElement(
523
+ "td",
524
+ {
525
+ ...n
526
+ },
527
+ a
528
+ );
529
+ }
530
+ const g = r.editor || "text", m = r.cells;
531
+ if (m && m.edit && m.edit[g]) {
532
+ const u = m.edit[g];
533
+ return /* @__PURE__ */ l.createElement(u, { ...r, tdProps: n }, a);
534
+ }
535
+ return r.render ? r.render.call(void 0, s, r) : s;
536
+ };
537
+ class or extends l.Component {
538
+ constructor() {
539
+ super(...arguments), this.headerWrap = null, this.table = null, this.syncScroll = !1, this.scrollbarWidth = St(), this.onScroll = (t) => {
540
+ if (this.syncScroll) {
541
+ this.syncScroll = !1;
542
+ return;
543
+ }
544
+ if (!this.headerWrap)
545
+ return;
546
+ const s = this.headerWrap.scrollLeft, o = this.props.scrollableDataElement();
547
+ o && o.scrollLeft !== s && (o.scrollLeft = s);
548
+ };
549
+ }
550
+ get element() {
551
+ return this.props.elemRef.current;
552
+ }
553
+ componentDidMount() {
554
+ const t = wt(this.element);
555
+ this.props.columnResize && this.props.columnResize.setIsRtl(t), this.forceUpdate();
556
+ }
557
+ /**
558
+ *
559
+ * @param scrollLeft - Scrolls to the left (in pixels).
560
+ */
561
+ setScrollLeft(t) {
562
+ this.headerWrap && this.headerWrap.scrollLeft !== t && (this.syncScroll = !0, this.headerWrap.scrollLeft = t);
563
+ }
564
+ /**
565
+ *
566
+ * @param width - Scrolls the width (in pixels).
567
+ */
568
+ setWidth(t) {
569
+ this.table && (this.table.style.width = t + "px");
570
+ }
571
+ render() {
572
+ return this.props.staticHeaders ? /* @__PURE__ */ l.createElement(
573
+ "div",
574
+ {
575
+ ref: this.props.elemRef,
576
+ className: y(
577
+ "k-grid-header",
578
+ { "k-grid-draggable-header": this.props.draggable }
579
+ ),
580
+ role: "presentation"
581
+ },
582
+ /* @__PURE__ */ l.createElement(
583
+ "div",
584
+ {
585
+ ref: (t) => {
586
+ this.headerWrap = t;
587
+ },
588
+ className: "k-grid-header-wrap",
589
+ style: this.scrollbarWidth ? {} : { borderWidth: 0 },
590
+ onScroll: this.onScroll,
591
+ role: "presentation"
592
+ },
593
+ /* @__PURE__ */ l.createElement(
594
+ "table",
595
+ {
596
+ ref: (t) => {
597
+ this.table = t;
598
+ },
599
+ className: y(
600
+ "k-table k-grid-header-table",
601
+ {
602
+ "k-table-md": !this.props.size,
603
+ [`k-table-${K.sizeMap[this.props.size] || this.props.size}`]: this.props.size
604
+ },
605
+ this.props.className
606
+ ),
607
+ role: "presentation"
608
+ },
609
+ /* @__PURE__ */ l.createElement("colgroup", { ref: (t) => {
610
+ this.props.columnResize.colGroupHeader = t;
611
+ } }, this.props.cols),
612
+ /* @__PURE__ */ l.createElement("thead", { className: "k-table-thead", role: "rowgroup", ...nt }, this.props.headerRow, this.props.filterRow)
613
+ )
614
+ )
615
+ ) : /* @__PURE__ */ l.createElement(
616
+ "thead",
617
+ {
618
+ role: "presentation",
619
+ className: y(
620
+ "k-table-thead",
621
+ { "k-grid-draggable-header": this.props.draggable }
622
+ ),
623
+ ...nt
624
+ },
625
+ this.props.headerRow,
626
+ this.props.filterRow
627
+ );
628
+ }
629
+ }
630
+ const Wt = (...r) => Object.assign({ allowUnsort: !0, mode: "single" }, ...r);
631
+ class lr extends l.PureComponent {
632
+ constructor() {
633
+ super(...arguments), this.draggable = null, this.onPress = (t) => {
634
+ const s = this.draggable && this.draggable.element;
635
+ s && this.props.pressHandler && this.props.pressHandler(t.event, s);
636
+ }, this.onDrag = (t) => {
637
+ const s = this.draggable && this.draggable.element;
638
+ s && this.props.dragHandler && this.props.dragHandler(t.event, s);
639
+ }, this.onRelease = (t) => {
640
+ this.draggable && this.draggable.element && this.props.releaseHandler && this.props.releaseHandler(t.event);
641
+ };
642
+ }
643
+ render() {
644
+ return /* @__PURE__ */ l.createElement(
645
+ yt,
646
+ {
647
+ onPress: this.onPress,
648
+ onDrag: this.onDrag,
649
+ onRelease: this.onRelease,
650
+ hint: this.props.dragClue,
651
+ autoScroll: { boundaryElementRef: this.props.headerRef, direction: { horizontal: !0, vertical: !1 } },
652
+ scrollContainer: this.props.containerRef || void 0,
653
+ ref: (t) => {
654
+ this.draggable = t;
655
+ }
656
+ },
657
+ /* @__PURE__ */ l.createElement("tr", { className: "k-table-row", style: { touchAction: "none" }, role: "row", "aria-rowindex": this.props.ariaRowIndex }, this.props.children)
658
+ );
659
+ }
660
+ }
661
+ class Vt extends l.Component {
662
+ constructor() {
663
+ super(...arguments), this.state = {
664
+ show: !1
665
+ }, this._anchor = null, this._content = null, this.blurTimeout = void 0, this.willBlur = !1, this.blur = () => {
666
+ if (this.willBlur) {
667
+ this.willBlur = !1;
668
+ return;
669
+ }
670
+ clearTimeout(this.blurTimeout), this.blurTimeout = window.setTimeout(() => {
671
+ this.closeMenu();
672
+ });
673
+ }, this.focus = () => {
674
+ clearTimeout(this.blurTimeout);
675
+ }, this.anchorClick = (t) => {
676
+ t.preventDefault(), this.setState(
677
+ {
678
+ show: !this.state.show
679
+ },
680
+ () => this.state.show && this._content && this._content.focus()
681
+ );
682
+ }, this.closeMenu = () => {
683
+ this.setState({ show: !1 });
684
+ }, this.onAnchorMouseDown = (t) => {
685
+ this.willBlur = this.state.show && t.currentTarget === this._anchor;
686
+ }, this.onAnchorKeyDown = (t) => {
687
+ var s;
688
+ if (t.keyCode === me.tab) {
689
+ const o = t.target, e = o && ((s = o.closest(".k-grid")) == null ? void 0 : s.getElementsByClassName("k-grid-content")[0]);
690
+ e && e.scrollWidth > e.clientWidth && o.scrollIntoView({ inline: "center" });
691
+ }
692
+ };
693
+ }
694
+ render() {
695
+ const { columnMenu: t, ...s } = this.props, { column: o } = this.props, e = T(this), i = o.title || o.field, n = i ? `${i} ` : "";
696
+ return /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(
697
+ "a",
698
+ {
699
+ className: "k-grid-header-menu k-grid-column-menu",
700
+ ref: (a) => this._anchor = a,
701
+ onClick: this.anchorClick,
702
+ onMouseDown: this.onAnchorMouseDown,
703
+ onKeyDown: this.onAnchorKeyDown,
704
+ href: "#",
705
+ "aria-label": `${n}${e.toLanguageString(De, v[De])}`
706
+ },
707
+ /* @__PURE__ */ l.createElement(O, { name: "more-vertical", icon: Ns })
708
+ ), /* @__PURE__ */ l.createElement(
709
+ Ps,
710
+ {
711
+ anchor: this._anchor,
712
+ show: this.state.show
713
+ },
714
+ /* @__PURE__ */ l.createElement(
715
+ "div",
716
+ {
717
+ ref: (a) => this._content = a,
718
+ className: "k-grid-columnmenu-popup",
719
+ tabIndex: 0,
720
+ onBlur: this.blur,
721
+ onFocus: this.focus,
722
+ style: { outline: "none" }
723
+ },
724
+ t && /* @__PURE__ */ l.createElement(
725
+ t,
726
+ {
727
+ ...s,
728
+ onCloseMenu: this.closeMenu
729
+ }
730
+ )
731
+ )
732
+ ));
733
+ }
734
+ }
735
+ class nr extends l.Component {
736
+ /**
737
+ * @hidden
738
+ */
739
+ render() {
740
+ const { columnMenuWrapperProps: t } = this.props, s = this.props.onClick ? {
741
+ onClick: this.props.onClick
742
+ } : {}, o = /* @__PURE__ */ l.createElement("span", { className: "k-cell-inner" }, /* @__PURE__ */ l.createElement(
743
+ "span",
744
+ {
745
+ className: y(
746
+ "k-link",
747
+ {
748
+ "!k-cursor-default": !this.props.columnMenuWrapperProps.sortable
749
+ }
750
+ ),
751
+ ...s
752
+ },
753
+ /* @__PURE__ */ l.createElement("span", { className: "k-column-title" }, this.props.title || this.props.field || " "),
754
+ this.props.children
755
+ ), t.columnMenu && /* @__PURE__ */ l.createElement(Vt, { ...t }));
756
+ return this.props.render ? this.props.render.call(void 0, o, this.props) : o;
757
+ }
758
+ }
759
+ const ar = {
760
+ true: { asc: "desc", desc: "", "": "asc" },
761
+ false: { asc: "desc", desc: "asc", "": "asc" }
762
+ }, hr = {
763
+ none: "none",
764
+ asc: "ascending",
765
+ desc: "descending"
766
+ };
767
+ class Kt extends l.Component {
768
+ constructor(t) {
769
+ super(t), this.serviceIndex = 0, this.index = -1, this.cellKeyDown = (s, o) => {
770
+ s.isDefaultPrevented() || s.keyCode === me.enter && this.cellClick(s, o);
771
+ }, this.cells = (s) => s.map((o) => {
772
+ const e = this.props.columns[o], i = this.props.sortable && e.sortable, n = this.props.sort ? this.props.sort.findIndex((k) => k.field === e.field) : -1, a = n >= 0 && this.props.sort[n].dir || "none", h = e.columnMenu === null ? null : e.columnMenu || this.props.columnMenu, c = y({
773
+ "k-first": e.kFirst,
774
+ "k-filterable": !!h,
775
+ "k-table-th": !0,
776
+ "k-header": !0,
777
+ "k-grid-header-sticky": e.locked,
778
+ "k-sorted": this.props.sort && this.props.sort.some((k) => k.field === e.field)
779
+ }, e.headerClassName), d = e.left !== void 0 ? this.props.isRtl ? { left: e.right, right: e.left } : { left: e.left, right: e.right } : {}, g = T(this).toLanguageString(Oe, v[Oe]);
780
+ let m = e.isAccessible ? {
781
+ ariaSort: hr[a],
782
+ role: "columnheader",
783
+ ariaColumnIndex: e.ariaColumnIndex,
784
+ ariaSelected: !1,
785
+ ariaDescription: i ? g : ""
786
+ } : {
787
+ role: "presentation"
788
+ };
789
+ const u = e.declarationIndex >= 0 ? ++this.index : --this.serviceIndex, b = e.headerCell ? e.headerCell : nr, E = /* @__PURE__ */ l.createElement(
790
+ b,
791
+ {
792
+ key: 1,
793
+ field: e.field,
794
+ onClick: i && ((k) => this.cellClick(k, e)) || void 0,
795
+ selectionChange: this.props.selectionChange,
796
+ title: e.title,
797
+ selectionValue: e.headerSelectionValue,
798
+ render: this.props.cellRender,
799
+ children: this.sortIcon(n),
800
+ columnMenuWrapperProps: {
801
+ column: {
802
+ field: e.field,
803
+ title: e.title,
804
+ locked: e.locked,
805
+ filter: e.filter,
806
+ id: e.id
807
+ },
808
+ sortable: i && this.props.sortable,
809
+ sort: this.props.sort,
810
+ onSortChange: this.props.sortChange,
811
+ filter: this.props.filter,
812
+ filterable: this.props.filterable && e.filterable,
813
+ filterOperators: this.props.filterOperators,
814
+ onFilterChange: this.props.filterChange,
815
+ group: this.props.group,
816
+ groupable: this.props.groupable,
817
+ onGroupChange: this.props.groupChange,
818
+ columnMenu: h
819
+ }
820
+ }
821
+ ), C = {
822
+ ...m,
823
+ key: u,
824
+ colSpan: e.colSpan,
825
+ rowSpan: e.rowSpan,
826
+ className: c,
827
+ style: d,
828
+ columnId: e.id,
829
+ navigatable: e.navigatable,
830
+ onKeyDown: i && ((k) => this.cellKeyDown(k, e)) || void 0,
831
+ role: "columnheader"
832
+ }, x = [
833
+ E,
834
+ this.props.columnResize && this.props.columnResize.resizable && e.resizable && /* @__PURE__ */ l.createElement(
835
+ ks,
836
+ {
837
+ key: 2,
838
+ resize: (k, _, D) => this.props.columnResize && this.props.columnResize.dragHandler(k, e, _, D),
839
+ autofit: (k) => this.props.columnResize && this.props.columnResize.dblClickHandler(k, [e.id])
840
+ }
841
+ )
842
+ ], I = Ce(this.props.cells, e.cells);
843
+ if (I && I.headerCell) {
844
+ const k = I.headerCell;
845
+ return /* @__PURE__ */ l.createElement(k, { key: u, thProps: C, index: o }, x);
846
+ }
847
+ return /* @__PURE__ */ l.createElement(
848
+ Rt,
849
+ {
850
+ ...C,
851
+ key: u
852
+ },
853
+ x
854
+ );
855
+ }), this.cellClick = this.cellClick.bind(this);
856
+ }
857
+ cellClick(t, s) {
858
+ if (t.preventDefault(), !this.props.sortChange)
859
+ return;
860
+ const { allowUnsort: o, mode: e } = Wt(this.props.sortable || !1, s.sortable || !1), i = (this.props.sort || []).filter((h) => h.field === s.field)[0], n = ar[o][i && i.dir || ""], a = e === "single" ? [] : (this.props.sort || []).filter((h) => h.field !== s.field);
861
+ n !== "" && s.field && a.push({ field: s.field, dir: n }), this.props.sortChange(a, t);
862
+ }
863
+ sortIcon(t) {
864
+ return this.props.sort ? t >= 0 && [
865
+ /* @__PURE__ */ l.createElement("span", { key: 1, className: "k-sort-icon" }, /* @__PURE__ */ l.createElement(
866
+ O,
867
+ {
868
+ name: "sort-" + this.props.sort[t].dir + "-small",
869
+ icon: this.props.sort[t].dir === "asc" ? We : Ve
870
+ }
871
+ )),
872
+ this.props.sort.length > 1 && /* @__PURE__ */ l.createElement("span", { key: 2, className: "k-sort-icon" }, /* @__PURE__ */ l.createElement("span", { className: "k-sort-order" }, t + 1))
873
+ ] : null;
874
+ }
875
+ render() {
876
+ return this.serviceIndex = 0, this.index = -1, this.props.columnsMap.map((t, s) => this.props.pressHandler && /* @__PURE__ */ l.createElement(
877
+ lr,
878
+ {
879
+ key: s,
880
+ pressHandler: this.props.pressHandler,
881
+ dragHandler: this.props.dragHandler,
882
+ releaseHandler: this.props.releaseHandler,
883
+ ariaRowIndex: s + 1,
884
+ dragClue: this.props.dragClue,
885
+ headerRef: this.props.headerRef,
886
+ containerRef: this.props.containerRef
887
+ },
888
+ this.cells(t)
889
+ ) || /* @__PURE__ */ l.createElement("tr", { key: s, className: "k-table-row", role: "row", "aria-rowindex": s + 1 }, this.cells(t)));
890
+ }
891
+ }
892
+ G(Kt);
893
+ const cr = [
894
+ { text: "grid.filterAndLogic", operator: "and" },
895
+ { text: "grid.filterOrLogic", operator: "or" }
896
+ ], bt = {
897
+ text: [
898
+ { text: "grid.filterContainsOperator", operator: "contains" },
899
+ { text: "grid.filterNotContainsOperator", operator: "doesnotcontain" },
900
+ { text: "grid.filterEqOperator", operator: "eq" },
901
+ { text: "grid.filterNotEqOperator", operator: "neq" },
902
+ { text: "grid.filterStartsWithOperator", operator: "startswith" },
903
+ { text: "grid.filterEndsWithOperator", operator: "endswith" },
904
+ { text: "grid.filterIsNullOperator", operator: "isnull" },
905
+ { text: "grid.filterIsNotNullOperator", operator: "isnotnull" },
906
+ { text: "grid.filterIsEmptyOperator", operator: "isempty" },
907
+ { text: "grid.filterIsNotEmptyOperator", operator: "isnotempty" }
908
+ ],
909
+ numeric: [
910
+ { text: "grid.filterEqOperator", operator: "eq" },
911
+ { text: "grid.filterNotEqOperator", operator: "neq" },
912
+ { text: "grid.filterGteOperator", operator: "gte" },
913
+ { text: "grid.filterGtOperator", operator: "gt" },
914
+ { text: "grid.filterLteOperator", operator: "lte" },
915
+ { text: "grid.filterLtOperator", operator: "lt" },
916
+ { text: "grid.filterIsNullOperator", operator: "isnull" },
917
+ { text: "grid.filterIsNotNullOperator", operator: "isnotnull" }
918
+ ],
919
+ date: [
920
+ { text: "grid.filterEqOperator", operator: "eq" },
921
+ { text: "grid.filterNotEqOperator", operator: "neq" },
922
+ { text: "grid.filterAfterOrEqualOperator", operator: "gte" },
923
+ { text: "grid.filterAfterOperator", operator: "gt" },
924
+ { text: "grid.filterBeforeOperator", operator: "lt" },
925
+ { text: "grid.filterBeforeOrEqualOperator", operator: "lte" },
926
+ { text: "grid.filterIsNullOperator", operator: "isnull" },
927
+ { text: "grid.filterIsNotNullOperator", operator: "isnotnull" }
928
+ ],
929
+ boolean: [
930
+ { text: "grid.filterEqOperator", operator: "eq" }
931
+ ]
932
+ }, L = (r) => r === "isnull" || r === "isnotnull" || r === "isempty" || r === "isnotempty", ie = (r, t) => r.map((s) => ({
933
+ text: t.toLanguageString(s.text, v[s.text]),
934
+ operator: s.operator
935
+ })), dr = "eq", Ut = [
936
+ { text: "grid.filterBooleanAll", operator: "" },
937
+ { text: "grid.filterIsTrue", operator: !0 },
938
+ { text: "grid.filterIsFalse", operator: !1 }
939
+ ], pr = {
940
+ text: !1,
941
+ numeric: !1,
942
+ date: !1,
943
+ boolean: !0
944
+ }, qt = (r, t, s) => {
945
+ const o = $t(s.operators);
946
+ let e = s.operator;
947
+ switch (s.filterType) {
948
+ case "numeric":
949
+ (!e || L(e)) && (e = o), r === null && e === o && (e = "");
950
+ break;
951
+ case "date":
952
+ (!e || L(e)) && (e = o), r === null && e === o && (e = "");
953
+ break;
954
+ case "text":
955
+ (!e || L(e)) && (e = o), !r && e === o && (e = "");
956
+ break;
957
+ default:
958
+ return;
959
+ }
960
+ s.onChange({ value: r, operator: e, syntheticEvent: t });
961
+ }, $t = (r, t) => t ? r[t][0].operator : r[0].operator, Ae = (r) => r || "text", jt = (r, t) => {
962
+ const s = r.target.value;
963
+ t({
964
+ value: s.operator,
965
+ operator: s.operator === "" ? "" : dr,
966
+ syntheticEvent: r.syntheticEvent
967
+ });
968
+ }, Xt = (r, t, s) => {
969
+ let o = t;
970
+ const e = r.target.value;
971
+ r.target.state.opened && (L(e.operator) && (o = null), t === null && !L(e.operator) && (o = void 0), s({ value: o, operator: e.operator, syntheticEvent: r.syntheticEvent }));
972
+ };
973
+ class Yt extends l.Component {
974
+ constructor(t) {
975
+ super(t), this._inputRef = l.createRef(), this.renderOperatorEditor = (s) => {
976
+ if (this.props.filterType === "boolean")
977
+ return;
978
+ const o = this.props.operators.find((e) => e.operator === this.props.operator) || null;
979
+ return /* @__PURE__ */ l.createElement(
980
+ le,
981
+ {
982
+ size: this.props.size,
983
+ value: o,
984
+ onChange: this.operatorChange,
985
+ className: "k-dropdown-operator",
986
+ iconClassName: "k-i-filter k-icon",
987
+ svgIcon: Ke,
988
+ data: this.props.operators,
989
+ textField: "text",
990
+ title: s.toLanguageString(ze, v[ze]),
991
+ popupSettings: {
992
+ width: ""
993
+ }
994
+ }
995
+ );
996
+ }, this.inputChange = this.inputChange.bind(this), this.clear = this.clear.bind(this), this.operatorChange = this.operatorChange.bind(this), this.boolDropdownChange = this.boolDropdownChange.bind(this);
997
+ }
998
+ /**
999
+ * @hidden
1000
+ */
1001
+ render() {
1002
+ const t = T(this), s = /* @__PURE__ */ l.createElement("div", { className: "k-filtercell" }, /* @__PURE__ */ l.createElement("div", { className: "k-filtercell-wrapper" }, this.filterComponent(this.props.filterType, this.props.value, this.props.booleanValues), /* @__PURE__ */ l.createElement("div", { className: "k-filtercell-operator" }, this.renderOperatorEditor(t), " ", /* @__PURE__ */ l.createElement(
1003
+ W,
1004
+ {
1005
+ size: this.props.size,
1006
+ icon: "filter-clear",
1007
+ svgIcon: Ds,
1008
+ className: y({
1009
+ "k-clear-button-visible": !!(!(this.props.value === null || this.props.value === "") || this.props.operator)
1010
+ }),
1011
+ title: t.toLanguageString(U, v[U]),
1012
+ type: "button",
1013
+ onClick: this.clear,
1014
+ disabled: !(!(this.props.value === null || this.props.value === "") || this.props.operator)
1015
+ }
1016
+ ))));
1017
+ return this.props.render ? this.props.render.call(void 0, s, this.props) : s;
1018
+ }
1019
+ inputChange(t, s) {
1020
+ qt(t, s, this.props);
1021
+ }
1022
+ operatorChange(t) {
1023
+ Xt(t, this.props.value, this.props.onChange);
1024
+ }
1025
+ boolDropdownChange(t) {
1026
+ jt(t, this.props.onChange);
1027
+ }
1028
+ clear(t) {
1029
+ t.preventDefault(), this.props.onChange({ value: "", operator: "", syntheticEvent: t }), this._inputRef.current && (this._inputRef.current.element.value = "", setTimeout(() => {
1030
+ this._inputRef.current.element.focus();
1031
+ }, 0));
1032
+ }
1033
+ filterComponent(t, s, o) {
1034
+ switch (t) {
1035
+ case "numeric":
1036
+ return /* @__PURE__ */ l.createElement(
1037
+ Ue,
1038
+ {
1039
+ ref: this._inputRef,
1040
+ size: this.props.size,
1041
+ value: s,
1042
+ onChange: (e) => {
1043
+ this.inputChange(e.value, e.syntheticEvent);
1044
+ },
1045
+ title: this.props.title,
1046
+ ariaLabel: this.props.ariaLabel
1047
+ }
1048
+ );
1049
+ case "date":
1050
+ return /* @__PURE__ */ l.createElement(
1051
+ qe,
1052
+ {
1053
+ ref: this._inputRef,
1054
+ size: this.props.size,
1055
+ value: s,
1056
+ onChange: (e) => {
1057
+ this.inputChange(e.value, e.syntheticEvent);
1058
+ },
1059
+ title: this.props.title,
1060
+ ariaLabel: this.props.ariaLabel
1061
+ }
1062
+ );
1063
+ case "boolean": {
1064
+ const e = (i) => i == null;
1065
+ return /* @__PURE__ */ l.createElement(
1066
+ le,
1067
+ {
1068
+ ref: this._inputRef,
1069
+ size: this.props.size,
1070
+ onChange: this.boolDropdownChange,
1071
+ value: o.find((i) => i.operator === (e(s) ? "" : s)),
1072
+ data: o,
1073
+ textField: "text",
1074
+ title: this.props.title,
1075
+ ariaLabel: this.props.ariaLabel
1076
+ }
1077
+ );
1078
+ }
1079
+ default:
1080
+ return /* @__PURE__ */ l.createElement(
1081
+ Mt,
1082
+ {
1083
+ ref: this._inputRef,
1084
+ size: this.props.size,
1085
+ value: s || "",
1086
+ onChange: (e) => {
1087
+ this.inputChange(e.target.value, e.syntheticEvent);
1088
+ },
1089
+ title: this.props.title,
1090
+ "aria-label": this.props.ariaLabel
1091
+ }
1092
+ );
1093
+ }
1094
+ }
1095
+ }
1096
+ G(Yt);
1097
+ const ur = "k-table-row k-filter-row";
1098
+ class Jt extends l.Component {
1099
+ headerCellClassName(t, s) {
1100
+ let o = `${s ? "k-grid-header-sticky" : ""}`;
1101
+ return this.props.sort && this.props.sort.filter((e) => e.field === t).length > 0 && (o += " k-sorted"), o;
1102
+ }
1103
+ setFilter(t, s, o, e) {
1104
+ if (!this.props.filterChange)
1105
+ return;
1106
+ const i = [];
1107
+ (t !== "" && t !== null || s !== "") && i.push({
1108
+ field: o,
1109
+ operator: s,
1110
+ value: t
1111
+ }), this.props.filter && this.props.filter.filters && (this.props.filter.filters || []).forEach((h) => {
1112
+ const c = h;
1113
+ c && c.field !== o && i.push(c);
1114
+ });
1115
+ const n = this.props.filter && this.props.filter.logic ? this.props.filter.logic : "and";
1116
+ this.props.filterChange(i.length > 0 ? { logic: n, filters: i } : null, e);
1117
+ }
1118
+ render() {
1119
+ const t = T(this), s = this.props.filter && this.props.filter.filters || [], o = (a) => {
1120
+ if (a === void 0)
1121
+ return;
1122
+ const h = s.filter((c) => c.field === a);
1123
+ return h.length ? h[0] : void 0;
1124
+ };
1125
+ let e = 0, i = -1;
1126
+ const n = this.props.columns.filter((a) => a.children.length === 0).map(
1127
+ (a) => {
1128
+ const h = Ae(a.filter), c = o(a.field), d = a.filterable ? t.toLanguageString(_e, v[_e]) : void 0;
1129
+ let g = c && c.value;
1130
+ g === void 0 && (g = h === "text" ? "" : null);
1131
+ const m = a.filterable && {
1132
+ render: this.props.cellRender,
1133
+ field: a.field,
1134
+ title: a.filterTitle,
1135
+ value: g,
1136
+ operator: c && c.operator,
1137
+ operators: ie(this.props.filterOperators[h] || [], t),
1138
+ booleanValues: ie(Ut, t),
1139
+ filterType: h,
1140
+ ariaLabel: d,
1141
+ onChange: (k) => {
1142
+ this.setFilter(k.value, k.operator, a.field, k.syntheticEvent);
1143
+ }
1144
+ }, u = a.declarationIndex >= 0 ? ++i : --e, b = {
1145
+ ariaLabel: d,
1146
+ ariaColumnIndex: a.ariaColumnIndex
1147
+ }, E = a.left !== void 0 ? this.props.isRtl ? { left: a.right, right: a.left } : { left: a.left, right: a.right } : {}, C = {
1148
+ columnId: z.getFilterColumnId(a.id),
1149
+ navigatable: a.navigatable,
1150
+ style: E,
1151
+ className: y("k-table-th", this.headerCellClassName(a.field, a.locked) || void 0),
1152
+ role: "columnheader",
1153
+ ...b
1154
+ }, x = m && (a.filterCell ? /* @__PURE__ */ l.createElement(a.filterCell, { ...m }) : /* @__PURE__ */ l.createElement(Yt, { size: this.props.size, ...m })), I = Ce(this.props.cells, a.cells);
1155
+ if (I && I.filterCell) {
1156
+ const k = I.filterCell;
1157
+ return /* @__PURE__ */ l.createElement(k, { key: u, ...m, thProps: C, index: i }, x);
1158
+ }
1159
+ return /* @__PURE__ */ l.createElement(
1160
+ Rt,
1161
+ {
1162
+ key: u,
1163
+ ...C
1164
+ },
1165
+ x
1166
+ );
1167
+ }
1168
+ );
1169
+ return /* @__PURE__ */ l.createElement("tr", { className: ur, "aria-rowindex": this.props.ariaRowIndex, role: "row" }, n);
1170
+ }
1171
+ }
1172
+ G(Jt);
1173
+ class Qt extends l.Component {
1174
+ constructor() {
1175
+ super(...arguments), this.draggable = null, this.onPress = (t) => {
1176
+ const s = this.draggable && this.draggable.element;
1177
+ s && this.props.onPress && this.props.onPress(t.event, s);
1178
+ }, this.onDrag = (t) => {
1179
+ const s = this.draggable && this.draggable.element;
1180
+ s && this.props.onDrag && this.props.onDrag(t.event, s);
1181
+ }, this.onRelease = (t) => {
1182
+ this.draggable && this.draggable.element && this.props.onRelease && this.props.onRelease(t.event);
1183
+ }, this.sortChange = (t) => {
1184
+ if (t.preventDefault(), this.props.onSortChange) {
1185
+ const s = this.props.dir === "asc" ? "desc" : "asc";
1186
+ this.props.onSortChange(t, s);
1187
+ }
1188
+ }, this.groupRemove = (t) => {
1189
+ t.preventDefault(), t.stopPropagation(), this.props.onRemove && this.props.onRemove(t);
1190
+ }, this.onContextMenu = (t) => {
1191
+ const s = {
1192
+ title: this.props.title,
1193
+ dir: this.props.dir,
1194
+ index: this.props.index
1195
+ };
1196
+ this.props.onContextMenu && this.props.onContextMenu.call(void 0, t, { dataItem: { ...s } });
1197
+ };
1198
+ }
1199
+ render() {
1200
+ const { dir: t } = this.props;
1201
+ return /* @__PURE__ */ l.createElement(
1202
+ yt,
1203
+ {
1204
+ onPress: this.onPress,
1205
+ onDrag: this.onDrag,
1206
+ onRelease: this.onRelease,
1207
+ ref: (s) => {
1208
+ this.draggable = s;
1209
+ }
1210
+ },
1211
+ /* @__PURE__ */ l.createElement(
1212
+ "div",
1213
+ {
1214
+ className: "k-chip k-chip-md k-chip-solid k-chip-solid-base k-rounded-md",
1215
+ onClick: this.sortChange,
1216
+ onContextMenu: this.onContextMenu,
1217
+ role: "button",
1218
+ style: { touchAction: "none" }
1219
+ },
1220
+ /* @__PURE__ */ l.createElement("span", null, /* @__PURE__ */ l.createElement(
1221
+ O,
1222
+ {
1223
+ name: "sort-" + t + "-small",
1224
+ icon: t === "asc" ? We : Ve,
1225
+ size: "small"
1226
+ }
1227
+ )),
1228
+ /* @__PURE__ */ l.createElement("span", { className: "k-chip-content" }, this.props.title),
1229
+ /* @__PURE__ */ l.createElement("span", { className: "k-chip-actions" }, /* @__PURE__ */ l.createElement(
1230
+ "span",
1231
+ {
1232
+ className: "k-chip-action k-chip-remove-action",
1233
+ onClick: this.groupRemove
1234
+ },
1235
+ /* @__PURE__ */ l.createElement(
1236
+ O,
1237
+ {
1238
+ name: "x-circle",
1239
+ icon: Ms,
1240
+ size: "small"
1241
+ }
1242
+ )
1243
+ ))
1244
+ )
1245
+ );
1246
+ }
1247
+ }
1248
+ G(Qt);
1249
+ class Zt extends l.Component {
1250
+ constructor() {
1251
+ super(...arguments), this.onGroupRemove = (t, s) => {
1252
+ const o = this.props.group.slice();
1253
+ o.splice(s, 1), this.props.groupChange(o, t);
1254
+ }, this.onGroupSortChange = (t, s, o, e) => {
1255
+ const i = Object.assign({}, o, { dir: e }), n = this.props.group.slice();
1256
+ n.splice(s, 1, i), this.props.groupChange(n, t);
1257
+ };
1258
+ }
1259
+ render() {
1260
+ const s = (this.props.group || []).map((o, e) => /* @__PURE__ */ l.createElement(
1261
+ Qt,
1262
+ {
1263
+ key: e,
1264
+ index: e,
1265
+ dir: o.dir || "asc",
1266
+ title: this.props.resolveTitle(o.field),
1267
+ onRemove: (i) => {
1268
+ this.onGroupRemove(i, e);
1269
+ },
1270
+ onSortChange: (i, n) => {
1271
+ this.onGroupSortChange(i, e, o, n);
1272
+ },
1273
+ onPress: this.props.pressHandler,
1274
+ onDrag: this.props.dragHandler,
1275
+ onRelease: this.props.releaseHandler,
1276
+ onContextMenu: this.props.onContextMenu
1277
+ }
1278
+ ));
1279
+ return /* @__PURE__ */ l.createElement(
1280
+ "div",
1281
+ {
1282
+ ref: this.props.refCallback,
1283
+ className: "k-grouping-header",
1284
+ role: "toolbar",
1285
+ "aria-label": T(this).toLanguageString(Pe, v[Pe]),
1286
+ "aria-controls": this.props.ariaControls || ""
1287
+ },
1288
+ /* @__PURE__ */ l.createElement("div", { className: "k-chip-list k-chip-list-md", role: "none" }, s),
1289
+ /* @__PURE__ */ l.createElement("div", { className: "k-grouping-drop-container" }, !s.length && T(this).toLanguageString(Ne, v[Ne]), " ")
1290
+ );
1291
+ }
1292
+ }
1293
+ G(Zt);
1294
+ class gr extends l.Component {
1295
+ constructor() {
1296
+ super(...arguments), this.footerWrap = null, this.table = null, this.scrollbarWidth = St();
1297
+ }
1298
+ componentDidMount() {
1299
+ this.setState({});
1300
+ }
1301
+ /**
1302
+ *
1303
+ * @param scrollLeft - Scrolls to the left (in pixels).
1304
+ */
1305
+ setScrollLeft(t) {
1306
+ this.footerWrap && (this.footerWrap.scrollLeft = t);
1307
+ }
1308
+ /**
1309
+ *
1310
+ * @param width - Scrolls the width (in pixels).
1311
+ */
1312
+ setWidth(t) {
1313
+ this.table && (this.table.style.width = t + "px");
1314
+ }
1315
+ render() {
1316
+ return this.props.staticHeaders ? /* @__PURE__ */ l.createElement(
1317
+ "div",
1318
+ {
1319
+ className: "k-grid-footer",
1320
+ role: "presentation"
1321
+ },
1322
+ /* @__PURE__ */ l.createElement(
1323
+ "div",
1324
+ {
1325
+ ref: (t) => {
1326
+ this.footerWrap = t;
1327
+ },
1328
+ className: "k-grid-footer-wrap",
1329
+ style: this.scrollbarWidth ? {} : { borderWidth: 0 },
1330
+ role: "presentation"
1331
+ },
1332
+ /* @__PURE__ */ l.createElement(
1333
+ "table",
1334
+ {
1335
+ ref: (t) => {
1336
+ this.table = t;
1337
+ },
1338
+ className: y(
1339
+ "k-table k-grid-footer-table",
1340
+ {
1341
+ "k-table-md": !this.props.size,
1342
+ [`k-table-${K.sizeMap[this.props.size] || this.props.size}`]: this.props.size
1343
+ },
1344
+ this.props.className
1345
+ ),
1346
+ role: "presentation"
1347
+ },
1348
+ /* @__PURE__ */ l.createElement("colgroup", { ref: (t) => {
1349
+ this.props.columnResize.colGroupFooter = t;
1350
+ }, role: "presentation" }, this.props.cols),
1351
+ /* @__PURE__ */ l.createElement("tfoot", { className: "k-table-tfoot", role: "presentation" }, this.props.row)
1352
+ )
1353
+ )
1354
+ ) : /* @__PURE__ */ l.createElement("tfoot", { className: "k-table-tfoot" }, this.props.row);
1355
+ }
1356
+ }
1357
+ class fr {
1358
+ constructor(t) {
1359
+ 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.prevScrollPos = 0, this.tableTranslate = 0, this.scrollSyncing = !1, this.reactVersion = Number.parseFloat(l.version), this.topItems = (s, o) => {
1360
+ if (!this.container || o)
1361
+ return { topItemsCount: 0, topItemsHeight: 0 };
1362
+ const e = this.container.clientHeight, i = Math.ceil(e / s[0].line), n = Math.ceil((s.length - i) / 2);
1363
+ let a = 0;
1364
+ for (let h = 0; h < n; h++)
1365
+ a += s[h].line + s[h].acc;
1366
+ return {
1367
+ topItemsCount: n,
1368
+ topItemsHeight: a,
1369
+ itemsNeededOnScreen: i + i / 2
1370
+ };
1371
+ }, this.horizontalScrollbarHeight = () => this.container ? this.container.offsetHeight - this.container.clientHeight : 0, t && (this.topCacheCount = 4, this.attendedSkip = -this.topCacheCount), this.scrollHandler = this.scrollHandler.bind(this);
1372
+ }
1373
+ get container() {
1374
+ return this.containerRef.current;
1375
+ }
1376
+ /**
1377
+ * @return - The row heights in an array.
1378
+ */
1379
+ get rowHeights() {
1380
+ const t = [], s = this.tableBodyRef.current && this.tableBodyRef.current.children || [];
1381
+ let o = 0;
1382
+ for (let e = 0; e < s.length; e++) {
1383
+ if (s[e].className.indexOf("k-grouping-row") > -1) {
1384
+ o += s[e].scrollHeight;
1385
+ continue;
1386
+ }
1387
+ s[e].className.indexOf("k-detail-row") > -1 ? t[t.length - 1].line += s[e].scrollHeight : (t.push({
1388
+ line: s[e].scrollHeight,
1389
+ acc: o
1390
+ }), o = 0);
1391
+ }
1392
+ return t;
1393
+ }
1394
+ changePage(t, s) {
1395
+ this.attendedSkip = t - this.topCacheCount, this.PageChange && this.PageChange(
1396
+ {
1397
+ skip: Math.max(0, t - this.topCacheCount),
1398
+ take: this.pageSize
1399
+ },
1400
+ s
1401
+ );
1402
+ }
1403
+ translate(t, s) {
1404
+ this.tableTranslate = t, this.scrollableVirtual && this.table && (this.reactVersion <= 17 || s ? this.table.style.transform = "translateY(" + t + "px)" : this.tableTransform = "translateY(" + t + "px)");
1405
+ }
1406
+ reset() {
1407
+ this.scrollSyncing = !0, !this.fixedScroll && (this.container && (this.container.scrollTop = 0), this.translate(0, !0));
1408
+ }
1409
+ localScrollUp(t) {
1410
+ if (!this.container)
1411
+ return;
1412
+ const s = this.rowHeights, o = this.container.scrollTop;
1413
+ let e = this.tableTranslate, i = 0;
1414
+ const {
1415
+ topItemsCount: n,
1416
+ topItemsHeight: a,
1417
+ itemsNeededOnScreen: h
1418
+ } = this.topItems(s, !!this.topCacheCount), c = o - e;
1419
+ if (!(c > a || s.length <= h)) {
1420
+ for (; i < this.topCacheCount + this.attendedSkip - this.realSkip + n && this.propsSkip - i > 0 && !(e + (s[s.length - 1 - i].line + s[s.length - 1 - i].acc) + c <= o); )
1421
+ e -= s[s.length - 1 - i].line + s[s.length - 1 - i].acc, i++;
1422
+ if (i === 0 && this.topCacheCount === 0 && this.attendedSkip > 0 && (e = Math.max(e - s[0].line, 0), i = 1), this.propsSkip - i <= 0 && e > o) {
1423
+ this.translate(0), this.changePage(0, t), this.container.scrollTop = 0;
1424
+ return;
1425
+ }
1426
+ if (e > o && (e = o), e !== this.tableTranslate) {
1427
+ this.translate(Math.max(0, e - a));
1428
+ const d = Math.max(0, this.propsSkip - i - n);
1429
+ this.changePage(d, t);
1430
+ }
1431
+ }
1432
+ }
1433
+ localScrollDown(t) {
1434
+ if (!this.container)
1435
+ return;
1436
+ const s = this.rowHeights, o = this.container.scrollTop;
1437
+ let e = this.tableTranslate, i = 0;
1438
+ const {
1439
+ topItemsCount: n,
1440
+ topItemsHeight: a,
1441
+ itemsNeededOnScreen: h
1442
+ } = this.topItems(s, !!this.topCacheCount);
1443
+ for (; i < s.length - this.topCacheCount && !(e + s[i].line + s[i].acc > o); )
1444
+ e += s[i].line + s[i].acc, i++;
1445
+ n > this.propsSkip + i || s.length <= h || (i >= s.length - this.topCacheCount && this.propsSkip + i >= this.total ? (this.translate(e - a), this.changePage(this.total - 1 - n, t)) : e !== this.tableTranslate && this.propsSkip + i - n !== this.propsSkip && (this.translate(e - a), this.changePage(this.propsSkip + i - n, t)));
1446
+ }
1447
+ scrollNonStrict(t) {
1448
+ const s = this.total * this.prevScrollPos / this.containerHeight;
1449
+ let o = Math.floor(s);
1450
+ o >= this.total && (o = this.total - 1);
1451
+ const e = Math.min(s - o, 1);
1452
+ let i = 0;
1453
+ const n = o - this.propsSkip, a = this.rowHeights;
1454
+ n >= 0 && n <= 1 ? i = -((a[0].line + a[0].acc) * e) : n === -1 && (i = -((a[a.length - 1].line + a[a.length - 1].acc) * e));
1455
+ const { topItemsCount: h, topItemsHeight: c } = this.topItems(a, !!this.topCacheCount);
1456
+ this.translate(Math.max(0, i - c - this.horizontalScrollbarHeight() + this.containerHeight * s / this.total)), this.changePage(o - h, t);
1457
+ }
1458
+ scrollHandler(t) {
1459
+ if (!this.scrollableVirtual)
1460
+ return;
1461
+ if (this.scrollSyncing || !this.container || !this.table) {
1462
+ this.scrollSyncing = !1;
1463
+ return;
1464
+ }
1465
+ const s = this.container.scrollTop, o = this.prevScrollPos;
1466
+ if (this.prevScrollPos = s, this.askedSkip !== void 0) {
1467
+ this.translate(this.containerHeight * this.askedSkip / this.total), this.changePage(this.askedSkip, t), this.prevScrollPos = s, this.askedSkip = void 0;
1468
+ return;
1469
+ }
1470
+ s - o < 0 && s > this.tableTranslate - this.table.scrollHeight / 10 ? this.localScrollUp(t) : s - o > 0 && s < this.tableTranslate + this.table.scrollHeight * 2 / 3 ? this.localScrollDown(t) : this.scrollNonStrict(t), this.prevScrollPos = s;
1471
+ }
1472
+ }
1473
+ class xt {
1474
+ constructor(t = 0, s, o, e) {
1475
+ this.total = t, this.offsets = [], this.heights = [];
1476
+ let i = 0;
1477
+ for (let n = 0; n < t; n++) {
1478
+ this.offsets.push(i);
1479
+ const a = e && e[n].expanded && e[n].rowType === "data" ? o : s;
1480
+ i += a, this.heights.push(a);
1481
+ }
1482
+ }
1483
+ height(t) {
1484
+ return this.heights[t];
1485
+ }
1486
+ index(t) {
1487
+ if (t < 0)
1488
+ return;
1489
+ const s = this.offsets.reduce((o, e, i) => {
1490
+ if (o !== void 0)
1491
+ return o;
1492
+ if (e === t)
1493
+ return i;
1494
+ if (e > t)
1495
+ return i - 1;
1496
+ }, void 0);
1497
+ return s === void 0 ? this.total - 1 : s;
1498
+ }
1499
+ offset(t) {
1500
+ return this.offsets[t];
1501
+ }
1502
+ totalHeight() {
1503
+ const t = this.offsets[this.offsets.length - 1], s = this.heights[this.heights.length - 1];
1504
+ return t + s;
1505
+ }
1506
+ }
1507
+ class kt {
1508
+ constructor(t) {
1509
+ 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);
1510
+ }
1511
+ get container() {
1512
+ return this.containerRef.current;
1513
+ }
1514
+ translate(t, s) {
1515
+ this.scrollableVirtual && this.table && (Re || this.reactVersion <= 17 || s ? this.table.style.transform = "translateY(" + t + "px)" : this.tableTransform = "translateY(" + t + "px)");
1516
+ }
1517
+ changePage(t, s) {
1518
+ this.PageChange && this.PageChange({ skip: Math.max(0, t), take: this.pageSize }, s);
1519
+ }
1520
+ reset() {
1521
+ this.scrollSyncing = !0, !this.fixedScroll && (this.container && (this.container.scrollTop = 0), this.translate(0, !0));
1522
+ }
1523
+ scrollHandler(t) {
1524
+ if (!this.scrollableVirtual || !this.container || !this.table || !this.rowHeightService || !this.containerRef.current)
1525
+ return;
1526
+ if (this.scrollSyncing) {
1527
+ this.scrollSyncing = !1;
1528
+ return;
1529
+ }
1530
+ const s = this.container.scrollTop, o = this.lastScrollTop >= s, e = !o;
1531
+ this.lastScrollTop = s;
1532
+ let i = this.rowHeightService.index(s), n = this.rowHeightService.offset(i);
1533
+ const { offsetHeight: a } = this.containerRef.current, h = this.rowHeightService.index(s + a);
1534
+ if (e && h >= this.lastLoaded && this.lastLoaded < this.total) {
1535
+ const c = i + this.pageSize - this.total;
1536
+ c > 0 && (i = i - c, n = this.rowHeightService.offset(i)), this.firstLoaded = i, this.translate(n);
1537
+ let d = this.firstLoaded + this.pageSize;
1538
+ this.lastLoaded = Math.min(d, this.total), this.changePage(this.firstLoaded, t);
1539
+ } else if (o && i < this.firstLoaded) {
1540
+ const c = Math.floor(this.pageSize * 0.3);
1541
+ this.firstLoaded = Math.max(i - c, 0), this.translate(this.rowHeightService.offset(this.firstLoaded)), this.lastLoaded = Math.min(this.firstLoaded + this.pageSize, this.total), this.changePage(this.firstLoaded, t);
1542
+ }
1543
+ }
1544
+ }
1545
+ const mr = 1, Cr = 20;
1546
+ class br {
1547
+ constructor(t) {
1548
+ this.columns = [], this.resizable = !1, this.isRtl = !1, this.setIsRtl = (s) => {
1549
+ this.isRtl = s;
1550
+ }, this.dragHandler = (s, o, e, i) => {
1551
+ const n = s.originalEvent;
1552
+ i || (n.preventDefault(), n.stopPropagation(), n.stopImmediatePropagation());
1553
+ const a = e.closest("th");
1554
+ if (!a || !a)
1555
+ return;
1556
+ const h = a.clientWidth;
1557
+ let c = h;
1558
+ if (this.isRtl ? c += e.getBoundingClientRect().right - e.offsetWidth / 2 - s.clientX : c += s.clientX - e.getBoundingClientRect().left - e.offsetWidth / 2, !i && Math.abs(c - h) < 1)
1559
+ return;
1560
+ this.fixateInitialWidths(a.parentElement.clientWidth), this.setWidths(o, Math.floor(c) / h);
1561
+ const d = this.columns.filter((g) => !g.children.length).findIndex((g) => g.id === o.id);
1562
+ this.onResize(d, h, c, n, i, o.id);
1563
+ }, this.dblClickHandler = (s, o) => {
1564
+ const e = this.columns.filter((m) => o.indexOf(m.id) > -1);
1565
+ if (!this.colGroupMain || !e.length)
1566
+ return;
1567
+ const i = {}, n = e;
1568
+ for (; n.length > 0; ) {
1569
+ const m = n.pop();
1570
+ if (!m)
1571
+ break;
1572
+ m.children.length ? n.push(...m.children) : i[m.id] = m;
1573
+ }
1574
+ const a = this.columns.filter((m) => !m.children.length), h = [];
1575
+ a.forEach((m, u) => {
1576
+ i[m.id] && h.push(u);
1577
+ });
1578
+ const c = [this.colGroupMain.parentElement], d = [this.colGroupMain];
1579
+ this.colGroupHeader && (c.push(this.colGroupHeader.parentElement), d.push(this.colGroupHeader)), this.colGroupFooter && (c.push(this.colGroupFooter.parentElement), d.push(this.colGroupFooter)), c.forEach((m) => m.classList.add("k-autofitting"));
1580
+ let g = [];
1581
+ d.forEach((m) => {
1582
+ h.forEach((u) => {
1583
+ m.children[u] && (m.children[u].width = "", g[u] = Math.max(g[u] || 0, m.children[u].offsetWidth + mr));
1584
+ });
1585
+ }), d.forEach((m) => {
1586
+ h.forEach((u) => {
1587
+ m.children[u] && (m.children[u].width = g[u] + "px", a[u].width = g[u]);
1588
+ });
1589
+ }), c.forEach((m) => m.classList.remove("k-autofitting")), this.onResize(h[0], 0, 0, s, !0, o[0]);
1590
+ }, this.updateColElements = (s) => {
1591
+ const o = this.columns.filter((i) => !i.children.length);
1592
+ let e = 1e-10;
1593
+ for (let i = 0; i < s.length; i++) {
1594
+ const n = s[i], a = o.findIndex((g) => g.id === n.id), h = parseFloat((n.width || 0).toString()), c = Math.floor(h);
1595
+ e += h - c;
1596
+ const d = c + Math.floor(e);
1597
+ if (e -= Math.floor(e), this.colGroupMain && this.colGroupMain.children[a]) {
1598
+ const g = parseInt(this.colGroupMain.children[a].width, 10);
1599
+ this.colGroupMain.children[a].width = d + "px", this.updateNextLockedCol(
1600
+ this.colGroupMain.parentElement,
1601
+ n,
1602
+ g - d
1603
+ );
1604
+ }
1605
+ if (this.colGroupHeader && this.colGroupHeader.children[a]) {
1606
+ const g = parseInt(this.colGroupHeader.children[a].width, 10);
1607
+ this.colGroupHeader.children[a].width = d + "px", this.updateNextLockedCol(
1608
+ this.colGroupHeader.parentElement,
1609
+ n,
1610
+ g - d
1611
+ );
1612
+ }
1613
+ if (this.colGroupFooter && this.colGroupFooter.children[a]) {
1614
+ const g = parseInt(this.colGroupFooter.children[a].width, 10);
1615
+ this.colGroupFooter.children[a].width = d + "px", this.updateNextLockedCol(
1616
+ this.colGroupFooter.parentElement,
1617
+ n,
1618
+ g - d
1619
+ );
1620
+ }
1621
+ }
1622
+ }, this.onResize = t;
1623
+ }
1624
+ fixateInitialWidths(t) {
1625
+ const s = this.columns.filter((n) => !n.children.length);
1626
+ let o = 0, e = this.colGroupMain ? this.colGroupMain.children : [];
1627
+ for (let n = 0; n < e.length; n++)
1628
+ e[n].width ? t -= parseFloat(e[n].width) : o++;
1629
+ if (o === 0)
1630
+ return;
1631
+ const i = Math.floor(t / o);
1632
+ for (let n = 0; n < e.length; n++) {
1633
+ const a = e[n];
1634
+ a.width || (a.width = i, s[n].width = i.toString(), this.colGroupHeader && (this.colGroupHeader.children[n].width = i), this.colGroupFooter && (this.colGroupFooter.children[n].width = i));
1635
+ }
1636
+ }
1637
+ setWidths(t, s) {
1638
+ const o = this.columns.findIndex((n) => n.id === t.id), e = [];
1639
+ let i = t.children.length;
1640
+ for (let n = o + 1; i > 0 && n < this.columns.length; n++, i--) {
1641
+ const a = this.columns[n];
1642
+ a.children.length ? i += a.children.length : e.push(a);
1643
+ }
1644
+ return e.length === 0 && e.push(t), e.forEach((n) => {
1645
+ let a = n.width ? parseFloat(n.width.toString()) * s : 0;
1646
+ const h = n.minResizableWidth === void 0 ? 10 : n.minResizableWidth;
1647
+ a < h && (a = h), n.width = a;
1648
+ }), this.updateColElements(e), e;
1649
+ }
1650
+ updateNextLockedCol(t, s, o) {
1651
+ const e = s.index, i = this.colGroupMain.parentElement.closest(".k-grid"), n = i == null ? void 0 : i.clientWidth, a = this.columns.filter((h) => h.locked).map((h) => parseInt(h.width + "", 10)).reduce((h, c) => h + c, 0);
1652
+ !s.locked || n <= a + Cr || this.columns.forEach((h) => {
1653
+ if (h != null && h.locked && o) {
1654
+ const c = t == null ? void 0 : t.querySelectorAll('[aria-colindex="' + h.ariaColumnIndex + '"]');
1655
+ c == null || c.forEach((d) => {
1656
+ const g = d.style;
1657
+ this.isRtl ? (h.index > e && g && g.right && (g.right = parseInt(g.right, 10) - o + "px"), h.index < e && g && g.left && (g.left = parseInt(g.left, 10) - o + "px")) : (h.index > e && g && g.left && (g.left = parseInt(g.left, 10) - o + "px"), h.index < e && g && g.right && (g.right = parseInt(g.right, 10) - o + "px"));
1658
+ });
1659
+ }
1660
+ });
1661
+ }
1662
+ }
1663
+ class xr {
1664
+ constructor(t, s, o) {
1665
+ this.refDragElementClue = l.createRef(), this.refDropElementClue = l.createRef(), this.columns = [], this.reorderable = !1, this.groupable = !1, this.startColumn = -1, this.startGroup = -1, this.currentColumn = -1, this.currentGroup = -1, this.groupPanelDivElement = null, this.refGroupPanelDiv = (e) => {
1666
+ this.groupPanelDivElement = e && e.children ? e.children[0] : e;
1667
+ }, this.pressHandler = (e, i) => {
1668
+ const n = this.getColumnIndex(e, i);
1669
+ if (this.startGroup = this.getGroupIndex(e), n >= 0) {
1670
+ const a = this.columns[n];
1671
+ (a.reorderable && this.reorderable || a.groupable && this.groupable) && (this.startColumn = n);
1672
+ }
1673
+ }, this.dragHandler = (e, i) => {
1674
+ if (e.isTouch || e.originalEvent.preventDefault(), e.originalEvent.stopPropagation(), this.startColumn === -1 && this.startGroup === -1)
1675
+ return;
1676
+ this.currentColumn = this.getColumnIndex(e, i);
1677
+ const n = this.groupPanelDivElement && this.groupPanelDivElement.children;
1678
+ this.currentGroup = this.isTargetGroupingContainer(e) ? n && n.length ? n.length : 0 : this.getGroupIndex(e);
1679
+ const a = !this.isValid();
1680
+ a && (this.currentColumn = -1, this.currentGroup = -1);
1681
+ const h = this.currentColumn >= 0 ? i.children[this.columns[this.currentColumn].index] : this.isTargetGroupingContainer(e) ? e.originalEvent.target : this.groupPanelDivElement && this.groupPanelDivElement.children[this.currentGroup];
1682
+ this.updateDragElementClue(e, i, h, a), this.updateDropElementClue(e, i, h, a);
1683
+ }, this.releaseHandler = (e) => {
1684
+ const i = this.startColumn, n = this.currentColumn, a = this.startGroup, h = this.currentGroup;
1685
+ e.originalEvent.preventDefault(), this.dropElementClue && this.dropElementClue.setState({ visible: !1 }), this.dragElementClue && this.dragElementClue.setState({ visible: !1 });
1686
+ const c = this.isValid();
1687
+ this.startColumn = this.startGroup = this.currentColumn = this.currentGroup = -1, c && (i >= 0 && n >= 0 ? this.columnReorder(i, n, e.originalEvent) : a >= 0 && h >= 0 ? this.groupReorder(a, h, e.originalEvent) : i >= 0 && h >= 0 && this.columnToGroup(i, h, e.originalEvent));
1688
+ }, this.columnReorder = t, this.groupReorder = s, this.columnToGroup = o;
1689
+ }
1690
+ get dragClueRef() {
1691
+ return this.refDragElementClue;
1692
+ }
1693
+ get dropClueRef() {
1694
+ return this.refDropElementClue;
1695
+ }
1696
+ get dragElementClue() {
1697
+ return this.refDragElementClue.current;
1698
+ }
1699
+ get dropElementClue() {
1700
+ return this.refDropElementClue.current;
1701
+ }
1702
+ getColumnIndex(t, s) {
1703
+ if (!s || s.parentElement === this.groupPanelDivElement)
1704
+ return -1;
1705
+ const o = at(t, s);
1706
+ if (o === -1)
1707
+ return -1;
1708
+ for (let e = 0; e < s.parentNode.children.length; e++)
1709
+ if (s.parentNode.children[e] === s)
1710
+ return this.columns.findIndex((i) => i.index === o && i.depth === e);
1711
+ return -1;
1712
+ }
1713
+ isTargetGroupingContainer(t) {
1714
+ const s = t.originalEvent.target;
1715
+ return s.className.indexOf ? s.className.indexOf("k-grouping-drop-container") !== -1 : !1;
1716
+ }
1717
+ getGroupIndex(t) {
1718
+ return at(t, this.groupPanelDivElement);
1719
+ }
1720
+ isValid() {
1721
+ return this.startGroup >= 0 ? this.currentGroup >= 0 && this.currentGroup !== this.startGroup : this.startColumn === -1 ? !1 : this.currentGroup >= 0 ? this.columns[this.startColumn].groupable === !0 && this.groupable === !0 : this.reorderable === !0 && this.currentColumn >= 0 && this.currentColumn !== this.startColumn && this.columns[this.startColumn].reorderable === !0 && this.columns[this.currentColumn].parentIndex === this.columns[this.startColumn].parentIndex;
1722
+ }
1723
+ updateDragElementClue(t, s, o, e) {
1724
+ if (!this.dragElementClue)
1725
+ return;
1726
+ const i = this.startColumn >= 0 ? s.children[this.columns[this.startColumn].index].innerText : s.innerText;
1727
+ this.dragElementClue.setState({
1728
+ visible: !0,
1729
+ top: t.pageY + 10,
1730
+ left: t.pageX,
1731
+ innerText: i,
1732
+ status: e || !o ? "k-i-cancel" : "k-i-plus"
1733
+ });
1734
+ }
1735
+ updateDropElementClue(t, s, o, e) {
1736
+ if (!this.dropElementClue)
1737
+ return;
1738
+ if (e || !o) {
1739
+ this.dropElementClue.setState({ visible: !1 });
1740
+ return;
1741
+ }
1742
+ const i = o.getBoundingClientRect(), a = (o.closest(".k-grouping-header") || o).getBoundingClientRect();
1743
+ let h = i.left + t.pageX - t.clientX - 6;
1744
+ !this.isTargetGroupingContainer(t) && (this.currentColumn > this.startColumn || this.currentGroup > this.startGroup && this.startGroup !== -1) && (h += i.width);
1745
+ const c = a.top + t.pageY - t.clientY;
1746
+ this.dropElementClue.setState({
1747
+ visible: !0,
1748
+ top: c,
1749
+ left: h,
1750
+ height: this.currentColumn >= 0 ? s.clientHeight : a.height
1751
+ });
1752
+ }
1753
+ }
1754
+ const kr = (r) => {
1755
+ let t = null;
1756
+ const s = ws(), o = q(r.id), e = l.useCallback((c) => {
1757
+ r.onContextMenu && r.onContextMenu.call(void 0, c, r.dataItem, r.field);
1758
+ }, [r.onContextMenu, r.dataItem, r.field]);
1759
+ let i = null, n = null;
1760
+ if (r.rowType === "groupFooter")
1761
+ i = {
1762
+ onContextMenu: e,
1763
+ className: r.className
1764
+ }, t = /* @__PURE__ */ l.createElement("td", { ...i });
1765
+ else if (r.rowType !== "groupHeader") {
1766
+ if (r.field !== void 0) {
1767
+ const d = M(r.field, r.dataItem);
1768
+ d != null && (n = r.format ? s.format(r.format, d) : d.toString());
1769
+ }
1770
+ const c = y(
1771
+ "k-table-td",
1772
+ r.className,
1773
+ { "k-selected": r.isSelected }
1774
+ );
1775
+ i = {
1776
+ onContextMenu: e,
1777
+ colSpan: r.colSpan,
1778
+ style: r.style,
1779
+ className: c,
1780
+ role: "gridcell",
1781
+ "aria-colindex": r.ariaColumnIndex,
1782
+ "aria-selected": r.isSelected,
1783
+ [re]: r.columnIndex,
1784
+ ...o
1785
+ }, t = /* @__PURE__ */ l.createElement("td", { ...i }, n);
1786
+ }
1787
+ const a = r.rowType || "data", h = r.cells;
1788
+ if (h && h[a]) {
1789
+ const c = h[a];
1790
+ return /* @__PURE__ */ l.createElement(c, { ...r, tdProps: i }, n);
1791
+ }
1792
+ return r.render ? r.render.call(void 0, t, r) : t;
1793
+ }, vt = (r) => {
1794
+ let t = null;
1795
+ const { columnIndex: s, level: o, columnsCount: e, rowType: i, dataItem: n, field: a, onChange: h, expanded: c, render: d, dataIndex: g, ariaColumnIndex: m, isRtl: u } = r, b = a || "", E = q(r.id), C = Ft();
1796
+ let x = null, I = null, k = null;
1797
+ const _ = l.useCallback(
1798
+ (F) => {
1799
+ F.isDefaultPrevented() || F.keyCode === me.enter && h && (F.preventDefault(), h({
1800
+ dataItem: n,
1801
+ dataIndex: g,
1802
+ syntheticEvent: F,
1803
+ field: void 0,
1804
+ value: !c
1805
+ }));
1806
+ },
1807
+ [c, h, n, g]
1808
+ ), D = l.useCallback((F) => {
1809
+ r.onContextMenu && r.onContextMenu.call(void 0, F, r.dataItem, r.field);
1810
+ }, [r.onContextMenu, r.dataItem, r.field]), de = (F, ke) => {
1811
+ const pe = c ? Pt : _t, ve = C.toLanguageString(pe, v[pe]);
1812
+ return x = {
1813
+ className: "k-table-td",
1814
+ style: { ...r.style, ...ke },
1815
+ colSpan: F,
1816
+ key: "g-colspan",
1817
+ role: "gridcell",
1818
+ ["aria-selected"]: !1,
1819
+ ["aria-expanded"]: c,
1820
+ ["aria-colindex"]: m,
1821
+ onKeyDown: _,
1822
+ onContextMenu: D,
1823
+ ...E
1824
+ }, k = /* @__PURE__ */ l.createElement("p", { className: "k-reset" }, /* @__PURE__ */ l.createElement(
1825
+ "a",
1826
+ {
1827
+ onClick: (J) => {
1828
+ J.preventDefault(), h && h({
1829
+ dataItem: n,
1830
+ dataIndex: g,
1831
+ syntheticEvent: J,
1832
+ field: void 0,
1833
+ value: !c
1834
+ });
1835
+ },
1836
+ href: "#",
1837
+ tabIndex: -1,
1838
+ "aria-label": ve
1839
+ },
1840
+ /* @__PURE__ */ l.createElement(
1841
+ O,
1842
+ {
1843
+ name: c ? "caret-alt-down" : u ? "caret-alt-left" : "caret-alt-right",
1844
+ icon: c ? Ts : u ? Gs : Hs
1845
+ }
1846
+ )
1847
+ ), n[b] instanceof Date && n[b].toString ? n[b].toString() : n[b]), /* @__PURE__ */ l.createElement(
1848
+ "td",
1849
+ {
1850
+ ...x
1851
+ },
1852
+ k
1853
+ );
1854
+ };
1855
+ s === void 0 || o === void 0 || s < o || e === void 0 || i !== "groupHeader" || n[b] === void 0 ? (x = {
1856
+ style: r.style,
1857
+ key: "g" + s,
1858
+ className: y(
1859
+ "k-table-td",
1860
+ "k-group-cell",
1861
+ { "k-grid-content-sticky": r.locked }
1862
+ ),
1863
+ role: "gridcell",
1864
+ onContextMenu: D
1865
+ }, t = /* @__PURE__ */ l.createElement(
1866
+ "td",
1867
+ {
1868
+ ...x
1869
+ }
1870
+ )) : s <= o && !r.locked ? t = de(e - s, {}) : s <= o && r.locked && (I = {
1871
+ className: "k-table-td",
1872
+ role: "gridcell",
1873
+ colSpan: e - s,
1874
+ style: { borderLeftWidth: 0, borderRightWidth: 0 },
1875
+ onContextMenu: D
1876
+ }, t = /* @__PURE__ */ l.createElement(l.Fragment, null, de(0, { position: "sticky", zIndex: 2 }), /* @__PURE__ */ l.createElement(
1877
+ "td",
1878
+ {
1879
+ ...I
1880
+ }
1881
+ )));
1882
+ const Y = r.rowType || "data", $ = r.cells;
1883
+ if ($ && $.group && $.group[Y]) {
1884
+ const F = $.group[Y];
1885
+ return /* @__PURE__ */ l.createElement(F, { ...r, tdProps: x, td2Props: I }, k);
1886
+ }
1887
+ return d ? d.call(void 0, t, r) : t;
1888
+ };
1889
+ class vr extends l.Component {
1890
+ /**
1891
+ * @hidden
1892
+ */
1893
+ render() {
1894
+ const t = y(
1895
+ "k-table-row",
1896
+ {
1897
+ "k-grouping-row": this.props.rowType === "groupHeader",
1898
+ "k-group-footer": this.props.rowType === "groupFooter",
1899
+ "k-master-row": this.props.rowType !== "groupHeader" && this.props.rowType !== "groupFooter",
1900
+ "k-table-alt-row k-alt": this.props.rowType !== "groupHeader" && this.props.rowType !== "groupFooter" && this.props.isAltRow,
1901
+ "k-selected": this.props.isSelected,
1902
+ "k-grid-edit-row": this.props.isInEdit
1903
+ }
1904
+ ), s = /* @__PURE__ */ l.createElement(
1905
+ "tr",
1906
+ {
1907
+ id: this.props.id,
1908
+ onClick: this.props.onClick,
1909
+ onDoubleClick: this.props.onDoubleClick,
1910
+ className: t,
1911
+ style: {
1912
+ height: this.props.rowHeight ? this.props.rowHeight + "px" : "",
1913
+ visibility: this.props.isHidden ? "hidden" : ""
1914
+ },
1915
+ role: "row",
1916
+ "aria-rowindex": this.props.ariaRowIndex,
1917
+ "absolute-row-index": this.props.absoluteRowIndex,
1918
+ key: this.props.absoluteRowIndex,
1919
+ [rr]: this.props.rowType === "data" ? this.props.dataIndex : void 0
1920
+ },
1921
+ this.props.children
1922
+ );
1923
+ return this.props.render ? this.props.render.call(void 0, s, this.props) : s;
1924
+ }
1925
+ }
1926
+ class Er extends l.Component {
1927
+ constructor() {
1928
+ super(...arguments), this._inputId = oe();
1929
+ }
1930
+ render() {
1931
+ const { columnMenuWrapperProps: t } = this.props, s = [
1932
+ /* @__PURE__ */ l.createElement(
1933
+ "input",
1934
+ {
1935
+ key: 0,
1936
+ checked: this.props.selectionValue,
1937
+ id: this._inputId,
1938
+ type: "checkbox",
1939
+ className: "k-checkbox k-checkbox-md k-rounded-md",
1940
+ onChange: (o) => this.props.selectionChange({
1941
+ field: this.props.field,
1942
+ syntheticEvent: o
1943
+ })
1944
+ }
1945
+ ),
1946
+ /* @__PURE__ */ l.createElement("label", { key: 1, className: "k-checkbox-label", htmlFor: this._inputId }),
1947
+ t.columnMenu && /* @__PURE__ */ l.createElement(Vt, { ...t })
1948
+ ];
1949
+ return this.props.render ? this.props.render.call(void 0, s, this.props) : s;
1950
+ }
1951
+ }
1952
+ class $e extends l.Component {
1953
+ /**
1954
+ * @hidden
1955
+ */
1956
+ render() {
1957
+ return this.props.children || T(this).toLanguageString(Fe, v[Fe]);
1958
+ }
1959
+ }
1960
+ $e.displayName = "KendoReactGridNoRecords";
1961
+ G($e);
1962
+ class Ir extends l.Component {
1963
+ constructor() {
1964
+ super(...arguments), this._element = null, this.renderCell = (t, s) => {
1965
+ const o = {
1966
+ colSpan: t.colSpan !== 1 ? t.colSpan : void 0,
1967
+ style: t.left !== void 0 ? this.props.isRtl ? { left: t.right, right: t.left } : { left: t.left, right: t.right } : {},
1968
+ className: y(
1969
+ "k-table-td",
1970
+ t.locked && t.left !== void 0 ? "k-grid-footer-sticky" : ""
1971
+ ),
1972
+ key: s,
1973
+ role: "gridcell",
1974
+ ["aria-colindex"]: t.ariaColumnIndex
1975
+ }, e = {
1976
+ field: t.field,
1977
+ ariaColumnIndex: t.ariaColumnIndex,
1978
+ ...o
1979
+ }, i = Ce(this.props.cells, t.cells);
1980
+ if (i && i.footerCell) {
1981
+ const n = i.footerCell;
1982
+ return /* @__PURE__ */ l.createElement(n, { ...e, tdProps: o, index: s });
1983
+ }
1984
+ return t.footerCell && /* @__PURE__ */ l.createElement(t.footerCell, { ...e, key: s }) || /* @__PURE__ */ l.createElement("td", { ...o });
1985
+ };
1986
+ }
1987
+ get element() {
1988
+ return this._element;
1989
+ }
1990
+ render() {
1991
+ return /* @__PURE__ */ l.createElement("tr", { className: "k-table-row", role: "row", "aria-rowindex": this.props.ariaRowIndex }, Vs(this.props.columns).map(this.renderCell));
1992
+ }
1993
+ }
1994
+ const Sr = ({
1995
+ buttonCount: r = 10,
1996
+ info: t = !0,
1997
+ type: s = "numeric",
1998
+ pageSizes: o = void 0,
1999
+ previousNext: e = !0,
2000
+ responsive: i = void 0,
2001
+ pageSizeValue: n = void 0
2002
+ }) => ({
2003
+ buttonCount: r,
2004
+ info: t,
2005
+ pageSizes: o === !0 ? [5, 10, 20] : o || void 0,
2006
+ previousNext: e,
2007
+ responsive: i !== !1,
2008
+ type: s,
2009
+ pageSizeValue: n
2010
+ }), yr = (r) => Sr(r === !0 ? {} : r), Et = {
2011
+ name: "@progress/kendo-react-grid",
2012
+ productName: "KendoReact",
2013
+ productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
2014
+ publishDate: 1701439815,
2015
+ version: "",
2016
+ licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
2017
+ }, wr = (r) => {
2018
+ const { colSpan: t, ariaColIndex: s, dataItem: o, dataIndex: e, id: i } = r, n = q(i), a = l.useCallback((h) => {
2019
+ r.onContextMenu && r.onContextMenu.call(void 0, h, r.dataItem);
2020
+ }, [r.onContextMenu, r.dataItem]);
2021
+ return /* @__PURE__ */ l.createElement(
2022
+ "td",
2023
+ {
2024
+ onContextMenu: a,
2025
+ className: "k-table-td k-detail-cell",
2026
+ colSpan: t,
2027
+ "aria-colindex": s,
2028
+ role: "gridcell",
2029
+ ...n
2030
+ },
2031
+ /* @__PURE__ */ l.createElement(r.detail, { dataItem: o, dataIndex: e })
2032
+ );
2033
+ }, Rr = (r) => {
2034
+ const t = q(r.id);
2035
+ return /* @__PURE__ */ l.createElement("td", { className: "k-table-td k-hierarchy-cell", ...t, role: "gridcell" });
2036
+ };
2037
+ class be extends l.Component {
2038
+ constructor(t) {
2039
+ super(t), this._columns = [], this._columnsMap = [[]], this._columnsMutations = 0, this._resized = !1, this._shouldUpdateLeftRight = !0, this.contextStateRef = { current: void 0 }, this.navigationStateRef = { current: void 0 }, this._data = [], this._slicedData = void 0, this.wrapperScrollTop = 0, this.showLicenseWatermark = !1, this.headerRef = l.createRef(), this.headerElementRef = l.createRef(), this._element = null, this.tableElement = null, this.containerRef = l.createRef(), this.tableBodyRef = l.createRef(), this._footer = null, this.forceUpdateTimeout = void 0, this.isRtl = !1, this._gridId = oe(), this._gridRoleElementId = oe(), this.observer = null, this.handleIntersection = (e) => {
2040
+ const i = { rowIndex: this.rowIndex };
2041
+ e.forEach((n) => {
2042
+ n.isIntersecting || this.setCurrentOnTop(i);
2043
+ });
2044
+ }, this.setCurrentOnTop = (e) => {
2045
+ if (!this.vs.container || this.props.scrollable === "none")
2046
+ return;
2047
+ this.observer && this.observer.disconnect();
2048
+ const { rowIndex: i } = e;
2049
+ if (this.props.scrollable === "virtual")
2050
+ this.vs.askedSkip = i, this.vs.container.scroll(0, Math.round(this.vs.askedSkip / this.vs.total * this.vs.container.scrollHeight));
2051
+ else if (this.element) {
2052
+ const n = i < 1 ? this.element.querySelector("tbody > tr:nth-child(1)") : this.element.querySelector(`tbody > tr:nth-child(${i + 1})`);
2053
+ n && this.containerRef.current && (this.containerRef.current.scrollTop = n.offsetTop);
2054
+ }
2055
+ }, this.scrollIntoView = (e) => {
2056
+ if (!this.vs.container || this.props.scrollable === "none")
2057
+ return;
2058
+ this.rowIndex = e.rowIndex;
2059
+ const { rowIndex: i } = e, n = this.element;
2060
+ if (this.observer && n) {
2061
+ this.observer.disconnect();
2062
+ const a = n.querySelector(`[absolute-row-index="${i}"]`);
2063
+ a ? this.observer.observe(a) : this.setCurrentOnTop(e);
2064
+ }
2065
+ }, this.fitColumns = (e) => {
2066
+ this.columnResize.dblClickHandler(null, e);
2067
+ }, this.onContextMenu = (e, i, n) => {
2068
+ if (this.props.onContextMenu) {
2069
+ const a = {
2070
+ target: this,
2071
+ syntheticEvent: e,
2072
+ nativeEvent: e.nativeEvent,
2073
+ dataItem: i,
2074
+ field: n
2075
+ };
2076
+ this.props.onContextMenu.call(void 0, a);
2077
+ }
2078
+ }, this.getVirtualScroll = (e) => {
2079
+ const { rowHeight: i, detailRowHeight: n, detail: a, expandField: h, groupable: c } = e, d = this.isAllData(), g = i !== void 0 && i > 0, m = n !== void 0 && n > 0, u = c === !0 || typeof c == "object" && c.enabled !== !1;
2080
+ return !g || u && !d || !!(a && h) && (!m || !d) ? fr : kt;
2081
+ }, this.isAllData = () => {
2082
+ const { data: e, total: i } = this.props;
2083
+ return Array.isArray(e) ? e.length === i : e ? i === e.total : !1;
2084
+ }, this.initializeVirtualization = (e, i) => {
2085
+ if (this.reInitVirtualization(
2086
+ this.props.scrollable === "virtual",
2087
+ this.props.total,
2088
+ this.props.filter,
2089
+ this.props.group,
2090
+ this.props.sort,
2091
+ i || this.props.rowHeight === void 0 || this.props.rowHeight === 0
2092
+ ), this.vs.fixedScroll = this.props.fixedScroll || !1, this.vs.PageChange = this.pageChange, this.vs.realSkip = this.props.skip || 0, this.vs.pageSize = (this.props.take !== void 0 ? this.props.take : this.props.pageSize) || 0, this.vs.scrollableVirtual = this.props.scrollable === "virtual", this.vs.total = e, this.vs.propsSkip = (this.props.skip || 0) + (this.props.scrollable === "virtual" ? this.vs.topCacheCount + (this.vs.attendedSkip - (this.props.skip || 0)) : 0), this.props.rowHeight !== void 0 && this.props.rowHeight > 0 && !i) {
2093
+ const n = this.props.rowHeight * e;
2094
+ this.vs.containerHeight = Re ? Math.min(Ct, n) : n;
2095
+ } else
2096
+ this.vs.containerHeight = 1533915;
2097
+ if (this.vs.containerRef = this.containerRef, this.vs.tableBodyRef = this.tableBodyRef, this.vs.table = this.tableElement, this._slicedData = void 0, this.vs instanceof kt) {
2098
+ const { rowHeight: n = 0, detail: a, expandField: h } = this.props;
2099
+ let { detailRowHeight: c = 0 } = this.props;
2100
+ c = a && h ? c : n, this.isAllData() ? (this.vs.total = this._data.length, this._slicedData = this._data.slice(this.vs.realSkip, this.vs.realSkip + this.vs.pageSize), this.vs.rowHeightService = this.rowHeightService(this.vs, this._data.length, n, c, this._data)) : this.vs.rowHeightService = new xt(e, n, c);
2101
+ const d = this.vs.rowHeightService.totalHeight();
2102
+ this.vs.containerHeight = Re ? Math.min(Ct, d) : d;
2103
+ }
2104
+ }, this.scrollHandler = (e) => {
2105
+ if (e.target !== e.currentTarget)
2106
+ return;
2107
+ clearTimeout(this.forceUpdateTimeout), this.vs.table = this.tableElement;
2108
+ const i = e.currentTarget.scrollLeft, n = e.currentTarget.scrollTop;
2109
+ this.props.columnVirtualization && (!this.vs.scrollableVirtual || n === this.wrapperScrollTop) && (this.forceUpdateTimeout = window.setTimeout(() => {
2110
+ this.forceUpdate();
2111
+ }, 0)), this._header && this._header.setScrollLeft(i), this._footer && this._footer.setScrollLeft(i), this.vs && n !== this.wrapperScrollTop && this.vs.scrollHandler(e), ps(this.props.onScroll, e, this, void 0), this.wrapperScrollTop = n;
2112
+ }, this.onKeyDown = (e) => {
2113
+ if (X.onKeyDown(e, {
2114
+ contextStateRef: this.contextStateRef,
2115
+ navigationStateRef: this.navigationStateRef,
2116
+ onNavigationAction: this.onNavigationAction
2117
+ }), this.props.onKeyDown) {
2118
+ const { mode: i, cell: n } = ht(this.props.selectable), a = {
2119
+ dataItems: this.getLeafDataItems(),
2120
+ mode: i,
2121
+ cell: n,
2122
+ componentId: this._gridId,
2123
+ selectedField: this.props.selectedField,
2124
+ ...this.getArguments(e)
2125
+ };
2126
+ this.props.onKeyDown.call(void 0, a);
2127
+ }
2128
+ }, this.onFocus = (e) => {
2129
+ X.onFocus(e, {
2130
+ contextStateRef: this.contextStateRef
2131
+ });
2132
+ }, this.onNavigationAction = (e) => {
2133
+ if (this.props.onNavigationAction) {
2134
+ const i = {
2135
+ focusElement: e.focusElement,
2136
+ ...this.getArguments(e.event)
2137
+ };
2138
+ this.props.onNavigationAction.call(void 0, i);
2139
+ }
2140
+ }, this.rowClick = (e, i) => {
2141
+ this.props.onRowClick && e.target.nodeName === "TD" && this.props.onRowClick.call(
2142
+ void 0,
2143
+ {
2144
+ dataItem: i.dataItem,
2145
+ ...this.getArguments(e)
2146
+ }
2147
+ );
2148
+ }, this.rowDblClick = (e, i) => {
2149
+ this.props.onRowDoubleClick && e.target.nodeName === "TD" && this.props.onRowDoubleClick.call(
2150
+ void 0,
2151
+ {
2152
+ dataItem: i.dataItem,
2153
+ ...this.getArguments(e)
2154
+ }
2155
+ );
2156
+ }, this.itemChange = (e) => {
2157
+ const i = this.props.onItemChange;
2158
+ if (e.field === this.props.expandField || this.props.group && e.field === void 0) {
2159
+ const n = this.props.onExpandChange;
2160
+ n && n.call(
2161
+ void 0,
2162
+ {
2163
+ ...this.getArguments(e.syntheticEvent),
2164
+ dataItem: e.dataItem,
2165
+ dataIndex: e.dataIndex,
2166
+ value: e.value
2167
+ }
2168
+ );
2169
+ return;
2170
+ }
2171
+ i && i.call(
2172
+ void 0,
2173
+ {
2174
+ ...this.getArguments(e.syntheticEvent),
2175
+ dataItem: e.dataItem,
2176
+ field: e.field,
2177
+ value: e.value
2178
+ }
2179
+ );
2180
+ }, this.onHeaderSelectionChange = (e) => {
2181
+ this.props.onHeaderSelectionChange && this.props.onHeaderSelectionChange.call(
2182
+ void 0,
2183
+ {
2184
+ field: e.field,
2185
+ nativeEvent: e.syntheticEvent && e.syntheticEvent.nativeEvent,
2186
+ syntheticEvent: e.syntheticEvent,
2187
+ target: this,
2188
+ dataItems: this.getLeafDataItems(),
2189
+ selectedField: this.props.selectedField
2190
+ }
2191
+ );
2192
+ }, this.selectionRelease = (e) => {
2193
+ if (this.props.onSelectionChange) {
2194
+ const i = {
2195
+ syntheticEvent: void 0,
2196
+ target: this,
2197
+ selectedField: this.props.selectedField || "",
2198
+ componentId: this._gridId,
2199
+ dataItems: this.getLeafDataItems(),
2200
+ dataItem: null,
2201
+ ...e
2202
+ };
2203
+ this.props.onSelectionChange.call(void 0, i);
2204
+ }
2205
+ }, this.pageChange = (e, i, n) => {
2206
+ this.raiseDataEvent(
2207
+ this.props.onPageChange,
2208
+ { page: e },
2209
+ { skip: e.skip, take: e.take },
2210
+ i,
2211
+ n
2212
+ );
2213
+ }, this.pagerPageChange = (e) => {
2214
+ this.pageChange({ skip: e.skip, take: e.take }, e.syntheticEvent, e.targetEvent);
2215
+ }, this.sortChange = (e, i) => {
2216
+ this.raiseDataEvent(
2217
+ this.props.onSortChange,
2218
+ { sort: e },
2219
+ { sort: e, ...this.props.scrollable === "virtual" ? { skip: 0 } : {} },
2220
+ i
2221
+ );
2222
+ }, this.filterChange = (e, i) => {
2223
+ this.raiseDataEvent(
2224
+ this.props.onFilterChange,
2225
+ { filter: e },
2226
+ { filter: e || void 0, skip: 0 },
2227
+ i
2228
+ );
2229
+ }, this.groupChange = (e, i) => {
2230
+ const n = i.nativeEvent ? i : { nativeEvent: i.nativeEvent || i.originalEvent };
2231
+ this.raiseDataEvent(
2232
+ this.props.onGroupChange,
2233
+ { group: e },
2234
+ { group: e, skip: 0 },
2235
+ n
2236
+ );
2237
+ }, this.onResize = (e, i, n, a, h, c) => {
2238
+ this.resetTableWidth(), this._shouldUpdateLeftRight = !0, this._resized = !0, this._columnsMutations++, this.props.onColumnResize && this.props.onColumnResize.call(
2239
+ void 0,
2240
+ {
2241
+ columns: this.columns,
2242
+ nativeEvent: a,
2243
+ targetColumnId: c,
2244
+ index: e,
2245
+ newWidth: i,
2246
+ oldWidth: n,
2247
+ end: h,
2248
+ target: this
2249
+ }
2250
+ );
2251
+ }, this.reInitVirtualization = B((e, i, n, a, h, c) => {
2252
+ this.vs.reset();
2253
+ const d = this.getVirtualScroll(this.props);
2254
+ this.vs = new d(c);
2255
+ }), this.flatData = B((e, i, n, a, h, c, d) => {
2256
+ const g = [], m = Gt(
2257
+ g,
2258
+ e,
2259
+ i,
2260
+ { index: n },
2261
+ a !== void 0,
2262
+ h
2263
+ );
2264
+ return { flattedData: g, resolvedGroupsCount: m };
2265
+ }), this.rowHeightService = B((e, i, n, a, h) => new xt(i, n, a, h)), this.childrenToArray = B((e) => l.Children.toArray(e)), this.readColumns = B(
2266
+ (e, i, n) => {
2267
+ const a = e.filter((h) => h && h.type && h.type.displayName === "KendoReactGridColumn");
2268
+ return Ht(a, this.columns, { prevId: 0, idPrefix: i });
2269
+ }
2270
+ ), this.mapColumns = B(
2271
+ (e) => vs(e)
2272
+ ), this.configureColumns = B((e, i, n) => {
2273
+ this.props.selectedField && e.filter((c) => c.field === this.props.selectedField).forEach((c) => {
2274
+ c.width = c.width || "50px", c.cell = c.cell || Ks, c.headerCell = c.headerCell || Er;
2275
+ });
2276
+ const a = {
2277
+ id: "",
2278
+ resizable: !0,
2279
+ width: "32px",
2280
+ title: " ",
2281
+ declarationIndex: -1,
2282
+ orderIndex: -1,
2283
+ children: [],
2284
+ parentIndex: -1,
2285
+ depth: 0,
2286
+ colSpan: 0,
2287
+ rowSpan: 0,
2288
+ left: 0,
2289
+ right: 0,
2290
+ index: 0,
2291
+ rightBorder: !1,
2292
+ ariaColumnIndex: 0,
2293
+ isAccessible: !0
2294
+ };
2295
+ let h = 0;
2296
+ this.props.expandField && this.props.onExpandChange && this.props.detail && (e.unshift({
2297
+ ...a,
2298
+ cell: sr,
2299
+ field: this.props.expandField,
2300
+ headerClassName: "k-hierarchy-cell k-header",
2301
+ id: z.generateNavigatableId(`${this._columns.length}`, n, "column")
2302
+ }), h++);
2303
+ for (let c = 0; c < i; c++)
2304
+ e.unshift({
2305
+ ...a,
2306
+ isAccessible: !1,
2307
+ cell: vt,
2308
+ field: "value",
2309
+ locked: this.props.lockGroups
2310
+ }), h++;
2311
+ e.slice(h).forEach((c) => c.parentIndex >= 0 && (c.parentIndex += h));
2312
+ }), this.getHeaderRow = B((e, i, n, a, h, c, d, g, m, u, b, E) => /* @__PURE__ */ l.createElement(
2313
+ Kt,
2314
+ {
2315
+ cells: this.props.cells,
2316
+ sort: e,
2317
+ sortable: i,
2318
+ sortChange: this.sortChange,
2319
+ group: n || [],
2320
+ groupable: a,
2321
+ groupChange: this.groupChange,
2322
+ filter: h,
2323
+ filterable: c,
2324
+ filterOperators: d,
2325
+ filterChange: this.filterChange,
2326
+ columnMenu: m,
2327
+ selectionChange: this.onHeaderSelectionChange,
2328
+ columns: u,
2329
+ columnResize: this.columnResize,
2330
+ pressHandler: this.dragLogic.pressHandler,
2331
+ dragHandler: this.dragLogic.dragHandler,
2332
+ releaseHandler: this.dragLogic.releaseHandler,
2333
+ columnsMap: b,
2334
+ cellRender: g,
2335
+ isRtl: E,
2336
+ dragClue: this.dragLogic.dragClueRef,
2337
+ headerRef: this.headerElementRef,
2338
+ containerRef: this.containerRef
2339
+ }
2340
+ )), this.resolveTitle = (e) => {
2341
+ const i = this._columns.find((a) => a.field === e), n = i && (i.title || i.field);
2342
+ return n === void 0 ? e : n;
2343
+ }, this.getLeafDataItems = () => this._data.filter((e) => e.rowType === "data").map((e) => e.dataItem), us(Et), this.showLicenseWatermark = gs(Et);
2344
+ const s = this.props.groupable === !0 || typeof this.props.groupable == "object" && this.props.groupable.enabled !== !1, o = this.getVirtualScroll(t);
2345
+ this.vs = new o(s || t.rowHeight === void 0 || t.rowHeight === 0), this.dragLogic = new xr(
2346
+ this.columnReorder.bind(this),
2347
+ this.groupReorder.bind(this),
2348
+ this.columnToGroup.bind(this)
2349
+ ), this.columnResize = new br(this.onResize), X.onConstructor({
2350
+ navigatable: !!t.navigatable,
2351
+ contextStateRef: this.contextStateRef,
2352
+ navigationStateRef: this.navigationStateRef,
2353
+ idPrefix: this._gridId
2354
+ });
2355
+ }
2356
+ /* eslint-disable max-len */
2357
+ /**
2358
+ * A getter of the current columns. Gets the current column width or current columns, or any other [`GridColumnProps`]({% slug api_grid_gridcolumnprops %}) for each defined column. Can be used on each Grid instance. To obtain the instance of the rendered Grid, use the `ref` callback. The following example demonstrates how to reorder the columns by dragging their handlers and check the properties afterwards. You can check the result in the browser console.
2359
+ *
2360
+ * @example
2361
+ * ```jsx
2362
+ * class App extends React.Component {
2363
+ * constructor(props) {
2364
+ * super(props);
2365
+ * this.state = {
2366
+ * data: [
2367
+ * { 'foo': 'A1', 'bar': 'B1' },
2368
+ * { 'foo': 'A2', 'bar': 'B2' },
2369
+ * { 'foo': 'A3', 'bar': 'B2' }
2370
+ * ]
2371
+ * };
2372
+ * this.grid = null;
2373
+ * }
2374
+ * render() {
2375
+ * return (
2376
+ * <div>
2377
+ * <Grid
2378
+ * data={this.state.data}
2379
+ * reorderable={true}
2380
+ * ref={(g) => { this.grid = g; }}
2381
+ * >
2382
+ * <GridColumn field="foo" />
2383
+ * <GridColumn field="bar" />
2384
+ * </Grid>
2385
+ * <button onClick={() => console.log(JSON.stringify(this.grid.columns))}>
2386
+ * log current properties into browser console.
2387
+ * </button>
2388
+ * </div>
2389
+ * );
2390
+ * }
2391
+ * }
2392
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
2393
+ * ```
2394
+ */
2395
+ // tslint:enable:max-line-length
2396
+ get columns() {
2397
+ const t = this._columns.filter((s) => s.declarationIndex >= 0 && s.parentIndex === -1);
2398
+ return zt(t);
2399
+ }
2400
+ /**
2401
+ * Returns the HTML element of the Grid component.
2402
+ */
2403
+ get element() {
2404
+ return this._element;
2405
+ }
2406
+ get document() {
2407
+ if (ot)
2408
+ return this.element && this.element.ownerDocument || document;
2409
+ }
2410
+ get _header() {
2411
+ return this.headerRef.current;
2412
+ }
2413
+ /**
2414
+ * @hidden
2415
+ */
2416
+ componentDidMount() {
2417
+ this.resetTableWidth(), lt();
2418
+ const t = wt(this.element);
2419
+ this.isRtl = t, X.onComponentDidMount({
2420
+ scope: this.element || void 0,
2421
+ contextStateRef: this.contextStateRef,
2422
+ navigationStateRef: this.navigationStateRef
2423
+ }), this.isRtl && this.forceUpdate();
2424
+ const s = {
2425
+ rootMargin: "0px",
2426
+ threshold: 0.9
2427
+ };
2428
+ this.observer = ot && window.IntersectionObserver && new window.IntersectionObserver(this.handleIntersection, s) || null;
2429
+ }
2430
+ /**
2431
+ * @hidden
2432
+ */
2433
+ getSnapshotBeforeUpdate() {
2434
+ return X.onGetSnapshotBeforeUpdate({
2435
+ document: this.document,
2436
+ contextStateRef: this.contextStateRef,
2437
+ navigationStateRef: this.navigationStateRef
2438
+ }), null;
2439
+ }
2440
+ /**
2441
+ * @hidden
2442
+ */
2443
+ componentDidUpdate() {
2444
+ this.resetTableWidth(), lt(), this.vs.tableTransform && this.vs.table && (this.vs.table.style.transform = this.vs.tableTransform, this.vs.tableTransform = ""), X.onComponentDidUpdate({
2445
+ scope: this.element || void 0,
2446
+ contextStateRef: this.contextStateRef,
2447
+ navigationStateRef: this.navigationStateRef
2448
+ });
2449
+ }
2450
+ /**
2451
+ * @hidden
2452
+ */
2453
+ componentWillUnmount() {
2454
+ clearTimeout(this.forceUpdateTimeout);
2455
+ }
2456
+ /**
2457
+ * @hidden
2458
+ */
2459
+ render() {
2460
+ var rt;
2461
+ let t = this.props.total || 0;
2462
+ const s = z.getIdPrefix(this.navigationStateRef);
2463
+ let o = [];
2464
+ Array.isArray(this.props.data) ? (o = this.props.data, t = t || this.props.data.length) : this.props.data && (o = this.props.data.data, t = t || this.props.data.total);
2465
+ const e = typeof this.props.groupable == "object" && this.props.groupable.footer || "none", { resolvedGroupsCount: i, flattedData: n } = this.flatData(
2466
+ o,
2467
+ e,
2468
+ this.props.skip || 0,
2469
+ this.props.group,
2470
+ this.props.expandField,
2471
+ this.props.filter,
2472
+ this.props.sort
2473
+ );
2474
+ this._data = n;
2475
+ const a = this.props.groupable === !0 || typeof this.props.groupable == "object" && this.props.groupable.enabled !== !1;
2476
+ this.columnResize.resizable = this.props.resizable || !1, this.dragLogic.reorderable = this.props.reorderable || !1, this.dragLogic.groupable = a;
2477
+ const h = this.props.selectable && this.props.selectable.drag ? "none" : void 0;
2478
+ this.initializeVirtualization(t, a);
2479
+ const c = this.childrenToArray(this.props.children);
2480
+ this.initColumns(c, i);
2481
+ const d = c.map((f) => f && f.type && f.type.displayName === "KendoReactGridToolbar" ? l.cloneElement(f, { ...f.props, ariaControls: this._gridRoleElementId }) : null), g = c.filter((f) => f && f.type && f.type.displayName === "KendoReactGridNoRecords"), m = c.filter((f) => f && f.type && f.type.displayName === "KendoReactGridStatusBar"), u = this._columns.filter((f) => f.children.length === 0), b = a && /* @__PURE__ */ l.createElement(
2482
+ Zt,
2483
+ {
2484
+ group: this.props.group || [],
2485
+ groupChange: this.groupChange,
2486
+ pressHandler: this.dragLogic.pressHandler,
2487
+ dragHandler: this.dragLogic.dragHandler,
2488
+ releaseHandler: this.dragLogic.releaseHandler,
2489
+ refCallback: this.dragLogic.refGroupPanelDiv,
2490
+ resolveTitle: this.resolveTitle,
2491
+ ariaControls: this._gridRoleElementId,
2492
+ onContextMenu: this.onContextMenu
2493
+ }
2494
+ ), { sort: E, sortable: C, group: x, filter: I, filterable: k, filterOperators: _ = bt, headerCellRender: D, columnMenu: de } = this.props, Y = /* @__PURE__ */ l.createElement(
2495
+ or,
2496
+ {
2497
+ size: this.props.size,
2498
+ columnResize: this.columnResize,
2499
+ staticHeaders: this.props.scrollable !== "none",
2500
+ scrollableDataElement: () => this.vs.container,
2501
+ draggable: this.props.reorderable || a,
2502
+ ref: this.headerRef,
2503
+ elemRef: this.headerElementRef,
2504
+ headerRow: this.getHeaderRow(
2505
+ E,
2506
+ C,
2507
+ x,
2508
+ a,
2509
+ I,
2510
+ k,
2511
+ _,
2512
+ D,
2513
+ de,
2514
+ this._columns,
2515
+ this._columnsMap,
2516
+ this.isRtl
2517
+ ),
2518
+ filterRow: this.props.filterable && /* @__PURE__ */ l.createElement(
2519
+ Jt,
2520
+ {
2521
+ cells: this.props.cells,
2522
+ size: this.props.size,
2523
+ columns: this._columns,
2524
+ filter: this.props.filter,
2525
+ filterOperators: this.props.filterOperators || bt,
2526
+ filterChange: this.filterChange,
2527
+ sort: this.props.sort,
2528
+ cellRender: this.props.filterCellRender,
2529
+ isRtl: this.isRtl,
2530
+ ariaRowIndex: this._columnsMap.length + 1
2531
+ }
2532
+ ) || void 0,
2533
+ cols: u.map((f, w) => /* @__PURE__ */ l.createElement(
2534
+ "col",
2535
+ {
2536
+ key: w.toString(),
2537
+ width: Se(f)
2538
+ }
2539
+ ))
2540
+ }
2541
+ ), $ = this.vs && this.vs.container && this.vs.container.scrollLeft || 0, F = parseFloat(((this.props.style || {}).width || "").toString()), { colSpans: ke, hiddenColumns: pe } = Es({
2542
+ enabled: this.props.columnVirtualization,
2543
+ columns: u,
2544
+ tableViewPortWidth: F,
2545
+ scrollLeft: $
2546
+ }), ve = (f, w, R) => {
2547
+ let j = !1;
2548
+ const V = this.props.selectedField ? M(this.props.selectedField, f.dataItem) : void 0;
2549
+ return {
2550
+ row: u.map((S, N) => {
2551
+ if (pe[N])
2552
+ return null;
2553
+ const ee = S.id ? S.id : N, te = `${S.className ? S.className + " " : ""}${S.locked ? "k-grid-content-sticky" : ""}`, P = S.left !== void 0 ? this.isRtl ? { left: S.right, right: S.left } : { left: S.left, right: S.right } : {};
2554
+ let A = !1;
2555
+ if (S.editable && this.props.editField) {
2556
+ const H = M(this.props.editField, f.dataItem);
2557
+ H && (H === !0 || H === S.field) && (j = !0, A = !0);
2558
+ }
2559
+ let Ie = S.cell || A && ir || kr;
2560
+ return /* @__PURE__ */ l.createElement(
2561
+ Ie,
2562
+ {
2563
+ onContextMenu: this.onContextMenu,
2564
+ key: ee,
2565
+ locked: this.props.lockGroups,
2566
+ id: z.generateNavigatableId(`${w}-${String(N)}`, s),
2567
+ colSpan: ke[N],
2568
+ dataItem: f.dataItem,
2569
+ field: S.field,
2570
+ editor: S.editor,
2571
+ format: S.format,
2572
+ className: te,
2573
+ render: this.props.cellRender,
2574
+ cells: Ce(this.props.cells, S.cells),
2575
+ onChange: this.itemChange,
2576
+ selectionChange: this.props.onSelectionChange ? (H) => {
2577
+ this.selectionChange({ event: H, dataItem: f.dataItem, dataIndex: R, columnIndex: N });
2578
+ } : void 0,
2579
+ columnIndex: N,
2580
+ columnsCount: u.length,
2581
+ rowType: f.rowType,
2582
+ level: f.level,
2583
+ expanded: f.expanded,
2584
+ dataIndex: f.dataIndex,
2585
+ style: P,
2586
+ ariaColumnIndex: S.ariaColumnIndex,
2587
+ isSelected: Array.isArray(V) && V.indexOf(N) > -1
2588
+ }
2589
+ );
2590
+ }),
2591
+ isInEdit: j,
2592
+ isSelected: typeof V == "boolean" && V
2593
+ };
2594
+ };
2595
+ let J = 0;
2596
+ if (this.props.scrollable === "virtual")
2597
+ for (let f = 0; f < this.vs.topCacheCount + this.vs.attendedSkip - (this.props.skip || 0); f++) {
2598
+ const w = this._data.shift();
2599
+ if (w)
2600
+ this._data.push(w), J++, w.rowType === "groupHeader" && f--;
2601
+ else
2602
+ break;
2603
+ }
2604
+ const Xe = (f) => f >= this._data.length - J;
2605
+ let Ye = this.vs.realSkip || 0;
2606
+ const Q = [], Ee = this._columnsMap.length + (this.props.filterable ? 1 : 0) + 1;
2607
+ let Z = 0;
2608
+ if (this._data.length) {
2609
+ let f = -1, w = 0;
2610
+ (this._slicedData || this._data).forEach((R, j) => {
2611
+ R.rowType === "data" && (Ye++, f++);
2612
+ const V = Ye % 2 === 0, S = this.props.dataItemKey && ye(this.props.dataItemKey)(R.dataItem), N = j + (this.vs.realSkip || 0), ee = S || "ai" + N, te = ee + "_1", P = ve(R, ee, f);
2613
+ if (Z = N + Ee + w, Q.push(/* @__PURE__ */ l.createElement(
2614
+ vr,
2615
+ {
2616
+ key: ee,
2617
+ dataItem: R.dataItem,
2618
+ isAltRow: V,
2619
+ isInEdit: P.isInEdit,
2620
+ rowType: R.rowType,
2621
+ isHidden: Xe(j),
2622
+ onClick: (A) => this.rowClick(A, R),
2623
+ onDoubleClick: (A) => this.rowDblClick(A, R),
2624
+ selectedField: this.props.selectedField,
2625
+ rowHeight: this.props.rowHeight,
2626
+ render: this.props.rowRender,
2627
+ ariaRowIndex: Z,
2628
+ absoluteRowIndex: N,
2629
+ dataIndex: f,
2630
+ isSelected: P.isSelected
2631
+ },
2632
+ P.row
2633
+ )), this.props.detail && R.rowType === "data" && R.expanded) {
2634
+ const A = u.length - (this.props.expandField ? 1 : 0) - (this.props.group ? this.props.group.length : 0) || 1;
2635
+ w++, Z = N + Ee + w, Q.push(/* @__PURE__ */ l.createElement(
2636
+ "tr",
2637
+ {
2638
+ key: te,
2639
+ className: y(
2640
+ "k-table-row",
2641
+ V ? "k-detail-row k-table-alt-row k-alt" : "k-detail-row"
2642
+ ),
2643
+ style: { visibility: Xe(j) ? "hidden" : "", height: this.props.detailRowHeight },
2644
+ role: "row",
2645
+ "aria-rowindex": Z
2646
+ },
2647
+ this.props.group && this.props.group.map((Ie, H) => {
2648
+ var it;
2649
+ const se = (it = P == null ? void 0 : P.row[H]) == null ? void 0 : it.props.style, ds = se ? this.isRtl ? { left: se.right, right: se.left } : { left: se.left, right: se.right } : {};
2650
+ return /* @__PURE__ */ l.createElement(
2651
+ vt,
2652
+ {
2653
+ id: "",
2654
+ dataIndex: R.dataIndex,
2655
+ field: Ie.field,
2656
+ dataItem: R.dataItem,
2657
+ key: H,
2658
+ style: ds,
2659
+ ariaColumnIndex: 1 + H,
2660
+ isSelected: !1,
2661
+ locked: this.props.lockGroups,
2662
+ isRtl: this.isRtl,
2663
+ cells: this.props.cells
2664
+ }
2665
+ );
2666
+ }),
2667
+ this.props.expandField && /* @__PURE__ */ l.createElement(
2668
+ Rr,
2669
+ {
2670
+ id: z.generateNavigatableId(`${te}-dhcell`, s)
2671
+ }
2672
+ ),
2673
+ /* @__PURE__ */ l.createElement(
2674
+ wr,
2675
+ {
2676
+ onContextMenu: this.onContextMenu,
2677
+ dataItem: R.dataItem,
2678
+ dataIndex: R.dataIndex,
2679
+ colSpan: A,
2680
+ ariaColIndex: 2 + (this.props.group ? this.props.group.length : 0),
2681
+ detail: this.props.detail,
2682
+ id: z.generateNavigatableId(`${te}-dcell`, s)
2683
+ }
2684
+ )
2685
+ ));
2686
+ }
2687
+ });
2688
+ } else
2689
+ Q.push(/* @__PURE__ */ l.createElement("tr", { key: "no-records", className: "k-table-row k-grid-norecords", role: "row", "aria-rowindex": Ee }, /* @__PURE__ */ l.createElement("td", { className: "k-table-td", colSpan: u.length, role: "gridcell" }, g.length ? g : /* @__PURE__ */ l.createElement($e, null))));
2690
+ const Je = {
2691
+ size: this.props.size,
2692
+ onPageChange: this.pagerPageChange,
2693
+ total: t,
2694
+ dir: this.isRtl ? "rtl" : void 0,
2695
+ skip: this.vs.propsSkip || 0,
2696
+ take: (this.props.take !== void 0 ? this.props.take : this.props.pageSize) || 10,
2697
+ messagesMap: tr,
2698
+ ...yr(this.props.pageable || {})
2699
+ }, Qe = this.props.pager ? /* @__PURE__ */ l.createElement(this.props.pager, { ...Je }) : /* @__PURE__ */ l.createElement(Is, { className: "k-grid-pager", ...Je }), hs = (f) => this.props.sort && this.props.sort.filter((w) => w.field === f).length > 0, cs = (f, w) => /* @__PURE__ */ l.createElement(
2700
+ "col",
2701
+ {
2702
+ key: w.toString(),
2703
+ width: Se(f)
2704
+ }
2705
+ ), Ze = (rt = this.props.cells) != null && rt.footerCell || this._columns.some(
2706
+ (f) => {
2707
+ var w;
2708
+ return !!(f.footerCell || (w = f.cells) != null && w.footerCell);
2709
+ }
2710
+ ) ? /* @__PURE__ */ l.createElement(
2711
+ gr,
2712
+ {
2713
+ size: this.props.size,
2714
+ columnResize: this.columnResize,
2715
+ staticHeaders: this.props.scrollable !== "none",
2716
+ ref: (f) => this._footer = f,
2717
+ row: /* @__PURE__ */ l.createElement(
2718
+ Ir,
2719
+ {
2720
+ cells: this.props.cells,
2721
+ columns: this._columns,
2722
+ isRtl: this.isRtl,
2723
+ ariaRowIndex: Z + 1
2724
+ }
2725
+ ),
2726
+ cols: u.map(cs)
2727
+ }
2728
+ ) : null, et = /* @__PURE__ */ l.createElement(
2729
+ "colgroup",
2730
+ {
2731
+ ref: (f) => {
2732
+ this.columnResize.colGroupMain = f;
2733
+ }
2734
+ },
2735
+ u.map(
2736
+ (f, w) => /* @__PURE__ */ l.createElement(
2737
+ "col",
2738
+ {
2739
+ key: w.toString(),
2740
+ className: hs(f.field) ? "k-sorted" : void 0,
2741
+ width: Se(f)
2742
+ }
2743
+ )
2744
+ )
2745
+ ), tt = this.dragLogic.reorderable || this.dragLogic.groupable, st = this.props.columnVirtualization ? "block" : "table";
2746
+ if (this.props.scrollable === "none")
2747
+ return /* @__PURE__ */ l.createElement(we.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ l.createElement(
2748
+ "div",
2749
+ {
2750
+ id: this.props.id,
2751
+ style: this.props.style,
2752
+ className: y(
2753
+ "k-grid",
2754
+ {
2755
+ "k-grid-md": !this.props.size,
2756
+ [`k-grid-${K.sizeMap[this.props.size] || this.props.size}`]: this.props.size
2757
+ },
2758
+ this.props.className
2759
+ ),
2760
+ ref: (f) => {
2761
+ this._element = f;
2762
+ },
2763
+ "aria-label": this.props.ariaLabel,
2764
+ onKeyDown: this.onKeyDown,
2765
+ onFocus: this.onFocus,
2766
+ ...ct
2767
+ },
2768
+ d,
2769
+ b,
2770
+ /* @__PURE__ */ l.createElement(
2771
+ dt,
2772
+ {
2773
+ selectable: this.props.selectable,
2774
+ onRelease: this.selectionRelease,
2775
+ childRef: (f) => {
2776
+ this.tableElement = f;
2777
+ }
2778
+ },
2779
+ /* @__PURE__ */ l.createElement(
2780
+ "table",
2781
+ {
2782
+ className: y(
2783
+ "k-table k-grid-table",
2784
+ { [`k-table-${K.sizeMap[this.props.size] || this.props.size}`]: this.props.size }
2785
+ ),
2786
+ style: { userSelect: h, display: st }
2787
+ },
2788
+ et,
2789
+ Y,
2790
+ /* @__PURE__ */ l.createElement("tbody", { role: "rowgroup", className: "k-table-tbody", ...pt }, Q),
2791
+ Ze
2792
+ )
2793
+ ),
2794
+ tt && /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(ut, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ l.createElement(gt, { ref: this.dragLogic.refDragElementClue }))
2795
+ ), m, this.props.pageable && Qe);
2796
+ let ue = this.props.style || {};
2797
+ return this.props.scrollable === "virtual" && (ue.height || (ue = Object.assign({}, ue, { height: "450px" }))), /* @__PURE__ */ l.createElement(we.Provider, { value: this.contextStateRef.current }, /* @__PURE__ */ l.createElement(
2798
+ "div",
2799
+ {
2800
+ id: this.props.id,
2801
+ style: ue,
2802
+ className: y(
2803
+ "k-grid",
2804
+ {
2805
+ "k-grid-md": !this.props.size,
2806
+ [`k-grid-${K.sizeMap[this.props.size] || this.props.size}`]: this.props.size,
2807
+ "k-grid-virtual": this.props.scrollable === "virtual"
2808
+ },
2809
+ this.props.className
2810
+ ),
2811
+ ref: (f) => {
2812
+ this._element = f;
2813
+ },
2814
+ "aria-label": this.props.ariaLabel,
2815
+ onKeyDown: this.onKeyDown,
2816
+ onFocus: this.onFocus,
2817
+ ...ct
2818
+ },
2819
+ d,
2820
+ b,
2821
+ /* @__PURE__ */ l.createElement(
2822
+ "div",
2823
+ {
2824
+ className: "k-grid-aria-root",
2825
+ role: "grid",
2826
+ "aria-colcount": u.length,
2827
+ "aria-rowcount": t,
2828
+ id: this._gridRoleElementId
2829
+ },
2830
+ Y,
2831
+ /* @__PURE__ */ l.createElement("div", { className: "k-grid-container", role: "presentation" }, /* @__PURE__ */ l.createElement(
2832
+ "div",
2833
+ {
2834
+ ref: this.containerRef,
2835
+ className: "k-grid-content k-virtual-content",
2836
+ onScroll: this.scrollHandler,
2837
+ role: "presentation"
2838
+ },
2839
+ /* @__PURE__ */ l.createElement("div", { className: "k-grid-table-wrap", role: "presentation" }, /* @__PURE__ */ l.createElement(
2840
+ dt,
2841
+ {
2842
+ selectable: this.props.selectable,
2843
+ onRelease: this.selectionRelease,
2844
+ childRef: (f) => {
2845
+ this.tableElement = f;
2846
+ }
2847
+ },
2848
+ /* @__PURE__ */ l.createElement(
2849
+ "table",
2850
+ {
2851
+ className: y(
2852
+ "k-table k-grid-table",
2853
+ {
2854
+ "k-table-md": !this.props.size,
2855
+ [`k-table-${K.sizeMap[this.props.size] || this.props.size}`]: this.props.size
2856
+ }
2857
+ ),
2858
+ role: "presentation",
2859
+ style: { userSelect: h, display: st }
2860
+ },
2861
+ et,
2862
+ /* @__PURE__ */ l.createElement(
2863
+ "tbody",
2864
+ {
2865
+ className: "k-table-tbody",
2866
+ ref: this.tableBodyRef,
2867
+ role: "rowgroup",
2868
+ ...pt
2869
+ },
2870
+ Q
2871
+ )
2872
+ )
2873
+ )),
2874
+ /* @__PURE__ */ l.createElement("div", { className: "k-height-container", role: "presentation" }, /* @__PURE__ */ l.createElement(
2875
+ "div",
2876
+ {
2877
+ style: this.props.scrollable === "virtual" ? { height: this.vs.containerHeight + "px" } : {}
2878
+ }
2879
+ ))
2880
+ )),
2881
+ Ze,
2882
+ tt && /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(ut, { ref: this.dragLogic.refDropElementClue }), /* @__PURE__ */ l.createElement(gt, { ref: this.dragLogic.refDragElementClue })),
2883
+ this.showLicenseWatermark && /* @__PURE__ */ l.createElement(fs, null)
2884
+ ),
2885
+ m,
2886
+ this.props.pageable && Qe
2887
+ ));
2888
+ }
2889
+ selectionChange(t) {
2890
+ if (this.props.onSelectionChange) {
2891
+ const { event: s, dataItem: o, dataIndex: e, columnIndex: i } = t, { mode: n, cell: a } = ht(this.props.selectable), h = {
2892
+ ...this.getArguments(s.syntheticEvent),
2893
+ dataItem: o,
2894
+ startColIndex: i,
2895
+ endColIndex: i,
2896
+ startRowIndex: e,
2897
+ endRowIndex: e,
2898
+ dataItems: this.getLeafDataItems(),
2899
+ altKey: !1,
2900
+ ctrlKey: !1,
2901
+ shiftKey: !1,
2902
+ metaKey: !1,
2903
+ mode: n,
2904
+ cell: a,
2905
+ isDrag: !1,
2906
+ componentId: this._gridId,
2907
+ selectedField: this.props.selectedField || ""
2908
+ };
2909
+ this.props.onSelectionChange.call(void 0, h);
2910
+ }
2911
+ }
2912
+ raiseDataEvent(t, s, o, e, i) {
2913
+ const n = this.props.onDataStateChange;
2914
+ if (t) {
2915
+ const a = { ...this.getArguments(e), ...s, targetEvent: i };
2916
+ t.call(void 0, a);
2917
+ } else
2918
+ n && n.call(
2919
+ void 0,
2920
+ {
2921
+ ...this.getArguments(e),
2922
+ targetEvent: i || {},
2923
+ dataState: {
2924
+ ...this.getDataState(),
2925
+ ...o
2926
+ }
2927
+ }
2928
+ );
2929
+ }
2930
+ columnReorder(t, s, o) {
2931
+ const e = this._columns[t], i = e.depth, n = (d) => {
2932
+ do
2933
+ d++;
2934
+ while (d < this._columns.length && this._columns[d].depth > i);
2935
+ return d;
2936
+ }, a = this._columns.splice(t, n(t) - t);
2937
+ this._columns.splice(t < s ? n(s - a.length) : s, 0, ...a), this._columns.filter((d) => d.declarationIndex >= 0).forEach((d, g) => d.orderIndex = g), this._columnsMutations++;
2938
+ const h = this._columns[t].locked && this._columns[s].locked;
2939
+ Ss(this._columnsMap, this._columns, h || this._shouldUpdateLeftRight), ys(this._columnsMap, this._columns, h || this._shouldUpdateLeftRight), this._resized && (this._shouldUpdateLeftRight = !1, this._resized = !1);
2940
+ const c = this.columns;
2941
+ if (this.forceUpdate(), this.props.onColumnReorder) {
2942
+ const d = {
2943
+ target: this,
2944
+ columns: c,
2945
+ columnId: e.id,
2946
+ nativeEvent: o
2947
+ };
2948
+ this.props.onColumnReorder.call(void 0, d);
2949
+ }
2950
+ }
2951
+ groupReorder(t, s, o) {
2952
+ if (this.props.group === void 0)
2953
+ return;
2954
+ const e = this.props.group.slice();
2955
+ e.splice(s, 0, ...e.splice(t, 1)), this.groupChange(e, o);
2956
+ }
2957
+ columnToGroup(t, s, o) {
2958
+ const e = this._columns[t].field;
2959
+ if (!e)
2960
+ return;
2961
+ const i = (this.props.group || []).slice();
2962
+ i.splice(s, 0, { field: e }), this.groupChange(i, o);
2963
+ }
2964
+ resetTableWidth() {
2965
+ let t = 0;
2966
+ if (!this.columnResize.colGroupMain)
2967
+ return;
2968
+ const s = this.columnResize.colGroupMain.children;
2969
+ for (let o = 0; o < s.length; o++) {
2970
+ const e = s[o].width;
2971
+ if (!e)
2972
+ return;
2973
+ t += parseFloat(e.toString());
2974
+ }
2975
+ t = Math.round(t), this._header && this._header.setWidth(t), this._footer && this._footer.setWidth(t), this.tableElement && (this.tableElement.style.width = t + "px");
2976
+ }
2977
+ initColumns(t, s) {
2978
+ const o = z.getIdPrefix(this.navigationStateRef);
2979
+ this._columns = this.readColumns(t, o, this._columnsMutations), this._columns.length === 0 && (this._columns = Bs(this.props.data, this.props.group, this.props.expandField, { prevId: 0, idPrefix: o })), this.configureColumns(this._columns, s, o), this._columnsMap = this.mapColumns(this._columns), this.columnResize.columns = this._columns, this.dragLogic.columns = this._columns;
2980
+ }
2981
+ getDataState() {
2982
+ return {
2983
+ filter: this.props.filter,
2984
+ sort: this.props.sort,
2985
+ skip: this.props.skip,
2986
+ take: this.props.take !== void 0 ? this.props.take : this.props.pageSize,
2987
+ group: this.props.group
2988
+ };
2989
+ }
2990
+ getArguments(t) {
2991
+ return {
2992
+ nativeEvent: t && t.nativeEvent,
2993
+ syntheticEvent: t,
2994
+ target: this
2995
+ };
2996
+ }
2997
+ }
2998
+ be.displayName = "KendoReactGrid";
2999
+ be.defaultProps = {
3000
+ // never use this
3001
+ };
3002
+ be.propTypes = {
3003
+ data: p.oneOfType([
3004
+ p.array,
3005
+ p.shape({
3006
+ data: p.array,
3007
+ total: p.number
3008
+ })
3009
+ ]),
3010
+ sortable: p.oneOfType([
3011
+ p.bool,
3012
+ p.shape({
3013
+ mode: p.oneOf(["single", "multiple"]),
3014
+ allowUnsort: p.bool
3015
+ })
3016
+ ]),
3017
+ onSortChange: p.func,
3018
+ sort: p.array,
3019
+ filterable: p.bool,
3020
+ filter: p.any,
3021
+ onFilterChange: p.func,
3022
+ pageable: p.oneOfType([
3023
+ p.bool,
3024
+ p.shape({
3025
+ buttonCount: p.number,
3026
+ info: p.bool,
3027
+ type: p.oneOf(["numeric", "input"]),
3028
+ pageSizes: p.oneOfType(
3029
+ [
3030
+ p.bool,
3031
+ p.arrayOf(p.oneOfType([
3032
+ p.string,
3033
+ p.number
3034
+ ]))
3035
+ ]
3036
+ ),
3037
+ previousNext: p.bool
3038
+ })
3039
+ ]),
3040
+ pageSize: p.number,
3041
+ onPageChange: p.func,
3042
+ total: p.number,
3043
+ skip: p.number,
3044
+ take: p.number,
3045
+ fixedScroll: p.bool,
3046
+ onExpandChange: p.func,
3047
+ expandField: p.string,
3048
+ selectedField: p.string,
3049
+ onSelectionChange: p.func,
3050
+ onHeaderSelectionChange: p.func,
3051
+ resizable: p.bool,
3052
+ reorderable: p.bool,
3053
+ group: p.any,
3054
+ groupable: p.oneOfType([
3055
+ p.bool,
3056
+ p.shape({
3057
+ enabled: p.bool,
3058
+ footer: p.oneOf(["always", "visible", "none"])
3059
+ })
3060
+ ]),
3061
+ onGroupChange: p.func,
3062
+ onRowClick: p.func,
3063
+ onRowDoubleClick: p.func,
3064
+ onItemChange: p.func,
3065
+ editField: p.string,
3066
+ scrollable: p.oneOf(["none", "scrollable", "virtual"]),
3067
+ rowHeight: p.number,
3068
+ detailRowHeight: p.number,
3069
+ detail: p.any,
3070
+ style: p.object,
3071
+ onDataStateChange: p.func,
3072
+ onColumnResize: p.func,
3073
+ onColumnReorder: p.func,
3074
+ dataItemKey: p.string,
3075
+ navigatable: p.bool,
3076
+ size: p.oneOf(["small", "medium"])
3077
+ };
3078
+ be.contextType = we;
3079
+ class xe extends l.Component {
3080
+ /**
3081
+ * @hidden
3082
+ */
3083
+ render() {
3084
+ const { children: t } = this.props;
3085
+ return /* @__PURE__ */ l.createElement(
3086
+ "div",
3087
+ {
3088
+ id: this.props.id,
3089
+ className: y("k-columnmenu-item-wrapper", this.props.className),
3090
+ style: this.props.style
3091
+ },
3092
+ t
3093
+ );
3094
+ }
3095
+ }
3096
+ class he extends l.Component {
3097
+ /**
3098
+ * @hidden
3099
+ */
3100
+ render() {
3101
+ const { title: t, iconClass: s, svgIcon: o, selected: e } = this.props;
3102
+ return /* @__PURE__ */ l.createElement("div", { onClick: this.props.onClick, className: `k-columnmenu-item ${e ? "k-selected" : ""}` }, (s || o) && /* @__PURE__ */ l.createElement(O, { name: s && ms(s), icon: o }), t);
3103
+ }
3104
+ }
3105
+ class es extends l.Component {
3106
+ constructor() {
3107
+ super(...arguments), this.onGroupClick = (t) => {
3108
+ if (t.preventDefault(), this.props.onGroupChange) {
3109
+ const { column: s } = this.props;
3110
+ if (!s.field)
3111
+ return;
3112
+ const o = (this.props.group || []).slice(), e = o.findIndex((i) => i.field === s.field);
3113
+ e > -1 ? o.splice(e, 1) : o.push({
3114
+ field: s.field
3115
+ }), this.props.onGroupChange(o, t);
3116
+ }
3117
+ this.props.onCloseMenu && this.props.onCloseMenu();
3118
+ };
3119
+ }
3120
+ /**
3121
+ * @hidden
3122
+ */
3123
+ render() {
3124
+ const { group: t, column: s } = this.props, o = T(this), e = !!(t && s.field && t.find((n) => n.field === s.field)), i = e ? Ot : Lt;
3125
+ return /* @__PURE__ */ l.createElement(xe, null, /* @__PURE__ */ l.createElement(
3126
+ he,
3127
+ {
3128
+ title: o.toLanguageString(i, v[i]),
3129
+ iconClass: e ? "k-i-ungroup" : "k-i-group",
3130
+ svgIcon: e ? Ls : zs,
3131
+ onClick: this.onGroupClick
3132
+ }
3133
+ ));
3134
+ }
3135
+ }
3136
+ Nt(es);
3137
+ G(es);
3138
+ const ts = "asc", ss = "desc", Fr = {
3139
+ true: {
3140
+ asc: { asc: "", desc: "desc" },
3141
+ desc: { asc: "asc", desc: "" },
3142
+ "": { asc: "asc", desc: "desc" }
3143
+ },
3144
+ false: {
3145
+ asc: { asc: "asc", desc: "desc" },
3146
+ desc: { asc: "asc", desc: "desc" },
3147
+ "": { asc: "asc", desc: "desc" }
3148
+ }
3149
+ }, rs = (r, t) => t ? t.findIndex((s) => s.field === r) : -1, is = (r, t) => !!(t && r > -1 && t[r].dir === ts), os = (r, t) => !!(t && r > -1 && t[r].dir === ss);
3150
+ class je extends l.Component {
3151
+ constructor() {
3152
+ super(...arguments), this.onAscClick = (t) => {
3153
+ this.onSort(t, ts), this.props.onCloseMenu && this.props.onCloseMenu();
3154
+ }, this.onDescClick = (t) => {
3155
+ this.onSort(t, ss), this.props.onCloseMenu && this.props.onCloseMenu();
3156
+ }, this.onSort = (t, s) => {
3157
+ if (t.preventDefault(), !this.props.onSortChange)
3158
+ return;
3159
+ const { column: o, sortable: e, sort: i } = this.props, { allowUnsort: n, mode: a } = Wt(e || !1, !1), h = (i || []).filter((g) => g.field === o.field)[0], c = Fr[n][h && h.dir || ""][s], d = a === "single" ? [] : (this.props.sort || []).filter((g) => g.field !== o.field);
3160
+ c !== "" && o.field && d.push({ field: o.field, dir: c }), this.props.onSortChange(d, t);
3161
+ };
3162
+ }
3163
+ /**
3164
+ * @hidden
3165
+ */
3166
+ render() {
3167
+ const { sort: t, column: s } = this.props, o = rs(s.field, t), e = T(this);
3168
+ return /* @__PURE__ */ l.createElement(xe, null, /* @__PURE__ */ l.createElement(
3169
+ he,
3170
+ {
3171
+ title: e.toLanguageString(Me, v[Me]),
3172
+ iconClass: "k-i-sort-asc-sm",
3173
+ svgIcon: We,
3174
+ selected: is(o, t),
3175
+ onClick: this.onAscClick
3176
+ }
3177
+ ), /* @__PURE__ */ l.createElement(
3178
+ he,
3179
+ {
3180
+ title: e.toLanguageString(Te, v[Te]),
3181
+ iconClass: "k-i-sort-desc-sm",
3182
+ svgIcon: Ve,
3183
+ selected: os(o, t),
3184
+ onClick: this.onDescClick
3185
+ }
3186
+ ));
3187
+ }
3188
+ }
3189
+ je.active = (r, t) => {
3190
+ const s = rs(r, t);
3191
+ return os(s, t) || is(s, t);
3192
+ };
3193
+ Nt(je);
3194
+ G(je);
3195
+ class ls extends l.Component {
3196
+ /**
3197
+ * @hidden
3198
+ */
3199
+ render() {
3200
+ return /* @__PURE__ */ l.createElement(
3201
+ "div",
3202
+ {
3203
+ id: this.props.id,
3204
+ className: y("k-columnmenu-item-content", this.props.className),
3205
+ style: this.props.style
3206
+ },
3207
+ /* @__PURE__ */ l.createElement(As, { style: { position: "relative", display: "block" } }, this.props.show ? this.props.children : null)
3208
+ );
3209
+ }
3210
+ }
3211
+ class It extends l.Component {
3212
+ constructor(t) {
3213
+ super(t), this.renderOperatorEditor = () => {
3214
+ if (this.props.filterType === "boolean")
3215
+ return;
3216
+ const s = this.props.operators.find((o) => o.operator === this.props.operator) || null;
3217
+ return /* @__PURE__ */ l.createElement(
3218
+ le,
3219
+ {
3220
+ value: s,
3221
+ onChange: this.operatorChange,
3222
+ data: this.props.operators,
3223
+ textField: "text"
3224
+ }
3225
+ );
3226
+ }, this.inputChange = this.inputChange.bind(this), this.operatorChange = this.operatorChange.bind(this), this.boolDropdownChange = this.boolDropdownChange.bind(this);
3227
+ }
3228
+ /**
3229
+ * @hidden
3230
+ */
3231
+ render() {
3232
+ return /* @__PURE__ */ l.createElement(l.Fragment, null, this.renderOperatorEditor(), this.filterComponent(this.props.filterType, this.props.value, this.props.booleanValues));
3233
+ }
3234
+ inputChange(t, s) {
3235
+ qt(t, s, this.props);
3236
+ }
3237
+ operatorChange(t) {
3238
+ Xt(t, this.props.value, this.props.onChange);
3239
+ }
3240
+ boolDropdownChange(t) {
3241
+ jt(t, this.props.onChange);
3242
+ }
3243
+ filterComponent(t, s, o) {
3244
+ switch (t) {
3245
+ case "numeric":
3246
+ return /* @__PURE__ */ l.createElement(
3247
+ Ue,
3248
+ {
3249
+ value: s,
3250
+ onChange: (e) => {
3251
+ this.inputChange(e.value, e.syntheticEvent);
3252
+ },
3253
+ rangeOnEnter: !1
3254
+ }
3255
+ );
3256
+ case "date":
3257
+ return /* @__PURE__ */ l.createElement(
3258
+ qe,
3259
+ {
3260
+ value: s,
3261
+ onChange: (e) => {
3262
+ this.inputChange(e.value, e.syntheticEvent);
3263
+ }
3264
+ }
3265
+ );
3266
+ case "boolean": {
3267
+ const e = (i) => i == null;
3268
+ return /* @__PURE__ */ l.createElement(
3269
+ le,
3270
+ {
3271
+ onChange: this.boolDropdownChange,
3272
+ value: o.find((i) => i.operator === (e(s) ? "" : s)),
3273
+ data: o,
3274
+ textField: "text"
3275
+ }
3276
+ );
3277
+ }
3278
+ default:
3279
+ return /* @__PURE__ */ l.createElement(
3280
+ Tt,
3281
+ {
3282
+ value: s || "",
3283
+ onChange: (e) => {
3284
+ this.inputChange(e.target.value, e.syntheticEvent);
3285
+ }
3286
+ }
3287
+ );
3288
+ }
3289
+ }
3290
+ }
3291
+ class Nr extends l.Component {
3292
+ render() {
3293
+ const {
3294
+ firstFilterProps: t,
3295
+ hideSecondFilter: s,
3296
+ secondFilterProps: o,
3297
+ logicData: e,
3298
+ logicValue: i,
3299
+ onLogicChange: n
3300
+ } = this.props;
3301
+ return /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(It, { ...t }), !s && /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(
3302
+ le,
3303
+ {
3304
+ data: e,
3305
+ value: i,
3306
+ onChange: n,
3307
+ className: "k-filter-and",
3308
+ textField: "text"
3309
+ }
3310
+ ), /* @__PURE__ */ l.createElement(It, { ...o })));
3311
+ }
3312
+ }
3313
+ const Be = (r) => r || { filters: [], logic: "and" }, ge = (r, t) => Be(t).filters.filter((e) => ft(e) ? e.filters && e.filters.length && e.filters.length <= 2 && !e.filters.find((i) => ft(i) || i.field !== r) : !1)[0] || null;
3314
+ class ns extends l.Component {
3315
+ constructor(t) {
3316
+ super(t), this.removeGroup = (o, e) => {
3317
+ const i = [...e.filters], n = i.findIndex((a) => a === o);
3318
+ return n > -1 && i.splice(n, 1), {
3319
+ ...e,
3320
+ filters: i
3321
+ };
3322
+ }, this.insertGroup = (o, e) => ({
3323
+ ...e,
3324
+ filters: [
3325
+ o,
3326
+ ...e.filters
3327
+ ]
3328
+ }), this.isControlled = () => this.props.expanded !== void 0, this.onFilterExpand = () => {
3329
+ const o = this.isControlled(), e = !(o ? this.props.expanded : this.state.expanded);
3330
+ this.props.onExpandChange && this.props.onExpandChange(e), o || this.setState({
3331
+ expanded: e
3332
+ });
3333
+ }, this.firstFilterChange = (o) => {
3334
+ this.filterChange(0, o);
3335
+ }, this.secondFilterChange = (o) => {
3336
+ this.filterChange(1, o);
3337
+ }, this.filterChange = (o, e) => {
3338
+ const i = this.state.filterGroup.filters.map((n, a) => a === o ? {
3339
+ ...n,
3340
+ value: e.value,
3341
+ operator: e.operator
3342
+ } : n);
3343
+ this.setState({
3344
+ filterGroup: {
3345
+ ...this.state.filterGroup,
3346
+ filters: i
3347
+ }
3348
+ });
3349
+ }, this.logicChange = (o) => {
3350
+ this.setState({
3351
+ filterGroup: {
3352
+ ...this.state.filterGroup,
3353
+ logic: o.target.value.operator
3354
+ }
3355
+ });
3356
+ }, this.clear = (o) => {
3357
+ if (o.preventDefault(), !this.props.onFilterChange)
3358
+ return;
3359
+ const e = this.props.column.field, i = Be(this.props.filter), n = ge(e, this.props.filter), a = i.filters.filter((h) => h !== n);
3360
+ a.length ? this.props.onFilterChange({ ...i, filters: a }, o) : this.props.onFilterChange(null, o), this.props.onCloseMenu && this.props.onCloseMenu();
3361
+ }, this.currentFilterGroup = () => ({
3362
+ ...this.state.filterGroup,
3363
+ filters: this.state.filterGroup.filters.filter((o) => o.value !== void 0 && o.value !== null && o.value !== "" || o.value === null && o.operator)
3364
+ }), this.submit = (o) => {
3365
+ if (o.preventDefault(), !this.props.onFilterChange)
3366
+ return;
3367
+ const e = this.props.column.field, i = Be(this.props.filter), n = ge(e, this.props.filter), a = this.currentFilterGroup();
3368
+ let h = null;
3369
+ if (n && a.filters.length > 0) {
3370
+ const c = i.filters.map((d) => d === n ? a : d);
3371
+ h = {
3372
+ ...i,
3373
+ filters: c
3374
+ };
3375
+ } else if (a.filters.length === 0) {
3376
+ const c = i.filters.filter((d) => d !== n);
3377
+ c.length && (h = {
3378
+ ...i,
3379
+ filters: c
3380
+ });
3381
+ } else
3382
+ h = {
3383
+ ...i,
3384
+ filters: [...i.filters, a]
3385
+ };
3386
+ this.props.onFilterChange(h, o), this.props.onCloseMenu && this.props.onCloseMenu();
3387
+ };
3388
+ let s;
3389
+ if (t.column && t.column.field) {
3390
+ const o = Ae(t.column.filter), e = $t(t.filterOperators, o);
3391
+ s = ge(t.column.field, t.filter), s = s ? {
3392
+ ...s,
3393
+ filters: s.filters.map((i) => ({ ...i }))
3394
+ } : {
3395
+ logic: "and",
3396
+ filters: [
3397
+ { field: t.column.field, operator: e, value: L(e) ? null : void 0 },
3398
+ { field: t.column.field, operator: e, value: L(e) ? null : void 0 }
3399
+ ]
3400
+ }, s.filters.filter((i) => i.field === t.column.field).length === 1 && s.filters.splice(1, 0, { field: t.column.field, operator: e });
3401
+ }
3402
+ this.state = {
3403
+ expanded: t.expanded || !1,
3404
+ filterGroup: s
3405
+ };
3406
+ }
3407
+ /**
3408
+ * @hidden
3409
+ */
3410
+ render() {
3411
+ const { column: t, filterUI: s, hideSecondFilter: o, filterOperators: e } = this.props;
3412
+ if (!t || !t.field)
3413
+ return /* @__PURE__ */ l.createElement("div", null);
3414
+ const i = Ae(t.filter), n = o !== void 0 ? o : pr[i], a = T(this), h = this.state.filterGroup.filters, c = ie(e[i], a), d = ie(Ut, a), g = {
3415
+ field: t.field,
3416
+ value: h[0].value,
3417
+ operator: h[0].operator,
3418
+ operators: c,
3419
+ booleanValues: d,
3420
+ onChange: this.firstFilterChange,
3421
+ filterType: i
3422
+ }, m = {
3423
+ field: t.field,
3424
+ value: h[1].value,
3425
+ operator: h[1].operator,
3426
+ operators: c,
3427
+ booleanValues: d,
3428
+ onChange: this.secondFilterChange,
3429
+ filterType: i
3430
+ }, u = this.state.filterGroup.logic, b = ie(cr, a), E = {
3431
+ value: b.find((D) => D.operator === (u === null ? "" : u)),
3432
+ onChange: this.logicChange,
3433
+ data: b
3434
+ }, C = s, x = {
3435
+ firstFilterProps: g,
3436
+ secondFilterProps: m,
3437
+ logicData: E.data,
3438
+ logicValue: E.value,
3439
+ onLogicChange: E.onChange,
3440
+ hideSecondFilter: n
3441
+ }, I = this.currentFilterGroup().filters.length !== 0 || L(h[0].operator) || L(h[1].operator), k = this.isControlled() ? this.props.expanded : this.state.expanded, _ = this.props.alwaysExpand;
3442
+ return /* @__PURE__ */ l.createElement(xe, null, !_ && /* @__PURE__ */ l.createElement(
3443
+ he,
3444
+ {
3445
+ title: a.toLanguageString(ae, v[ae]),
3446
+ iconClass: "k-i-filter",
3447
+ svgIcon: Ke,
3448
+ onClick: this.onFilterExpand
3449
+ }
3450
+ ), /* @__PURE__ */ l.createElement(ls, { show: _ || !!k }, /* @__PURE__ */ l.createElement("div", { className: "kendo-grid-filter-menu-container" }, /* @__PURE__ */ l.createElement(
3451
+ "form",
3452
+ {
3453
+ className: "k-filter-menu k-group k-reset k-state-border-up",
3454
+ onSubmit: this.submit,
3455
+ onReset: this.clear,
3456
+ onKeyDown: (D) => D.stopPropagation()
3457
+ },
3458
+ /* @__PURE__ */ l.createElement("div", { className: "k-filter-menu-container" }, C ? /* @__PURE__ */ l.createElement(C, { ...x }) : /* @__PURE__ */ l.createElement(Nr, { ...x }), /* @__PURE__ */ l.createElement("div", { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ l.createElement(
3459
+ W,
3460
+ {
3461
+ themeColor: "primary",
3462
+ disabled: !I
3463
+ },
3464
+ a.toLanguageString(ne, v[ne])
3465
+ ), /* @__PURE__ */ l.createElement(
3466
+ W,
3467
+ {
3468
+ type: "reset"
3469
+ },
3470
+ a.toLanguageString(U, v[U])
3471
+ )))
3472
+ ))));
3473
+ }
3474
+ }
3475
+ ns.active = (r, t) => !!ge(r, t);
3476
+ G(ns);
3477
+ const Dr = (r, t) => r.length !== t.length ? !1 : r.every((s, o) => s === t[o]);
3478
+ class as extends l.Component {
3479
+ constructor(t) {
3480
+ super(t), this.defaultFilter = () => this.props.filter ? Cs(this.props.filter) : { filters: [], logic: "and" }, this.isControlled = () => this.props.expanded !== void 0, this.parseData = (s, o) => {
3481
+ let e = this.props.column.field || "", i = s.map((n) => M(e, n));
3482
+ return o ? i.filter((n, a) => i.indexOf(n) === a) : i;
3483
+ }, this.getFilterIndex = () => {
3484
+ let s = this.props.column.field;
3485
+ return this.defaultFilter().filters.findIndex((i) => i.filters && i.filters.length > 0 && i.filters[0].field === s);
3486
+ }, this.onFilterExpand = () => {
3487
+ const s = this.isControlled(), o = !(s ? this.props.expanded : this.state.expanded);
3488
+ this.props.onExpandChange && this.props.onExpandChange(o), s || this.setState({
3489
+ expanded: o
3490
+ });
3491
+ }, this.handleSearchChange = (s) => {
3492
+ let o = this.props.searchBoxFilterOperator ? this.props.searchBoxFilterOperator : "startswith", e = {
3493
+ logic: "and",
3494
+ filters: [
3495
+ { field: this.props.column.field, operator: o, value: s.target.value, ignoreCase: !0 }
3496
+ ]
3497
+ };
3498
+ this.setState({
3499
+ value: s.target.value,
3500
+ data: this.parseData(mt(this.props.data || [], e), this.props.uniqueData)
3501
+ });
3502
+ }, this.handleClear = () => {
3503
+ let s = this.props.searchBoxFilterOperator ? this.props.searchBoxFilterOperator : "startswith", o = {
3504
+ logic: "and",
3505
+ filters: [
3506
+ { field: this.props.column.field, operator: s, value: "", ignoreCase: !0 }
3507
+ ]
3508
+ };
3509
+ this.setState({
3510
+ value: "",
3511
+ data: this.parseData(mt(this.props.data || [], o), this.props.uniqueData)
3512
+ });
3513
+ }, this.clear = (s) => {
3514
+ if (s.preventDefault(), !this.props.onFilterChange)
3515
+ return;
3516
+ let o = this.state.currentFilter || null;
3517
+ o !== null && o.filters.length > 0 ? (this.compositeFilterIndex >= 0 && o.filters.splice(this.compositeFilterIndex, 1), this.props.onFilterChange(o, s)) : this.props.onFilterChange(null, s), this.props.onCloseMenu && this.props.onCloseMenu();
3518
+ }, this.submit = (s) => {
3519
+ if (s.preventDefault(), !this.props.onFilterChange)
3520
+ return;
3521
+ let o = this.state.currentFilter || null;
3522
+ this.props.onFilterChange(o, s), this.props.onCloseMenu && this.props.onCloseMenu();
3523
+ }, this.handleCheckBoxChange = (s, o) => {
3524
+ const e = this.props.column.field || "";
3525
+ let i = { ...this.state.currentFilter }, n = [...this.state.currentFilter.filters], a = [];
3526
+ if (this.compositeFilterIndex !== -1 && i.filters[this.compositeFilterIndex].filters && o !== "all" && (a = i.filters[this.compositeFilterIndex].filters), s.value && o === "all")
3527
+ this.state.data.forEach((h) => {
3528
+ a.push({ field: e, operator: "eq", value: h });
3529
+ });
3530
+ else if (s.value)
3531
+ a.push({ field: e, operator: "eq", value: o });
3532
+ else if (this.state.currentFilter) {
3533
+ let h = a.findIndex((c) => c.value === o);
3534
+ a.splice(h, 1);
3535
+ }
3536
+ i.logic = "and", this.compositeFilterIndex !== -1 ? n[this.compositeFilterIndex] = {
3537
+ logic: "or",
3538
+ filters: a
3539
+ } : n.push({
3540
+ logic: "or",
3541
+ filters: a
3542
+ }), (!s.value && o === "all" || a.length === 0) && n.splice(this.compositeFilterIndex, 1), i.filters = n, this.setState({ currentFilter: i });
3543
+ }, this.isAllSelected = () => {
3544
+ let s = !1;
3545
+ if (this.state.currentFilter) {
3546
+ let o = [...this.state.currentFilter.filters];
3547
+ return this.compositeFilterIndex === -1 ? !1 : (s = this.state.data.every((e) => this.compositeFilterIndex !== -1 && o[this.compositeFilterIndex].filters ? o[this.compositeFilterIndex].filters.findIndex((n) => n.value === e) >= 0 : !1), s);
3548
+ }
3549
+ return s;
3550
+ }, this.compositeFilterIndex = this.getFilterIndex(), this.state = {
3551
+ expanded: t.expanded || !1,
3552
+ value: "",
3553
+ data: this.parseData(this.props.data, this.props.uniqueData) || [],
3554
+ dataFromProps: this.parseData(this.props.data, !1) || [],
3555
+ currentFilter: this.defaultFilter()
3556
+ };
3557
+ }
3558
+ /**
3559
+ * @hidden
3560
+ */
3561
+ componentDidUpdate() {
3562
+ let t = this.props.column.field || "", s = this.props.data.map((o) => M(t, o));
3563
+ Dr(s, this.state.dataFromProps) || this.setState({
3564
+ data: s,
3565
+ dataFromProps: s
3566
+ });
3567
+ }
3568
+ /**
3569
+ * @hidden
3570
+ */
3571
+ render() {
3572
+ const { column: t } = this.props;
3573
+ if (!t || !t.field)
3574
+ return /* @__PURE__ */ l.createElement("div", null);
3575
+ const s = T(this), o = this.isControlled() ? this.props.expanded : this.state.expanded;
3576
+ let e = [];
3577
+ if (this.state.currentFilter) {
3578
+ const a = [...this.state.currentFilter.filters];
3579
+ this.compositeFilterIndex = a.findIndex((h) => h.filters && h.filters.length > 0 ? h.filters[0].field === t.field : !1), this.compositeFilterIndex !== -1 && a[this.compositeFilterIndex].filters.length > 0 && a[this.compositeFilterIndex].filters.forEach((h) => {
3580
+ h.field === this.props.column.field && e.push(h.value);
3581
+ });
3582
+ }
3583
+ const i = this.props.searchBox ? /* @__PURE__ */ l.createElement(this.props.searchBox, { value: this.state.value, onChange: this.handleSearchChange }) : /* @__PURE__ */ l.createElement("div", { className: "k-searchbox k-textbox k-input k-input-md k-input-solid" }, /* @__PURE__ */ l.createElement(O, { className: "k-input-icon", name: "search", icon: Dt }), /* @__PURE__ */ l.createElement(
3584
+ Tt,
3585
+ {
3586
+ className: "k-input-inner",
3587
+ type: "text",
3588
+ placeholder: s.toLanguageString(Ge, v[Ge]),
3589
+ value: this.state.value,
3590
+ onChange: (a) => this.handleSearchChange(a.nativeEvent)
3591
+ }
3592
+ ), /* @__PURE__ */ l.createElement(
3593
+ W,
3594
+ {
3595
+ type: "button",
3596
+ rounded: null,
3597
+ className: "k-input-button",
3598
+ onClick: this.handleClear,
3599
+ icon: "x",
3600
+ svgIcon: Os
3601
+ }
3602
+ )), n = e.filter((a, h) => e.indexOf(a) === h);
3603
+ return /* @__PURE__ */ l.createElement(xe, null, /* @__PURE__ */ l.createElement(
3604
+ he,
3605
+ {
3606
+ title: s.toLanguageString(ae, v[ae]),
3607
+ iconClass: "k-i-filter",
3608
+ svgIcon: Ke,
3609
+ onClick: this.onFilterExpand
3610
+ }
3611
+ ), /* @__PURE__ */ l.createElement(ls, { show: !!o }, /* @__PURE__ */ l.createElement("div", { className: "kendo-grid-filter-menu-container" }, /* @__PURE__ */ l.createElement(
3612
+ "form",
3613
+ {
3614
+ className: "k-filter-menu k-group k-reset k-state-border-up",
3615
+ onSubmit: this.submit,
3616
+ onReset: this.clear
3617
+ },
3618
+ /* @__PURE__ */ l.createElement("div", { className: "k-filter-menu-container" }, i, /* @__PURE__ */ l.createElement("ul", { className: "k-reset k-multicheck-wrap" }, /* @__PURE__ */ l.createElement("li", { className: "k-item k-check-all-wrap" }, /* @__PURE__ */ l.createElement(
3619
+ fe,
3620
+ {
3621
+ label: s.toLanguageString(He, v[He]),
3622
+ onChange: (a) => this.handleCheckBoxChange(a, "all"),
3623
+ checked: this.isAllSelected()
3624
+ }
3625
+ )), this.state.data.map((a, h) => /* @__PURE__ */ l.createElement("li", { className: "k-item", key: h }, /* @__PURE__ */ l.createElement(
3626
+ fe,
3627
+ {
3628
+ label: String(a),
3629
+ onChange: (c) => this.handleCheckBoxChange(c, a),
3630
+ checked: n.includes(a)
3631
+ }
3632
+ )))), /* @__PURE__ */ l.createElement("div", { className: "k-filter-selected-items" }, n.length + " " + s.toLanguageString(Le, v[Le])), /* @__PURE__ */ l.createElement("div", { className: "k-actions k-hstack k-justify-content-stretch" }, /* @__PURE__ */ l.createElement(
3633
+ W,
3634
+ {
3635
+ themeColor: "primary",
3636
+ type: "submit"
3637
+ },
3638
+ s.toLanguageString(ne, v[ne])
3639
+ ), /* @__PURE__ */ l.createElement(
3640
+ W,
3641
+ {
3642
+ className: "k-button",
3643
+ type: "reset"
3644
+ },
3645
+ s.toLanguageString(U, v[U])
3646
+ )))
3647
+ ))));
3648
+ }
3649
+ }
3650
+ as.defaultProps = {
3651
+ uniqueData: !0
3652
+ };
3653
+ G(as);
3654
+ const Mr = (r) => {
3655
+ const [t, s] = l.useState(""), o = l.useMemo(() => new Set(r.columnsState.map((u) => u.id)), [r.columnsState]), e = l.useMemo(() => r.columns.filter((u) => {
3656
+ var b;
3657
+ return (b = u.title || u.field) == null ? void 0 : b.toLowerCase().includes(t.toLowerCase());
3658
+ }), [r.columns, t]), [i, n] = l.useState(r.columns.map((u) => o.has(u.id))), a = l.useCallback(() => {
3659
+ const u = r.columns.filter((b, E) => i[E]);
3660
+ r.onColumnsChange.call(void 0, u), r.onCloseMenu.call(void 0);
3661
+ }, [i, r.columns, r.onColumnsChange, r.onCloseMenu]), h = l.useCallback(() => {
3662
+ n(r.columns.map((u) => o.has(u.id)));
3663
+ }, [o, r.columns]), c = i.filter((u) => u).length, d = c === i.length, g = l.useCallback(() => {
3664
+ n(r.columns.map((u, b) => d && b === 0 ? !0 : !d));
3665
+ }, [r.columns, d]), m = l.useCallback((u, b) => {
3666
+ const E = i.slice();
3667
+ E[b] = u, n(E);
3668
+ }, [i]);
3669
+ return /* @__PURE__ */ l.createElement("form", { className: "k-filter-menu k-group k-reset" }, /* @__PURE__ */ l.createElement("div", { className: "k-filter-menu-container" }, /* @__PURE__ */ l.createElement(
3670
+ Mt,
3671
+ {
3672
+ className: "k-searchbox",
3673
+ value: t,
3674
+ onChange: (u) => s(String(u.target.value)),
3675
+ prefix: () => /* @__PURE__ */ l.createElement(_s, null, /* @__PURE__ */ l.createElement(O, { name: "search", icon: Dt }))
3676
+ }
3677
+ ), /* @__PURE__ */ l.createElement("ul", { className: "k-reset k-multicheck-wrap" }, !t && /* @__PURE__ */ l.createElement("li", { className: "k-item k-check-all-wrap" }, /* @__PURE__ */ l.createElement(
3678
+ fe,
3679
+ {
3680
+ checked: d,
3681
+ onChange: g,
3682
+ label: "(Select all)"
3683
+ }
3684
+ )), e.map((u, b) => /* @__PURE__ */ l.createElement("li", { key: u.id, className: "k-item" }, /* @__PURE__ */ l.createElement(
3685
+ fe,
3686
+ {
3687
+ disabled: i[b] && c === 1,
3688
+ checked: i[b],
3689
+ onChange: (E) => {
3690
+ var C;
3691
+ return m(!!((C = E.target.element) != null && C.checked), b);
3692
+ },
3693
+ label: u.title || u.field
3694
+ }
3695
+ )))), /* @__PURE__ */ l.createElement("div", { className: "k-filter-selected-items" }, c, " selected items"), /* @__PURE__ */ l.createElement("div", { className: "k-actions k-actions-start k-actions-horizontal" }, /* @__PURE__ */ l.createElement(W, { type: "button", themeColor: "primary", onClick: a }, "Apply"), /* @__PURE__ */ l.createElement(W, { type: "button", onClick: h }, "Reset"))));
3696
+ };
3697
+ Mr.displayName = "GridColumnMenuColumnsList";
3698
+ class qr extends l.Component {
3699
+ /**
3700
+ * @hidden
3701
+ */
3702
+ render() {
3703
+ return null;
3704
+ }
3705
+ }
3706
+ class Tr extends l.Component {
3707
+ /**
3708
+ * @hidden
3709
+ */
3710
+ render() {
3711
+ return /* @__PURE__ */ l.createElement(
3712
+ "div",
3713
+ {
3714
+ className: y(
3715
+ "k-toolbar k-grid-toolbar",
3716
+ {
3717
+ "k-toolbar-md": !this.props.size,
3718
+ [`k-toolbar-${K.sizeMap[this.props.size] || this.props.size}`]: this.props.size
3719
+ },
3720
+ this.props.className
3721
+ ),
3722
+ "aria-label": this.props.ariaLabel,
3723
+ "aria-controls": this.props.ariaControls,
3724
+ role: "toolbar"
3725
+ },
3726
+ this.props.children
3727
+ );
3728
+ }
3729
+ }
3730
+ Tr.displayName = "KendoReactGridToolbar";
3731
+ const Gr = (r) => {
3732
+ const { data: t = [] } = r;
3733
+ return /* @__PURE__ */ l.createElement("div", { className: "k-selection-aggregates k-grid-selection-aggregates" }, t.map((s, o) => /* @__PURE__ */ l.createElement("div", { key: o }, /* @__PURE__ */ l.createElement("span", { className: "k-selection-aggregates-item-text" }, s.type, ": "), /* @__PURE__ */ l.createElement("span", { className: "k-selection-aggregates-item-value" }, s.formattedValue))));
3734
+ };
3735
+ Gr.displayName = "KendoReactGridStatusBar";
3736
+ const Hr = (r) => {
3737
+ var s;
3738
+ const t = r.slice();
3739
+ for (let o = 0; o < t.length; o++)
3740
+ for (; t[o] && ((s = t[o].children) != null && s.length); )
3741
+ t.splice(o, 1, ...t[o].children);
3742
+ return t;
3743
+ }, $r = (r) => {
3744
+ const { dataItems: t, target: s, selectedField: o } = r, i = Hr(s.columns).map((C) => C.field).filter((C) => C && typeof C == "string").map((C) => ye(C)), n = ye(o), a = { dates: [], numbers: [], booleans: [], others: [] }, h = (C) => {
3745
+ typeof C == "number" ? a.numbers.push(C) : typeof C == "boolean" ? a.booleans.push(C) : C instanceof Date ? a.dates.push(C) : a.others.push(C);
3746
+ };
3747
+ t.forEach((C) => {
3748
+ const x = n(C);
3749
+ x && x.forEach((I) => {
3750
+ h(i[I](C));
3751
+ });
3752
+ });
3753
+ const c = a.dates.map((C) => C.getTime()), d = a.booleans.filter((C) => C).length, g = a.booleans.filter((C) => !C).length, m = a.numbers.length ? a.numbers.reduce((C, x) => C += x, 0) : void 0, u = {
3754
+ sum: m,
3755
+ average: typeof m == "number" ? m / a.numbers.length : void 0,
3756
+ min: a.numbers.length ? Math.min(...a.numbers) : void 0,
3757
+ max: a.numbers.length ? Math.max(...a.numbers) : void 0,
3758
+ count: a.numbers.length + a.booleans.length + a.dates.length + a.others.length,
3759
+ isTrue: d > 0 ? d : void 0,
3760
+ isFalse: g > 0 ? g : void 0,
3761
+ earliest: a.dates.length ? new Date(Math.min(...c)) : void 0,
3762
+ latest: a.dates.length ? new Date(Math.max(...c)) : void 0
3763
+ }, b = (C, x) => (x === "sum" || x === "average") && typeof C == "number" ? C.toFixed(2) : (x === "earliest" || x === "latest") && C instanceof Date ? C.toLocaleDateString() : String(C), E = [];
3764
+ return Object.keys(u).forEach((C) => {
3765
+ const x = C, I = u[x];
3766
+ I !== void 0 && E.push({ type: x, value: I, formattedValue: b(I, x) });
3767
+ }), E;
3768
+ };
3769
+ export {
3770
+ re as GRID_COL_INDEX_ATTRIBUTE,
3771
+ rr as GRID_ROW_INDEX_ATTRIBUTE,
3772
+ be as Grid,
3773
+ kr as GridCell,
3774
+ ce as GridColumn,
3775
+ as as GridColumnMenuCheckboxFilter,
3776
+ Mr as GridColumnMenuColumnsList,
3777
+ ns as GridColumnMenuFilter,
3778
+ It as GridColumnMenuFilterCell,
3779
+ Nr as GridColumnMenuFilterUI,
3780
+ es as GridColumnMenuGroup,
3781
+ he as GridColumnMenuItem,
3782
+ ls as GridColumnMenuItemContent,
3783
+ xe as GridColumnMenuItemGroup,
3784
+ je as GridColumnMenuSort,
3785
+ Vt as GridColumnMenuWrapper,
3786
+ xr as GridCommonDragLogic,
3787
+ qr as GridDetailRow,
3788
+ ir as GridEditCell,
3789
+ Yt as GridFilterCell,
3790
+ vt as GridGroupCell,
3791
+ nr as GridHeaderCell,
3792
+ sr as GridHierarchyCell,
3793
+ $e as GridNoRecords,
3794
+ vr as GridRow,
3795
+ Ks as GridSelectionCell,
3796
+ Tr as GridToolbar,
3797
+ Gr as StatusBar,
3798
+ Ut as booleanFilterValues,
3799
+ ge as filterGroupByField,
3800
+ Yr as getSelectedState,
3801
+ Jr as getSelectedStateFromKeyDown,
3802
+ $r as getStatusData,
3803
+ v as gridMessages,
3804
+ Hr as leafColumns,
3805
+ bt as operators,
3806
+ qs as pagerFirstPage,
3807
+ Us as pagerInfo,
3808
+ Ys as pagerItemPerPage,
3809
+ Xs as pagerLastPage,
3810
+ js as pagerNextPage,
3811
+ $s as pagerPreviousPage,
3812
+ Be as rootFilterOrDefault,
3813
+ Qr as setSelectedState
3814
+ };