@refinitiv-ui/efx-grid 6.0.4 → 6.0.6

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 (277) hide show
  1. package/lib/column-dragging/es6/ColumnDragging.d.ts +13 -11
  2. package/lib/column-dragging/es6/ColumnDragging.js +21 -15
  3. package/lib/column-format-dialog/lib/column-format-dialog.d.ts +1 -1
  4. package/lib/column-format-dialog/lib/column-format-dialog.js +3 -4
  5. package/lib/column-format-dialog/lib/preview-table.js +3 -4
  6. package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +2 -2
  7. package/lib/column-selection-dialog/lib/column-selection-dialog.js +23 -7
  8. package/lib/core/dist/core.css +1 -1
  9. package/lib/core/dist/core.js +392 -230
  10. package/lib/core/dist/core.min.js +1 -1
  11. package/lib/core/es6/data/ColumnStats.d.ts +3 -3
  12. package/lib/core/es6/data/DataCache.d.ts +9 -9
  13. package/lib/core/es6/data/DataTable.d.ts +28 -28
  14. package/lib/core/es6/data/DataTable.js +33 -10
  15. package/lib/core/es6/data/DataView.d.ts +62 -62
  16. package/lib/core/es6/data/DataView.js +42 -22
  17. package/lib/core/es6/data/Segment.d.ts +4 -4
  18. package/lib/core/es6/data/SegmentCollection.d.ts +7 -7
  19. package/lib/core/es6/data/WrappedView.d.ts +62 -62
  20. package/lib/core/es6/grid/Core.d.ts +97 -95
  21. package/lib/core/es6/grid/Core.js +180 -26
  22. package/lib/core/es6/grid/ILayoutGrid.d.ts +20 -20
  23. package/lib/core/es6/grid/ILayoutGrid.js +2 -1
  24. package/lib/core/es6/grid/LayoutGrid.d.ts +2 -2
  25. package/lib/core/es6/grid/LayoutGrid.js +18 -10
  26. package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +2 -2
  27. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +14 -3
  28. package/lib/core/es6/grid/components/Cell.d.ts +6 -6
  29. package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +2 -2
  30. package/lib/core/es6/grid/components/CellSpans.d.ts +2 -2
  31. package/lib/core/es6/grid/components/Column.d.ts +2 -2
  32. package/lib/core/es6/grid/components/ElementWrapper.d.ts +19 -19
  33. package/lib/core/es6/grid/components/Scrollbar.d.ts +11 -9
  34. package/lib/core/es6/grid/components/Scrollbar.js +13 -0
  35. package/lib/core/es6/grid/components/StretchedCells.js +12 -2
  36. package/lib/core/es6/grid/event/EventDispatcher.d.ts +3 -3
  37. package/lib/core/es6/grid/event/EventListeners.d.ts +5 -5
  38. package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +45 -44
  39. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +62 -65
  40. package/lib/core/es6/grid/util/Conflator.d.ts +4 -4
  41. package/lib/core/es6/grid/util/HttpRequest.d.ts +3 -3
  42. package/lib/core/es6/grid/util/PercentBar.d.ts +8 -8
  43. package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +8 -8
  44. package/lib/core/es6/grid/util/RangeBar.d.ts +1 -1
  45. package/lib/core/es6/grid/util/RangeBar.js +1 -1
  46. package/lib/core/es6/grid/util/Reverter.d.ts +1 -1
  47. package/lib/core/es6/grid/util/SectionSettings.d.ts +13 -13
  48. package/lib/core/es6/grid/util/SelectionList.d.ts +2 -2
  49. package/lib/core/es6/grid/util/TrackLayout.d.ts +9 -9
  50. package/lib/core/es6/grid/util/Virtualizer.d.ts +3 -3
  51. package/lib/core/es6/grid/util/util.d.ts +6 -4
  52. package/lib/core/es6/grid/util/util.js +16 -91
  53. package/lib/core/es6/tr-grid-theme.js +1 -1
  54. package/lib/filter-dialog/lib/checkbox-list.d.ts +1 -1
  55. package/lib/filter-dialog/lib/filter-dialog.d.ts +1 -1
  56. package/lib/filter-dialog/lib/filter-dialog.js +27 -9
  57. package/lib/filter-dialog/themes/base-checkbox.less +0 -1
  58. package/lib/filter-dialog/themes/base.less +1 -1
  59. package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +1 -1
  60. package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +2 -2
  61. package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
  62. package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +1 -1
  63. package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +2 -2
  64. package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
  65. package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +1 -1
  66. package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +2 -2
  67. package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
  68. package/lib/filter-dialog/themes/halo/light/checkbox-list.js +1 -1
  69. package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +2 -2
  70. package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
  71. package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +1 -1
  72. package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +2 -2
  73. package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
  74. package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +1 -1
  75. package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +2 -2
  76. package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
  77. package/lib/grid/index.js +1 -1
  78. package/lib/grid/lib/efx-grid.js +7 -44
  79. package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
  80. package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
  81. package/lib/grid/themes/halo/efx-grid.less +5 -5
  82. package/lib/grid/themes/halo/light/efx-grid.js +1 -1
  83. package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
  84. package/lib/row-segmenting/es6/RowSegmenting.d.ts +30 -24
  85. package/lib/row-segmenting/es6/RowSegmenting.js +122 -21
  86. package/lib/rt-grid/dist/rt-grid.js +1354 -435
  87. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  88. package/lib/rt-grid/es6/ColumnDefinition.d.ts +46 -42
  89. package/lib/rt-grid/es6/ColumnDefinition.js +31 -1
  90. package/lib/rt-grid/es6/DataConnector.d.ts +6 -4
  91. package/lib/rt-grid/es6/DataConnector.js +8 -0
  92. package/lib/rt-grid/es6/FieldDefinition.d.ts +2 -2
  93. package/lib/rt-grid/es6/FieldDefinition.js +12 -5
  94. package/lib/rt-grid/es6/Grid.d.ts +106 -91
  95. package/lib/rt-grid/es6/Grid.js +151 -106
  96. package/lib/rt-grid/es6/ReferenceCounter.d.ts +5 -5
  97. package/lib/rt-grid/es6/RowDefSorter.d.ts +2 -2
  98. package/lib/rt-grid/es6/RowDefinition.d.ts +22 -22
  99. package/lib/rt-grid/es6/RowDefinition.js +12 -5
  100. package/lib/rt-grid/es6/SnapshotFiller.d.ts +5 -2
  101. package/lib/rt-grid/es6/SnapshotFiller.js +121 -15
  102. package/lib/rt-grid/es6/StyleLoader.d.ts +1 -1
  103. package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +11 -11
  104. package/lib/tr-grid-cell-selection/es6/CellSelection.js +20 -35
  105. package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +18 -16
  106. package/lib/tr-grid-checkbox/es6/Checkbox.js +1 -0
  107. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +29 -27
  108. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +1 -0
  109. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +28 -14
  110. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +556 -11
  111. package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +2 -2
  112. package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1 -0
  113. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +2 -3
  114. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +15 -13
  115. package/lib/tr-grid-column-stack/es6/ColumnStack.js +96 -72
  116. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +14 -4
  117. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +314 -114
  118. package/lib/tr-grid-content-wrap/es6/ContentWrap.js +1 -6
  119. package/lib/tr-grid-contextmenu/es6/ContextMenu.js +3 -3
  120. package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +2 -2
  121. package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +2 -2
  122. package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +2 -1
  123. package/lib/tr-grid-heat-map/es6/HeatMap.js +6 -9
  124. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +5 -2
  125. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +311 -71
  126. package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +1 -1
  127. package/lib/tr-grid-percent-bar/es6/PercentBar.js +8 -11
  128. package/lib/tr-grid-printer/es6/SectionWriter.js +8 -0
  129. package/lib/tr-grid-range-bar/es6/RangeBar.js +3 -10
  130. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +6 -0
  131. package/lib/tr-grid-row-dragging/es6/RowDragging.js +56 -23
  132. package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +4 -3
  133. package/lib/tr-grid-row-filtering/es6/RowFiltering.js +57 -13
  134. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1 -1
  135. package/lib/tr-grid-row-selection/es6/RowSelection.js +16 -13
  136. package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +0 -2
  137. package/lib/tr-grid-rowcoloring/es6/RowColoring.js +1 -40
  138. package/lib/tr-grid-util/es6/CellPainter.d.ts +30 -30
  139. package/lib/tr-grid-util/es6/CellPainter.js +9 -8
  140. package/lib/tr-grid-util/es6/Conflator.d.ts +4 -4
  141. package/lib/tr-grid-util/es6/CoralItems.d.ts +1 -1
  142. package/lib/tr-grid-util/es6/DateTime.d.ts +10 -10
  143. package/lib/tr-grid-util/es6/Deferred.d.ts +3 -1
  144. package/lib/tr-grid-util/es6/Deferred.js +11 -1
  145. package/lib/tr-grid-util/es6/Delay.d.ts +2 -2
  146. package/lib/tr-grid-util/es6/Dom.d.ts +10 -10
  147. package/lib/tr-grid-util/es6/Dom.js +14 -10
  148. package/lib/tr-grid-util/es6/DragUI.js +5 -2
  149. package/lib/tr-grid-util/es6/ElementObserver.d.ts +2 -2
  150. package/lib/tr-grid-util/es6/ElementObserver.js +6 -3
  151. package/lib/tr-grid-util/es6/ElementWrapper.d.ts +4 -4
  152. package/lib/tr-grid-util/es6/ElfDate.d.ts +5 -5
  153. package/lib/tr-grid-util/es6/ElfDate.js +1 -0
  154. package/lib/tr-grid-util/es6/ElfUtil.d.ts +13 -4
  155. package/lib/tr-grid-util/es6/ElfUtil.js +178 -26
  156. package/lib/tr-grid-util/es6/EventDispatcher.d.ts +5 -5
  157. package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +2 -2
  158. package/lib/tr-grid-util/es6/ExpanderIcon.js +1 -1
  159. package/lib/tr-grid-util/es6/Ext.d.ts +1 -1
  160. package/lib/tr-grid-util/es6/FieldFormatter.d.ts +12 -12
  161. package/lib/tr-grid-util/es6/FieldFormatter.js +1 -1
  162. package/lib/tr-grid-util/es6/FilterBuilder.d.ts +13 -13
  163. package/lib/tr-grid-util/es6/FilterBuilder.js +15 -8
  164. package/lib/tr-grid-util/es6/FilterOperators.d.ts +22 -22
  165. package/lib/tr-grid-util/es6/FilterOperators.js +3 -3
  166. package/lib/tr-grid-util/es6/GridPlugin.d.ts +10 -10
  167. package/lib/tr-grid-util/es6/GridPlugin.js +20 -0
  168. package/lib/tr-grid-util/es6/Icon.d.ts +3 -3
  169. package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +8 -8
  170. package/lib/tr-grid-util/es6/MultiTableManager.d.ts +6 -6
  171. package/lib/tr-grid-util/es6/NumberFormatter.d.ts +19 -19
  172. package/lib/tr-grid-util/es6/NumberFormatter.js +1 -1
  173. package/lib/tr-grid-util/es6/PercentBar.d.ts +19 -19
  174. package/lib/tr-grid-util/es6/Perf.d.ts +4 -4
  175. package/lib/tr-grid-util/es6/Popup.d.ts +36 -33
  176. package/lib/tr-grid-util/es6/Popup.js +19 -1
  177. package/lib/tr-grid-util/es6/RangeBar.d.ts +5 -5
  178. package/lib/tr-grid-util/es6/RequestQueue.d.ts +4 -4
  179. package/lib/tr-grid-util/es6/RowPainter.d.ts +37 -4
  180. package/lib/tr-grid-util/es6/RowPainter.js +199 -76
  181. package/lib/tr-grid-util/es6/SubTable.d.ts +14 -14
  182. package/lib/tr-grid-util/es6/Table.d.ts +25 -25
  183. package/lib/tr-grid-util/es6/TextHighlighter.d.ts +1 -1
  184. package/lib/tr-grid-util/es6/Timer.d.ts +1 -1
  185. package/lib/tr-grid-util/es6/TouchProxy.d.ts +9 -9
  186. package/lib/tr-grid-util/es6/Util.d.ts +12 -12
  187. package/lib/tr-grid-util/es6/formula/ADCService.d.ts +1 -1
  188. package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +1 -1
  189. package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +1 -1
  190. package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +1 -1
  191. package/lib/tr-grid-util/es6/formula/Engine.d.ts +9 -9
  192. package/lib/tr-grid-util/es6/formula/Formula.d.ts +4 -4
  193. package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +1 -1
  194. package/lib/tr-grid-util/es6/formula/Realtime.d.ts +3 -3
  195. package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +1 -1
  196. package/lib/tr-grid-util/es6/formula/TSIService.d.ts +1 -1
  197. package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +1 -1
  198. package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +1 -1
  199. package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +1 -1
  200. package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +34 -34
  201. package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +1 -1
  202. package/lib/tr-grid-util/es6/jet/MockJET.d.ts +4 -4
  203. package/lib/tr-grid-util/es6/jet/MockJET.js +12 -4
  204. package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +9 -9
  205. package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +17 -9
  206. package/lib/tr-grid-util/es6/jet/MockQuotes2.js +84 -24
  207. package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +42 -2
  208. package/lib/tr-grid-util/es6/jet/MockRTK.js +55 -16
  209. package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +2 -2
  210. package/lib/tr-grid-util/es6/jet/mockDataAPI.js +99 -1
  211. package/lib/types/es6/Checkbox.d.ts +18 -16
  212. package/lib/types/es6/ColumnFormatting.d.ts +29 -27
  213. package/lib/types/es6/ColumnGrouping.d.ts +28 -14
  214. package/lib/types/es6/ColumnResizing.d.ts +2 -2
  215. package/lib/types/es6/ColumnStack.d.ts +15 -13
  216. package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +4 -2
  217. package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +0 -1
  218. package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +1 -1
  219. package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +1 -1
  220. package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +1 -5
  221. package/lib/types/es6/CompositeGrid/Plugin.d.ts +3 -1
  222. package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +2 -1
  223. package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +2 -1
  224. package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +1 -1
  225. package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +0 -1
  226. package/lib/types/es6/ConditionalColoring.d.ts +14 -4
  227. package/lib/types/es6/Core/data/ColumnStats.d.ts +3 -3
  228. package/lib/types/es6/Core/data/DataCache.d.ts +9 -9
  229. package/lib/types/es6/Core/data/DataTable.d.ts +28 -28
  230. package/lib/types/es6/Core/data/DataView.d.ts +62 -62
  231. package/lib/types/es6/Core/data/Segment.d.ts +4 -4
  232. package/lib/types/es6/Core/data/SegmentCollection.d.ts +7 -7
  233. package/lib/types/es6/Core/data/WrappedView.d.ts +62 -62
  234. package/lib/types/es6/Core/grid/Core.d.ts +97 -95
  235. package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +20 -20
  236. package/lib/types/es6/Core/grid/LayoutGrid.d.ts +2 -2
  237. package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +2 -2
  238. package/lib/types/es6/Core/grid/components/Cell.d.ts +6 -6
  239. package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +2 -2
  240. package/lib/types/es6/Core/grid/components/CellSpans.d.ts +2 -2
  241. package/lib/types/es6/Core/grid/components/Column.d.ts +2 -2
  242. package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +19 -19
  243. package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +11 -9
  244. package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +3 -3
  245. package/lib/types/es6/Core/grid/event/EventListeners.d.ts +5 -5
  246. package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +45 -44
  247. package/lib/types/es6/Core/grid/util/Conflator.d.ts +4 -4
  248. package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +3 -3
  249. package/lib/types/es6/Core/grid/util/PercentBar.d.ts +8 -8
  250. package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +8 -8
  251. package/lib/types/es6/Core/grid/util/RangeBar.d.ts +1 -1
  252. package/lib/types/es6/Core/grid/util/Reverter.d.ts +1 -1
  253. package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +13 -13
  254. package/lib/types/es6/Core/grid/util/SelectionList.d.ts +2 -2
  255. package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +9 -9
  256. package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +3 -3
  257. package/lib/types/es6/Core/grid/util/util.d.ts +6 -4
  258. package/lib/types/es6/HeatMap.d.ts +2 -1
  259. package/lib/types/es6/InCellEditing.d.ts +5 -2
  260. package/lib/types/es6/MenuEventAPI.d.ts +2 -2
  261. package/lib/types/es6/MenuItem.d.ts +2 -2
  262. package/lib/types/es6/PercentBar.d.ts +1 -1
  263. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +46 -42
  264. package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +6 -4
  265. package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +2 -2
  266. package/lib/types/es6/RealtimeGrid/Grid.d.ts +104 -89
  267. package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +5 -5
  268. package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +2 -2
  269. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +22 -22
  270. package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +5 -2
  271. package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +1 -1
  272. package/lib/types/es6/RowColoring.d.ts +0 -2
  273. package/lib/types/es6/RowDragging.d.ts +6 -0
  274. package/lib/types/es6/RowFiltering.d.ts +4 -3
  275. package/lib/types/es6/RowSegmenting.d.ts +30 -24
  276. package/lib/versions.json +26 -26
  277. package/package.json +2 -2
