@lemon-fe/kits 0.1.136 → 1.0.0-0

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 (344) hide show
  1. package/README.md +27 -5
  2. package/es/app.d.ts +1 -0
  3. package/es/app.js +3 -0
  4. package/es/components/Actions/index.d.ts +26 -0
  5. package/es/components/Actions/index.js +169 -0
  6. package/es/components/Actions/index.less +67 -0
  7. package/es/components/BaseTable/Actions.d.ts +9 -0
  8. package/es/components/BaseTable/Actions.js +136 -0
  9. package/es/components/BaseTable/BaseTableContext.d.ts +7 -0
  10. package/es/components/BaseTable/BaseTableContext.js +7 -0
  11. package/es/components/BaseTable/ResizeHeaderCell.d.ts +8 -0
  12. package/es/components/BaseTable/ResizeHeaderCell.js +130 -0
  13. package/es/components/BaseTable/VirtualBody.d.ts +8 -0
  14. package/es/components/BaseTable/VirtualBody.js +163 -0
  15. package/es/components/BaseTable/empty.png +0 -0
  16. package/es/components/BaseTable/index.d.ts +9 -0
  17. package/es/components/BaseTable/index.js +482 -0
  18. package/es/components/BaseTable/index.less +189 -0
  19. package/es/components/BaseTable/typings.d.ts +48 -0
  20. package/es/components/BaseTable/utils.d.ts +4 -0
  21. package/es/components/BaseTable/utils.js +26 -0
  22. package/es/components/ColorPicker/index.d.ts +13 -0
  23. package/es/components/ColorPicker/index.js +114 -0
  24. package/es/components/ColorPicker/index.less +47 -0
  25. package/es/components/DataGrid/Actions.d.ts +9 -0
  26. package/es/components/DataGrid/Actions.js +119 -0
  27. package/es/components/DataGrid/CellRenderer.d.ts +4 -0
  28. package/es/components/DataGrid/CellRenderer.js +68 -0
  29. package/es/components/DataGrid/GridContext.d.ts +4 -0
  30. package/es/components/DataGrid/GridContext.js +4 -0
  31. package/es/components/DataGrid/HeaderRenderer.d.ts +6 -0
  32. package/es/components/DataGrid/HeaderRenderer.js +93 -0
  33. package/es/components/DataGrid/cell-editors/Custom.d.ts +9 -0
  34. package/es/components/DataGrid/cell-editors/Custom.js +105 -0
  35. package/es/components/DataGrid/cell-editors/Date.d.ts +8 -0
  36. package/es/components/DataGrid/cell-editors/Date.js +78 -0
  37. package/es/components/DataGrid/cell-editors/Number.d.ts +9 -0
  38. package/es/components/DataGrid/cell-editors/Number.js +86 -0
  39. package/es/components/DataGrid/cell-editors/Select.d.ts +7 -0
  40. package/es/components/DataGrid/cell-editors/Select.js +70 -0
  41. package/es/components/DataGrid/cell-editors/Text.d.ts +5 -0
  42. package/es/components/DataGrid/cell-editors/Text.js +60 -0
  43. package/es/components/DataGrid/cell-editors/Wrapper.d.ts +4 -0
  44. package/es/components/DataGrid/cell-editors/Wrapper.js +7 -0
  45. package/es/components/DataGrid/cell-editors/utils.d.ts +1 -0
  46. package/es/components/DataGrid/cell-editors/utils.js +2 -0
  47. package/es/components/DataGrid/empty.png +0 -0
  48. package/es/components/DataGrid/hooks.d.ts +2 -0
  49. package/es/components/DataGrid/hooks.js +45 -0
  50. package/es/components/DataGrid/index.d.ts +77 -0
  51. package/es/components/DataGrid/index.js +1051 -0
  52. package/es/components/DataGrid/index.less +304 -0
  53. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideNodeManager.d.ts +57 -0
  54. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideNodeManager.js +378 -0
  55. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideRowModel.d.ts +120 -0
  56. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideRowModel.js +1160 -0
  57. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterService.d.ts +7 -0
  58. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterService.js +137 -0
  59. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterStage.d.ts +5 -0
  60. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterStage.js +60 -0
  61. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/flattenStage.d.ts +10 -0
  62. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/flattenStage.js +199 -0
  63. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/immutableService.d.ts +13 -0
  64. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/immutableService.js +175 -0
  65. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortService.d.ts +21 -0
  66. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortService.js +330 -0
  67. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortStage.d.ts +7 -0
  68. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortStage.js +75 -0
  69. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModelModule.d.ts +15 -0
  70. package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModelModule.js +15 -0
  71. package/es/components/DataGrid/modules/client-side-row-model/index.d.ts +1 -0
  72. package/es/components/DataGrid/modules/client-side-row-model/index.js +1 -0
  73. package/es/components/DataGrid/modules/clipboard/clipboard/clipboardService.d.ts +62 -0
  74. package/es/components/DataGrid/modules/clipboard/clipboard/clipboardService.js +923 -0
  75. package/es/components/DataGrid/modules/clipboard/clipboardModule.d.ts +7 -0
  76. package/es/components/DataGrid/modules/clipboard/clipboardModule.js +8 -0
  77. package/es/components/DataGrid/modules/clipboard/index.d.ts +1 -0
  78. package/es/components/DataGrid/modules/clipboard/index.js +1 -0
  79. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnModelItem.d.ts +32 -0
  80. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnModelItem.js +100 -0
  81. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnToolPanel.d.ts +51 -0
  82. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnToolPanel.js +320 -0
  83. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/modelItemUtils.d.ts +20 -0
  84. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/modelItemUtils.js +247 -0
  85. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/pivotModePanel.d.ts +9 -0
  86. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/pivotModePanel.js +93 -0
  87. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.d.ts +32 -0
  88. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.js +186 -0
  89. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.d.ts +49 -0
  90. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.js +546 -0
  91. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.d.ts +26 -0
  92. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.js +264 -0
  93. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.d.ts +32 -0
  94. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.js +151 -0
  95. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.d.ts +43 -0
  96. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.js +369 -0
  97. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.d.ts +62 -0
  98. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.js +475 -0
  99. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.d.ts +24 -0
  100. package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.js +322 -0
  101. package/es/components/DataGrid/modules/column-tool-panel/columnsToolPanelModule.d.ts +24 -0
  102. package/es/components/DataGrid/modules/column-tool-panel/columnsToolPanelModule.js +24 -0
  103. package/es/components/DataGrid/modules/column-tool-panel/index.d.ts +2 -0
  104. package/es/components/DataGrid/modules/column-tool-panel/index.js +3 -0
  105. package/es/components/DataGrid/modules/menu/index.d.ts +1 -0
  106. package/es/components/DataGrid/modules/menu/index.js +1 -0
  107. package/es/components/DataGrid/modules/menu/menu/contextMenu.d.ts +26 -0
  108. package/es/components/DataGrid/modules/menu/menu/contextMenu.js +329 -0
  109. package/es/components/DataGrid/modules/menu/menu/enterpriseMenu.d.ts +85 -0
  110. package/es/components/DataGrid/modules/menu/menu/enterpriseMenu.js +639 -0
  111. package/es/components/DataGrid/modules/menu/menu/menuItemMapper.d.ts +15 -0
  112. package/es/components/DataGrid/modules/menu/menu/menuItemMapper.js +565 -0
  113. package/es/components/DataGrid/modules/menu/menuModule.d.ts +8 -0
  114. package/es/components/DataGrid/modules/menu/menuModule.js +8 -0
  115. package/es/components/DataGrid/modules/row-grouping/index.d.ts +4 -0
  116. package/es/components/DataGrid/modules/row-grouping/index.js +4 -0
  117. package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggFuncService.d.ts +23 -0
  118. package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggFuncService.js +303 -0
  119. package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggregationStage.d.ts +20 -0
  120. package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggregationStage.js +326 -0
  121. package/es/components/DataGrid/modules/row-grouping/rowGrouping/batchRemover.d.ts +10 -0
  122. package/es/components/DataGrid/modules/row-grouping/rowGrouping/batchRemover.js +71 -0
  123. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.d.ts +75 -0
  124. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.js +618 -0
  125. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.d.ts +40 -0
  126. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.js +460 -0
  127. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.d.ts +11 -0
  128. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.js +108 -0
  129. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.d.ts +17 -0
  130. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.js +170 -0
  131. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.d.ts +15 -0
  132. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.js +133 -0
  133. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.d.ts +15 -0
  134. package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.js +133 -0
  135. package/es/components/DataGrid/modules/row-grouping/rowGrouping/filterAggregatesStage.d.ts +9 -0
  136. package/es/components/DataGrid/modules/row-grouping/rowGrouping/filterAggregatesStage.js +175 -0
  137. package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupStage.d.ts +47 -0
  138. package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupStage.js +814 -0
  139. package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotColDefService.d.ts +24 -0
  140. package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotColDefService.js +478 -0
  141. package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotStage.d.ts +19 -0
  142. package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotStage.js +219 -0
  143. package/es/components/DataGrid/modules/row-grouping/rowGroupingModule.d.ts +16 -0
  144. package/es/components/DataGrid/modules/row-grouping/rowGroupingModule.js +16 -0
  145. package/es/components/DataGrid/modules/server-side-row-model/index.d.ts +1 -0
  146. package/es/components/DataGrid/modules/server-side-row-model/index.js +1 -0
  147. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/blockUtils.d.ts +47 -0
  148. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/blockUtils.js +444 -0
  149. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/infiniteStoreBlock.d.ts +92 -0
  150. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/infiniteStoreBlock.js +510 -0
  151. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/expandListener.d.ts +9 -0
  152. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/expandListener.js +115 -0
  153. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/filterListener.d.ts +9 -0
  154. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/filterListener.js +114 -0
  155. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/listenerUtils.d.ts +5 -0
  156. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/listenerUtils.js +68 -0
  157. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/sortListener.d.ts +13 -0
  158. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/sortListener.js +194 -0
  159. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/nodeManager.d.ts +7 -0
  160. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/nodeManager.js +63 -0
  161. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/serverSideRowModel.d.ts +88 -0
  162. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/serverSideRowModel.js +572 -0
  163. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/fullStore.d.ts +108 -0
  164. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/fullStore.js +876 -0
  165. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/infiniteStore.d.ts +102 -0
  166. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/infiniteStore.js +918 -0
  167. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeFactory.d.ts +12 -0
  168. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeFactory.js +141 -0
  169. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeUtils.d.ts +35 -0
  170. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeUtils.js +154 -0
  171. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/transactionManager.d.ts +23 -0
  172. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/transactionManager.js +210 -0
  173. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModelModule.d.ts +18 -0
  174. package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModelModule.js +18 -0
  175. package/es/components/DataGrid/modules/side-bar/index.d.ts +2 -0
  176. package/es/components/DataGrid/modules/side-bar/index.js +2 -0
  177. package/es/components/DataGrid/modules/side-bar/sideBar/common/toolPanelColDefService.d.ts +11 -0
  178. package/es/components/DataGrid/modules/side-bar/sideBar/common/toolPanelColDefService.js +280 -0
  179. package/es/components/DataGrid/modules/side-bar/sideBar/horizontalResizeComp.d.ts +19 -0
  180. package/es/components/DataGrid/modules/side-bar/sideBar/horizontalResizeComp.js +132 -0
  181. package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonComp.d.ts +16 -0
  182. package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonComp.js +108 -0
  183. package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonsComp.d.ts +18 -0
  184. package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonsComp.js +115 -0
  185. package/es/components/DataGrid/modules/side-bar/sideBar/sideBarComp.d.ts +29 -0
  186. package/es/components/DataGrid/modules/side-bar/sideBar/sideBarComp.js +353 -0
  187. package/es/components/DataGrid/modules/side-bar/sideBar/toolPanelWrapper.d.ts +17 -0
  188. package/es/components/DataGrid/modules/side-bar/sideBar/toolPanelWrapper.js +128 -0
  189. package/es/components/DataGrid/modules/side-bar/sideBarModule.d.ts +19 -0
  190. package/es/components/DataGrid/modules/side-bar/sideBarModule.js +19 -0
  191. package/es/components/DataGrid/typings.d.ts +138 -0
  192. package/es/components/DataGrid/typings.js +1 -0
  193. package/es/components/DataGrid/utils.d.ts +43 -0
  194. package/es/components/DataGrid/utils.js +242 -0
  195. package/es/components/Dropdown/index.d.ts +15 -0
  196. package/es/components/Dropdown/index.js +55 -0
  197. package/es/components/Dropdown/index.less +13 -0
  198. package/es/components/DurationPicker/index.d.ts +26 -0
  199. package/es/components/DurationPicker/index.js +204 -0
  200. package/es/components/DurationPicker/index.less +61 -0
  201. package/es/components/EditableTable/EditableCell.d.ts +12 -0
  202. package/es/components/EditableTable/EditableCell.js +41 -0
  203. package/es/components/EditableTable/EditableTableFormItem.d.ts +6 -0
  204. package/es/components/EditableTable/EditableTableFormItem.js +47 -0
  205. package/es/components/EditableTable/Table.d.ts +6 -0
  206. package/es/components/EditableTable/Table.js +362 -0
  207. package/es/components/EditableTable/index.d.ts +9 -0
  208. package/es/components/EditableTable/index.js +8 -0
  209. package/es/components/EditableTable/index.less +29 -0
  210. package/es/components/EditableTable/typings.d.ts +90 -0
  211. package/es/components/EditableTable/util.d.ts +25 -0
  212. package/es/components/EditableTable/util.js +399 -0
  213. package/es/components/Filter/index.d.ts +15 -0
  214. package/es/components/Filter/index.js +644 -0
  215. package/es/components/Filter/index.less +82 -0
  216. package/es/components/Filter/typings.d.ts +35 -0
  217. package/es/components/FormLayout/index.d.ts +32 -0
  218. package/es/components/FormLayout/index.js +41 -0
  219. package/es/components/FormLayout/index.less +109 -0
  220. package/es/components/Icons/BigTip/error.png +0 -0
  221. package/es/components/Icons/BigTip/index.d.ts +6 -0
  222. package/es/components/Icons/BigTip/index.js +46 -0
  223. package/es/components/Icons/BigTip/info.png +0 -0
  224. package/es/components/Icons/BigTip/success.png +0 -0
  225. package/es/components/Icons/BigTip/warning.png +0 -0
  226. package/es/components/Icons/Calendar.d.ts +5 -0
  227. package/es/components/Icons/Calendar.js +43 -0
  228. package/es/components/Icons/Close.d.ts +5 -0
  229. package/es/components/Icons/Close.js +25 -0
  230. package/es/components/Icons/CollapseUp.d.ts +5 -0
  231. package/es/components/Icons/CollapseUp.js +27 -0
  232. package/es/components/Icons/DarkSearch.d.ts +5 -0
  233. package/es/components/Icons/DarkSearch.js +34 -0
  234. package/es/components/Icons/Down.d.ts +5 -0
  235. package/es/components/Icons/Down.js +31 -0
  236. package/es/components/Icons/Empty.d.ts +3 -0
  237. package/es/components/Icons/Empty.js +267 -0
  238. package/es/components/Icons/LookUp.d.ts +5 -0
  239. package/es/components/Icons/LookUp.js +70 -0
  240. package/es/components/Icons/More.d.ts +5 -0
  241. package/es/components/Icons/More.js +40 -0
  242. package/es/components/Icons/Search.d.ts +5 -0
  243. package/es/components/Icons/Search.js +31 -0
  244. package/es/components/Icons/Tip.d.ts +6 -0
  245. package/es/components/Icons/Tip.js +165 -0
  246. package/es/components/Icons/index.d.ts +25 -0
  247. package/es/components/Icons/index.js +25 -0
  248. package/es/components/Layout/index.d.ts +41 -0
  249. package/es/components/Layout/index.js +173 -0
  250. package/es/components/Layout/index.less +136 -0
  251. package/es/components/PageLoading/index.d.ts +5 -0
  252. package/es/components/PageLoading/index.js +15 -0
  253. package/es/components/PageLoading/index.less +8 -0
  254. package/es/components/Popup/index.d.ts +39 -0
  255. package/es/components/Popup/index.js +223 -0
  256. package/es/components/Popup/index.less +12 -0
  257. package/es/components/Portal/index.d.ts +17 -0
  258. package/es/components/Portal/index.js +141 -0
  259. package/es/components/Section/TabBar.d.ts +12 -0
  260. package/es/components/Section/TabBar.js +51 -0
  261. package/es/components/Section/index.d.ts +54 -0
  262. package/es/components/Section/index.js +96 -0
  263. package/es/components/Section/index.less +130 -0
  264. package/es/components/SelectView/index.d.ts +47 -0
  265. package/es/components/SelectView/index.js +244 -0
  266. package/es/components/SelectView/index.less +60 -0
  267. package/es/components/SiderTree/TreeNodeTitle.d.ts +9 -0
  268. package/es/components/SiderTree/TreeNodeTitle.js +107 -0
  269. package/es/components/SiderTree/empty.png +0 -0
  270. package/es/components/SiderTree/index.d.ts +37 -0
  271. package/es/components/SiderTree/index.js +217 -0
  272. package/es/components/SiderTree/index.less +222 -0
  273. package/es/components/SiderTree/typings.d.ts +19 -0
  274. package/es/components/SymbolIcon/index.d.ts +8 -0
  275. package/es/components/SymbolIcon/index.js +32 -0
  276. package/es/components/SymbolIcon/index.less +7 -0
  277. package/es/components/TabBar/index.d.ts +14 -0
  278. package/es/components/TabBar/index.js +52 -0
  279. package/es/components/TabBar/index.less +31 -0
  280. package/es/components/Table/index.d.ts +3 -0
  281. package/es/components/Table/index.js +242 -0
  282. package/es/components/Table/typings.d.ts +25 -0
  283. package/es/components/Table/utils.d.ts +2 -0
  284. package/es/components/Table/utils.js +3 -0
  285. package/es/components/utils.d.ts +3 -0
  286. package/es/components/utils.js +20 -0
  287. package/es/constants.d.ts +1 -0
  288. package/es/constants.js +1 -0
  289. package/es/{useBatchOperator → hooks/useBatchOperator}/index.d.ts +2 -2
  290. package/es/{useBatchOperator → hooks/useBatchOperator}/index.js +120 -57
  291. package/es/{usePageTrack → hooks/usePageTrack}/index.d.ts +0 -0
  292. package/es/{usePageTrack → hooks/usePageTrack}/index.js +0 -0
  293. package/es/index.d.ts +33 -6
  294. package/es/index.js +30 -6
  295. package/es/index.less +25 -1
  296. package/es/init.d.ts +3 -0
  297. package/es/init.js +153 -0
  298. package/es/layouts/BasicLayout/components/Main.d.ts +10 -0
  299. package/es/layouts/BasicLayout/components/Main.js +390 -0
  300. package/es/layouts/BasicLayout/components/MainFramework/components/DropMenu/index.d.ts +11 -0
  301. package/es/layouts/BasicLayout/components/MainFramework/components/DropMenu/index.js +104 -0
  302. package/es/layouts/BasicLayout/components/MainFramework/components/DropMenu/index.less +59 -0
  303. package/es/layouts/BasicLayout/components/MainFramework/components/Menu/index.d.ts +10 -0
  304. package/es/layouts/BasicLayout/components/MainFramework/components/Menu/index.js +667 -0
  305. package/es/layouts/BasicLayout/components/MainFramework/components/Menu/index.less +445 -0
  306. package/es/layouts/BasicLayout/components/MainFramework/components/RefreshButton/index.d.ts +6 -0
  307. package/es/layouts/BasicLayout/components/MainFramework/components/RefreshButton/index.js +72 -0
  308. package/es/layouts/BasicLayout/components/MainFramework/components/RefreshButton/index.less +30 -0
  309. package/es/layouts/BasicLayout/components/MainFramework/components/TabBar/index.d.ts +10 -0
  310. package/es/layouts/BasicLayout/components/MainFramework/components/TabBar/index.js +116 -0
  311. package/es/layouts/BasicLayout/components/MainFramework/components/TabBar/index.less +155 -0
  312. package/es/layouts/BasicLayout/components/MainFramework/components/WaterMark/index.d.ts +6 -0
  313. package/es/layouts/BasicLayout/components/MainFramework/components/WaterMark/index.js +70 -0
  314. package/es/layouts/BasicLayout/components/MainFramework/index.d.ts +28 -0
  315. package/es/layouts/BasicLayout/components/MainFramework/index.js +78 -0
  316. package/es/layouts/BasicLayout/components/MainFramework/index.less +97 -0
  317. package/es/layouts/BasicLayout/components/MainFramework/typings.d.ts +10 -0
  318. package/es/layouts/BasicLayout/index.d.ts +3 -0
  319. package/es/layouts/BasicLayout/index.js +98 -0
  320. package/es/layouts/BasicLayout/typings.d.ts +82 -0
  321. package/es/layouts/BlankLayout/index.d.ts +5 -0
  322. package/es/layouts/BlankLayout/index.js +5 -0
  323. package/es/layouts/Breadcrumb/index.d.ts +6 -0
  324. package/es/layouts/Breadcrumb/index.js +75 -0
  325. package/es/layouts/MicroLayout/index.d.ts +10 -0
  326. package/es/layouts/MicroLayout/index.js +105 -0
  327. package/es/layouts/MicroLayout/typings.d.ts +25 -0
  328. package/es/layouts/components/CachableRoute.d.ts +2 -0
  329. package/es/layouts/components/CachableRoute.js +38 -0
  330. package/es/layouts/components/RouteTab.d.ts +20 -0
  331. package/es/layouts/components/RouteTab.js +40 -0
  332. package/es/layouts/components/Switch.d.ts +2 -0
  333. package/es/layouts/components/Switch.js +63 -0
  334. package/es/layouts/index.d.ts +4 -0
  335. package/es/layouts/index.js +4 -0
  336. package/es/layouts/typings.d.ts +29 -0
  337. package/es/layouts/utils.d.ts +23 -0
  338. package/es/layouts/utils.js +175 -0
  339. package/es/styles/overrides.less +191 -0
  340. package/es/styles/theme.less +9 -0
  341. package/es/styles/utils.less +110 -0
  342. package/package.json +75 -22
  343. package/es/subject.d.ts +0 -12
  344. package/es/subject.js +0 -30
