@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,814 @@
1
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2
+
3
+ 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); } }
4
+
5
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
+
7
+ 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); }
8
+
9
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
10
+
11
+ 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); }; }
12
+
13
+ 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); }
14
+
15
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
16
+
17
+ 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; } }
18
+
19
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
20
+
21
+ 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); }
22
+
23
+ var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
24
+ var c = arguments.length,
25
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
26
+ d;
27
+ 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--) {
28
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
29
+ }
30
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
31
+ };
32
+
33
+ import { _, Autowired, Bean, BeanStub, NumberSequence, PostConstruct, RowNode } from "@ag-grid-community/core";
34
+ import { BatchRemover } from "./batchRemover";
35
+
36
+ var GroupStage = /*#__PURE__*/function (_BeanStub) {
37
+ _inherits(GroupStage, _BeanStub);
38
+
39
+ var _super = _createSuper(GroupStage);
40
+
41
+ function GroupStage() {
42
+ var _this;
43
+
44
+ _classCallCheck(this, GroupStage);
45
+
46
+ _this = _super.apply(this, arguments); // we use a sequence variable so that each time we do a grouping, we don't
47
+ // reuse the ids - otherwise the rowRenderer will confuse rowNodes between redraws
48
+ // when it tries to animate between rows.
49
+
50
+ _this.groupIdSequence = new NumberSequence();
51
+ return _this;
52
+ }
53
+
54
+ _createClass(GroupStage, [{
55
+ key: "postConstruct",
56
+ value: function postConstruct() {
57
+ this.usingTreeData = this.gridOptionsWrapper.isTreeData();
58
+
59
+ if (this.usingTreeData) {
60
+ this.getDataPath = this.gridOptionsWrapper.getDataPathFunc();
61
+ }
62
+ }
63
+ }, {
64
+ key: "execute",
65
+ value: function execute(params) {
66
+ var details = this.createGroupingDetails(params);
67
+
68
+ if (details.transactions) {
69
+ this.handleTransaction(details);
70
+ } else {
71
+ var afterColsChanged = params.afterColumnsChanged === true;
72
+ this.shotgunResetEverything(details, afterColsChanged);
73
+ }
74
+
75
+ this.positionLeafsAboveGroups(params.changedPath);
76
+ this.orderGroups(details.rootNode);
77
+ this.selectableService.updateSelectableAfterGrouping(details.rootNode);
78
+ }
79
+ }, {
80
+ key: "positionLeafsAboveGroups",
81
+ value: function positionLeafsAboveGroups(changedPath) {
82
+ // we don't do group sorting for tree data
83
+ if (this.usingTreeData) {
84
+ return;
85
+ }
86
+
87
+ changedPath.forEachChangedNodeDepthFirst(function (group) {
88
+ if (group.childrenAfterGroup) {
89
+ var leafNodes = [];
90
+ var groupNodes = [];
91
+ group.childrenAfterGroup.forEach(function (row) {
92
+ var _a;
93
+
94
+ if (!((_a = row.childrenAfterGroup) === null || _a === void 0 ? void 0 : _a.length)) {
95
+ leafNodes.push(row);
96
+ } else {
97
+ groupNodes.push(row);
98
+ }
99
+ });
100
+ group.childrenAfterGroup = [].concat(leafNodes, groupNodes);
101
+ }
102
+ }, false);
103
+ }
104
+ }, {
105
+ key: "createGroupingDetails",
106
+ value: function createGroupingDetails(params) {
107
+ var rowNode = params.rowNode,
108
+ changedPath = params.changedPath,
109
+ rowNodeTransactions = params.rowNodeTransactions,
110
+ rowNodeOrder = params.rowNodeOrder;
111
+ var groupedCols = this.usingTreeData ? null : this.columnModel.getRowGroupColumns();
112
+ var details = {
113
+ // someone complained that the parent attribute was causing some change detection
114
+ // to break is some angular add-on - which i never used. taking the parent out breaks
115
+ // a cyclic dependency, hence this flag got introduced.
116
+ includeParents: !this.gridOptionsWrapper.isSuppressParentsInRowNodes(),
117
+ expandByDefault: this.gridOptionsWrapper.getGroupDefaultExpanded(),
118
+ groupedCols: groupedCols,
119
+ rootNode: rowNode,
120
+ pivotMode: this.columnModel.isPivotMode(),
121
+ groupedColCount: this.usingTreeData || !groupedCols ? 0 : groupedCols.length,
122
+ rowNodeOrder: rowNodeOrder,
123
+ transactions: rowNodeTransactions,
124
+ // if no transaction, then it's shotgun, changed path would be 'not active' at this point anyway
125
+ changedPath: changedPath
126
+ };
127
+ return details;
128
+ }
129
+ }, {
130
+ key: "handleTransaction",
131
+ value: function handleTransaction(details) {
132
+ var _this2 = this;
133
+
134
+ details.transactions.forEach(function (tran) {
135
+ // we don't allow batch remover for tree data as tree data uses Filler Nodes,
136
+ // and creating/deleting filler nodes needs to be done alongside the node deleting
137
+ // and moving. if we want to Batch Remover working with tree data then would need
138
+ // to consider how Filler Nodes would be impacted (it's possible that it can be easily
139
+ // modified to work, however for now I don't have the brain energy to work it all out).
140
+ var batchRemover = !_this2.usingTreeData ? new BatchRemover() : undefined; // the order here of [add, remove, update] needs to be the same as in ClientSideNodeManager,
141
+ // as the order is important when a record with the same id is added and removed in the same
142
+ // transaction.
143
+
144
+ if (_.existsAndNotEmpty(tran.remove)) {
145
+ _this2.removeNodes(tran.remove, details, batchRemover);
146
+ }
147
+
148
+ if (_.existsAndNotEmpty(tran.update)) {
149
+ _this2.moveNodesInWrongPath(tran.update, details, batchRemover);
150
+ }
151
+
152
+ if (_.existsAndNotEmpty(tran.add)) {
153
+ _this2.insertNodes(tran.add, details, false);
154
+ } // must flush here, and not allow another transaction to be applied,
155
+ // as each transaction must finish leaving the data in a consistent state.
156
+
157
+
158
+ if (batchRemover) {
159
+ var parentsWithChildrenRemoved = batchRemover.getAllParents().slice();
160
+ batchRemover.flush();
161
+
162
+ _this2.removeEmptyGroups(parentsWithChildrenRemoved, details);
163
+ }
164
+ });
165
+
166
+ if (details.rowNodeOrder) {
167
+ this.sortChildren(details);
168
+ }
169
+ } // this is used when doing delta updates, eg Redux, keeps nodes in right order
170
+
171
+ }, {
172
+ key: "sortChildren",
173
+ value: function sortChildren(details) {
174
+ details.changedPath.forEachChangedNodeDepthFirst(function (node) {
175
+ if (!node.childrenAfterGroup) {
176
+ return;
177
+ }
178
+
179
+ var didSort = _.sortRowNodesByOrder(node.childrenAfterGroup, details.rowNodeOrder);
180
+
181
+ if (didSort) {
182
+ details.changedPath.addParentNode(node);
183
+ }
184
+ }, false, true);
185
+ }
186
+ }, {
187
+ key: "orderGroups",
188
+ value: function orderGroups(rootNode) {
189
+ // we don't do group sorting for tree data
190
+ if (this.usingTreeData) {
191
+ return;
192
+ }
193
+
194
+ var comparator = this.gridOptionsWrapper.getInitialGroupOrderComparator();
195
+
196
+ if (_.exists(comparator)) {
197
+ recursiveSort(rootNode);
198
+ }
199
+
200
+ function recursiveSort(rowNode) {
201
+ var doSort = _.exists(rowNode.childrenAfterGroup) && // we only want to sort groups, so we do not sort leafs (a leaf group has leafs as children)
202
+ !rowNode.leafGroup;
203
+
204
+ if (doSort) {
205
+ rowNode.childrenAfterGroup.sort(function (nodeA, nodeB) {
206
+ return comparator({
207
+ nodeA: nodeA,
208
+ nodeB: nodeB
209
+ });
210
+ });
211
+ rowNode.childrenAfterGroup.forEach(function (childNode) {
212
+ return recursiveSort(childNode);
213
+ });
214
+ }
215
+ }
216
+ }
217
+ }, {
218
+ key: "getExistingPathForNode",
219
+ value: function getExistingPathForNode(node, details) {
220
+ var res = []; // when doing tree data, the node is part of the path,
221
+ // but when doing grid grouping, the node is not part of the path so we start with the parent.
222
+
223
+ var pointer = this.usingTreeData ? node : node.parent;
224
+
225
+ while (pointer && pointer !== details.rootNode) {
226
+ res.push({
227
+ key: pointer.key,
228
+ rowGroupColumn: pointer.rowGroupColumn,
229
+ field: pointer.field
230
+ });
231
+ pointer = pointer.parent;
232
+ }
233
+
234
+ res.reverse();
235
+ return res;
236
+ }
237
+ }, {
238
+ key: "moveNodesInWrongPath",
239
+ value: function moveNodesInWrongPath(childNodes, details, batchRemover) {
240
+ var _this3 = this;
241
+
242
+ childNodes.forEach(function (childNode) {
243
+ // we add node, even if parent has not changed, as the data could have
244
+ // changed, hence aggregations will be wrong
245
+ if (details.changedPath.isActive()) {
246
+ details.changedPath.addParentNode(childNode.parent);
247
+ }
248
+
249
+ var infoToKeyMapper = function infoToKeyMapper(item) {
250
+ return item.key;
251
+ };
252
+
253
+ var oldPath = _this3.getExistingPathForNode(childNode, details).map(infoToKeyMapper);
254
+
255
+ var newPath = _this3.getGroupInfo(childNode, details).map(infoToKeyMapper);
256
+
257
+ var nodeInCorrectPath = _.areEqual(oldPath, newPath);
258
+
259
+ if (!nodeInCorrectPath) {
260
+ _this3.moveNode(childNode, details, batchRemover);
261
+ }
262
+ });
263
+ }
264
+ }, {
265
+ key: "moveNode",
266
+ value: function moveNode(childNode, details, batchRemover) {
267
+ this.removeNodesInStages([childNode], details, batchRemover);
268
+ this.insertOneNode(childNode, details, true); // hack - if we didn't do this, then renaming a tree item (ie changing rowNode.key) wouldn't get
269
+ // refreshed into the gui.
270
+ // this is needed to kick off the event that rowComp listens to for refresh. this in turn
271
+ // then will get each cell in the row to refresh - which is what we need as we don't know which
272
+ // columns will be displaying the rowNode.key info.
273
+
274
+ childNode.setData(childNode.data); // we add both old and new parents to changed path, as both will need to be refreshed.
275
+ // we already added the old parent (in calling method), so just add the new parent here
276
+
277
+ if (details.changedPath.isActive()) {
278
+ var newParent = childNode.parent;
279
+ details.changedPath.addParentNode(newParent);
280
+ }
281
+ }
282
+ }, {
283
+ key: "removeNodes",
284
+ value: function removeNodes(leafRowNodes, details, batchRemover) {
285
+ this.removeNodesInStages(leafRowNodes, details, batchRemover);
286
+
287
+ if (details.changedPath.isActive()) {
288
+ leafRowNodes.forEach(function (rowNode) {
289
+ return details.changedPath.addParentNode(rowNode.parent);
290
+ });
291
+ }
292
+ }
293
+ }, {
294
+ key: "removeNodesInStages",
295
+ value: function removeNodesInStages(leafRowNodes, details, batchRemover) {
296
+ this.removeNodesFromParents(leafRowNodes, details, batchRemover);
297
+
298
+ if (this.usingTreeData) {
299
+ this.postRemoveCreateFillerNodes(leafRowNodes, details); // When not TreeData, then removeEmptyGroups is called just before the BatchRemover is flushed.
300
+ // However for TreeData, there is no BatchRemover, so we have to call removeEmptyGroups here.
301
+
302
+ var nodeParents = leafRowNodes.map(function (n) {
303
+ return n.parent;
304
+ });
305
+ this.removeEmptyGroups(nodeParents, details);
306
+ }
307
+ }
308
+ }, {
309
+ key: "forEachParentGroup",
310
+ value: function forEachParentGroup(details, group, callback) {
311
+ var pointer = group;
312
+
313
+ while (pointer && pointer !== details.rootNode) {
314
+ callback(pointer);
315
+ pointer = pointer.parent;
316
+ }
317
+ }
318
+ }, {
319
+ key: "removeNodesFromParents",
320
+ value: function removeNodesFromParents(nodesToRemove, details, provided) {
321
+ var _this4 = this;
322
+
323
+ // this method can be called with BatchRemover as optional. if it is missed, we created a local version
324
+ // and flush it at the end. if one is provided, we add to the provided one and it gets flushed elsewhere.
325
+ var batchRemoverIsLocal = provided == null;
326
+ var batchRemoverToUse = provided ? provided : new BatchRemover();
327
+ nodesToRemove.forEach(function (nodeToRemove) {
328
+ _this4.removeFromParent(nodeToRemove, batchRemoverToUse); // remove from allLeafChildren. we clear down all parents EXCEPT the Root Node, as
329
+ // the ClientSideNodeManager is responsible for the Root Node.
330
+
331
+
332
+ _this4.forEachParentGroup(details, nodeToRemove.parent, function (parentNode) {
333
+ batchRemoverToUse.removeFromAllLeafChildren(parentNode, nodeToRemove);
334
+ });
335
+ });
336
+
337
+ if (batchRemoverIsLocal) {
338
+ batchRemoverToUse.flush();
339
+ }
340
+ }
341
+ }, {
342
+ key: "postRemoveCreateFillerNodes",
343
+ value: function postRemoveCreateFillerNodes(nodesToRemove, details) {
344
+ var _this5 = this;
345
+
346
+ nodesToRemove.forEach(function (nodeToRemove) {
347
+ // if not group, and children are present, need to move children to a group.
348
+ // otherwise if no children, we can just remove without replacing.
349
+ var replaceWithGroup = nodeToRemove.hasChildren();
350
+
351
+ if (replaceWithGroup) {
352
+ var oldPath = _this5.getExistingPathForNode(nodeToRemove, details); // because we just removed the userGroup, this will always return new support group
353
+
354
+
355
+ var newGroupNode = _this5.findParentForNode(nodeToRemove, oldPath, details); // these properties are the ones that will be incorrect in the newly created group,
356
+ // so copy them from the old childNode
357
+
358
+
359
+ newGroupNode.expanded = nodeToRemove.expanded;
360
+ newGroupNode.allLeafChildren = nodeToRemove.allLeafChildren;
361
+ newGroupNode.childrenAfterGroup = nodeToRemove.childrenAfterGroup;
362
+ newGroupNode.childrenMapped = nodeToRemove.childrenMapped;
363
+ newGroupNode.updateHasChildren();
364
+ newGroupNode.childrenAfterGroup.forEach(function (rowNode) {
365
+ return rowNode.parent = newGroupNode;
366
+ });
367
+ }
368
+ });
369
+ }
370
+ }, {
371
+ key: "removeEmptyGroups",
372
+ value: function removeEmptyGroups(possibleEmptyGroups, details) {
373
+ var _this6 = this;
374
+
375
+ // we do this multiple times, as when we remove groups, that means the parent of just removed
376
+ // group can then be empty. to get around this, if we remove, then we check everything again for
377
+ // newly emptied groups. the max number of times this will execute is the depth of the group tree.
378
+ var checkAgain = true;
379
+
380
+ var groupShouldBeRemoved = function groupShouldBeRemoved(rowNode) {
381
+ // because of the while loop below, it's possible we already moved the node,
382
+ // so double check before trying to remove again.
383
+ var mapKey = _this6.getChildrenMappedKey(rowNode.key, rowNode.rowGroupColumn);
384
+
385
+ var parentRowNode = rowNode.parent;
386
+ var groupAlreadyRemoved = parentRowNode && parentRowNode.childrenMapped ? !parentRowNode.childrenMapped[mapKey] : true;
387
+
388
+ if (groupAlreadyRemoved) {
389
+ // if not linked, then group was already removed
390
+ return false;
391
+ } // if still not removed, then we remove if this group is empty
392
+
393
+
394
+ return !!rowNode.isEmptyRowGroupNode();
395
+ };
396
+
397
+ var _loop = function _loop() {
398
+ checkAgain = false;
399
+ var batchRemover = new BatchRemover();
400
+ possibleEmptyGroups.forEach(function (possibleEmptyGroup) {
401
+ // remove empty groups
402
+ _this6.forEachParentGroup(details, possibleEmptyGroup, function (rowNode) {
403
+ if (groupShouldBeRemoved(rowNode)) {
404
+ checkAgain = true;
405
+
406
+ _this6.removeFromParent(rowNode, batchRemover); // we remove selection on filler nodes here, as the selection would not be removed
407
+ // from the RowNodeManager, as filler nodes don't exist on the RowNodeManager
408
+
409
+
410
+ rowNode.setSelected(false);
411
+ }
412
+ });
413
+ });
414
+ batchRemover.flush();
415
+ };
416
+
417
+ while (checkAgain) {
418
+ _loop();
419
+ }
420
+ } // removes the node from the parent by:
421
+ // a) removing from childrenAfterGroup (using batchRemover if present, otherwise immediately)
422
+ // b) removing from childrenMapped (immediately)
423
+ // c) setRowTop(null) - as the rowRenderer uses this to know the RowNode is no longer needed
424
+ // d) setRowIndex(null) - as the rowNode will no longer be displayed.
425
+
426
+ }, {
427
+ key: "removeFromParent",
428
+ value: function removeFromParent(child, batchRemover) {
429
+ if (child.parent) {
430
+ if (batchRemover) {
431
+ batchRemover.removeFromChildrenAfterGroup(child.parent, child);
432
+ } else {
433
+ _.removeFromArray(child.parent.childrenAfterGroup, child);
434
+
435
+ child.parent.updateHasChildren();
436
+ }
437
+ }
438
+
439
+ var mapKey = this.getChildrenMappedKey(child.key, child.rowGroupColumn);
440
+
441
+ if (child.parent && child.parent.childrenMapped) {
442
+ child.parent.childrenMapped[mapKey] = undefined;
443
+ } // this is important for transition, see rowComp removeFirstPassFuncs. when doing animation and
444
+ // remove, if rowTop is still present, the rowComp thinks it's just moved position.
445
+
446
+
447
+ child.setRowTop(null);
448
+ child.setRowIndex(null);
449
+ }
450
+ }, {
451
+ key: "addToParent",
452
+ value: function addToParent(child, parent) {
453
+ var mapKey = this.getChildrenMappedKey(child.key, child.rowGroupColumn);
454
+
455
+ if (parent) {
456
+ var children = parent.childrenMapped != null;
457
+
458
+ if (children) {
459
+ parent.childrenMapped[mapKey] = child;
460
+ }
461
+
462
+ parent.childrenAfterGroup.push(child);
463
+ parent.updateHasChildren();
464
+ }
465
+ }
466
+ }, {
467
+ key: "areGroupColsEqual",
468
+ value: function areGroupColsEqual(d1, d2) {
469
+ if (d1 == null || d2 == null || d1.pivotMode !== d2.pivotMode) {
470
+ return false;
471
+ }
472
+
473
+ return _.areEqual(d1.groupedCols, d2.groupedCols);
474
+ }
475
+ }, {
476
+ key: "checkAllGroupDataAfterColsChanged",
477
+ value: function checkAllGroupDataAfterColsChanged(details) {
478
+ var _this7 = this;
479
+
480
+ var recurse = function recurse(rowNodes) {
481
+ if (!rowNodes) {
482
+ return;
483
+ }
484
+
485
+ rowNodes.forEach(function (rowNode) {
486
+ var isLeafNode = !_this7.usingTreeData && !rowNode.group;
487
+
488
+ if (isLeafNode) {
489
+ return;
490
+ }
491
+
492
+ var groupInfo = {
493
+ field: rowNode.field,
494
+ key: rowNode.key,
495
+ rowGroupColumn: rowNode.rowGroupColumn
496
+ };
497
+
498
+ _this7.setGroupData(rowNode, groupInfo);
499
+
500
+ recurse(rowNode.childrenAfterGroup);
501
+ });
502
+ };
503
+
504
+ recurse(details.rootNode.childrenAfterGroup);
505
+ }
506
+ }, {
507
+ key: "shotgunResetEverything",
508
+ value: function shotgunResetEverything(details, afterColumnsChanged) {
509
+ if (this.noChangeInGroupingColumns(details, afterColumnsChanged)) {
510
+ return;
511
+ } // groups are about to get disposed, so need to deselect any that are selected
512
+
513
+
514
+ this.selectionService.removeGroupsFromSelection();
515
+ var rootNode = details.rootNode,
516
+ groupedCols = details.groupedCols; // because we are not creating the root node each time, we have the logic
517
+ // here to change leafGroup once.
518
+ // we set .leafGroup to false for tree data, as .leafGroup is only used when pivoting, and pivoting
519
+ // isn't allowed with treeData, so the grid never actually use .leafGroup when doing treeData.
520
+
521
+ rootNode.leafGroup = this.usingTreeData ? false : groupedCols.length === 0; // we are doing everything from scratch, so reset childrenAfterGroup and childrenMapped from the rootNode
522
+
523
+ rootNode.childrenAfterGroup = [];
524
+ rootNode.childrenMapped = {};
525
+ rootNode.updateHasChildren();
526
+ var sibling = rootNode.sibling;
527
+
528
+ if (sibling) {
529
+ sibling.childrenAfterGroup = rootNode.childrenAfterGroup;
530
+ sibling.childrenMapped = rootNode.childrenMapped;
531
+ }
532
+
533
+ this.insertNodes(rootNode.allLeafChildren, details, false);
534
+ }
535
+ }, {
536
+ key: "noChangeInGroupingColumns",
537
+ value: function noChangeInGroupingColumns(details, afterColumnsChanged) {
538
+ var noFurtherProcessingNeeded = false;
539
+ var groupDisplayColumns = this.columnModel.getGroupDisplayColumns();
540
+ var newGroupDisplayColIds = groupDisplayColumns ? groupDisplayColumns.map(function (c) {
541
+ return c.getId();
542
+ }).join('-') : '';
543
+
544
+ if (afterColumnsChanged) {
545
+ // we only need to redo grouping if doing normal grouping (ie not tree data)
546
+ // and the group cols have changed.
547
+ noFurtherProcessingNeeded = this.usingTreeData || this.areGroupColsEqual(details, this.oldGroupingDetails); // if the group display cols have changed, then we need to update rowNode.groupData
548
+ // (regardless of tree data or row grouping)
549
+
550
+ if (this.oldGroupDisplayColIds !== newGroupDisplayColIds) {
551
+ this.checkAllGroupDataAfterColsChanged(details);
552
+ }
553
+ }
554
+
555
+ this.oldGroupingDetails = details;
556
+ this.oldGroupDisplayColIds = newGroupDisplayColIds;
557
+ return noFurtherProcessingNeeded;
558
+ }
559
+ }, {
560
+ key: "insertNodes",
561
+ value: function insertNodes(newRowNodes, details, isMove) {
562
+ var _this8 = this;
563
+
564
+ newRowNodes.forEach(function (rowNode) {
565
+ _this8.insertOneNode(rowNode, details, isMove);
566
+
567
+ if (details.changedPath.isActive()) {
568
+ details.changedPath.addParentNode(rowNode.parent);
569
+ }
570
+ });
571
+ }
572
+ }, {
573
+ key: "insertOneNode",
574
+ value: function insertOneNode(childNode, details, isMove) {
575
+ var path = this.getGroupInfo(childNode, details);
576
+ var parentGroup = this.findParentForNode(childNode, path, details);
577
+
578
+ if (!parentGroup.group) {
579
+ console.warn("AG Grid: duplicate group keys for row data, keys should be unique", [parentGroup.data, childNode.data]);
580
+ }
581
+
582
+ if (this.usingTreeData) {
583
+ this.swapGroupWithUserNode(parentGroup, childNode, isMove);
584
+ } else {
585
+ childNode.parent = parentGroup;
586
+ childNode.level = path.length;
587
+ parentGroup.childrenAfterGroup.push(childNode);
588
+ parentGroup.updateHasChildren();
589
+ }
590
+ }
591
+ }, {
592
+ key: "findParentForNode",
593
+ value: function findParentForNode(childNode, path, details) {
594
+ var _this9 = this;
595
+
596
+ var nextNode = details.rootNode;
597
+ path.forEach(function (groupInfo, level) {
598
+ nextNode = _this9.getOrCreateNextNode(nextNode, groupInfo, level, details); // node gets added to all group nodes.
599
+ // note: we do not add to rootNode here, as the rootNode is the master list of rowNodes
600
+
601
+ nextNode.allLeafChildren.push(childNode);
602
+ });
603
+ return nextNode;
604
+ }
605
+ }, {
606
+ key: "swapGroupWithUserNode",
607
+ value: function swapGroupWithUserNode(fillerGroup, userGroup, isMove) {
608
+ userGroup.parent = fillerGroup.parent;
609
+ userGroup.key = fillerGroup.key;
610
+ userGroup.field = fillerGroup.field;
611
+ userGroup.groupData = fillerGroup.groupData;
612
+ userGroup.level = fillerGroup.level; // AG-3441 - preserve the existing expanded status of the node if we're moving it, so that
613
+ // you can drag a sub tree from one parent to another without changing its expansion
614
+
615
+ if (!isMove) {
616
+ userGroup.expanded = fillerGroup.expanded;
617
+ } // we set .leafGroup to false for tree data, as .leafGroup is only used when pivoting, and pivoting
618
+ // isn't allowed with treeData, so the grid never actually use .leafGroup when doing treeData.
619
+
620
+
621
+ userGroup.leafGroup = fillerGroup.leafGroup; // always null for userGroups, as row grouping is not allowed when doing tree data
622
+
623
+ userGroup.rowGroupIndex = fillerGroup.rowGroupIndex;
624
+ userGroup.allLeafChildren = fillerGroup.allLeafChildren;
625
+ userGroup.childrenAfterGroup = fillerGroup.childrenAfterGroup;
626
+ userGroup.childrenMapped = fillerGroup.childrenMapped;
627
+ userGroup.updateHasChildren();
628
+ this.removeFromParent(fillerGroup);
629
+ userGroup.childrenAfterGroup.forEach(function (rowNode) {
630
+ return rowNode.parent = userGroup;
631
+ });
632
+ this.addToParent(userGroup, fillerGroup.parent);
633
+ }
634
+ }, {
635
+ key: "getOrCreateNextNode",
636
+ value: function getOrCreateNextNode(parentGroup, groupInfo, level, details) {
637
+ var key = this.getChildrenMappedKey(groupInfo.key, groupInfo.rowGroupColumn);
638
+ var nextNode = parentGroup.childrenMapped ? parentGroup.childrenMapped[key] : undefined;
639
+
640
+ if (!nextNode) {
641
+ nextNode = this.createGroup(groupInfo, parentGroup, level, details); // attach the new group to the parent
642
+
643
+ this.addToParent(nextNode, parentGroup);
644
+ }
645
+
646
+ return nextNode;
647
+ }
648
+ }, {
649
+ key: "createGroup",
650
+ value: function createGroup(groupInfo, parent, level, details) {
651
+ var groupNode = new RowNode(this.beans);
652
+ groupNode.group = true;
653
+ groupNode.field = groupInfo.field;
654
+ groupNode.rowGroupColumn = groupInfo.rowGroupColumn;
655
+ this.setGroupData(groupNode, groupInfo); // we put 'row-group-' before the group id, so it doesn't clash with standard row id's. we also use 't-' and 'b-'
656
+ // for top pinned and bottom pinned rows.
657
+
658
+ groupNode.id = RowNode.ID_PREFIX_ROW_GROUP + this.groupIdSequence.next();
659
+ groupNode.key = groupInfo.key;
660
+ groupNode.level = level;
661
+ groupNode.leafGroup = this.usingTreeData ? false : level === details.groupedColCount - 1;
662
+ groupNode.allLeafChildren = []; // why is this done here? we are not updating the children count as we go,
663
+ // i suspect this is updated in the filter stage
664
+
665
+ groupNode.setAllChildrenCount(0);
666
+ groupNode.rowGroupIndex = this.usingTreeData ? null : level;
667
+ groupNode.childrenAfterGroup = [];
668
+ groupNode.childrenMapped = {};
669
+ groupNode.updateHasChildren();
670
+ groupNode.parent = details.includeParents ? parent : null;
671
+ this.setExpandedInitialValue(details, groupNode);
672
+ return groupNode;
673
+ }
674
+ }, {
675
+ key: "setGroupData",
676
+ value: function setGroupData(groupNode, groupInfo) {
677
+ var _this10 = this;
678
+
679
+ groupNode.groupData = {};
680
+ var groupDisplayCols = this.columnModel.getGroupDisplayColumns();
681
+ groupDisplayCols.forEach(function (col) {
682
+ // newGroup.rowGroupColumn=null when working off GroupInfo, and we always display the group in the group column
683
+ // if rowGroupColumn is present, then it's grid row grouping and we only include if configuration says so
684
+ var displayGroupForCol = _this10.usingTreeData || (groupNode.rowGroupColumn ? col.isRowGroupDisplayed(groupNode.rowGroupColumn.getId()) : false);
685
+
686
+ if (displayGroupForCol) {
687
+ groupNode.groupData[col.getColId()] = groupInfo.key;
688
+ }
689
+ });
690
+ }
691
+ }, {
692
+ key: "getChildrenMappedKey",
693
+ value: function getChildrenMappedKey(key, rowGroupColumn) {
694
+ if (rowGroupColumn) {
695
+ // grouping by columns
696
+ return rowGroupColumn.getId() + '-' + key;
697
+ } // tree data - we don't have rowGroupColumns
698
+
699
+
700
+ return key;
701
+ }
702
+ }, {
703
+ key: "setExpandedInitialValue",
704
+ value: function setExpandedInitialValue(details, groupNode) {
705
+ // if pivoting the leaf group is never expanded as we do not show leaf rows
706
+ if (details.pivotMode && groupNode.leafGroup) {
707
+ groupNode.expanded = false;
708
+ return;
709
+ } // use callback if exists
710
+
711
+
712
+ var userCallback = this.gridOptionsWrapper.getIsGroupOpenByDefaultFunc();
713
+
714
+ if (userCallback) {
715
+ var params = {
716
+ rowNode: groupNode,
717
+ field: groupNode.field,
718
+ key: groupNode.key,
719
+ level: groupNode.level,
720
+ rowGroupColumn: groupNode.rowGroupColumn
721
+ };
722
+ groupNode.expanded = userCallback(params) == true;
723
+ return;
724
+ } // use expandByDefault if exists
725
+
726
+
727
+ var expandByDefault = details.expandByDefault;
728
+
729
+ if (details.expandByDefault === -1) {
730
+ groupNode.expanded = true;
731
+ return;
732
+ } // otherwise
733
+
734
+
735
+ groupNode.expanded = groupNode.level < expandByDefault;
736
+ }
737
+ }, {
738
+ key: "getGroupInfo",
739
+ value: function getGroupInfo(rowNode, details) {
740
+ if (this.usingTreeData) {
741
+ return this.getGroupInfoFromCallback(rowNode);
742
+ }
743
+
744
+ return this.getGroupInfoFromGroupColumns(rowNode, details);
745
+ }
746
+ }, {
747
+ key: "getGroupInfoFromCallback",
748
+ value: function getGroupInfoFromCallback(rowNode) {
749
+ var keys = this.getDataPath ? this.getDataPath(rowNode.data) : null;
750
+
751
+ if (keys === null || keys === undefined || keys.length === 0) {
752
+ _.doOnce(function () {
753
+ return console.warn("AG Grid: getDataPath() should not return an empty path for data", rowNode.data);
754
+ }, 'groupStage.getGroupInfoFromCallback');
755
+ }
756
+
757
+ var groupInfoMapper = function groupInfoMapper(key) {
758
+ return {
759
+ key: key,
760
+ field: null,
761
+ rowGroupColumn: null
762
+ };
763
+ };
764
+
765
+ return keys ? keys.map(groupInfoMapper) : [];
766
+ }
767
+ }, {
768
+ key: "getGroupInfoFromGroupColumns",
769
+ value: function getGroupInfoFromGroupColumns(rowNode, details) {
770
+ var _this11 = this;
771
+
772
+ var res = [];
773
+ details.groupedCols.forEach(function (groupCol) {
774
+ var key = _this11.valueService.getKeyForNode(groupCol, rowNode);
775
+
776
+ var keyExists = key !== null && key !== undefined; // unbalanced tree and pivot mode don't work together - not because of the grid, it doesn't make
777
+ // mathematical sense as you are building up a cube. so if pivot mode, we put in a blank key where missing.
778
+ // this keeps the tree balanced and hence can be represented as a group.
779
+
780
+ if (details.pivotMode && !keyExists) {
781
+ key = ' ';
782
+ keyExists = true;
783
+ }
784
+
785
+ if (keyExists) {
786
+ var item = {
787
+ key: key,
788
+ field: groupCol.getColDef().field,
789
+ rowGroupColumn: groupCol
790
+ };
791
+ res.push(item);
792
+ }
793
+ });
794
+ return res;
795
+ }
796
+ }]);
797
+
798
+ return GroupStage;
799
+ }(BeanStub);
800
+
801
+ __decorate([Autowired('columnModel')], GroupStage.prototype, "columnModel", void 0);
802
+
803
+ __decorate([Autowired('selectableService')], GroupStage.prototype, "selectableService", void 0);
804
+
805
+ __decorate([Autowired('valueService')], GroupStage.prototype, "valueService", void 0);
806
+
807
+ __decorate([Autowired('beans')], GroupStage.prototype, "beans", void 0);
808
+
809
+ __decorate([Autowired('selectionService')], GroupStage.prototype, "selectionService", void 0);
810
+
811
+ __decorate([PostConstruct], GroupStage.prototype, "postConstruct", null);
812
+
813
+ GroupStage = __decorate([Bean('groupStage')], GroupStage);
814
+ export { GroupStage };