@@ -18,16 +18,17 @@ import { CoralItems } from "../../tr-grid-util/es6/CoralItems.js";
18
18
  * @property {boolean=} tabToMove=false If enabled, pressing tab key while editor is active will open editor on the next editable cell.
19
19
  * @property {boolean=} contentSource="textContent" By default, the text in the editor will be populated with textContent of the target cell. Use "field" to populated data from grid's data model. Use "empty" to shows empty editor.
20
20
  * @property {boolean=} inlineStyling=false force inline styles regardless of elf version.
21
- * @property {boolean=} disablingScroll=false Scrollbar will be frozen when editor opened.
21
+ * @property {boolean=} disablingScroll=false Scrollbar will be frozen when editor opened. Deprecated in favor of uiBlocking
22
+ * @property {boolean=} uiBlocking=false append transparent overlay to block ui interaction
22
23
  * @property {Function=} preEditorOpening=null Handler before editor is opened
23
24
  * @property {Function=} editorOpened=null Handler after editor is opened
24
25
  * @property {Function=} beforeCommit=null Handler before data binding, allowing data type conversion
25
26
  * @property {Function=} editorClosed=null Handler after editor is closed
26
27
  * @property {Function=} keyUp=null Handler for each keyup of the input text box
27
- * @property {Function=} beforeRowCommit=null Handler before all editor in row commit
28
- * @property {Function=} rowEditorClosed=null Handler after all editors closed
29
- * @property {boolean=} uiBlocking=false append transparent overlay to block ui interaction
30
- * @property {Element=} autoSuggest=null Element of ef-autosuggest for handled with input cell
28
+ * @property {Function=} beforeRowCommit=null Handler before committing from all editors in the row
29
+ * @property {Function=} rowEditorClosed=null Handler after closing of all editors
30
+ * @property {Element=} autoSuggest=null Element of ef-autosuggest or atlas-autosuggest for handled with input cell
31
+ * @property {boolean=} closingOnScroll=true If disabled, scrolling will not automatically close editor. autoHiding, closingOnScroll
31
32
  */