@@ -0,0 +1,923 @@
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
+
3
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
+
5
+ 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); } }
6
+
7
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
8
+
9
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
10
+
11
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
+
13
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
14
+
15
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
16
+
17
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
18
+
19
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
20
+
21
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
22
+
23
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
24
+
25
+ var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
26
+ var c = arguments.length,
27
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
28
+ 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--) {
30
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
31
+ }
32
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33
+ };
34
+
35
+ import { _, Autowired, Bean, BeanStub, ChangedPath, Constants, Events, PostConstruct, Optional } from '@ag-grid-community/core';
36
+
37
+ var ClipboardService = /*#__PURE__*/function (_BeanStub) {
38
+ _inherits(ClipboardService, _BeanStub);
39
+
40
+ var _super = _createSuper(ClipboardService);
41
+
42
+ function ClipboardService() {
43
+ var _this;
44
+
45
+ _classCallCheck(this, ClipboardService);
46
+
47
+ _this = _super.apply(this, arguments);
48
+ _this.lastPasteOperationTime = 0;
49
+ _this.navigatorApiFailed = false;
50
+ return _this;
51
+ }
52
+
53
+ _createClass(ClipboardService, [{
54
+ key: "init",
55
+ value: function init() {
56
+ var _this2 = this;
57
+
58
+ this.logger = this.loggerFactory.create('ClipboardService');
59
+
60
+ if (this.rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {
61
+ this.clientSideRowModel = this.rowModel;
62
+ }
63
+
64
+ this.ctrlsService.whenReady(function (p) {
65
+ _this2.gridCtrl = p.gridCtrl;
66
+ });
67
+ }
68
+ }, {
69
+ key: "pasteFromClipboard",
70
+ value: function pasteFromClipboard() {
71
+ var _this3 = this;
72
+
73
+ this.logger.log('pasteFromClipboard'); // Method 1 - native clipboard API, available in modern chrome browsers
74
+
75
+ var allowNavigator = !this.gridOptionsWrapper.isSuppressClipboardApi(); // Some browsers (Firefox) do not allow Web Applications to read from
76
+ // the clipboard so verify if not only the ClipboardAPI is available,
77
+ // but also if the `readText` method is public.
78
+
79
+ if (allowNavigator && !this.navigatorApiFailed && navigator.clipboard && navigator.clipboard.readText) {
80
+ navigator.clipboard.readText().then(this.processClipboardData.bind(this)).catch(function (e) {
81
+ _.doOnce(function () {
82
+ 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');
84
+ }, 'clipboardApiError');
85
+
86
+ _this3.navigatorApiFailed = true;
87
+
88
+ _this3.pasteFromClipboardLegacy();
89
+ });
90
+ } else {
91
+ this.pasteFromClipboardLegacy();
92
+ }
93
+ }
94
+ }, {
95
+ key: "pasteFromClipboardLegacy",
96
+ value: function pasteFromClipboardLegacy() {
97
+ var _this4 = this;
98
+
99
+ // Method 2 - if modern API fails, the old school hack
100
+ var defaultPrevented = false;
101
+
102
+ var handlePasteEvent = function handlePasteEvent(e) {
103
+ var currentPastOperationTime = new Date().getTime();
104
+
105
+ if (currentPastOperationTime - _this4.lastPasteOperationTime < 50) {
106
+ defaultPrevented = true;
107
+ e.preventDefault();
108
+ }
109
+
110
+ _this4.lastPasteOperationTime = currentPastOperationTime;
111
+ };
112
+
113
+ this.executeOnTempElement(function (textArea) {
114
+ textArea.addEventListener('paste', handlePasteEvent);
115
+ textArea.focus({
116
+ preventScroll: true
117
+ });
118
+ }, function (element) {
119
+ var data = element.value;
120
+
121
+ if (!defaultPrevented) {
122
+ _this4.processClipboardData(data);
123
+ } else {
124
+ _this4.refocusLastFocusedCell();
125
+ }
126
+
127
+ element.removeEventListener('paste', handlePasteEvent);
128
+ });
129
+ }
130
+ }, {
131
+ key: "refocusLastFocusedCell",
132
+ value: function refocusLastFocusedCell() {
133
+ var focusedCell = this.focusService.getFocusedCell();
134
+
135
+ if (focusedCell) {
136
+ this.focusService.setFocusedCell({
137
+ rowIndex: focusedCell.rowIndex,
138
+ column: focusedCell.column,
139
+ rowPinned: focusedCell.rowPinned,
140
+ forceBrowserFocus: true
141
+ });
142
+ }
143
+ }
144
+ }, {
145
+ key: "processClipboardData",
146
+ value: function processClipboardData(data) {
147
+ var _this5 = this;
148
+
149
+ if (data == null) {
150
+ return;
151
+ }
152
+
153
+ var parsedData = _.stringToArray(data, this.gridOptionsWrapper.getClipboardDelimiter());
154
+
155
+ var userFunc = this.gridOptionsWrapper.getProcessDataFromClipboardFunc();
156
+
157
+ if (userFunc) {
158
+ parsedData = userFunc({
159
+ data: parsedData
160
+ });
161
+ }
162
+
163
+ if (parsedData == null) {
164
+ return;
165
+ }
166
+
167
+ if (this.gridOptionsWrapper.isSuppressLastEmptyLineOnPaste()) {
168
+ this.removeLastLineIfBlank(parsedData);
169
+ }
170
+
171
+ var pasteOperation = function pasteOperation(cellsToFlash, updatedRowNodes, focusedCell, changedPath) {
172
+ var rangeActive = _this5.rangeService && _this5.rangeService.isMoreThanOneCell();
173
+
174
+ var pasteIntoRange = rangeActive && !_this5.hasOnlyOneValueToPaste(parsedData);
175
+
176
+ if (pasteIntoRange) {
177
+ _this5.pasteIntoActiveRange(parsedData, cellsToFlash, updatedRowNodes, changedPath);
178
+ } else {
179
+ _this5.pasteStartingFromFocusedCell(parsedData, cellsToFlash, updatedRowNodes, focusedCell, changedPath);
180
+ }
181
+ };
182
+
183
+ this.doPasteOperation(pasteOperation);
184
+ } // common code to paste operations, e.g. paste to cell, paste to range, and copy range down
185
+
186
+ }, {
187
+ key: "doPasteOperation",
188
+ value: function doPasteOperation(pasteOperationFunc) {
189
+ var api = this.gridOptionsWrapper.getApi();
190
+ var columnApi = this.gridOptionsWrapper.getColumnApi();
191
+ var source = 'clipboard';
192
+ this.eventService.dispatchEvent({
193
+ type: Events.EVENT_PASTE_START,
194
+ api: api,
195
+ columnApi: columnApi,
196
+ source: source
197
+ });
198
+ var changedPath;
199
+
200
+ if (this.clientSideRowModel) {
201
+ var onlyChangedColumns = this.gridOptionsWrapper.isAggregateOnlyChangedColumns();
202
+ changedPath = new ChangedPath(onlyChangedColumns, this.clientSideRowModel.getRootNode());
203
+ }
204
+
205
+ var cellsToFlash = {};
206
+ var updatedRowNodes = [];
207
+ var focusedCell = this.focusService.getFocusedCell();
208
+ pasteOperationFunc(cellsToFlash, updatedRowNodes, focusedCell, changedPath);
209
+
210
+ if (changedPath) {
211
+ this.clientSideRowModel.doAggregate(changedPath);
212
+ }
213
+
214
+ this.rowRenderer.refreshCells();
215
+ this.dispatchFlashCells(cellsToFlash);
216
+ this.fireRowChanged(updatedRowNodes); // if using the clipboard hack with a temp element, then the focus has been lost,
217
+ // so need to put it back. otherwise paste operation loosed focus on cell and keyboard
218
+ // navigation stops.
219
+
220
+ this.refocusLastFocusedCell();
221
+ var event = {
222
+ type: Events.EVENT_PASTE_END,
223
+ source: source
224
+ };
225
+ this.eventService.dispatchEvent(event);
226
+ }
227
+ }, {
228
+ key: "pasteIntoActiveRange",
229
+ value: function pasteIntoActiveRange(clipboardData, cellsToFlash, updatedRowNodes, changedPath) {
230
+ var _this6 = this;
231
+
232
+ // true if clipboard data can be evenly pasted into range, otherwise false
233
+ var abortRepeatingPasteIntoRows = this.getRangeSize() % clipboardData.length != 0;
234
+ var indexOffset = 0;
235
+ var dataRowIndex = 0;
236
+
237
+ var rowCallback = function rowCallback(currentRow, rowNode, columns, index) {
238
+ var atEndOfClipboardData = index - indexOffset >= clipboardData.length;
239
+
240
+ if (atEndOfClipboardData) {
241
+ if (abortRepeatingPasteIntoRows) {
242
+ return;
243
+ } // increment offset and reset data index to repeat paste of data
244
+
245
+
246
+ indexOffset += dataRowIndex;
247
+ dataRowIndex = 0;
248
+ }
249
+
250
+ var currentRowData = clipboardData[index - indexOffset]; // otherwise we are not the first row, so copy
251
+
252
+ updatedRowNodes.push(rowNode);
253
+
254
+ var processCellFromClipboardFunc = _this6.gridOptionsWrapper.getProcessCellFromClipboardFunc();
255
+
256
+ columns.forEach(function (column, idx) {
257
+ if (!column.isCellEditable(rowNode) || column.isSuppressPaste(rowNode)) {
258
+ return;
259
+ } // repeat data for columns we don't have data for - happens when to range is bigger than copied data range
260
+
261
+
262
+ if (idx >= currentRowData.length) {
263
+ idx = idx % currentRowData.length;
264
+ }
265
+
266
+ var newValue = _this6.processCell(rowNode, column, currentRowData[idx], Constants.EXPORT_TYPE_DRAG_COPY, processCellFromClipboardFunc);
267
+
268
+ rowNode.setDataValue(column, newValue, Constants.SOURCE_PASTE);
269
+
270
+ if (changedPath) {
271
+ changedPath.addParentNode(rowNode.parent, [column]);
272
+ }
273
+
274
+ var cellId = _this6.cellPositionUtils.createIdFromValues(currentRow.rowIndex, column, currentRow.rowPinned);
275
+
276
+ cellsToFlash[cellId] = true;
277
+ });
278
+ dataRowIndex++;
279
+ };
280
+
281
+ this.iterateActiveRanges(false, rowCallback);
282
+ }
283
+ }, {
284
+ key: "pasteStartingFromFocusedCell",
285
+ value: function pasteStartingFromFocusedCell(parsedData, cellsToFlash, updatedRowNodes, focusedCell, changedPath) {
286
+ if (!focusedCell) {
287
+ return;
288
+ }
289
+
290
+ var currentRow = {
291
+ rowIndex: focusedCell.rowIndex,
292
+ rowPinned: focusedCell.rowPinned
293
+ };
294
+ var columnsToPasteInto = this.columnModel.getDisplayedColumnsStartingAt(focusedCell.column);
295
+
296
+ if (this.isPasteSingleValueIntoRange(parsedData)) {
297
+ this.pasteSingleValueIntoRange(parsedData, updatedRowNodes, cellsToFlash, changedPath);
298
+ } else {
299
+ this.pasteMultipleValues(parsedData, currentRow, updatedRowNodes, columnsToPasteInto, cellsToFlash, Constants.EXPORT_TYPE_CLIPBOARD, changedPath);
300
+ }
301
+ } // if range is active, and only one cell, then we paste this cell into all cells in the active range.
302
+
303
+ }, {
304
+ key: "isPasteSingleValueIntoRange",
305
+ value: function isPasteSingleValueIntoRange(parsedData) {
306
+ return this.hasOnlyOneValueToPaste(parsedData) && this.rangeService != null && !this.rangeService.isEmpty();
307
+ }
308
+ }, {
309
+ key: "pasteSingleValueIntoRange",
310
+ value: function pasteSingleValueIntoRange(parsedData, updatedRowNodes, cellsToFlash, changedPath) {
311
+ var _this7 = this;
312
+
313
+ var value = parsedData[0][0];
314
+
315
+ var rowCallback = function rowCallback(currentRow, rowNode, columns) {
316
+ updatedRowNodes.push(rowNode);
317
+ columns.forEach(function (column) {
318
+ return _this7.updateCellValue(rowNode, column, value, cellsToFlash, Constants.EXPORT_TYPE_CLIPBOARD, changedPath);
319
+ });
320
+ };
321
+
322
+ this.iterateActiveRanges(false, rowCallback);
323
+ }
324
+ }, {
325
+ key: "hasOnlyOneValueToPaste",
326
+ value: function hasOnlyOneValueToPaste(parsedData) {
327
+ return parsedData.length === 1 && parsedData[0].length === 1;
328
+ }
329
+ }, {
330
+ key: "copyRangeDown",
331
+ value: function copyRangeDown() {
332
+ var _this8 = this;
333
+
334
+ if (!this.rangeService || this.rangeService.isEmpty()) {
335
+ return;
336
+ }
337
+
338
+ var firstRowValues = [];
339
+
340
+ var pasteOperation = function pasteOperation(cellsToFlash, updatedRowNodes, focusedCell, changedPath) {
341
+ var processCellForClipboardFunc = _this8.gridOptionsWrapper.getProcessCellForClipboardFunc();
342
+
343
+ var processCellFromClipboardFunc = _this8.gridOptionsWrapper.getProcessCellFromClipboardFunc();
344
+
345
+ var rowCallback = function rowCallback(currentRow, rowNode, columns) {
346
+ // take reference of first row, this is the one we will be using to copy from
347
+ if (!firstRowValues.length) {
348
+ // two reasons for looping through columns
349
+ columns.forEach(function (column) {
350
+ // 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);
352
+
353
+ firstRowValues.push(value);
354
+ });
355
+ } else {
356
+ // otherwise we are not the first row, so copy
357
+ updatedRowNodes.push(rowNode);
358
+ columns.forEach(function (column, index) {
359
+ if (!column.isCellEditable(rowNode) || column.isSuppressPaste(rowNode)) {
360
+ return;
361
+ }
362
+
363
+ var firstRowValue = _this8.processCell(rowNode, column, firstRowValues[index], Constants.EXPORT_TYPE_DRAG_COPY, processCellFromClipboardFunc);
364
+
365
+ rowNode.setDataValue(column, firstRowValue, Constants.SOURCE_PASTE);
366
+
367
+ if (changedPath) {
368
+ changedPath.addParentNode(rowNode.parent, [column]);
369
+ }
370
+
371
+ var cellId = _this8.cellPositionUtils.createIdFromValues(currentRow.rowIndex, column, currentRow.rowPinned);
372
+
373
+ cellsToFlash[cellId] = true;
374
+ });
375
+ }
376
+ };
377
+
378
+ _this8.iterateActiveRanges(true, rowCallback);
379
+ };
380
+
381
+ this.doPasteOperation(pasteOperation);
382
+ }
383
+ }, {
384
+ key: "removeLastLineIfBlank",
385
+ value: function removeLastLineIfBlank(parsedData) {
386
+ // remove last row if empty, excel puts empty last row in
387
+ var lastLine = _.last(parsedData);
388
+
389
+ var lastLineIsBlank = lastLine && lastLine.length === 1 && lastLine[0] === '';
390
+
391
+ if (lastLineIsBlank) {
392
+ // do not remove the last empty line when that is the only line pasted
393
+ if (parsedData.length === 1) {
394
+ return;
395
+ }
396
+
397
+ _.removeFromArray(parsedData, lastLine);
398
+ }
399
+ }
400
+ }, {
401
+ key: "fireRowChanged",
402
+ value: function fireRowChanged(rowNodes) {
403
+ var _this9 = this;
404
+
405
+ if (!this.gridOptionsWrapper.isFullRowEdit()) {
406
+ return;
407
+ }
408
+
409
+ rowNodes.forEach(function (rowNode) {
410
+ var event = {
411
+ type: Events.EVENT_ROW_VALUE_CHANGED,
412
+ node: rowNode,
413
+ data: rowNode.data,
414
+ rowIndex: rowNode.rowIndex,
415
+ rowPinned: rowNode.rowPinned
416
+ };
417
+
418
+ _this9.eventService.dispatchEvent(event);
419
+ });
420
+ }
421
+ }, {
422
+ key: "pasteMultipleValues",
423
+ value: function pasteMultipleValues(clipboardGridData, currentRow, updatedRowNodes, columnsToPasteInto, cellsToFlash, type, changedPath) {
424
+ var _this10 = this;
425
+
426
+ var rowPointer = currentRow; // if doing CSRM and NOT tree data, then it means groups are aggregates, which are read only,
427
+ // so we should skip them when doing paste operations.
428
+
429
+ var skipGroupRows = this.clientSideRowModel != null && !this.gridOptionsWrapper.isTreeData();
430
+
431
+ var getNextGoodRowNode = function getNextGoodRowNode() {
432
+ while (true) {
433
+ if (!rowPointer) {
434
+ return null;
435
+ }
436
+
437
+ var res = _this10.rowPositionUtils.getRowNode(rowPointer); // move to next row down for next set of values
438
+
439
+
440
+ rowPointer = _this10.cellNavigationService.getRowBelow({
441
+ rowPinned: rowPointer.rowPinned,
442
+ rowIndex: rowPointer.rowIndex
443
+ }); // if no more rows, return null
444
+
445
+ if (res == null) {
446
+ return null;
447
+ } // skip details rows and footer rows, never paste into them as they don't hold data
448
+
449
+
450
+ var skipRow = res.detail || res.footer || skipGroupRows && res.group; // skipping row means we go into the next iteration of the while loop
451
+
452
+ if (!skipRow) {
453
+ return res;
454
+ }
455
+ }
456
+ };
457
+
458
+ clipboardGridData.forEach(function (clipboardRowData) {
459
+ var rowNode = getNextGoodRowNode(); // if we have come to end of rows in grid, then skip
460
+
461
+ if (!rowNode) {
462
+ return;
463
+ }
464
+
465
+ clipboardRowData.forEach(function (value, index) {
466
+ return _this10.updateCellValue(rowNode, columnsToPasteInto[index], value, cellsToFlash, type, changedPath);
467
+ });
468
+ updatedRowNodes.push(rowNode);
469
+ });
470
+ }
471
+ }, {
472
+ key: "updateCellValue",
473
+ value: function updateCellValue(rowNode, column, value, cellsToFlash, type, changedPath) {
474
+ if (!rowNode || !column || !column.isCellEditable(rowNode) || column.isSuppressPaste(rowNode)) {
475
+ return;
476
+ }
477
+
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);
481
+ cellsToFlash[cellId] = true;
482
+
483
+ if (changedPath) {
484
+ changedPath.addParentNode(rowNode.parent, [column]);
485
+ }
486
+ }
487
+ }, {
488
+ key: "copyToClipboard",
489
+ value: function copyToClipboard() {
490
+ var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
491
+ var includeHeaders = params.includeHeaders,
492
+ includeGroupHeaders = params.includeGroupHeaders;
493
+ this.logger.log("copyToClipboard: includeHeaders = ".concat(includeHeaders)); // don't override 'includeHeaders' if it has been explicitly set to 'false'
494
+
495
+ if (includeHeaders == null) {
496
+ includeHeaders = this.gridOptionsWrapper.isCopyHeadersToClipboard();
497
+ }
498
+
499
+ if (includeGroupHeaders == null) {
500
+ includeGroupHeaders = this.gridOptionsWrapper.isCopyGroupHeadersToClipboard();
501
+ }
502
+
503
+ var copyParams = {
504
+ includeHeaders: includeHeaders,
505
+ includeGroupHeaders: includeGroupHeaders
506
+ };
507
+ var shouldCopyRows = !this.gridOptionsWrapper.isSuppressCopyRowsToClipboard(); // Copy priority is Range > Row > Focus
508
+
509
+ if (this.rangeService && !this.rangeService.isEmpty() && !this.shouldSkipSingleCellRange()) {
510
+ this.copySelectedRangeToClipboard(copyParams);
511
+ } else if (shouldCopyRows && !this.selectionService.isEmpty()) {
512
+ this.copySelectedRowsToClipboard(copyParams);
513
+ } else if (this.focusService.isAnyCellFocused()) {
514
+ this.copyFocusedCellToClipboard(copyParams);
515
+ }
516
+ }
517
+ }, {
518
+ key: "shouldSkipSingleCellRange",
519
+ value: function shouldSkipSingleCellRange() {
520
+ return this.gridOptionsWrapper.isSuppressCopySingleCellRanges() && !this.rangeService.isMoreThanOneCell();
521
+ }
522
+ }, {
523
+ key: "iterateActiveRanges",
524
+ value: function iterateActiveRanges(onlyFirst, rowCallback, columnCallback) {
525
+ var _this11 = this;
526
+
527
+ if (!this.rangeService || this.rangeService.isEmpty()) {
528
+ return;
529
+ }
530
+
531
+ var cellRanges = this.rangeService.getCellRanges();
532
+
533
+ if (onlyFirst) {
534
+ this.iterateActiveRange(cellRanges[0], rowCallback, columnCallback, true);
535
+ } else {
536
+ cellRanges.forEach(function (range, idx) {
537
+ return _this11.iterateActiveRange(range, rowCallback, columnCallback, idx === cellRanges.length - 1);
538
+ });
539
+ }
540
+ }
541
+ }, {
542
+ key: "iterateActiveRange",
543
+ value: function iterateActiveRange(range, rowCallback, columnCallback, isLastRange) {
544
+ if (!this.rangeService) {
545
+ return;
546
+ }
547
+
548
+ var currentRow = this.rangeService.getRangeStartRow(range);
549
+ var lastRow = this.rangeService.getRangeEndRow(range);
550
+
551
+ if (columnCallback && range.columns) {
552
+ columnCallback(range.columns);
553
+ }
554
+
555
+ var rangeIndex = 0;
556
+ var isLastRow = false; // the currentRow could be missing if the user sets the active range manually, and sets a range
557
+ // that is outside of the grid (eg. sets range rows 0 to 100, but grid has only 20 rows).
558
+
559
+ while (!isLastRow && currentRow != null) {
560
+ var rowNode = this.rowPositionUtils.getRowNode(currentRow);
561
+ isLastRow = this.rowPositionUtils.sameRow(currentRow, lastRow);
562
+ rowCallback(currentRow, rowNode, range.columns, rangeIndex++, isLastRow && isLastRange);
563
+ currentRow = this.cellNavigationService.getRowBelow(currentRow);
564
+ }
565
+ }
566
+ }, {
567
+ key: "copySelectedRangeToClipboard",
568
+ value: function copySelectedRangeToClipboard() {
569
+ var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
570
+
571
+ if (!this.rangeService || this.rangeService.isEmpty()) {
572
+ return;
573
+ }
574
+
575
+ var allRangesMerge = this.rangeService.areAllRangesAbleToMerge();
576
+
577
+ var _ref = allRangesMerge ? this.buildDataFromMergedRanges(params) : this.buildDataFromRanges(params),
578
+ data = _ref.data,
579
+ cellsToFlash = _ref.cellsToFlash;
580
+
581
+ this.copyDataToClipboard(data);
582
+ this.dispatchFlashCells(cellsToFlash);
583
+ }
584
+ }, {
585
+ key: "buildDataFromMergedRanges",
586
+ value: function buildDataFromMergedRanges(params) {
587
+ var _this12 = this;
588
+
589
+ var columnsSet = new Set();
590
+ var ranges = this.rangeService.getCellRanges();
591
+ var rowPositionsMap = new Map();
592
+ var allRowPositions = [];
593
+ var allCellsToFlash = {};
594
+ ranges.forEach(function (range) {
595
+ range.columns.forEach(function (col) {
596
+ return columnsSet.add(col);
597
+ });
598
+
599
+ var _this12$getRangeRowPo = _this12.getRangeRowPositionsAndCellsToFlash(range),
600
+ rowPositions = _this12$getRangeRowPo.rowPositions,
601
+ cellsToFlash = _this12$getRangeRowPo.cellsToFlash;
602
+
603
+ rowPositions.forEach(function (rowPosition) {
604
+ var rowPositionAsString = "".concat(rowPosition.rowIndex, "-").concat(rowPosition.rowPinned || 'null');
605
+
606
+ if (!rowPositionsMap.get(rowPositionAsString)) {
607
+ rowPositionsMap.set(rowPositionAsString, true);
608
+ allRowPositions.push(rowPosition);
609
+ }
610
+ });
611
+ Object.assign(allCellsToFlash, cellsToFlash);
612
+ });
613
+ var allColumns = this.columnModel.getAllDisplayedColumns();
614
+ var exportedColumns = Array.from(columnsSet);
615
+ exportedColumns.sort(function (a, b) {
616
+ var posA = allColumns.indexOf(a);
617
+ var posB = allColumns.indexOf(b);
618
+ return posA - posB;
619
+ });
620
+ var data = this.buildExportParams({
621
+ columns: exportedColumns,
622
+ rowPositions: allRowPositions,
623
+ includeHeaders: params.includeHeaders,
624
+ includeGroupHeaders: params.includeGroupHeaders
625
+ });
626
+ return {
627
+ data: data,
628
+ cellsToFlash: allCellsToFlash
629
+ };
630
+ }
631
+ }, {
632
+ key: "buildDataFromRanges",
633
+ value: function buildDataFromRanges(params) {
634
+ var _this13 = this;
635
+
636
+ var ranges = this.rangeService.getCellRanges();
637
+ var data = [];
638
+ var allCellsToFlash = {};
639
+ ranges.forEach(function (range) {
640
+ var _this13$getRangeRowPo = _this13.getRangeRowPositionsAndCellsToFlash(range),
641
+ rowPositions = _this13$getRangeRowPo.rowPositions,
642
+ cellsToFlash = _this13$getRangeRowPo.cellsToFlash;
643
+
644
+ Object.assign(allCellsToFlash, cellsToFlash);
645
+ data.push(_this13.buildExportParams({
646
+ columns: range.columns,
647
+ rowPositions: rowPositions,
648
+ includeHeaders: params.includeHeaders,
649
+ includeGroupHeaders: params.includeGroupHeaders
650
+ }));
651
+ });
652
+ return {
653
+ data: data.join('\n'),
654
+ cellsToFlash: allCellsToFlash
655
+ };
656
+ }
657
+ }, {
658
+ key: "getRangeRowPositionsAndCellsToFlash",
659
+ value: function getRangeRowPositionsAndCellsToFlash(range) {
660
+ var _this14 = this;
661
+
662
+ var rowPositions = [];
663
+ var cellsToFlash = {};
664
+ var startRow = this.rangeService.getRangeStartRow(range);
665
+ var lastRow = this.rangeService.getRangeEndRow(range);
666
+ var node = startRow;
667
+
668
+ while (node) {
669
+ rowPositions.push(node);
670
+ range.columns.forEach(function (column) {
671
+ var cellId = _this14.cellPositionUtils.createIdFromValues(node.rowIndex, column, node.rowPinned);
672
+
673
+ cellsToFlash[cellId] = true;
674
+ });
675
+
676
+ if (this.rowPositionUtils.sameRow(node, lastRow)) {
677
+ break;
678
+ }
679
+
680
+ node = this.cellNavigationService.getRowBelow(node);
681
+ }
682
+
683
+ return {
684
+ rowPositions: rowPositions,
685
+ cellsToFlash: cellsToFlash
686
+ };
687
+ }
688
+ }, {
689
+ key: "copyFocusedCellToClipboard",
690
+ value: function copyFocusedCellToClipboard() {
691
+ var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
692
+ var focusedCell = this.focusService.getFocusedCell();
693
+
694
+ if (focusedCell == null) {
695
+ return;
696
+ }
697
+
698
+ var cellId = this.cellPositionUtils.createId(focusedCell);
699
+ var currentRow = {
700
+ rowPinned: focusedCell.rowPinned,
701
+ rowIndex: focusedCell.rowIndex
702
+ };
703
+ var column = focusedCell.column;
704
+ var data = this.buildExportParams({
705
+ columns: [column],
706
+ rowPositions: [currentRow],
707
+ includeHeaders: params.includeHeaders,
708
+ includeGroupHeaders: params.includeGroupHeaders
709
+ });
710
+ this.copyDataToClipboard(data);
711
+ this.dispatchFlashCells(_defineProperty({}, cellId, true));
712
+ }
713
+ }, {
714
+ key: "copySelectedRowsToClipboard",
715
+ value: function copySelectedRowsToClipboard() {
716
+ var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
717
+ var columnKeys = params.columnKeys,
718
+ includeHeaders = params.includeHeaders,
719
+ includeGroupHeaders = params.includeGroupHeaders;
720
+ var data = this.buildExportParams({
721
+ columns: columnKeys,
722
+ includeHeaders: includeHeaders,
723
+ includeGroupHeaders: includeGroupHeaders
724
+ });
725
+ this.copyDataToClipboard(data);
726
+ }
727
+ }, {
728
+ key: "buildExportParams",
729
+ value: function buildExportParams(params) {
730
+ var columns = params.columns,
731
+ rowPositions = params.rowPositions,
732
+ _params$includeHeader = params.includeHeaders,
733
+ includeHeaders = _params$includeHeader === void 0 ? false : _params$includeHeader,
734
+ _params$includeGroupH = params.includeGroupHeaders,
735
+ includeGroupHeaders = _params$includeGroupH === void 0 ? false : _params$includeGroupH;
736
+ var exportParams = {
737
+ columnKeys: columns,
738
+ rowPositions: rowPositions,
739
+ skipColumnHeaders: !includeHeaders,
740
+ skipColumnGroupHeaders: !includeGroupHeaders,
741
+ suppressQuotes: true,
742
+ columnSeparator: this.gridOptionsWrapper.getClipboardDelimiter(),
743
+ onlySelected: !rowPositions,
744
+ processCellCallback: this.gridOptionsWrapper.getProcessCellForClipboardFunc(),
745
+ processRowGroupCallback: function processRowGroupCallback(params) {
746
+ return params.node.key;
747
+ },
748
+ processHeaderCallback: this.gridOptionsWrapper.getProcessHeaderForClipboardFunc(),
749
+ processGroupHeaderCallback: this.gridOptionsWrapper.getProcessGroupHeaderForClipboardFunc()
750
+ };
751
+ return this.csvCreator.getDataAsCsv(exportParams, true);
752
+ }
753
+ }, {
754
+ key: "dispatchFlashCells",
755
+ value: function dispatchFlashCells(cellsToFlash) {
756
+ var _this15 = this;
757
+
758
+ window.setTimeout(function () {
759
+ var event = {
760
+ type: Events.EVENT_FLASH_CELLS,
761
+ cells: cellsToFlash
762
+ };
763
+
764
+ _this15.eventService.dispatchEvent(event);
765
+ }, 0);
766
+ }
767
+ }, {
768
+ key: "processCell",
769
+ value: function processCell(rowNode, column, value, type, func) {
770
+ if (func) {
771
+ var params = {
772
+ column: column,
773
+ node: rowNode,
774
+ value: value,
775
+ type: type
776
+ };
777
+ return func(params);
778
+ }
779
+
780
+ return value;
781
+ }
782
+ }, {
783
+ key: "copyDataToClipboard",
784
+ value: function copyDataToClipboard(data) {
785
+ var _this16 = this;
786
+
787
+ var userProvidedFunc = this.gridOptionsWrapper.getSendToClipboardFunc(); // method 1 - user provided func
788
+
789
+ if (userProvidedFunc) {
790
+ userProvidedFunc({
791
+ data: data
792
+ });
793
+ return;
794
+ } // method 2 - native clipboard API, available in modern chrome browsers
795
+
796
+
797
+ var allowNavigator = !this.gridOptionsWrapper.isSuppressClipboardApi();
798
+
799
+ if (allowNavigator && navigator.clipboard) {
800
+ navigator.clipboard.writeText(data).catch(function (e) {
801
+ _.doOnce(function () {
802
+ 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.');
804
+ }, 'clipboardApiError');
805
+
806
+ _this16.copyDataToClipboardLegacy(data);
807
+ });
808
+ return;
809
+ }
810
+
811
+ this.copyDataToClipboardLegacy(data);
812
+ }
813
+ }, {
814
+ key: "copyDataToClipboardLegacy",
815
+ value: function copyDataToClipboardLegacy(data) {
816
+ var _this17 = this;
817
+
818
+ // method 3 - if all else fails, the old school hack
819
+ this.executeOnTempElement(function (element) {
820
+ var eDocument = _this17.gridOptionsWrapper.getDocument();
821
+
822
+ var focusedElementBefore = eDocument.activeElement;
823
+ element.value = data || ' '; // has to be non-empty value or execCommand will not do anything
824
+
825
+ element.select();
826
+ element.focus({
827
+ preventScroll: true
828
+ });
829
+ var result = eDocument.execCommand('copy');
830
+
831
+ 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.');
833
+ }
834
+
835
+ if (focusedElementBefore != null && focusedElementBefore.focus != null) {
836
+ focusedElementBefore.focus({
837
+ preventScroll: true
838
+ });
839
+ }
840
+ });
841
+ }
842
+ }, {
843
+ key: "executeOnTempElement",
844
+ value: function executeOnTempElement(callbackNow, callbackAfter) {
845
+ var eDoc = this.gridOptionsWrapper.getDocument();
846
+ var eTempInput = eDoc.createElement('textarea');
847
+ eTempInput.style.width = '1px';
848
+ eTempInput.style.height = '1px'; // removing items from the DOM causes the document element to scroll to the
849
+ // position where the element was positioned. Here we set scrollTop / scrollLeft
850
+ // to prevent the document element from scrolling when we remove it from the DOM.
851
+
852
+ eTempInput.style.top = eDoc.documentElement.scrollTop + 'px';
853
+ eTempInput.style.left = eDoc.documentElement.scrollLeft + 'px';
854
+ eTempInput.style.position = 'absolute';
855
+ eTempInput.style.opacity = '0';
856
+ var guiRoot = this.gridCtrl.getGui();
857
+ guiRoot.appendChild(eTempInput);
858
+
859
+ try {
860
+ callbackNow(eTempInput);
861
+ } catch (err) {
862
+ console.warn("AG Grid: Browser does not support document.execCommand('copy') for clipboard operations");
863
+ } //It needs 100 otherwise OS X seemed to not always be able to paste... Go figure...
864
+
865
+
866
+ if (callbackAfter) {
867
+ window.setTimeout(function () {
868
+ callbackAfter(eTempInput);
869
+ guiRoot.removeChild(eTempInput);
870
+ }, 100);
871
+ } else {
872
+ guiRoot.removeChild(eTempInput);
873
+ }
874
+ }
875
+ }, {
876
+ key: "getRangeSize",
877
+ value: function getRangeSize() {
878
+ var ranges = this.rangeService.getCellRanges();
879
+ var startRangeIndex = 0;
880
+ var endRangeIndex = 0;
881
+
882
+ if (ranges.length > 0) {
883
+ startRangeIndex = this.rangeService.getRangeStartRow(ranges[0]).rowIndex;
884
+ endRangeIndex = this.rangeService.getRangeEndRow(ranges[0]).rowIndex;
885
+ }
886
+
887
+ return startRangeIndex - endRangeIndex + 1;
888
+ }
889
+ }]);
890
+
891
+ return ClipboardService;
892
+ }(BeanStub);
893
+
894
+ __decorate([Autowired('csvCreator')], ClipboardService.prototype, 'csvCreator', void 0);
895
+
896
+ __decorate([Autowired('loggerFactory')], ClipboardService.prototype, 'loggerFactory', void 0);
897
+
898
+ __decorate([Autowired('selectionService')], ClipboardService.prototype, 'selectionService', void 0);
899
+
900
+ __decorate([Optional('rangeService')], ClipboardService.prototype, 'rangeService', void 0);
901
+
902
+ __decorate([Autowired('rowModel')], ClipboardService.prototype, 'rowModel', void 0);
903
+
904
+ __decorate([Autowired('ctrlsService')], ClipboardService.prototype, 'ctrlsService', void 0);
905
+
906
+ __decorate([Autowired('valueService')], ClipboardService.prototype, 'valueService', void 0);
907
+
908
+ __decorate([Autowired('focusService')], ClipboardService.prototype, 'focusService', void 0);
909
+
910
+ __decorate([Autowired('rowRenderer')], ClipboardService.prototype, 'rowRenderer', void 0);
911
+
912
+ __decorate([Autowired('columnModel')], ClipboardService.prototype, 'columnModel', void 0);
913
+
914
+ __decorate([Autowired('cellNavigationService')], ClipboardService.prototype, 'cellNavigationService', void 0);
915
+
916
+ __decorate([Autowired('cellPositionUtils')], ClipboardService.prototype, 'cellPositionUtils', void 0);
917
+
918
+ __decorate([Autowired('rowPositionUtils')], ClipboardService.prototype, 'rowPositionUtils', void 0);
919
+
920
+ __decorate([PostConstruct], ClipboardService.prototype, 'init', null);
921
+
922
+ ClipboardService = __decorate([Bean('clipboardService')], ClipboardService);
923
+ export { ClipboardService };