@lemon-fe/kits 1.0.0-21 → 1.0.0-211

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 (351) hide show
  1. package/README.md +5 -0
  2. package/es/components/Actions/index.d.ts +8 -5
  3. package/es/components/Actions/index.js +44 -28
  4. package/es/components/Actions/index.less +5 -4
  5. package/es/components/Alert/index.d.ts +3 -0
  6. package/es/components/Alert/index.js +23 -0
  7. package/es/components/BaseTable/Actions.js +2 -2
  8. package/es/components/BaseTable/VirtualBody.js +2 -2
  9. package/es/components/BaseTable/index.js +2 -2
  10. package/es/components/BaseTable/utils.d.ts +1 -1
  11. package/es/components/DataGrid/cell-editors/Date.d.ts +15 -5
  12. package/es/components/DataGrid/cell-editors/Date.js +52 -14
  13. package/es/components/DataGrid/cell-editors/Number.d.ts +14 -6
  14. package/es/components/DataGrid/cell-editors/Number.js +94 -34
  15. package/es/components/DataGrid/cell-editors/Row.d.ts +23 -0
  16. package/es/components/DataGrid/cell-editors/Row.js +146 -0
  17. package/es/components/DataGrid/cell-editors/Select.d.ts +29 -3
  18. package/es/components/DataGrid/cell-editors/Select.js +82 -18
  19. package/es/components/DataGrid/cell-editors/Text.d.ts +7 -5
  20. package/es/components/DataGrid/cell-editors/Text.js +55 -9
  21. package/es/components/DataGrid/cell-editors/Wrapper.d.ts +2 -1
  22. package/es/components/DataGrid/cell-editors/Wrapper.js +4 -2
  23. package/es/components/DataGrid/cell-editors/utils.d.ts +9 -0
  24. package/es/components/DataGrid/cell-editors/utils.js +56 -1
  25. package/es/components/DataGrid/components/CustomColumnPanel/DragContext.d.ts +4 -0
  26. package/es/components/DataGrid/components/CustomColumnPanel/DragContext.js +3 -0
  27. package/es/components/DataGrid/components/CustomColumnPanel/FieldModal.d.ts +10 -0
  28. package/es/components/DataGrid/components/CustomColumnPanel/FieldModal.js +256 -0
  29. package/es/components/DataGrid/components/CustomColumnPanel/Item.d.ts +14 -0
  30. package/es/components/DataGrid/components/CustomColumnPanel/Item.js +200 -0
  31. package/es/components/DataGrid/components/CustomColumnPanel/index.d.ts +5 -0
  32. package/es/components/DataGrid/components/CustomColumnPanel/index.js +366 -0
  33. package/es/components/DataGrid/components/CustomColumnPanel/typings.d.ts +25 -0
  34. package/es/components/DataGrid/components/Search.d.ts +4 -0
  35. package/es/components/DataGrid/components/Search.js +186 -0
  36. package/es/components/DataGrid/components/Selected.d.ts +7 -0
  37. package/es/components/DataGrid/components/Selected.js +32 -0
  38. package/es/components/DataGrid/context/GridStore.d.ts +4 -0
  39. package/es/components/DataGrid/context/GridStore.js +4 -0
  40. package/es/components/DataGrid/hooks.d.ts +18 -0
  41. package/es/components/DataGrid/hooks.js +46 -3
  42. package/es/components/DataGrid/index.d.ts +62 -25
  43. package/es/components/DataGrid/index.js +1299 -504
  44. package/es/components/DataGrid/index.less +382 -41
  45. package/es/components/DataGrid/modules/clipboard/clipboard/clipboardService.d.ts +60 -60
  46. package/es/components/DataGrid/modules/clipboard/clipboard/clipboardService.js +359 -69
  47. package/es/components/DataGrid/modules/clipboard/clipboardModule.d.ts +2 -7
  48. package/es/components/DataGrid/modules/clipboard/clipboardModule.js +4 -2
  49. package/es/components/DataGrid/modules/clipboard/main.d.ts +1 -0
  50. package/es/components/DataGrid/modules/clipboard/version.d.ts +1 -0
  51. package/es/components/DataGrid/modules/clipboard/version.js +2 -0
  52. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnModelItem.d.ts +24 -30
  53. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnModelItem.js +1 -1
  54. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnToolPanel.d.ts +30 -49
  55. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnToolPanel.js +7 -7
  56. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/modelItemUtils.d.ts +14 -18
  57. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/modelItemUtils.js +7 -7
  58. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/pivotModePanel.d.ts +7 -7
  59. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/pivotModePanel.js +8 -8
  60. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.d.ts +28 -28
  61. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.js +17 -17
  62. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.d.ts +42 -47
  63. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.js +8 -8
  64. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.d.ts +24 -24
  65. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.js +6 -6
  66. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.d.ts +23 -31
  67. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.js +9 -16
  68. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.d.ts +35 -41
  69. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.js +18 -18
  70. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.d.ts +49 -60
  71. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.js +21 -20
  72. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.d.ts +22 -22
  73. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.js +16 -16
  74. package/es/components/DataGrid/modules/column-tool-panel/columnsToolPanelModule.d.ts +2 -24
  75. package/es/components/DataGrid/modules/column-tool-panel/columnsToolPanelModule.js +8 -3
  76. package/es/components/DataGrid/modules/column-tool-panel/main.d.ts +2 -0
  77. package/es/components/DataGrid/modules/column-tool-panel/version.d.ts +1 -0
  78. package/es/components/DataGrid/modules/column-tool-panel/version.js +2 -0
  79. package/es/components/DataGrid/modules/master-detail/main.d.ts +1 -0
  80. package/es/components/DataGrid/modules/master-detail/main.js +1 -0
  81. package/es/components/DataGrid/modules/master-detail/masterDetail/detailCellRenderer.d.ts +14 -0
  82. package/es/components/DataGrid/modules/master-detail/masterDetail/detailCellRenderer.js +170 -0
  83. package/es/components/DataGrid/modules/master-detail/masterDetail/detailCellRendererCtrl.d.ts +19 -0
  84. package/es/components/DataGrid/modules/master-detail/masterDetail/detailCellRendererCtrl.js +245 -0
  85. package/es/components/DataGrid/modules/master-detail/masterDetailModule.d.ts +2 -0
  86. package/es/components/DataGrid/modules/master-detail/masterDetailModule.js +18 -0
  87. package/es/components/DataGrid/modules/master-detail/version.d.ts +1 -0
  88. package/es/components/DataGrid/modules/master-detail/version.js +2 -0
  89. package/es/components/DataGrid/modules/menu/menu/chartMenuItemMapper.d.ts +13 -0
  90. package/es/components/DataGrid/modules/menu/menu/chartMenuItemMapper.js +417 -0
  91. package/es/components/DataGrid/modules/menu/menu/contextMenu.d.ts +11 -24
  92. package/es/components/DataGrid/modules/menu/menu/contextMenu.js +32 -25
  93. package/es/components/DataGrid/modules/menu/menu/enterpriseMenu.d.ts +60 -79
  94. package/es/components/DataGrid/modules/menu/menu/enterpriseMenu.js +182 -129
  95. package/es/components/DataGrid/modules/menu/menu/menuItemMapper.d.ts +10 -12
  96. package/es/components/DataGrid/modules/menu/menu/menuItemMapper.js +81 -249
  97. package/es/components/DataGrid/modules/menu/menuModule.d.ts +2 -8
  98. package/es/components/DataGrid/modules/menu/menuModule.js +6 -2
  99. package/es/components/DataGrid/modules/menu/version.d.ts +1 -0
  100. package/es/components/DataGrid/modules/menu/version.js +2 -0
  101. package/es/components/DataGrid/modules/row-grouping/main.d.ts +4 -0
  102. package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggFuncService.js +1 -1
  103. package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggregationStage.d.ts +3 -1
  104. package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggregationStage.js +30 -12
  105. package/es/components/DataGrid/modules/row-grouping/rowGrouping/batchRemover.d.ts +2 -0
  106. package/es/components/DataGrid/modules/row-grouping/rowGrouping/batchRemover.js +12 -0
  107. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.d.ts +2 -2
  108. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.js +12 -10
  109. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.js +20 -21
  110. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.js +5 -5
  111. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.js +7 -7
  112. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.js +6 -6
  113. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.js +6 -6
  114. package/es/components/DataGrid/modules/row-grouping/rowGrouping/filterAggregatesStage.js +2 -2
  115. package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupFilter/groupFilter.d.ts +39 -0
  116. package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupFilter/groupFilter.js +395 -0
  117. package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupFilter/groupFloatingFilter.d.ts +23 -0
  118. package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupFilter/groupFloatingFilter.js +207 -0
  119. package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupStage.d.ts +2 -1
  120. package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupStage.js +66 -20
  121. package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotColDefService.js +8 -8
  122. package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotStage.js +19 -15
  123. package/es/components/DataGrid/modules/row-grouping/rowGroupingModule.d.ts +2 -16
  124. package/es/components/DataGrid/modules/row-grouping/rowGroupingModule.js +14 -2
  125. package/es/components/DataGrid/modules/row-grouping/version.d.ts +1 -0
  126. package/es/components/DataGrid/modules/row-grouping/version.js +2 -0
  127. package/es/components/DataGrid/modules/side-bar/main.d.ts +2 -0
  128. package/es/components/DataGrid/modules/side-bar/sideBar/common/toolPanelColDefService.d.ts +9 -9
  129. package/es/components/DataGrid/modules/side-bar/sideBar/common/toolPanelColDefService.js +3 -8
  130. package/es/components/DataGrid/modules/side-bar/sideBar/horizontalResizeComp.d.ts +17 -17
  131. package/es/components/DataGrid/modules/side-bar/sideBar/horizontalResizeComp.js +5 -5
  132. package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonComp.d.ts +14 -14
  133. package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonComp.js +8 -8
  134. package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonsComp.d.ts +14 -14
  135. package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonsComp.js +6 -6
  136. package/es/components/DataGrid/modules/side-bar/sideBar/sideBarComp.d.ts +26 -27
  137. package/es/components/DataGrid/modules/side-bar/sideBar/sideBarComp.js +82 -45
  138. package/es/components/DataGrid/modules/side-bar/sideBar/sideBarDefParser.d.ts +10 -0
  139. package/es/components/DataGrid/modules/side-bar/sideBar/sideBarDefParser.js +111 -0
  140. package/es/components/DataGrid/modules/side-bar/sideBar/toolPanelWrapper.d.ts +15 -15
  141. package/es/components/DataGrid/modules/side-bar/sideBar/toolPanelWrapper.js +5 -5
  142. package/es/components/DataGrid/modules/side-bar/sideBarModule.d.ts +2 -19
  143. package/es/components/DataGrid/modules/side-bar/sideBarModule.js +5 -2
  144. package/es/components/DataGrid/modules/side-bar/version.d.ts +1 -0
  145. package/es/components/DataGrid/modules/side-bar/version.js +2 -0
  146. package/es/components/DataGrid/{Actions.d.ts → renderer/Actions.d.ts} +1 -1
  147. package/es/components/DataGrid/{Actions.js → renderer/Actions.js} +4 -4
  148. package/es/components/DataGrid/renderer/CellDeleteRenderer.d.ts +5 -0
  149. package/es/components/DataGrid/renderer/CellDeleteRenderer.js +64 -0
  150. package/es/components/DataGrid/renderer/CellIndexRenderer.d.ts +4 -0
  151. package/es/components/DataGrid/renderer/CellIndexRenderer.js +59 -0
  152. package/es/components/DataGrid/{CellRenderer.d.ts → renderer/CellRenderer.d.ts} +2 -2
  153. package/es/components/DataGrid/{CellRenderer.js → renderer/CellRenderer.js} +18 -8
  154. package/es/components/DataGrid/renderer/DetailCellRenderer.d.ts +9 -0
  155. package/es/components/DataGrid/renderer/DetailCellRenderer.js +71 -0
  156. package/es/components/DataGrid/{HeaderRenderer.d.ts → renderer/HeaderRenderer.d.ts} +3 -3
  157. package/es/components/DataGrid/{HeaderRenderer.js → renderer/HeaderRenderer.js} +35 -15
  158. package/es/components/DataGrid/typings.d.ts +109 -32
  159. package/es/components/DataGrid/utils.d.ts +13 -6
  160. package/es/components/DataGrid/utils.js +116 -28
  161. package/es/components/Dropdown/index.d.ts +7 -8
  162. package/es/components/Dropdown/index.js +40 -47
  163. package/es/components/Dropdown/index.less +2 -10
  164. package/es/components/DurationPicker/index.d.ts +12 -9
  165. package/es/components/DurationPicker/index.js +87 -57
  166. package/es/components/DurationPicker/index.less +3 -52
  167. package/es/components/EditableTable/EditableCell.d.ts +1 -1
  168. package/es/components/EditableTable/EditableTableFormItem.d.ts +1 -1
  169. package/es/components/EditableTable/Table.d.ts +1 -1
  170. package/es/components/EditableTable/Table.js +7 -7
  171. package/es/components/EditableTable/typings.d.ts +1 -1
  172. package/es/components/Filter/index.js +157 -98
  173. package/es/components/Filter/index.less +1 -5
  174. package/es/components/Filter/typings.d.ts +36 -2
  175. package/es/components/FormLayout/index.d.ts +5 -1
  176. package/es/components/FormLayout/index.js +5 -4
  177. package/es/components/FormLayout/index.less +18 -8
  178. package/es/components/GreyPanel/index.d.ts +6 -0
  179. package/es/components/GreyPanel/index.js +20 -0
  180. package/es/components/GreyPanel/index.less +11 -0
  181. package/es/components/Icons/Add.d.ts +6 -0
  182. package/es/components/Icons/Add.js +42 -0
  183. package/es/components/Icons/BigTip/index.d.ts +1 -1
  184. package/es/components/Icons/Calendar.d.ts +1 -1
  185. package/es/components/Icons/Calendar.js +12 -17
  186. package/es/components/Icons/Clear.d.ts +3 -0
  187. package/es/components/Icons/Clear.js +21 -0
  188. package/es/components/Icons/Clock.d.ts +5 -0
  189. package/es/components/Icons/Clock.js +30 -0
  190. package/es/components/Icons/Close.d.ts +1 -1
  191. package/es/components/Icons/CloseLight.d.ts +5 -0
  192. package/es/components/Icons/CloseLight.js +34 -0
  193. package/es/components/Icons/CollapseUp.d.ts +1 -1
  194. package/es/components/Icons/DarkSearch.d.ts +1 -1
  195. package/es/components/Icons/Delete.d.ts +3 -0
  196. package/es/components/Icons/Delete.js +40 -0
  197. package/es/components/Icons/Down.d.ts +3 -5
  198. package/es/components/Icons/Down.js +5 -15
  199. package/es/components/Icons/Drag/drag.svg +7 -0
  200. package/es/components/Icons/Drag/index.d.ts +3 -0
  201. package/es/components/Icons/Drag/index.js +34 -0
  202. package/es/components/Icons/LookUp.d.ts +1 -1
  203. package/es/components/Icons/More.d.ts +3 -5
  204. package/es/components/Icons/NewTag.d.ts +3 -0
  205. package/es/components/Icons/NewTag.js +22 -0
  206. package/es/components/Icons/Plus/index.d.ts +3 -0
  207. package/es/components/Icons/Plus/index.js +30 -0
  208. package/es/components/Icons/Plus/plus.svg +6 -0
  209. package/es/components/Icons/Question.d.ts +3 -0
  210. package/es/components/Icons/Question.js +21 -0
  211. package/es/components/Icons/Reload.d.ts +3 -0
  212. package/es/components/Icons/Reload.js +21 -0
  213. package/es/components/Icons/Search.d.ts +3 -5
  214. package/es/components/Icons/Search.js +7 -17
  215. package/es/components/Icons/Tip.d.ts +4 -5
  216. package/es/components/Icons/Tip.js +59 -68
  217. package/es/components/Icons/index.d.ts +27 -7
  218. package/es/components/Icons/index.js +29 -9
  219. package/es/components/InputCompact/index.d.ts +11 -0
  220. package/es/components/InputCompact/index.js +80 -0
  221. package/es/components/InputCompact/index.less +33 -0
  222. package/es/components/InputNumber/index.d.ts +8 -0
  223. package/es/components/InputNumber/index.js +38 -0
  224. package/es/components/InputNumber/index.less +58 -0
  225. package/es/components/Layout/index.d.ts +26 -8
  226. package/es/components/Layout/index.js +159 -54
  227. package/es/components/Layout/index.less +58 -33
  228. package/es/components/Popup/index.d.ts +43 -7
  229. package/es/components/Popup/index.js +183 -89
  230. package/es/components/Popup/index.less +23 -1
  231. package/es/components/Portal/index.d.ts +7 -6
  232. package/es/components/Portal/index.js +57 -12
  233. package/es/components/Section/TabBar.d.ts +2 -1
  234. package/es/components/Section/index.d.ts +6 -2
  235. package/es/components/Section/index.js +30 -23
  236. package/es/components/Section/index.less +6 -2
  237. package/es/components/SelectPanel/index.d.ts +17 -0
  238. package/es/components/SelectPanel/index.js +70 -0
  239. package/es/components/SelectPanel/index.less +112 -0
  240. package/es/components/SelectView/index.d.ts +16 -5
  241. package/es/components/SelectView/index.js +162 -119
  242. package/es/components/SelectView/index.less +23 -26
  243. package/es/components/SiderTree/TreeNodeTitle.js +2 -2
  244. package/es/components/SiderTree/index.d.ts +4 -2
  245. package/es/components/SiderTree/index.js +50 -71
  246. package/es/components/SiderTree/index.less +23 -77
  247. package/es/components/State/index.d.ts +8 -0
  248. package/es/components/State/index.js +25 -0
  249. package/es/components/State/index.less +131 -0
  250. package/es/components/TabBar/index.d.ts +2 -3
  251. package/es/components/TabBar/index.js +24 -42
  252. package/es/components/TabBar/index.less +2 -28
  253. package/es/components/Table/typings.d.ts +1 -2
  254. package/es/components/Table/utils.d.ts +1 -1
  255. package/es/components/TipMark/index.d.ts +8 -0
  256. package/es/components/{DataGrid/cell-editors/Custom.js → TipMark/index.js} +40 -12
  257. package/es/components/utils.d.ts +1 -1
  258. package/es/components/utils.js +2 -2
  259. package/es/hooks/useBatchOperator/index.d.ts +83 -10
  260. package/es/hooks/useBatchOperator/index.js +644 -300
  261. package/es/hooks/useHistoryBlock/index.d.ts +8 -0
  262. package/es/hooks/useHistoryBlock/index.js +30 -0
  263. package/es/index.d.ts +20 -4
  264. package/es/index.js +15 -2
  265. package/es/index.less +5 -0
  266. package/es/init.js +82 -24
  267. package/es/layouts/BasicLayout/components/Main.js +37 -4
  268. package/es/layouts/BasicLayout/components/MainFramework/components/Menu/index.js +23 -22
  269. package/es/layouts/BasicLayout/components/MainFramework/index.less +19 -0
  270. package/es/layouts/BasicLayout/typings.d.ts +3 -3
  271. package/es/layouts/Breadcrumb/index.d.ts +13 -5
  272. package/es/layouts/Breadcrumb/index.js +31 -10
  273. package/es/layouts/Breadcrumb/index.less +5 -1
  274. package/es/layouts/MicroLayout/index.js +69 -5
  275. package/es/layouts/MicroLayout/typings.d.ts +5 -3
  276. package/es/layouts/TabInstance.d.ts +31 -0
  277. package/es/layouts/TabInstance.js +115 -0
  278. package/es/layouts/components/RouteTab.d.ts +7 -3
  279. package/es/layouts/components/RouteTab.js +6 -2
  280. package/es/layouts/typings.d.ts +0 -2
  281. package/es/layouts/utils.d.ts +1 -1
  282. package/es/layouts/utils.js +4 -4
  283. package/es/styles/empty.png +0 -0
  284. package/es/styles/overrides.less +203 -59
  285. package/es/styles/theme.less +21 -1
  286. package/es/styles/utils.less +18 -18
  287. package/package.json +28 -12
  288. package/es/components/DataGrid/GridContext.d.ts +0 -4
  289. package/es/components/DataGrid/GridContext.js +0 -4
  290. package/es/components/DataGrid/cell-editors/Custom.d.ts +0 -9
  291. package/es/components/DataGrid/empty.png +0 -0
  292. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideNodeManager.d.ts +0 -35
  293. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideNodeManager.js +0 -378
  294. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideRowModel.d.ts +0 -99
  295. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideRowModel.js +0 -1160
  296. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterService.d.ts +0 -7
  297. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterService.js +0 -137
  298. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterStage.d.ts +0 -5
  299. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterStage.js +0 -60
  300. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/flattenStage.d.ts +0 -10
  301. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/flattenStage.js +0 -199
  302. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/immutableService.d.ts +0 -13
  303. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/immutableService.js +0 -175
  304. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortService.d.ts +0 -14
  305. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortService.js +0 -330
  306. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortStage.d.ts +0 -7
  307. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortStage.js +0 -75
  308. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModelModule.d.ts +0 -2
  309. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModelModule.js +0 -15
  310. package/es/components/DataGrid/modules/client-side-row-model/index.d.ts +0 -1
  311. package/es/components/DataGrid/modules/client-side-row-model/index.js +0 -1
  312. package/es/components/DataGrid/modules/clipboard/index.d.ts +0 -1
  313. package/es/components/DataGrid/modules/column-tool-panel/index.d.ts +0 -2
  314. package/es/components/DataGrid/modules/row-grouping/index.d.ts +0 -4
  315. package/es/components/DataGrid/modules/server-side-row-model/index.d.ts +0 -1
  316. package/es/components/DataGrid/modules/server-side-row-model/index.js +0 -1
  317. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/blockUtils.d.ts +0 -47
  318. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/blockUtils.js +0 -444
  319. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/infiniteStoreBlock.d.ts +0 -92
  320. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/infiniteStoreBlock.js +0 -510
  321. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/expandListener.d.ts +0 -9
  322. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/expandListener.js +0 -115
  323. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/filterListener.d.ts +0 -9
  324. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/filterListener.js +0 -114
  325. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/listenerUtils.d.ts +0 -5
  326. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/listenerUtils.js +0 -68
  327. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/sortListener.d.ts +0 -13
  328. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/sortListener.js +0 -194
  329. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/nodeManager.d.ts +0 -7
  330. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/nodeManager.js +0 -63
  331. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/serverSideRowModel.d.ts +0 -88
  332. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/serverSideRowModel.js +0 -572
  333. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/fullStore.d.ts +0 -108
  334. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/fullStore.js +0 -876
  335. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/infiniteStore.d.ts +0 -102
  336. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/infiniteStore.js +0 -918
  337. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeFactory.d.ts +0 -12
  338. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeFactory.js +0 -141
  339. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeUtils.d.ts +0 -35
  340. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeUtils.js +0 -154
  341. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/transactionManager.d.ts +0 -23
  342. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/transactionManager.js +0 -210
  343. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModelModule.d.ts +0 -18
  344. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModelModule.js +0 -18
  345. package/es/components/DataGrid/modules/side-bar/index.d.ts +0 -2
  346. /package/es/components/DataGrid/modules/clipboard/{index.js → main.js} +0 -0
  347. /package/es/components/DataGrid/modules/column-tool-panel/{index.js → main.js} +0 -0
  348. /package/es/components/DataGrid/modules/menu/{index.d.ts → main.d.ts} +0 -0
  349. /package/es/components/DataGrid/modules/menu/{index.js → main.js} +0 -0
  350. /package/es/components/DataGrid/modules/row-grouping/{index.js → main.js} +0 -0
  351. /package/es/components/DataGrid/modules/side-bar/{index.js → main.js} +0 -0