32
33
 
33
34
  /** @typedef {Object} InCellEditingPlugin~Cache
@@ -67,7 +68,7 @@ import { CoralItems } from "../../tr-grid-util/es6/CoralItems.js";
67
68
  * @property {number} rowIndex
68
69
  * @property {string} field
69
70
  * @property {Element} inputElement
70
- * @property {Element} autoSuggest
71
+ * @property {Element} autoSuggest ef-autosuggest or atlas-autosuggest
71
72
  * @example
72
73
  * var cep = new InCellEditingPlugin();
73
74
  * cep.listen("editorOpened", function(e) {
@@ -154,13 +155,12 @@ var InCellEditingPlugin = function InCellEditingPlugin(options) {
154
155
  t._onTextKeyUp = t._onTextKeyUp.bind(t);
155
156
  t._onTouchStart = t._onTouchStart.bind(t);
156
157
  t._onTouchEnd = t._onTouchEnd.bind(t);
157
- t._onTimer = t._onTimer.bind(t);
158
+ t._onTouchTimer = t._onTouchTimer.bind(t);
158
159
  t._createContentEditor = t._createContentEditor.bind(t);
159
160
  t._createTitleEditor = t._createTitleEditor.bind(t);
160
161
  t._onColumnAdded = t._onColumnAdded.bind(t);
161
162
  t._onValueChanged = t._onValueChanged.bind(t);
162
163
  t._onAutoSuggestItemSelected = t._onAutoSuggestItemSelected.bind(t);
163
- t._onAutoSuggestTapStart = t._onAutoSuggestTapStart.bind(t);
164
164
  t._hosts = [];
165
165
 
166
166
  if (options) {
@@ -271,7 +271,7 @@ InCellEditingPlugin.prototype._autoCommitText = false;
271
271
  * @private
272
272
  */
273
273
 
274
- InCellEditingPlugin.prototype._timerId = 0;
274
+ InCellEditingPlugin.prototype._touchTimerId = 0;
275
275
  /** @type {number}
276
276
  * @private
277
277
  */
@@ -336,6 +336,21 @@ InCellEditingPlugin.prototype._defaultTag = "input";
336
336
  */
337
337
 
338
338
  InCellEditingPlugin.prototype._rowClosing = false;
339
+ /** @type {boolean}
340
+ * @private
341
+ */
342
+
343
+ InCellEditingPlugin.prototype._closingOnScroll = true;
344
+ /** @type {number}
345
+ * @private
346
+ */
347
+
348
+ InCellEditingPlugin.prototype._editorTimerId = 0;
349
+ /** @type {boolean}
350
+ * @private
351
+ */
352
+
353
+ InCellEditingPlugin._scrolling = false;
339
354
  /** @type {number}
340
355
  * @private
341
356
  */
@@ -352,11 +367,11 @@ InCellEditingPlugin._primaryColor = "";
352
367
 
353
368
  InCellEditingPlugin._styles = prettifyCss([":host .cell.editing input[type=text]", ["border-style: solid;"]]);
354
369
  /** @private
355
- * @param {Object} colors
356
370
  */
357
371
 