@@ -1,5 +1,11 @@
1
1
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
 
3
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
4
+
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+
7
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8
+
3
9
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
10
 
5
11
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -26,15 +32,29 @@ var __decorate = this && this.__decorate || function (decorators, target, key, d
26
32
  var c = arguments.length,
27
33
  r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
28
34
  d;
29
- if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === 'object' && typeof Reflect.decorate === 'function') r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
35
+ if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
30
36
  if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
31
37
  }
32
38
  return c > 3 && r && Object.defineProperty(target, key, r), r;
33
39
  };
34
40
 
35
- import { _, Autowired, Bean, BeanStub, ChangedPath, Constants, Events, PostConstruct, Optional } from '@ag-grid-community/core';
41
+ var ClipboardService_1;
42
+ import { _, Autowired, Bean, BeanStub, ChangedPath, Events, PostConstruct, Optional } from "@ag-grid-community/core"; // Matches value in changeDetectionService
43
+
44
+ var SOURCE_PASTE = 'paste';
45
+ var EXPORT_TYPE_DRAG_COPY = 'dragCopy';
46
+ var EXPORT_TYPE_CLIPBOARD = 'clipboard';
47
+ var CellClearType;
36
48
 
37
- var ClipboardService = /*#__PURE__*/function (_BeanStub) {
49
+ (function (CellClearType) {
50
+ CellClearType[CellClearType["CellRange"] = 0] = "CellRange";
51
+ CellClearType[CellClearType["SelectedRows"] = 1] = "SelectedRows";
52
+ CellClearType[CellClearType["FocusedCell"] = 2] = "FocusedCell";
53
+ })(CellClearType || (CellClearType = {}));
54
+
55
+ ;
56
+
57
+ var ClipboardService = ClipboardService_1 = /*#__PURE__*/function (_BeanStub) {
38
58
  _inherits(ClipboardService, _BeanStub);
39
59
 
40
60
  var _super = _createSuper(ClipboardService);
@@ -57,7 +77,7 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
57
77
 
58
78
  this.logger = this.loggerFactory.create('ClipboardService');
59
79
 
60
- if (this.rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {
80
+ if (this.rowModel.getType() === 'clientSide') {
61
81
  this.clientSideRowModel = this.rowModel;
62
82
  }
63
83
 
@@ -72,7 +92,7 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
72
92
 
73
93
  this.logger.log('pasteFromClipboard'); // Method 1 - native clipboard API, available in modern chrome browsers
74
94
 
75
- var allowNavigator = !this.gridOptionsWrapper.isSuppressClipboardApi(); // Some browsers (Firefox) do not allow Web Applications to read from
95
+ var allowNavigator = !this.gridOptionsService.is('suppressClipboardApi'); // Some browsers (Firefox) do not allow Web Applications to read from
76
96
  // the clipboard so verify if not only the ClipboardAPI is available,
77
97
  // but also if the `readText` method is public.
78
98
 
@@ -80,7 +100,7 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
80
100
  navigator.clipboard.readText().then(this.processClipboardData.bind(this)).catch(function (e) {
81
101
  _.doOnce(function () {
82
102
  console.warn(e);
83
- console.warn('AG Grid: Unable to use the Clipboard API (navigator.clipboard.readText()). ' + 'The reason why it could not be used has been logged in the previous line. ' + "For this reason the grid has defaulted to using a workaround which doesn't perform as well. " + 'Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid ' + 'property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API');
103
+ console.warn('AG Grid: Unable to use the Clipboard API (navigator.clipboard.readText()). ' + 'The reason why it could not be used has been logged in the previous line. ' + 'For this reason the grid has defaulted to using a workaround which doesn\'t perform as well. ' + 'Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid ' + 'property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API');
84
104
  }, 'clipboardApiError');
85
105
 
86
106
  _this3.navigatorApiFailed = true;
@@ -141,6 +161,12 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
141
161
  });
142
162
  }
143
163
  }
164
+ }, {
165
+ key: "getClipboardDelimiter",
166
+ value: function getClipboardDelimiter() {
167
+ var delimiter = this.gridOptionsService.get('clipboardDelimiter');
168
+ return _.exists(delimiter) ? delimiter : '\t';
169
+ }
144
170
  }, {
145
171
  key: "processClipboardData",
146
172
  value: function processClipboardData(data) {
@@ -150,9 +176,8 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
150
176
  return;
151
177
  }
152
178
 
153
- var parsedData = _.stringToArray(data, this.gridOptionsWrapper.getClipboardDelimiter());
154
-
155
- var userFunc = this.gridOptionsWrapper.getProcessDataFromClipboardFunc();
179
+ var parsedData = ClipboardService_1.stringToArray(data, this.getClipboardDelimiter());
180
+ var userFunc = this.gridOptionsService.getCallback('processDataFromClipboard');
156
181
 
157
182
  if (userFunc) {
158
183
  parsedData = userFunc({
@@ -164,7 +189,7 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
164
189
  return;
165
190
  }
166
191
 
167
- if (this.gridOptionsWrapper.isSuppressLastEmptyLineOnPaste()) {
192
+ if (this.gridOptionsService.is('suppressLastEmptyLineOnPaste')) {
168
193
  this.removeLastLineIfBlank(parsedData);
169
194
  }
170
195
 
@@ -181,13 +206,14 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
181
206
  };
182
207
 
183
208
  this.doPasteOperation(pasteOperation);
184
- } // common code to paste operations, e.g. paste to cell, paste to range, and copy range down
209
+ } // This will parse a delimited string into an array of arrays.
185
210
 
186
211
  }, {
187
212
  key: "doPasteOperation",
188
- value: function doPasteOperation(pasteOperationFunc) {
189
- var api = this.gridOptionsWrapper.getApi();
190
- var columnApi = this.gridOptionsWrapper.getColumnApi();
213
+ value: // common code to paste operations, e.g. paste to cell, paste to range, and copy range down
214
+ function doPasteOperation(pasteOperationFunc) {
215
+ var api = this.gridOptionsService.api;
216
+ var columnApi = this.gridOptionsService.columnApi;
191
217
  var source = 'clipboard';
192
218
  this.eventService.dispatchEvent({
193
219
  type: Events.EVENT_PASTE_START,
@@ -198,7 +224,7 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
198
224
  var changedPath;
199
225
 
200
226
  if (this.clientSideRowModel) {
201
- var onlyChangedColumns = this.gridOptionsWrapper.isAggregateOnlyChangedColumns();
227
+ var onlyChangedColumns = this.gridOptionsService.is('aggregateOnlyChangedColumns');
202
228
  changedPath = new ChangedPath(onlyChangedColumns, this.clientSideRowModel.getRootNode());
203
229
  }
204
230
 
@@ -251,7 +277,7 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
251
277
 
252
278
  updatedRowNodes.push(rowNode);
253
279
 
254
- var processCellFromClipboardFunc = _this6.gridOptionsWrapper.getProcessCellFromClipboardFunc();
280
+ var processCellFromClipboardFunc = _this6.gridOptionsService.getCallback('processCellFromClipboard');
255
281
 
256
282
  columns.forEach(function (column, idx) {
257
283
  if (!column.isCellEditable(rowNode) || column.isSuppressPaste(rowNode)) {
@@ -263,15 +289,22 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
263
289
  idx = idx % currentRowData.length;
264
290
  }
265
291
 
266
- var newValue = _this6.processCell(rowNode, column, currentRowData[idx], Constants.EXPORT_TYPE_DRAG_COPY, processCellFromClipboardFunc);
292
+ var newValue = _this6.processCell(rowNode, column, currentRowData[idx], EXPORT_TYPE_DRAG_COPY, processCellFromClipboardFunc);
267
293
 
268
- rowNode.setDataValue(column, newValue, Constants.SOURCE_PASTE);
294
+ rowNode.setDataValue(column, newValue, SOURCE_PASTE);
269
295
 
270
296
  if (changedPath) {
271
297
  changedPath.addParentNode(rowNode.parent, [column]);
272
298
  }
273
299
 
274
- var cellId = _this6.cellPositionUtils.createIdFromValues(currentRow.rowIndex, column, currentRow.rowPinned);
300
+ var rowIndex = currentRow.rowIndex,
301
+ rowPinned = currentRow.rowPinned;
302
+
303
+ var cellId = _this6.cellPositionUtils.createIdFromValues({
304
+ rowIndex: rowIndex,
305
+ column: column,
306
+ rowPinned: rowPinned
307
+ });
275
308
 
276
309
  cellsToFlash[cellId] = true;
277
310
  });
@@ -296,7 +329,7 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
296
329
  if (this.isPasteSingleValueIntoRange(parsedData)) {
297
330
  this.pasteSingleValueIntoRange(parsedData, updatedRowNodes, cellsToFlash, changedPath);
298
331
  } else {
299
- this.pasteMultipleValues(parsedData, currentRow, updatedRowNodes, columnsToPasteInto, cellsToFlash, Constants.EXPORT_TYPE_CLIPBOARD, changedPath);
332
+ this.pasteMultipleValues(parsedData, currentRow, updatedRowNodes, columnsToPasteInto, cellsToFlash, EXPORT_TYPE_CLIPBOARD, changedPath);
300
333
  }
301
334
  } // if range is active, and only one cell, then we paste this cell into all cells in the active range.
302
335
 
@@ -315,7 +348,7 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
315
348
  var rowCallback = function rowCallback(currentRow, rowNode, columns) {
316
349
  updatedRowNodes.push(rowNode);
317
350
  columns.forEach(function (column) {
318
- return _this7.updateCellValue(rowNode, column, value, cellsToFlash, Constants.EXPORT_TYPE_CLIPBOARD, changedPath);
351
+ return _this7.updateCellValue(rowNode, column, value, cellsToFlash, EXPORT_TYPE_CLIPBOARD, changedPath);
319
352
  });
320
353
  };
321
354
 
@@ -338,9 +371,9 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
338
371
  var firstRowValues = [];
339
372
 
340
373
  var pasteOperation = function pasteOperation(cellsToFlash, updatedRowNodes, focusedCell, changedPath) {
341
- var processCellForClipboardFunc = _this8.gridOptionsWrapper.getProcessCellForClipboardFunc();
374
+ var processCellForClipboardFunc = _this8.gridOptionsService.getCallback('processCellForClipboard');
342
375
 
343
- var processCellFromClipboardFunc = _this8.gridOptionsWrapper.getProcessCellFromClipboardFunc();
376
+ var processCellFromClipboardFunc = _this8.gridOptionsService.getCallback('processCellFromClipboard');
344
377
 
345
378
  var rowCallback = function rowCallback(currentRow, rowNode, columns) {
346
379
  // take reference of first row, this is the one we will be using to copy from
@@ -348,7 +381,7 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
348
381
  // two reasons for looping through columns
349
382
  columns.forEach(function (column) {
350
383
  // get the initial values to copy down
351
- var value = _this8.processCell(rowNode, column, _this8.valueService.getValue(column, rowNode), Constants.EXPORT_TYPE_DRAG_COPY, processCellForClipboardFunc);
384
+ var value = _this8.processCell(rowNode, column, _this8.valueService.getValue(column, rowNode), EXPORT_TYPE_DRAG_COPY, processCellForClipboardFunc);
352
385
 
353
386
  firstRowValues.push(value);
354
387
  });
@@ -360,15 +393,22 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
360
393
  return;
361
394
  }
362
395
 
363
- var firstRowValue = _this8.processCell(rowNode, column, firstRowValues[index], Constants.EXPORT_TYPE_DRAG_COPY, processCellFromClipboardFunc);
396
+ var firstRowValue = _this8.processCell(rowNode, column, firstRowValues[index], EXPORT_TYPE_DRAG_COPY, processCellFromClipboardFunc);
364
397
 
365
- rowNode.setDataValue(column, firstRowValue, Constants.SOURCE_PASTE);
398
+ rowNode.setDataValue(column, firstRowValue, SOURCE_PASTE);
366
399
 
367
400
  if (changedPath) {
368
401
  changedPath.addParentNode(rowNode.parent, [column]);
369
402
  }
370
403
 
371
- var cellId = _this8.cellPositionUtils.createIdFromValues(currentRow.rowIndex, column, currentRow.rowPinned);
404
+ var rowIndex = currentRow.rowIndex,
405
+ rowPinned = currentRow.rowPinned;
406
+
407
+ var cellId = _this8.cellPositionUtils.createIdFromValues({
408
+ rowIndex: rowIndex,
409
+ column: column,
410
+ rowPinned: rowPinned
411
+ });
372
412
 
373
413
  cellsToFlash[cellId] = true;
374
414
  });
@@ -402,7 +442,7 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
402
442
  value: function fireRowChanged(rowNodes) {
403
443
  var _this9 = this;
404
444
 
405
- if (!this.gridOptionsWrapper.isFullRowEdit()) {
445
+ if (this.gridOptionsService.get('editType') !== 'fullRow') {
406
446
  return;
407
447
  }
408
448
 
@@ -426,7 +466,7 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
426
466
  var rowPointer = currentRow; // if doing CSRM and NOT tree data, then it means groups are aggregates, which are read only,
427
467
  // so we should skip them when doing paste operations.
428
468
 
429
- var skipGroupRows = this.clientSideRowModel != null && !this.gridOptionsWrapper.isTreeData();
469
+ var skipGroupRows = this.clientSideRowModel != null && !this.gridOptionsService.isTreeData();
430
470
 
431
471
  var getNextGoodRowNode = function getNextGoodRowNode() {
432
472
  while (true) {
@@ -475,9 +515,15 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
475
515
  return;
476
516
  }
477
517
 
478
- var processedValue = this.processCell(rowNode, column, value, type, this.gridOptionsWrapper.getProcessCellFromClipboardFunc());
479
- rowNode.setDataValue(column, processedValue, Constants.SOURCE_PASTE);
480
- var cellId = this.cellPositionUtils.createIdFromValues(rowNode.rowIndex, column, rowNode.rowPinned);
518
+ var processedValue = this.processCell(rowNode, column, value, type, this.gridOptionsService.getCallback('processCellFromClipboard'));
519
+ rowNode.setDataValue(column, processedValue, SOURCE_PASTE);
520
+ var rowIndex = rowNode.rowIndex,
521
+ rowPinned = rowNode.rowPinned;
522
+ var cellId = this.cellPositionUtils.createIdFromValues({
523
+ rowIndex: rowIndex,
524
+ column: column,
525
+ rowPinned: rowPinned
526
+ });
481
527
  cellsToFlash[cellId] = true;
482
528
 
483
529
  if (changedPath) {
@@ -488,36 +534,131 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
488
534
  key: "copyToClipboard",
489
535
  value: function copyToClipboard() {
490
536
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
537
+ this.copyOrCutToClipboard(params);
538
+ }
539
+ }, {
540
+ key: "cutToClipboard",
541
+ value: function cutToClipboard() {
542
+ var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
543
+
544
+ if (this.gridOptionsService.is('suppressCutToClipboard')) {
545
+ return;
546
+ }
547
+
548
+ this.copyOrCutToClipboard(params, true);
549
+ }
550
+ }, {
551
+ key: "copyOrCutToClipboard",
552
+ value: function copyOrCutToClipboard(params, cut) {
491
553
  var includeHeaders = params.includeHeaders,
492
554
  includeGroupHeaders = params.includeGroupHeaders;
493
555
  this.logger.log("copyToClipboard: includeHeaders = ".concat(includeHeaders)); // don't override 'includeHeaders' if it has been explicitly set to 'false'
494
556
 
495
557
  if (includeHeaders == null) {
496
- includeHeaders = this.gridOptionsWrapper.isCopyHeadersToClipboard();
558
+ includeHeaders = this.gridOptionsService.is('copyHeadersToClipboard');
497
559
  }
498
560
 
499
561
  if (includeGroupHeaders == null) {
500
- includeGroupHeaders = this.gridOptionsWrapper.isCopyGroupHeadersToClipboard();
562
+ includeGroupHeaders = this.gridOptionsService.is('copyGroupHeadersToClipboard');
501
563
  }
502
564
 
503
565
  var copyParams = {
504
566
  includeHeaders: includeHeaders,
505
567
  includeGroupHeaders: includeGroupHeaders
506
568
  };
507
- var shouldCopyRows = !this.gridOptionsWrapper.isSuppressCopyRowsToClipboard(); // Copy priority is Range > Row > Focus
569
+ var shouldCopyRows = !this.gridOptionsService.is('suppressCopyRowsToClipboard');
570
+ var cellClearType = null; // Copy priority is Range > Row > Focus
508
571
 
509
572
  if (this.rangeService && !this.rangeService.isEmpty() && !this.shouldSkipSingleCellRange()) {
510
573
  this.copySelectedRangeToClipboard(copyParams);
574
+ cellClearType = CellClearType.CellRange;
511
575
  } else if (shouldCopyRows && !this.selectionService.isEmpty()) {
512
576
  this.copySelectedRowsToClipboard(copyParams);
577
+ cellClearType = CellClearType.SelectedRows;
513
578
  } else if (this.focusService.isAnyCellFocused()) {
514
579
  this.copyFocusedCellToClipboard(copyParams);
580
+ cellClearType = CellClearType.FocusedCell;
581
+ }
582
+
583
+ if (cut && cellClearType !== null) {
584
+ this.clearCellsAfterCopy(cellClearType);
515
585
  }
516
586
  }
587
+ }, {
588
+ key: "clearCellsAfterCopy",
589
+ value: function clearCellsAfterCopy(type) {
590
+ this.eventService.dispatchEvent({
591
+ type: Events.EVENT_KEY_SHORTCUT_CHANGED_CELL_START
592
+ });
593
+
594
+ if (type === CellClearType.CellRange) {
595
+ this.rangeService.clearCellRangeCellValues(undefined, 'clipboardService');
596
+ } else if (type === CellClearType.SelectedRows) {
597
+ this.clearSelectedRows();
598
+ } else {
599
+ var focusedCell = this.focusService.getFocusedCell();
600
+
601
+ if (focusedCell == null) {
602
+ return;
603
+ }
604
+
605
+ var rowNode = this.rowPositionUtils.getRowNode(focusedCell);
606
+
607
+ if (rowNode) {
608
+ this.clearCellValue(rowNode, focusedCell.column);
609
+ }
610
+ }
611
+
612
+ this.eventService.dispatchEvent({
613
+ type: Events.EVENT_KEY_SHORTCUT_CHANGED_CELL_END
614
+ });
615
+ }
616
+ }, {
617
+ key: "clearSelectedRows",
618
+ value: function clearSelectedRows() {
619
+ var selected = this.selectionService.getSelectedNodes();
620
+ var columns = this.columnModel.getAllDisplayedColumns();
621
+
622
+ var _iterator = _createForOfIteratorHelper(selected),
623
+ _step;
624
+
625
+ try {
626
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
627
+ var row = _step.value;
628
+
629
+ var _iterator2 = _createForOfIteratorHelper(columns),
630
+ _step2;
631
+
632
+ try {
633
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
634
+ var col = _step2.value;
635
+ this.clearCellValue(row, col);
636
+ }
637
+ } catch (err) {
638
+ _iterator2.e(err);
639
+ } finally {
640
+ _iterator2.f();
641
+ }
642
+ }
643
+ } catch (err) {
644
+ _iterator.e(err);
645
+ } finally {
646
+ _iterator.f();
647
+ }
648
+ }
649
+ }, {
650
+ key: "clearCellValue",
651
+ value: function clearCellValue(rowNode, column) {
652
+ if (!column.isCellEditable(rowNode)) {
653
+ return;
654
+ }
655
+
656
+ rowNode.setDataValue(column, null, 'clipboardService');
657
+ }
517
658
  }, {
518
659
  key: "shouldSkipSingleCellRange",
519
660
  value: function shouldSkipSingleCellRange() {
520
- return this.gridOptionsWrapper.isSuppressCopySingleCellRanges() && !this.rangeService.isMoreThanOneCell();
661
+ return this.gridOptionsService.is('suppressCopySingleCellRanges') && !this.rangeService.isMoreThanOneCell();
521
662
  }
522
663
  }, {
523
664
  key: "iterateActiveRanges",
@@ -668,7 +809,15 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
668
809
  while (node) {
669
810
  rowPositions.push(node);
670
811
  range.columns.forEach(function (column) {
671
- var cellId = _this14.cellPositionUtils.createIdFromValues(node.rowIndex, column, node.rowPinned);
812
+ var _node = node,
813
+ rowIndex = _node.rowIndex,
814
+ rowPinned = _node.rowPinned;
815
+
816
+ var cellId = _this14.cellPositionUtils.createIdFromValues({
817
+ rowIndex: rowIndex,
818
+ column: column,
819
+ rowPinned: rowPinned
820
+ });
672
821
 
673
822
  cellsToFlash[cellId] = true;
674
823
  });
@@ -727,6 +876,8 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
727
876
  }, {
728
877
  key: "buildExportParams",
729
878
  value: function buildExportParams(params) {
879
+ var _this15 = this;
880
+
730
881
  var columns = params.columns,
731
882
  rowPositions = params.rowPositions,
732
883
  _params$includeHeader = params.includeHeaders,
@@ -739,21 +890,57 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
739
890
  skipColumnHeaders: !includeHeaders,
740
891
  skipColumnGroupHeaders: !includeGroupHeaders,
741
892
  suppressQuotes: true,
742
- columnSeparator: this.gridOptionsWrapper.getClipboardDelimiter(),
893
+ columnSeparator: this.getClipboardDelimiter(),
743
894
  onlySelected: !rowPositions,
744
- processCellCallback: this.gridOptionsWrapper.getProcessCellForClipboardFunc(),
895
+ processCellCallback: this.gridOptionsService.getCallback('processCellForClipboard'),
745
896
  processRowGroupCallback: function processRowGroupCallback(params) {
746
- return params.node.key;
897
+ return _this15.processRowGroupCallback(params);
747
898
  },
748
- processHeaderCallback: this.gridOptionsWrapper.getProcessHeaderForClipboardFunc(),
749
- processGroupHeaderCallback: this.gridOptionsWrapper.getProcessGroupHeaderForClipboardFunc()
899
+ processHeaderCallback: this.gridOptionsService.getCallback('processHeaderForClipboard'),
900
+ processGroupHeaderCallback: this.gridOptionsService.getCallback('processGroupHeaderForClipboard')
750
901
  };
751
902
  return this.csvCreator.getDataAsCsv(exportParams, true);
752
903
  }
904
+ }, {
905
+ key: "processRowGroupCallback",
906
+ value: function processRowGroupCallback(params) {
907
+ var node = params.node;
908
+ var key = node.key;
909
+ var value = key != null ? key : '';
910
+
911
+ if (params.node.footer) {
912
+ var suffix = '';
913
+
914
+ if (key && key.length) {
915
+ suffix = " ".concat(key);
916
+ }
917
+
918
+ value = "Total".concat(suffix);
919
+ }
920
+
921
+ var processCellForClipboard = this.gridOptionsService.getCallback('processCellForClipboard');
922
+
923
+ if (processCellForClipboard) {
924
+ var column = node.rowGroupColumn;
925
+
926
+ if (!column && node.footer && node.level === -1) {
927
+ column = this.columnModel.getRowGroupColumns()[0];
928
+ }
929
+
930
+ return processCellForClipboard({
931
+ value: value,
932
+ node: node,
933
+ column: column,
934
+ type: 'clipboard'
935
+ });
936
+ }
937
+
938
+ return value;
939
+ }
753
940
  }, {
754
941
  key: "dispatchFlashCells",
755
942
  value: function dispatchFlashCells(cellsToFlash) {
756
- var _this15 = this;
943
+ var _this16 = this;
757
944
 
758
945
  window.setTimeout(function () {
759
946
  var event = {
@@ -761,7 +948,7 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
761
948
  cells: cellsToFlash
762
949
  };
763
950
 
764
- _this15.eventService.dispatchEvent(event);
951
+ _this16.eventService.dispatchEvent(event);
765
952
  }, 0);
766
953
  }
767
954
  }, {
@@ -782,9 +969,9 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
782
969
  }, {
783
970
  key: "copyDataToClipboard",
784
971
  value: function copyDataToClipboard(data) {
785
- var _this16 = this;
972
+ var _this17 = this;
786
973
 
787
- var userProvidedFunc = this.gridOptionsWrapper.getSendToClipboardFunc(); // method 1 - user provided func
974
+ var userProvidedFunc = this.gridOptionsService.getCallback('sendToClipboard'); // method 1 - user provided func
788
975
 
789
976
  if (userProvidedFunc) {
790
977
  userProvidedFunc({
@@ -794,16 +981,16 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
794
981
  } // method 2 - native clipboard API, available in modern chrome browsers
795
982
 
796
983
 
797
- var allowNavigator = !this.gridOptionsWrapper.isSuppressClipboardApi();
984
+ var allowNavigator = !this.gridOptionsService.is('suppressClipboardApi');
798
985
 
799
986
  if (allowNavigator && navigator.clipboard) {
800
987
  navigator.clipboard.writeText(data).catch(function (e) {
801
988
  _.doOnce(function () {
802
989
  console.warn(e);
803
- console.warn('AG Grid: Unable to use the Clipboard API (navigator.clipboard.writeText()). ' + 'The reason why it could not be used has been logged in the previous line. ' + "For this reason the grid has defaulted to using a workaround which doesn't perform as well. " + 'Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid ' + 'property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.');
990
+ console.warn('AG Grid: Unable to use the Clipboard API (navigator.clipboard.writeText()). ' + 'The reason why it could not be used has been logged in the previous line. ' + 'For this reason the grid has defaulted to using a workaround which doesn\'t perform as well. ' + 'Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid ' + 'property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.');
804
991
  }, 'clipboardApiError');
805
992
 
806
- _this16.copyDataToClipboardLegacy(data);
993
+ _this17.copyDataToClipboardLegacy(data);
807
994
  });
808
995
  return;
809
996
  }
@@ -813,11 +1000,11 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
813
1000
  }, {
814
1001
  key: "copyDataToClipboardLegacy",
815
1002
  value: function copyDataToClipboardLegacy(data) {
816
- var _this17 = this;
1003
+ var _this18 = this;
817
1004
 
818
1005
  // method 3 - if all else fails, the old school hack
819
1006
  this.executeOnTempElement(function (element) {
820
- var eDocument = _this17.gridOptionsWrapper.getDocument();
1007
+ var eDocument = _this18.gridOptionsService.getDocument();
821
1008
 
822
1009
  var focusedElementBefore = eDocument.activeElement;
823
1010
  element.value = data || ' '; // has to be non-empty value or execCommand will not do anything
@@ -829,7 +1016,7 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
829
1016
  var result = eDocument.execCommand('copy');
830
1017
 
831
1018
  if (!result) {
832
- console.warn("AG Grid: Browser did not allow document.execCommand('copy'). Ensure " + 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise ' + 'the browser will prevent it for security reasons.');
1019
+ console.warn('AG Grid: Browser did not allow document.execCommand(\'copy\'). Ensure ' + 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise ' + 'the browser will prevent it for security reasons.');
833
1020
  }
834
1021
 
835
1022
  if (focusedElementBefore != null && focusedElementBefore.focus != null) {
@@ -842,7 +1029,7 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
842
1029
  }, {
843
1030
  key: "executeOnTempElement",
844
1031
  value: function executeOnTempElement(callbackNow, callbackAfter) {
845
- var eDoc = this.gridOptionsWrapper.getDocument();
1032
+ var eDoc = this.gridOptionsService.getDocument();
846
1033
  var eTempInput = eDoc.createElement('textarea');
847
1034
  eTempInput.style.width = '1px';
848
1035
  eTempInput.style.height = '1px'; // removing items from the DOM causes the document element to scroll to the
@@ -859,7 +1046,7 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
859
1046
  try {
860
1047
  callbackNow(eTempInput);
861
1048
  } catch (err) {
862
- console.warn("AG Grid: Browser does not support document.execCommand('copy') for clipboard operations");
1049
+ console.warn('AG Grid: Browser does not support document.execCommand(\'copy\') for clipboard operations');
863
1050
  } //It needs 100 otherwise OS X seemed to not always be able to paste... Go figure...
864
1051
 
865
1052
 
@@ -886,38 +1073,141 @@ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
886
1073
 
887
1074
  return startRangeIndex - endRangeIndex + 1;
888
1075
  }
1076
+ }], [{
1077
+ key: "stringToArray",
1078
+ value: function stringToArray(strData) {
1079
+ var delimiter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ',';
1080
+ var data = [];
1081
+
1082
+ var isNewline = function isNewline(char) {
1083
+ return char === '\r' || char === '\n';
1084
+ };
1085
+
1086
+ var insideQuotedField = false;
1087
+
1088
+ if (strData === '') {
1089
+ return [['']];
1090
+ } // iterate over each character, keep track of current row and column (of the returned array)
1091
+
1092
+
1093
+ var _loop = function _loop(_row, _column, _position) {
1094
+ var previousChar = strData[_position - 1];
1095
+ var currentChar = strData[_position];
1096
+ var nextChar = strData[_position + 1];
1097
+
1098
+ var ensureDataExists = function ensureDataExists() {
1099
+ if (!data[_row]) {
1100
+ // create row if it doesn't exist
1101
+ data[_row] = [];
1102
+ }
1103
+
1104
+ if (!data[_row][_column]) {
1105
+ // create column if it doesn't exist
1106
+ data[_row][_column] = '';
1107
+ }
1108
+ };
1109
+
1110
+ ensureDataExists();
1111
+
1112
+ if (currentChar === '"') {
1113
+ if (insideQuotedField) {
1114
+ if (nextChar === '"') {
1115
+ // unescape double quote
1116
+ data[_row][_column] += '"';
1117
+ _position++;
1118
+ } else {
1119
+ // exit quoted field
1120
+ insideQuotedField = false;
1121
+ }
1122
+
1123
+ row = _row;
1124
+ column = _column;
1125
+ position = _position;
1126
+ return "continue";
1127
+ } else if (previousChar === undefined || previousChar === delimiter || isNewline(previousChar)) {
1128
+ // enter quoted field
1129
+ insideQuotedField = true;
1130
+ row = _row;
1131
+ column = _column;
1132
+ position = _position;
1133
+ return "continue";
1134
+ }
1135
+ }
1136
+
1137
+ if (!insideQuotedField) {
1138
+ if (currentChar === delimiter) {
1139
+ // move to next column
1140
+ _column++;
1141
+ ensureDataExists();
1142
+ row = _row;
1143
+ column = _column;
1144
+ position = _position;
1145
+ return "continue";
1146
+ } else if (isNewline(currentChar)) {
1147
+ // move to next row
1148
+ _column = 0;
1149
+ _row++;
1150
+ ensureDataExists();
1151
+
1152
+ if (currentChar === '\r' && nextChar === '\n') {
1153
+ // skip over second newline character if it exists
1154
+ _position++;
1155
+ }
1156
+
1157
+ row = _row;
1158
+ column = _column;
1159
+ position = _position;
1160
+ return "continue";
1161
+ }
1162
+ } // add current character to current column
1163
+
1164
+
1165
+ data[_row][_column] += currentChar;
1166
+ row = _row;
1167
+ column = _column;
1168
+ position = _position;
1169
+ };
1170
+
1171
+ for (var row = 0, column = 0, position = 0; position < strData.length; position++) {
1172
+ var _ret = _loop(row, column, position);
1173
+
1174
+ if (_ret === "continue") continue;
1175
+ }
1176
+
1177
+ return data;
1178
+ }
889
1179
  }]);
890
1180
 
891
1181
  return ClipboardService;
892
1182
  }(BeanStub);
893
1183
 
894
- __decorate([Autowired('csvCreator')], ClipboardService.prototype, 'csvCreator', void 0);
1184
+ __decorate([Autowired('csvCreator')], ClipboardService.prototype, "csvCreator", void 0);
895
1185
 
896
- __decorate([Autowired('loggerFactory')], ClipboardService.prototype, 'loggerFactory', void 0);
1186
+ __decorate([Autowired('loggerFactory')], ClipboardService.prototype, "loggerFactory", void 0);
897
1187
 
898
- __decorate([Autowired('selectionService')], ClipboardService.prototype, 'selectionService', void 0);
1188
+ __decorate([Autowired('selectionService')], ClipboardService.prototype, "selectionService", void 0);
899
1189
 
900
- __decorate([Optional('rangeService')], ClipboardService.prototype, 'rangeService', void 0);
1190
+ __decorate([Optional('rangeService')], ClipboardService.prototype, "rangeService", void 0);
901
1191
 
902
- __decorate([Autowired('rowModel')], ClipboardService.prototype, 'rowModel', void 0);
1192
+ __decorate([Autowired('rowModel')], ClipboardService.prototype, "rowModel", void 0);
903
1193
 
904
- __decorate([Autowired('ctrlsService')], ClipboardService.prototype, 'ctrlsService', void 0);
1194
+ __decorate([Autowired('ctrlsService')], ClipboardService.prototype, "ctrlsService", void 0);
905
1195
 
906
- __decorate([Autowired('valueService')], ClipboardService.prototype, 'valueService', void 0);
1196
+ __decorate([Autowired('valueService')], ClipboardService.prototype, "valueService", void 0);
907
1197
 
908
- __decorate([Autowired('focusService')], ClipboardService.prototype, 'focusService', void 0);
1198
+ __decorate([Autowired('focusService')], ClipboardService.prototype, "focusService", void 0);
909
1199
 
910
- __decorate([Autowired('rowRenderer')], ClipboardService.prototype, 'rowRenderer', void 0);
1200
+ __decorate([Autowired('rowRenderer')], ClipboardService.prototype, "rowRenderer", void 0);
911
1201
 
912
- __decorate([Autowired('columnModel')], ClipboardService.prototype, 'columnModel', void 0);
1202
+ __decorate([Autowired('columnModel')], ClipboardService.prototype, "columnModel", void 0);
913
1203
 
914
- __decorate([Autowired('cellNavigationService')], ClipboardService.prototype, 'cellNavigationService', void 0);
1204
+ __decorate([Autowired('cellNavigationService')], ClipboardService.prototype, "cellNavigationService", void 0);
915
1205
 
916
- __decorate([Autowired('cellPositionUtils')], ClipboardService.prototype, 'cellPositionUtils', void 0);
1206
+ __decorate([Autowired('cellPositionUtils')], ClipboardService.prototype, "cellPositionUtils", void 0);
917
1207
 
918
- __decorate([Autowired('rowPositionUtils')], ClipboardService.prototype, 'rowPositionUtils', void 0);
1208
+ __decorate([Autowired('rowPositionUtils')], ClipboardService.prototype, "rowPositionUtils", void 0);
919
1209
 
920
- __decorate([PostConstruct], ClipboardService.prototype, 'init', null);
1210
+ __decorate([PostConstruct], ClipboardService.prototype, "init", null);
921
1211
 
922
- ClipboardService = __decorate([Bean('clipboardService')], ClipboardService);
1212
+ ClipboardService = ClipboardService_1 = __decorate([Bean('clipboardService')], ClipboardService);
923
1213
  export { ClipboardService };