358
- InCellEditingPlugin._onThemeLoaded = function (colors) {
359
- if (!InCellEditingPlugin._primaryColor) InCellEditingPlugin._primaryColor = colors.primary;
372
+ InCellEditingPlugin._onThemeLoaded = function () {
373
+ var colors = ElfUtil.getColors();
374
+ InCellEditingPlugin._primaryColor = colors.primary;
360
375
  };
361
376
  /** @private
362
377
  * @param {string} tag element tag
@@ -395,10 +410,9 @@ InCellEditingPlugin.prototype._createInputElement = function (tag) {
395
410
  }
396
411
 
397
412
  if (this._autoSuggest) {
398
- this._autoSuggest.addEventListener("tapstart", t._onAutoSuggestTapStart); // TODO: remove this function after elf fixed item-select doesn't fire click events
399
-
400
-
401
413
  this._autoSuggest.addEventListener("item-select", t._onAutoSuggestItemSelected);
414
+
415
+ this._autoSuggest.addEventListener("wheel", t._stopPropagation, false);
402
416
  }
403
417
 
404
418
  elem.addEventListener("keydown", t._onTextKeyDown, false);
@@ -533,8 +547,13 @@ InCellEditingPlugin.prototype.initialize = function (host, options) {
533
547
  return;
534
548
  }
535
549
 
550
+ if (!this._hosts.length) {
551
+ window.addEventListener("scroll", this._onScroll);
552
+ }
553
+
536
554
  host.listen("columnAdded", this._onColumnAdded);
537
555
  host.getVScrollbar().listen("scroll", this._onScroll);
556
+ host.getHScrollbar().listen("scroll", this._onScroll);
538
557
 
539
558
  if (this._dblClick) {
540
559
  host.listen("dblclick", this._onDoubleClick); // Make a comparable functionality for touchscreen
@@ -563,7 +582,7 @@ InCellEditingPlugin.prototype.initialize = function (host, options) {
563
582
  this.config(options);
564
583
 
565
584
  if (!InCellEditingPlugin._primaryColor) {
566
- ElfUtil.getThemeColors().then(InCellEditingPlugin._onThemeLoaded);
585
+ ElfUtil.getThemeColors().then(InCellEditingPlugin._onThemeLoaded)["catch"](InCellEditingPlugin._onThemeLoaded);
567
586
  }
568
587
  };
569
588
  /** Remove redundant built-in composite-grid feature
@@ -643,6 +662,10 @@ InCellEditingPlugin.prototype.config = function (options) {
643
662
 
644
663
  if (pluginOption["autoSuggest"]) {
645
664
  t._autoSuggest = pluginOption["autoSuggest"];
665
+ }
666
+
667
+ if (pluginOption["closingOnScroll"] == false) {
668
+ t._closingOnScroll = false;
646
669
  } // event callback
647
670
 
648
671
 
@@ -749,11 +772,18 @@ InCellEditingPlugin.prototype.unload = function (host) {
749
772
 
750
773
  host.unlisten("columnAdded", this._onColumnAdded);
751
774
  host.getVScrollbar().unlisten("scroll", this._onScroll);
775
+ host.getHScrollbar().unlisten("scroll", this._onScroll);
752
776
  host.unlisten("dblclick", this._onDoubleClick);
753
777
  host.unlisten("touchstart", this._onTouchStart);
754
778
  host.unlisten("touchend", this._onTouchEnd);
755
779
  host.unlisten("touchcancel", this._onTouchEnd);
756
780
 
781
+ if (!this._hosts.length) {
782
+ this._touchTimerId = 0;
783
+ this._editorTimerId = 0;
784
+ window.removeEventListener("scroll", this._onScroll);
785
+ }
786
+
757
787
  this._dispose();
758
788
  };
759
789
  /** @public
@@ -1122,9 +1152,16 @@ InCellEditingPlugin.prototype._openEditor = function (e, host, arg) {
1122
1152
  var rowIndex = arg["rowIndex"];
1123
1153
  var section = arg["section"];
1124
1154
  var cell = section.getCell(colIndex, rowIndex);
1155
+ var rowSpan = 1;
1156
+ var stretchedCell = section.getStretchedCell(cell, rowIndex);
1125
1157
 
1126
- if (!cell || cell.hasClass("no-editing") || cell.hasClass("folder")) {
1127
- // TODO: Allow cell with folder (expander arrow) to be editable for row segmenting
1158
+ if (stretchedCell) {
1159
+ cell = stretchedCell;
1160
+ } else {
1161
+ rowSpan = section.getCellRowSpan(colIndex, rowIndex);
1162
+ }
1163
+
1164
+ if (!cell || cell.hasClass("no-editing")) {
1128
1165
  return;
1129
1166
  } // Everything has been verified at this point. We can start the opening process.
1130
1167
  // close row editor first
@@ -1132,10 +1169,20 @@ InCellEditingPlugin.prototype._openEditor = function (e, host, arg) {
1132
1169
 
1133
1170
  t.closeRowEditor(false, host);
1134
1171
  section.addClass("edit-mode");
1172
+ t._lastActiveGrid = host;
1135
1173
  t._activePos = arg;
1136
1174
  arg["cell"] = t._activeCell = cell;
1137
1175
  arg["content"] = t._prevContent = cell.getContent();
1138
- arg["field"] = t._getField(colIndex); // Initialize UIs
1176
+ arg["field"] = t._getField(colIndex);
1177
+ var dataSource = arg["dataSource"];
1178
+
1179
+ if (dataSource != null) {
1180
+ var rowId = arg["rowId"] = this._getRowId(arg["rowIndex"]);
1181
+
1182
+ arg["groupHeader"] = dataSource.isSegmentSeparator(rowId) || dataSource.getGroupByRowId(rowId);
1183
+ arg["rowData"] = this._getRow(dataSource, rowId);
1184
+ } // Initialize UIs
1185
+
1139
1186
 
1140
1187
  if (arg["sectionType"] === "title") {
1141
1188
  t._activeInCellCache = t._createTitleEditor(host);
@@ -1170,7 +1217,7 @@ InCellEditingPlugin.prototype._openEditor = function (e, host, arg) {
1170
1217
  }
1171
1218
 
1172
1219
  var rowH = section.getRowHeight(rowIndex);
1173
- var width = section.getCellWidth(colIndex, rowIndex);
1220
+ var width = cell.getWidth();
1174
1221
 
1175
1222
  if (!host.isPinnedColumn(colIndex)) {
1176
1223
  var hScrollbar = host.getHScrollbar();
@@ -1190,7 +1237,12 @@ InCellEditingPlugin.prototype._openEditor = function (e, host, arg) {
1190
1237
  editorStyle.width = "";
1191
1238
  }
1192
1239
 
1193
- editorStyle.height = rowH + "px"; // Attach our popup (balloon element)
1240
+ if (rowSpan > 1) {
1241
+ editorStyle.height = cell.getHeight() + "px";
1242
+ } else {
1243
+ editorStyle.height = rowH + "px";
1244
+ } // Attach our popup (balloon element)
1245
+
1194
1246
 
1195
1247
  var parentElement = document.body;
1196
1248
 
@@ -1203,10 +1255,14 @@ InCellEditingPlugin.prototype._openEditor = function (e, host, arg) {
1203
1255
  }
1204
1256
 
1205
1257
  balloonPopup.enableUIBlocking(t._uiBlocking);
1206
- balloonPopup.attachTo(cell.getElement());
1207
1258
  balloonPopup.addEventListener("hidden", t._onPopupHide);
1208
1259
  balloonPopup.disableAutoHiding(false);
1209
- balloonPopup.show(true, parentElement); // Attach user element
1260
+ balloonPopup.disableHideOnScroll(true);
1261
+ balloonPopup.attachTo(cell.getElement());
1262
+ balloonPopup.show(true, parentElement);
1263
+
1264
+ this._updateEditorPopup(t._activeInCellCache, cell, host); // Attach user element
1265
+
1210
1266
 
1211
1267
  if (t._customElement) {
1212
1268
  t._customElementPopup.attachTo(editor);
@@ -1230,9 +1286,13 @@ InCellEditingPlugin.prototype._openEditor = function (e, host, arg) {
1230
1286
  arg["autoSuggest"] = t._autoSuggest;
1231
1287
 
1232
1288
  if (t._autoSuggest) {
1233
- if (t._autoSuggest.parentNode !== host.getElement()) {
1289
+ if (t._autoSuggest.attach === inputElement) {
1290
+ t._autoSuggest.attach = null; // WORKAROUND: reset attach for re-attach target
1291
+ }
1292
+
1293
+ if (t._autoSuggest.parentNode !== editor) {
1234
1294
  // if we appendChild all time when open editor, events won't work
1235
- host.getElement().appendChild(t._autoSuggest);
1295
+ editor.appendChild(t._autoSuggest);
1236
1296
  }
1237
1297
 
1238
1298
  t._autoSuggest.attach = inputElement;
@@ -1252,8 +1312,6 @@ InCellEditingPlugin.prototype._openEditor = function (e, host, arg) {
1252
1312
  arg["initialText"] = t._initialText = t.getText(); // After all modifications, cache the string for text change event
1253
1313
 
1254
1314
  t._editing = true; // Editing state cannot be false until a text has been committed or cancelled
1255
-
1256
- t._lastActiveGrid = host;
1257
1315
  };
1258
1316
  /** Using to open row editor.
1259
1317
  * @public
@@ -1299,7 +1357,7 @@ InCellEditingPlugin.prototype.openRowEditor = function (rowIndex, grid) {
1299
1357
 
1300
1358
  var cell = section.getCell(columnIndex, rowIndex);
1301
1359
 
1302
- if (!cell || cell.hasClass("no-editing") || cell.hasClass("folder")) {
1360
+ if (!cell || cell.hasClass("no-editing")) {
1303
1361
  continue;
1304
1362
  } // all verify is done
1305
1363
  // create editor, popup, inputElement
@@ -1345,11 +1403,14 @@ InCellEditingPlugin.prototype.openRowEditor = function (rowIndex, grid) {
1345
1403
 
1346
1404
  var width = section.getCellWidth(columnIndex, rowIndex);
1347
1405
  editorStyle.width = width + "px";
1348
- editor.classList.remove("balloon"); // Attach our popup (editor element)
1349
-
1406
+ editor.classList.remove("balloon");
1407
+ balloonPopup.disableAutoHiding(true);
1408
+ balloonPopup.disableHideOnScroll(true);
1350
1409
  balloonPopup.attachTo(cell.getElement());
1351
1410
  balloonPopup.show(true, parentElement);
1352
- balloonPopup.disableAutoHiding(true); // this._updateEditorLayout(inputElement); // Adjust sizes after append to the DOM
1411
+
1412
+ this._updateEditorPopup(inCellCache, cell, grid); // this._updateEditorLayout(inputElement); // Adjust sizes after append to the DOM
1413
+
1353
1414
  } // if firstInput not undefined that mean at lease one popup is open
1354
1415
 
1355
1416
 
@@ -1517,10 +1578,39 @@ InCellEditingPlugin.prototype.toggleRowEditor = function (rowIndex, isCommit, gr
1517
1578
 
1518
1579
 
1519
1580
  InCellEditingPlugin.prototype._onScroll = function (e) {
1520
- // just close editor
1521
- this.closeRowEditor(false);
1581
+ this._scrolling = true;
1582
+
1583
+ if (!this._closingOnScroll && this._editing) {
1584
+ if (this._activeInCellCache) {
1585
+ var popup = this._activeInCellCache.balloonPopup;
1586
+ popup.hide();
1587
+ } else if (this._activeRowId) {
1588
+ var grid = this.getActiveGrid() || this._lastActiveGrid;
1589
+
1590
+ var section = grid.getSection("content");
1591
+ var lastIndex = (section.getColumnCount() || 0) - 1;
1592
+
1593
+ for (var columnIndex = 0; columnIndex <= lastIndex; columnIndex++) {
1594
+ var columnData = this._getColumnData(columnIndex, grid);
1595
+
1596
+ var inCellCache = columnData["inCellCache"];
1597
+
1598
+ if (!inCellCache) {
1599
+ continue;
1600
+ }
1601
+
1602
+ var popupCache = inCellCache["balloonPopup"];
1522
1603
 
1523
- this._commitText(false);
1604
+ if (popupCache) {
1605
+ popupCache.hide();
1606
+ }
1607
+ }
1608
+ }
1609
+ }
1610
+
1611
+ this._onPopupHide();
1612
+
1613
+ this._scrolling = false;
1524
1614
  };
1525
1615
  /** handle popup hidden event
1526
1616
  * @private
@@ -1529,9 +1619,16 @@ InCellEditingPlugin.prototype._onScroll = function (e) {
1529
1619
 
1530
1620
 
1531
1621
  InCellEditingPlugin.prototype._onPopupHide = function (e) {
1532
- // in cell editing mode, when popup hide for any reason
1622
+ if (!this._closingOnScroll) {
1623
+ if (this._scrolling) {
1624
+ this.requestShowEditorPopup();
1625
+ return;
1626
+ }
1627
+ } // in cell editing mode, when popup hide for any reason
1533
1628
  // cell editing will be close and make a commit. (depend on _autoCommitText flag)
1534
1629
  // WARNING: when user scroll outside grid. it will call _onPopupHide as well
1630
+
1631
+
1535
1632
  this._commitText(this._autoCommitText); // for row editing mode if editor hide by any reason
1536
1633
  // we will call close closeRowEditor to reset all internal flag status
1537
1634
  // row editing mode not care about _autoCommitText. (for the time being)
@@ -1544,34 +1641,17 @@ InCellEditingPlugin.prototype._onPopupHide = function (e) {
1544
1641
  */
1545
1642
 
1546
1643
 
1547
- InCellEditingPlugin.prototype._onAutoSuggestTapStart = function (event) {
1548
- // TODO: Remove this function and use _onAutoSuggestItemSelected instead of this function
1549
- // This WORKAROUND by use "tapstart" event instead of "item-select" event in ef-autosugest
1550
- var target = event.target;
1551
-
1552
- if (target.value) {
1553
- this.setText(target.value);
1554
-
1555
- this._commitText(true);
1556
- }
1557
- };
1558
- /** @private
1559
- * @param {Object} event
1560
- */
1561
-
1562
-
1563
1644
  InCellEditingPlugin.prototype._onAutoSuggestItemSelected = function (event) {
1564
- // TODO: Replace This function instead of _onAutoSuggestTapStart when elf fixed item-select.
1565
- // Currently, we use tapstart instead of item-select, so it's not support other method of item-select
1566
- // Currently, this function doesn't execute until item-select event fired from auto-suggest
1567
- var method = event.detail.method;
1568
- var value = event.detail.target.value;
1645
+ if (event.detail.target) {
1646
+ var method = event.detail.method;
1647
+ var value = event.detail.target.value;
1569
1648
 
1570
- if (method === 'enter' || method === 'click') {
1571
- if (value) {
1572
- this.setText(value);
1649
+ if (method === 'enter' || method === 'click') {
1650
+ if (value) {
1651
+ this.setText(value);
1573
1652
 
1574
- this._commitText(true);
1653
+ this._commitText(true);
1654
+ }
1575
1655
  }
1576
1656
  }
1577
1657
  };
@@ -1701,6 +1781,7 @@ InCellEditingPlugin.prototype._commitText = function (committed) {
1701
1781
  arg["section"].removeClass("edit-mode");
1702
1782
  t._editing = false;
1703
1783
  var enteredValue = arg["text"] = this.getValue();
1784
+ var groupHeader = arg["groupHeader"] || false;
1704
1785
 
1705
1786
  if (committed) {
1706
1787
  if (t.hasListener("beforeCommit")) {
@@ -1710,7 +1791,7 @@ InCellEditingPlugin.prototype._commitText = function (committed) {
1710
1791
  enteredValue = arg["text"];
1711
1792
  }
1712
1793
 
1713
- if (committed && t._dataBinding) {
1794
+ if (committed && t._dataBinding && !groupHeader) {
1714
1795
  var sectionSettings = arg["sectionSettings"];
1715
1796
  var sectionType = sectionSettings.getType(); // case edit content
1716
1797
 
@@ -1807,9 +1888,9 @@ InCellEditingPlugin.prototype._listenForTriggering = function (host, bool) {
1807
1888
 
1808
1889
 
1809
1890
  InCellEditingPlugin.prototype._onTouchStart = function (e) {
1810
- this._resetTimer();
1891
+ this._resetTouchTimer();
1811
1892
 
1812
- this._timerId = setTimeout(this._onTimer, this._longPressTime);
1893
+ this._touchTimerId = setTimeout(this._onTouchTimer, this._longPressTime);
1813
1894
  };
1814
1895
  /** Use only press time on mobile devices.
1815
1896
  * @private
@@ -1817,8 +1898,8 @@ InCellEditingPlugin.prototype._onTouchStart = function (e) {
1817
1898
  */
1818
1899
 
1819
1900
 
1820
- InCellEditingPlugin.prototype._onTimer = function (e) {
1821
- this._timerId = 0;
1901
+ InCellEditingPlugin.prototype._onTouchTimer = function (e) {
1902
+ this._touchTimerId = 0;
1822
1903
  };
1823
1904
  /** Use only On-Touch-End event on mobile devices.
1824
1905
  * @private
@@ -1827,7 +1908,7 @@ InCellEditingPlugin.prototype._onTimer = function (e) {
1827
1908
 
1828
1909
 
1829
1910
  InCellEditingPlugin.prototype._onTouchEnd = function (e) {
1830
- if (!this._resetTimer()) {
1911
+ if (!this._resetTouchTimer()) {
1831
1912
  this._onDoubleClick(e); // Trigger cell editor
1832
1913
 
1833
1914
  }
@@ -1838,10 +1919,10 @@ InCellEditingPlugin.prototype._onTouchEnd = function (e) {
1838
1919
  */
1839
1920
 
1840
1921
 
1841
- InCellEditingPlugin.prototype._resetTimer = function () {
1842
- if (this._timerId) {
1843
- clearTimeout(this._timerId);
1844
- this._timerId = 0;
1922
+ InCellEditingPlugin.prototype._resetTouchTimer = function () {
1923
+ if (this._touchTimerId) {
1924
+ clearTimeout(this._touchTimerId);
1925
+ this._touchTimerId = 0;
1845
1926
  return true;
1846
1927
  }
1847
1928
 
@@ -2040,7 +2121,7 @@ InCellEditingPlugin.prototype.getBalloonPopup = function () {
2040
2121
  // we should receive column index to return balloonPopup in specific column
2041
2122
  return this._activeInCellCache ? this._activeInCellCache["balloonPopup"] : null;
2042
2123
  };
2043
- /** Get ef-autosuggest
2124
+ /** Get ef-autosuggest or atlas-autosuggest
2044
2125
  * @public
2045
2126
  * @return {Element}
2046
2127
  */
@@ -2075,6 +2156,165 @@ InCellEditingPlugin.prototype._freezeScrolling = function (grid, frozen) {
2075
2156
  vs && vs.freezeScrolling(frozen);
2076
2157
  hs && hs.freezeScrolling(frozen);
2077
2158
  };
2159
+ /** Set a timer to call onUpdateEditorPopup only once to avoid performance issue
2160
+ * @public
2161
+ */
2162
+
2163
+
2164
+ InCellEditingPlugin.prototype.requestShowEditorPopup = function () {
2165
+ if (!this._editorTimerId) {
2166
+ this._editorTimerId = setTimeout(this._onUpdateEditorPopup.bind(this), 100);
2167
+ }
2168
+ };
2169
+ /** @private */
2170
+
2171
+
2172
+ InCellEditingPlugin.prototype._onUpdateEditorPopup = function () {
2173
+ this._editorTimerId = 0;
2174
+
2175
+ var grid = this.getActiveGrid() || this._lastActiveGrid;
2176
+
2177
+ if (!grid) {
2178
+ return;
2179
+ }
2180
+
2181
+ var parentElement = document.body;
2182
+
2183
+ if (this._compositeGrid || this._realTimeGrid) {
2184
+ parentElement = grid.getElement().parentElement;
2185
+ }
2186
+
2187
+ if (this._activeInCellCache) {
2188
+ var activePos = this._activePos;
2189
+
2190
+ if (activePos) {
2191
+ var section = grid.getSection(activePos["sectionType"]);
2192
+ var cell = section.getCell(activePos["colIndex"], activePos["rowIndex"]);
2193
+
2194
+ if (cell) {
2195
+ var popup = this._activeInCellCache["balloonPopup"];
2196
+ popup.attachTo(cell.getElement());
2197
+ popup.show(true, parentElement);
2198
+
2199
+ this._updateEditorPopup(this._activeInCellCache, cell, grid);
2200
+ }
2201
+ }
2202
+ } else if (this._activeRowId) {
2203
+ var sectionContent = grid.getSection("content");
2204
+
2205
+ var rowIndex = this._getRowIndex(this._activeRowId);
2206
+
2207
+ if (sectionContent.isRowVisible(rowIndex)) {
2208
+ var lastIndex = (sectionContent.getColumnCount() || 0) - 1;
2209
+
2210
+ for (var columnIndex = 0; columnIndex <= lastIndex; columnIndex++) {
2211
+ var columnData = this._getColumnData(columnIndex, grid);
2212
+
2213
+ var inCellCache = columnData["inCellCache"];
2214
+ var cellContent = sectionContent.getCell(columnIndex, rowIndex);
2215
+
2216
+ if (!inCellCache || !cellContent) {
2217
+ continue;
2218
+ }
2219
+
2220
+ var popupCache = inCellCache["balloonPopup"];
2221
+ popupCache.attachTo(cellContent.getElement());
2222
+ popupCache.show(true, parentElement);
2223
+
2224
+ this._updateEditorPopup(inCellCache, cellContent, grid);
2225
+ }
2226
+ }
2227
+ }
2228
+
2229
+ grid.focus();
2230
+ };
2231
+ /** Update editor popup position and styles
2232
+ * @private
2233
+ * @param {Object} contentEditor
2234
+ * @param {Object} cell
2235
+ * @param {Object} grid grid instance
2236
+ */
2237
+
2238
+
2239
+ InCellEditingPlugin.prototype._updateEditorPopup = function (contentEditor, cell, grid) {
2240
+ var popup = contentEditor["balloonPopup"];
2241
+ var editor = contentEditor["editor"];
2242
+ var popupElem = popup.getElement();
2243
+ var pos = grid.getRelativePosition(cell);
2244
+ var width = cell.getWidth();
2245
+ var height = cell.getHeight();
2246
+ var colRect = grid.getColumnRect(0, grid.getColumnCount());
2247
+ var rowRect = grid.getRowRect(0, grid.getRowCount());
2248
+ var offsetWidth = colRect.scrollViewSize;
2249
+ var offsetHeight = rowRect.scrollViewSize;
2250
+ var offsetLeft = 0;
2251
+ var offsetTop = pos["sectionType"] == "content" ? rowRect.scrollViewTop : 0;
2252
+ var newHeight = height;
2253
+ var newWidth = width;
2254
+ var displayStyle = "inline-block";
2255
+ var marginLeft = 0;
2256
+ var marginTop = 0;
2257
+
2258
+ if (colRect.leftPinnedIndex != -1) {
2259
+ var diff = 0;
2260
+
2261
+ if (grid.getVScrollbar().isActive()) {
2262
+ diff -= 8; // If column is left pinned, scrollbar width need to be subtracted
2263
+ }
2264
+
2265
+ diff += colRect.width - colRect.scrollViewSize;
2266
+ offsetWidth += diff;
2267
+ offsetLeft += diff;
2268
+ }
2269
+
2270
+ if (editor.classList.contains("balloon") && !this._activeRowId) {
2271
+ popupElem.style.display = "";
2272
+ editor.style.width = "";
2273
+ editor.style.marginLeft = "";
2274
+ editor.style.marginTop = "";
2275
+ marginLeft = -4;
2276
+ marginTop = -4;
2277
+ newWidth = popup.getElement().offsetWidth;
2278
+ }
2279
+
2280
+ if (!pos["hit"]) {
2281
+ displayStyle = "none";
2282
+ } else {
2283
+ var acquiredWidth = pos["x"] + newWidth;
2284
+ var acquiredHeight = pos["y"] - offsetTop + newHeight; // Left overflow
2285
+
2286
+ if (pos["x"] < offsetLeft) {
2287
+ newWidth = newWidth - (offsetLeft - pos["x"]);
2288
+ marginLeft = marginLeft + Math.abs(pos["x"] - offsetLeft);
2289
+ } // Right overflow
2290
+
2291
+
2292
+ if (acquiredWidth > offsetWidth) {
2293
+ newWidth = newWidth - (acquiredWidth - offsetWidth);
2294
+ } // Top overflow
2295
+
2296
+
2297
+ if (pos["y"] < offsetTop) {
2298
+ newHeight = newHeight + pos["y"] - offsetTop;
2299
+ marginTop = marginTop + Math.abs(pos["y"] - offsetTop);
2300
+ } // Bottom overflow
2301
+
2302
+
2303
+ if (acquiredHeight > offsetHeight) {
2304
+ newHeight = newHeight - (acquiredHeight - offsetHeight);
2305
+ }
2306
+
2307
+ if (newWidth < 48 && newWidth != width || newHeight < 16 && newHeight != height) {
2308
+ displayStyle = "none";
2309
+ }
2310
+ }
2311
+
2312
+ popupElem.style.display = displayStyle;
2313
+ editor.style.width = newWidth ? newWidth + "px" : "";
2314
+ editor.style.height = newHeight ? newHeight + "px" : "";
2315
+ editor.style.marginLeft = marginLeft ? marginLeft + "px" : 0;
2316
+ editor.style.marginTop = marginTop ? marginTop + "px" : 0;
2317
+ };
2078
2318
 
2079
2319
  export default InCellEditingPlugin;
2080
2320
  export { InCellEditingPlugin, InCellEditingPlugin as InCellEditing, InCellEditingPlugin as InCellEditingExtension };
@@ -52,7 +52,7 @@ declare class PercentBarPlugin extends GridPlugin {
52
52
 
53
53
  public setColumnPercentBar(colIndex: number, columnOptions: PercentBarPlugin.ColumnOptions): void;
54
54
 
55
- public reloadThemeColors(): void;
55
+ public reloadThemeColors(): Promise<any>|null;
56
56
 
57
57
  }
58
58
 
@@ -58,11 +58,6 @@ PercentBarPlugin._runningId = 0;
58
58
  * @private
59
59
  */
60
60
 
61
- PercentBarPlugin._themeLoaded = false;
62
- /** @type {boolean}
63
- * @private
64
- */
65
-
66
61
  PercentBarPlugin._themeRevision = 0;
67
62
  /** @type {boolean}
68
63
  * @private
@@ -128,9 +123,9 @@ PercentBarPlugin.prototype.initialize = function (host, options) {
128
123
  host.listen("columnAlignmentChanged", this._requestRowRefresh);
129
124
  }
130
125
 
131
- if (!PercentBarPlugin._themeLoaded && !this._themeLoading) {
126
+ if (!this._themeLoading) {
132
127
  this._themeLoading = true;
133
- ElfUtil.getThemeColors().then(this._onThemeLoaded);
128
+ ElfUtil.getThemeColors(this._onThemeLoaded).then(this._onThemeLoaded)["catch"](this._onThemeLoaded);
134
129
  }
135
130
  };
136
131
  /** @override */
@@ -523,7 +518,6 @@ PercentBarPlugin.prototype._getAutoTextSizing = function (colIndex, pBarOpt) {
523
518
 
524
519
 
525
520
  PercentBarPlugin.prototype._onThemeLoaded = function () {
526
- PercentBarPlugin._themeLoaded = true;
527
521
  PercentBarPlugin._themeRevision++;
528
522
 
529
523
  this._requestRowRefresh();
@@ -534,7 +528,7 @@ PercentBarPlugin.prototype._onThemeLoaded = function () {
534
528
 
535
529
 
536
530
  PercentBarPlugin.prototype._onPostSectionBinding = function (e) {
537
- if (!PercentBarPlugin._themeLoaded) {
531
+ if (!ElfUtil.isThemeLoaded()) {
538
532
  return;
539
533
  }
540
534
 
@@ -789,12 +783,15 @@ PercentBarPlugin.prototype._requestRowRefresh = function () {
789
783
  }
790
784
  };
791
785
  /** @public
786
+ * @description Reload theme colors and rerender percent bars.
787
+ * Should call after overwriting css variables for MovementColor without changing movement-color-profile attribute.
788
+ * @function
789
+ * @return {Promise<Object>}
792
790
  */
793
791
 
794
792
 
795
793
  PercentBarPlugin.prototype.reloadThemeColors = function () {
796
- PercentBarPlugin._themeLoaded = ElfUtil.themeReady = null;
797
- ElfUtil.getThemeColors().then(this._onThemeLoaded);
794
+ return ElfUtil.reloadThemeColors().then(this._onThemeLoaded)["catch"](this._onThemeLoaded);
798
795
  };
799
796
 
800
797
  export default PercentBarPlugin;