@refinitiv-ui/efx-grid 6.0.0-next.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 (837) hide show
  1. package/LICENSE +17 -0
  2. package/README.md +61 -0
  3. package/lib/column-format-dialog/index.d.ts +1 -0
  4. package/lib/column-format-dialog/index.js +1 -0
  5. package/lib/column-format-dialog/lib/column-format-dialog.d.ts +64 -0
  6. package/lib/column-format-dialog/lib/column-format-dialog.js +2713 -0
  7. package/lib/column-format-dialog/lib/locale/translation-de.d.ts +7 -0
  8. package/lib/column-format-dialog/lib/locale/translation-de.js +94 -0
  9. package/lib/column-format-dialog/lib/locale/translation-en.d.ts +7 -0
  10. package/lib/column-format-dialog/lib/locale/translation-en.js +94 -0
  11. package/lib/column-format-dialog/lib/locale/translation-ja.d.ts +7 -0
  12. package/lib/column-format-dialog/lib/locale/translation-ja.js +94 -0
  13. package/lib/column-format-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  14. package/lib/column-format-dialog/lib/locale/translation-zh-hant.js +94 -0
  15. package/lib/column-format-dialog/lib/locale/translation-zh.d.ts +7 -0
  16. package/lib/column-format-dialog/lib/locale/translation-zh.js +94 -0
  17. package/lib/column-format-dialog/lib/locale/translation.d.ts +11 -0
  18. package/lib/column-format-dialog/lib/locale/translation.js +18 -0
  19. package/lib/column-format-dialog/lib/preview-table.d.ts +151 -0
  20. package/lib/column-format-dialog/lib/preview-table.js +995 -0
  21. package/lib/column-format-dialog/themes/base.less +429 -0
  22. package/lib/column-format-dialog/themes/elemental/column-format-dialog.less +1 -0
  23. package/lib/column-format-dialog/themes/elemental/dark/column-format-dialog.js +4 -0
  24. package/lib/column-format-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  25. package/lib/column-format-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
  26. package/lib/column-format-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
  27. package/lib/column-format-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
  28. package/lib/column-format-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  29. package/lib/column-format-dialog/themes/elemental/dark.js +16 -0
  30. package/lib/column-format-dialog/themes/elemental/defaults.less +1 -0
  31. package/lib/column-format-dialog/themes/elemental/index.less +5 -0
  32. package/lib/column-format-dialog/themes/elemental/light/column-format-dialog.js +4 -0
  33. package/lib/column-format-dialog/themes/elemental/light/css/native-elements.css +0 -0
  34. package/lib/column-format-dialog/themes/elemental/light/es5/all-elements.js +2 -0
  35. package/lib/column-format-dialog/themes/elemental/light/imports/all-elements.js +1 -0
  36. package/lib/column-format-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
  37. package/lib/column-format-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  38. package/lib/column-format-dialog/themes/elemental/light.js +16 -0
  39. package/lib/column-format-dialog/themes/halo/column-format-dialog.less +6 -0
  40. package/lib/column-format-dialog/themes/halo/dark/column-format-dialog.js +4 -0
  41. package/lib/column-format-dialog/themes/halo/dark/css/native-elements.css +0 -0
  42. package/lib/column-format-dialog/themes/halo/dark/es5/all-elements.js +2 -0
  43. package/lib/column-format-dialog/themes/halo/dark/imports/all-elements.js +1 -0
  44. package/lib/column-format-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
  45. package/lib/column-format-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  46. package/lib/column-format-dialog/themes/halo/dark.js +16 -0
  47. package/lib/column-format-dialog/themes/halo/defaults.less +1 -0
  48. package/lib/column-format-dialog/themes/halo/index.less +5 -0
  49. package/lib/column-format-dialog/themes/halo/light/column-format-dialog.js +4 -0
  50. package/lib/column-format-dialog/themes/halo/light/css/native-elements.css +0 -0
  51. package/lib/column-format-dialog/themes/halo/light/es5/all-elements.js +2 -0
  52. package/lib/column-format-dialog/themes/halo/light/imports/all-elements.js +1 -0
  53. package/lib/column-format-dialog/themes/halo/light/imports/custom-elements.js +1 -0
  54. package/lib/column-format-dialog/themes/halo/light/imports/native-elements.js +0 -0
  55. package/lib/column-format-dialog/themes/halo/light.js +16 -0
  56. package/lib/column-format-dialog/themes/luna/column-format-dialog.less +1 -0
  57. package/lib/column-format-dialog/themes/luna/default/column-format-dialog.js +4 -0
  58. package/lib/column-format-dialog/themes/luna/default/css/native-elements.css +0 -0
  59. package/lib/column-format-dialog/themes/luna/default/es5/all-elements.js +2 -0
  60. package/lib/column-format-dialog/themes/luna/default/imports/all-elements.js +1 -0
  61. package/lib/column-format-dialog/themes/luna/default/imports/custom-elements.js +1 -0
  62. package/lib/column-format-dialog/themes/luna/default/imports/native-elements.js +0 -0
  63. package/lib/column-format-dialog/themes/luna/defaults.less +1 -0
  64. package/lib/column-format-dialog/themes/luna/index.less +5 -0
  65. package/lib/column-format-dialog/themes/solar/charcoal/column-format-dialog.js +4 -0
  66. package/lib/column-format-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  67. package/lib/column-format-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
  68. package/lib/column-format-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
  69. package/lib/column-format-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
  70. package/lib/column-format-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  71. package/lib/column-format-dialog/themes/solar/charcoal.js +16 -0
  72. package/lib/column-format-dialog/themes/solar/column-format-dialog.less +6 -0
  73. package/lib/column-format-dialog/themes/solar/defaults.less +1 -0
  74. package/lib/column-format-dialog/themes/solar/index.less +5 -0
  75. package/lib/column-format-dialog/themes/solar/pearl/column-format-dialog.js +4 -0
  76. package/lib/column-format-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  77. package/lib/column-format-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
  78. package/lib/column-format-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
  79. package/lib/column-format-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
  80. package/lib/column-format-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  81. package/lib/column-format-dialog/themes/solar/pearl.js +16 -0
  82. package/lib/column-selection-dialog/index.d.ts +1 -0
  83. package/lib/column-selection-dialog/index.js +1 -0
  84. package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +41 -0
  85. package/lib/column-selection-dialog/lib/column-selection-dialog.js +1410 -0
  86. package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
  87. package/lib/column-selection-dialog/lib/locale/translation-de.js +19 -0
  88. package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
  89. package/lib/column-selection-dialog/lib/locale/translation-en.js +19 -0
  90. package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
  91. package/lib/column-selection-dialog/lib/locale/translation-ja.js +19 -0
  92. package/lib/column-selection-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  93. package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +19 -0
  94. package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
  95. package/lib/column-selection-dialog/lib/locale/translation-zh.js +19 -0
  96. package/lib/column-selection-dialog/lib/locale/translation.d.ts +11 -0
  97. package/lib/column-selection-dialog/lib/locale/translation.js +18 -0
  98. package/lib/column-selection-dialog/themes/base.less +189 -0
  99. package/lib/column-selection-dialog/themes/elemental/column-selection-dialog.less +1 -0
  100. package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +4 -0
  101. package/lib/column-selection-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  102. package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
  103. package/lib/column-selection-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
  104. package/lib/column-selection-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
  105. package/lib/column-selection-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  106. package/lib/column-selection-dialog/themes/elemental/dark.js +6 -0
  107. package/lib/column-selection-dialog/themes/elemental/defaults.less +1 -0
  108. package/lib/column-selection-dialog/themes/elemental/index.less +5 -0
  109. package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +4 -0
  110. package/lib/column-selection-dialog/themes/elemental/light/css/native-elements.css +0 -0
  111. package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +2 -0
  112. package/lib/column-selection-dialog/themes/elemental/light/imports/all-elements.js +1 -0
  113. package/lib/column-selection-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
  114. package/lib/column-selection-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  115. package/lib/column-selection-dialog/themes/elemental/light.js +6 -0
  116. package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +22 -0
  117. package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +4 -0
  118. package/lib/column-selection-dialog/themes/halo/dark/css/native-elements.css +0 -0
  119. package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +2 -0
  120. package/lib/column-selection-dialog/themes/halo/dark/imports/all-elements.js +1 -0
  121. package/lib/column-selection-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
  122. package/lib/column-selection-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  123. package/lib/column-selection-dialog/themes/halo/dark.js +6 -0
  124. package/lib/column-selection-dialog/themes/halo/defaults.less +1 -0
  125. package/lib/column-selection-dialog/themes/halo/index.less +6 -0
  126. package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +4 -0
  127. package/lib/column-selection-dialog/themes/halo/light/css/native-elements.css +0 -0
  128. package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +2 -0
  129. package/lib/column-selection-dialog/themes/halo/light/imports/all-elements.js +1 -0
  130. package/lib/column-selection-dialog/themes/halo/light/imports/custom-elements.js +1 -0
  131. package/lib/column-selection-dialog/themes/halo/light/imports/native-elements.js +0 -0
  132. package/lib/column-selection-dialog/themes/halo/light.js +6 -0
  133. package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +4 -0
  134. package/lib/column-selection-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  135. package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
  136. package/lib/column-selection-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
  137. package/lib/column-selection-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
  138. package/lib/column-selection-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  139. package/lib/column-selection-dialog/themes/solar/charcoal.js +6 -0
  140. package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +1 -0
  141. package/lib/column-selection-dialog/themes/solar/defaults.less +1 -0
  142. package/lib/column-selection-dialog/themes/solar/index.less +6 -0
  143. package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +4 -0
  144. package/lib/column-selection-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  145. package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
  146. package/lib/column-selection-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
  147. package/lib/column-selection-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
  148. package/lib/column-selection-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  149. package/lib/column-selection-dialog/themes/solar/pearl.js +6 -0
  150. package/lib/core/dist/core.css +1 -0
  151. package/lib/core/dist/core.js +28075 -0
  152. package/lib/core/dist/core.min.js +1 -0
  153. package/lib/core/es6/data/ColumnStats.d.ts +42 -0
  154. package/lib/core/es6/data/ColumnStats.js +428 -0
  155. package/lib/core/es6/data/DataCache.d.ts +81 -0
  156. package/lib/core/es6/data/DataCache.js +1317 -0
  157. package/lib/core/es6/data/DataTable.d.ts +125 -0
  158. package/lib/core/es6/data/DataTable.js +1655 -0
  159. package/lib/core/es6/data/DataView.d.ts +280 -0
  160. package/lib/core/es6/data/DataView.js +3654 -0
  161. package/lib/core/es6/data/Segment.d.ts +38 -0
  162. package/lib/core/es6/data/Segment.js +193 -0
  163. package/lib/core/es6/data/SegmentCollection.d.ts +58 -0
  164. package/lib/core/es6/data/SegmentCollection.js +431 -0
  165. package/lib/core/es6/grid/Core.d.ts +387 -0
  166. package/lib/core/es6/grid/Core.js +4939 -0
  167. package/lib/core/es6/grid/ILayoutGrid.d.ts +204 -0
  168. package/lib/core/es6/grid/ILayoutGrid.js +658 -0
  169. package/lib/core/es6/grid/LayoutGrid.d.ts +23 -0
  170. package/lib/core/es6/grid/LayoutGrid.js +2602 -0
  171. package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +18 -0
  172. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +907 -0
  173. package/lib/core/es6/grid/components/Cell.d.ts +50 -0
  174. package/lib/core/es6/grid/components/Cell.js +740 -0
  175. package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +19 -0
  176. package/lib/core/es6/grid/components/CellFloatingPanel.js +123 -0
  177. package/lib/core/es6/grid/components/CellSpan.d.ts +18 -0
  178. package/lib/core/es6/grid/components/CellSpan.js +99 -0
  179. package/lib/core/es6/grid/components/CellSpans.d.ts +38 -0
  180. package/lib/core/es6/grid/components/CellSpans.js +341 -0
  181. package/lib/core/es6/grid/components/Column.d.ts +22 -0
  182. package/lib/core/es6/grid/components/Column.js +612 -0
  183. package/lib/core/es6/grid/components/ElementWrapper.d.ts +125 -0
  184. package/lib/core/es6/grid/components/ElementWrapper.js +714 -0
  185. package/lib/core/es6/grid/components/HScrollbar.d.ts +24 -0
  186. package/lib/core/es6/grid/components/HScrollbar.js +222 -0
  187. package/lib/core/es6/grid/components/Scrollbar.d.ts +61 -0
  188. package/lib/core/es6/grid/components/Scrollbar.js +1374 -0
  189. package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
  190. package/lib/core/es6/grid/components/StretchedCells.js +328 -0
  191. package/lib/core/es6/grid/components/VScrollbar.d.ts +18 -0
  192. package/lib/core/es6/grid/components/VScrollbar.js +139 -0
  193. package/lib/core/es6/grid/components/VirtualItems.d.ts +12 -0
  194. package/lib/core/es6/grid/components/VirtualItems.js +51 -0
  195. package/lib/core/es6/grid/event/EventDispatcher.d.ts +16 -0
  196. package/lib/core/es6/grid/event/EventDispatcher.js +138 -0
  197. package/lib/core/es6/grid/event/EventListeners.d.ts +34 -0
  198. package/lib/core/es6/grid/event/EventListeners.js +163 -0
  199. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
  200. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +615 -0
  201. package/lib/core/es6/grid/plugins/Plugin.d.ts +28 -0
  202. package/lib/core/es6/grid/plugins/Plugin.js +272 -0
  203. package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +127 -0
  204. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1707 -0
  205. package/lib/core/es6/grid/util/Conflator.d.ts +32 -0
  206. package/lib/core/es6/grid/util/Conflator.js +191 -0
  207. package/lib/core/es6/grid/util/ElementFrameWork.d.ts +18 -0
  208. package/lib/core/es6/grid/util/ElementFrameWork.js +227 -0
  209. package/lib/core/es6/grid/util/HttpRequest.d.ts +53 -0
  210. package/lib/core/es6/grid/util/HttpRequest.js +371 -0
  211. package/lib/core/es6/grid/util/PercentBar.d.ts +43 -0
  212. package/lib/core/es6/grid/util/PercentBar.js +390 -0
  213. package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +41 -0
  214. package/lib/core/es6/grid/util/PercentBarRenderer.js +316 -0
  215. package/lib/core/es6/grid/util/RangeBar.d.ts +25 -0
  216. package/lib/core/es6/grid/util/RangeBar.js +255 -0
  217. package/lib/core/es6/grid/util/Reverter.d.ts +14 -0
  218. package/lib/core/es6/grid/util/Reverter.js +79 -0
  219. package/lib/core/es6/grid/util/SectionSettings.d.ts +79 -0
  220. package/lib/core/es6/grid/util/SectionSettings.js +674 -0
  221. package/lib/core/es6/grid/util/SelectionList.d.ts +50 -0
  222. package/lib/core/es6/grid/util/SelectionList.js +422 -0
  223. package/lib/core/es6/grid/util/TrackLayout.d.ts +84 -0
  224. package/lib/core/es6/grid/util/TrackLayout.js +850 -0
  225. package/lib/core/es6/grid/util/Virtualizer.d.ts +40 -0
  226. package/lib/core/es6/grid/util/Virtualizer.js +340 -0
  227. package/lib/core/es6/grid/util/util.d.ts +18 -0
  228. package/lib/core/es6/grid/util/util.js +450 -0
  229. package/lib/core/es6/index.d.ts +84 -0
  230. package/lib/core/es6/index.js +132 -0
  231. package/lib/core/es6/tr-grid-theme.d.ts +5 -0
  232. package/lib/core/es6/tr-grid-theme.js +5 -0
  233. package/lib/filter-dialog/index.d.ts +1 -0
  234. package/lib/filter-dialog/index.js +1 -0
  235. package/lib/filter-dialog/lib/checkbox-list.d.ts +27 -0
  236. package/lib/filter-dialog/lib/checkbox-list.js +336 -0
  237. package/lib/filter-dialog/lib/filter-dialog.d.ts +53 -0
  238. package/lib/filter-dialog/lib/filter-dialog.js +860 -0
  239. package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
  240. package/lib/filter-dialog/lib/locale/translation-de.js +37 -0
  241. package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
  242. package/lib/filter-dialog/lib/locale/translation-en.js +37 -0
  243. package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
  244. package/lib/filter-dialog/lib/locale/translation-ja.js +37 -0
  245. package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  246. package/lib/filter-dialog/lib/locale/translation-zh-hant.js +37 -0
  247. package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
  248. package/lib/filter-dialog/lib/locale/translation-zh.js +37 -0
  249. package/lib/filter-dialog/lib/locale/translation.d.ts +11 -0
  250. package/lib/filter-dialog/lib/locale/translation.js +18 -0
  251. package/lib/filter-dialog/themes/base-checkbox.less +37 -0
  252. package/lib/filter-dialog/themes/base.less +102 -0
  253. package/lib/filter-dialog/themes/elemental/checkbox-list.less +3 -0
  254. package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +4 -0
  255. package/lib/filter-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  256. package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +4 -0
  257. package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +5 -0
  258. package/lib/filter-dialog/themes/elemental/dark/imports/all-elements.js +2 -0
  259. package/lib/filter-dialog/themes/elemental/dark/imports/custom-elements.js +2 -0
  260. package/lib/filter-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  261. package/lib/filter-dialog/themes/elemental/dark.js +11 -0
  262. package/lib/filter-dialog/themes/elemental/defaults.less +3 -0
  263. package/lib/filter-dialog/themes/elemental/filter-dialog.less +1 -0
  264. package/lib/filter-dialog/themes/elemental/index.less +6 -0
  265. package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +4 -0
  266. package/lib/filter-dialog/themes/elemental/light/css/native-elements.css +0 -0
  267. package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +4 -0
  268. package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +5 -0
  269. package/lib/filter-dialog/themes/elemental/light/imports/all-elements.js +2 -0
  270. package/lib/filter-dialog/themes/elemental/light/imports/custom-elements.js +2 -0
  271. package/lib/filter-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  272. package/lib/filter-dialog/themes/elemental/light.js +11 -0
  273. package/lib/filter-dialog/themes/halo/checkbox-list.less +3 -0
  274. package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +4 -0
  275. package/lib/filter-dialog/themes/halo/dark/css/native-elements.css +0 -0
  276. package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +4 -0
  277. package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +5 -0
  278. package/lib/filter-dialog/themes/halo/dark/imports/all-elements.js +2 -0
  279. package/lib/filter-dialog/themes/halo/dark/imports/custom-elements.js +2 -0
  280. package/lib/filter-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  281. package/lib/filter-dialog/themes/halo/dark.js +11 -0
  282. package/lib/filter-dialog/themes/halo/defaults.less +3 -0
  283. package/lib/filter-dialog/themes/halo/filter-dialog.less +9 -0
  284. package/lib/filter-dialog/themes/halo/index.less +6 -0
  285. package/lib/filter-dialog/themes/halo/light/checkbox-list.js +4 -0
  286. package/lib/filter-dialog/themes/halo/light/css/native-elements.css +0 -0
  287. package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +4 -0
  288. package/lib/filter-dialog/themes/halo/light/filter-dialog.js +5 -0
  289. package/lib/filter-dialog/themes/halo/light/imports/all-elements.js +2 -0
  290. package/lib/filter-dialog/themes/halo/light/imports/custom-elements.js +2 -0
  291. package/lib/filter-dialog/themes/halo/light/imports/native-elements.js +0 -0
  292. package/lib/filter-dialog/themes/halo/light.js +11 -0
  293. package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +4 -0
  294. package/lib/filter-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  295. package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +4 -0
  296. package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +5 -0
  297. package/lib/filter-dialog/themes/solar/charcoal/imports/all-elements.js +2 -0
  298. package/lib/filter-dialog/themes/solar/charcoal/imports/custom-elements.js +2 -0
  299. package/lib/filter-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  300. package/lib/filter-dialog/themes/solar/charcoal.js +11 -0
  301. package/lib/filter-dialog/themes/solar/checkbox-list.less +3 -0
  302. package/lib/filter-dialog/themes/solar/defaults.less +3 -0
  303. package/lib/filter-dialog/themes/solar/filter-dialog.less +5 -0
  304. package/lib/filter-dialog/themes/solar/index.less +6 -0
  305. package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +4 -0
  306. package/lib/filter-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  307. package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +4 -0
  308. package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +5 -0
  309. package/lib/filter-dialog/themes/solar/pearl/imports/all-elements.js +2 -0
  310. package/lib/filter-dialog/themes/solar/pearl/imports/custom-elements.js +2 -0
  311. package/lib/filter-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  312. package/lib/filter-dialog/themes/solar/pearl.js +11 -0
  313. package/lib/formatters/es6/CoralButtonFormatter.d.ts +22 -0
  314. package/lib/formatters/es6/CoralButtonFormatter.js +40 -0
  315. package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
  316. package/lib/formatters/es6/CoralCheckboxFormatter.js +45 -0
  317. package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
  318. package/lib/formatters/es6/CoralComboBoxFormatter.js +102 -0
  319. package/lib/formatters/es6/CoralIconFormatter.d.ts +23 -0
  320. package/lib/formatters/es6/CoralIconFormatter.js +45 -0
  321. package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
  322. package/lib/formatters/es6/CoralInputFormatter.js +40 -0
  323. package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +22 -0
  324. package/lib/formatters/es6/CoralRadioButtonFormatter.js +80 -0
  325. package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
  326. package/lib/formatters/es6/CoralSelectFormatter.js +66 -0
  327. package/lib/formatters/es6/CoralToggleFormatter.d.ts +12 -0
  328. package/lib/formatters/es6/CoralToggleFormatter.js +47 -0
  329. package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
  330. package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.js +119 -0
  331. package/lib/formatters/es6/EFButtonFormatter.d.ts +22 -0
  332. package/lib/formatters/es6/EFButtonFormatter.js +40 -0
  333. package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
  334. package/lib/formatters/es6/EFCheckboxFormatter.js +45 -0
  335. package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
  336. package/lib/formatters/es6/EFComboBoxFormatter.js +68 -0
  337. package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
  338. package/lib/formatters/es6/EFDateTimePickerFormatter.js +55 -0
  339. package/lib/formatters/es6/EFIconFormatter.d.ts +23 -0
  340. package/lib/formatters/es6/EFIconFormatter.js +45 -0
  341. package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
  342. package/lib/formatters/es6/EFNumberFieldFormatter.js +40 -0
  343. package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +22 -0
  344. package/lib/formatters/es6/EFRadioButtonFormatter.js +80 -0
  345. package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
  346. package/lib/formatters/es6/EFSelectFormatter.js +66 -0
  347. package/lib/formatters/es6/EFTextFieldFormatter.d.ts +12 -0
  348. package/lib/formatters/es6/EFTextFieldFormatter.js +40 -0
  349. package/lib/formatters/es6/EFToggleFormatter.d.ts +12 -0
  350. package/lib/formatters/es6/EFToggleFormatter.js +47 -0
  351. package/lib/formatters/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
  352. package/lib/formatters/es6/EmeraldDateTimePickerFormatter.js +55 -0
  353. package/lib/formatters/es6/FormatterBuilder.d.ts +22 -0
  354. package/lib/formatters/es6/FormatterBuilder.js +334 -0
  355. package/lib/formatters/es6/NumericInputFormatter.d.ts +13 -0
  356. package/lib/formatters/es6/NumericInputFormatter.js +64 -0
  357. package/lib/formatters/es6/PercentBarFormatter.d.ts +25 -0
  358. package/lib/formatters/es6/PercentBarFormatter.js +62 -0
  359. package/lib/formatters/es6/SimpleImageFormatter.d.ts +21 -0
  360. package/lib/formatters/es6/SimpleImageFormatter.js +64 -0
  361. package/lib/formatters/es6/SimpleInputFormatter.d.ts +12 -0
  362. package/lib/formatters/es6/SimpleInputFormatter.js +40 -0
  363. package/lib/formatters/es6/SimpleLinkFormatter.d.ts +21 -0
  364. package/lib/formatters/es6/SimpleLinkFormatter.js +48 -0
  365. package/lib/formatters/es6/SimpleTickerFormatter.d.ts +25 -0
  366. package/lib/formatters/es6/SimpleTickerFormatter.js +65 -0
  367. package/lib/formatters/es6/SimpleToggleFormatter.d.ts +22 -0
  368. package/lib/formatters/es6/SimpleToggleFormatter.js +132 -0
  369. package/lib/formatters/es6/TextFormatter.d.ts +12 -0
  370. package/lib/formatters/es6/TextFormatter.js +30 -0
  371. package/lib/formatters/es6/index.d.ts +43 -0
  372. package/lib/formatters/es6/index.js +67 -0
  373. package/lib/grid/index.d.ts +1 -0
  374. package/lib/grid/index.js +2 -0
  375. package/lib/grid/lib/efx-grid.d.ts +32 -0
  376. package/lib/grid/lib/efx-grid.js +469 -0
  377. package/lib/grid/themes/base.less +134 -0
  378. package/lib/grid/themes/halo/dark/css/native-elements.css +0 -0
  379. package/lib/grid/themes/halo/dark/efx-grid.js +4 -0
  380. package/lib/grid/themes/halo/dark/es5/all-elements.js +2 -0
  381. package/lib/grid/themes/halo/dark/imports/all-elements.js +1 -0
  382. package/lib/grid/themes/halo/dark/imports/custom-elements.js +1 -0
  383. package/lib/grid/themes/halo/dark/imports/native-elements.js +0 -0
  384. package/lib/grid/themes/halo/dark.js +3 -0
  385. package/lib/grid/themes/halo/efx-grid.less +92 -0
  386. package/lib/grid/themes/halo/index.less +3 -0
  387. package/lib/grid/themes/halo/light/css/native-elements.css +0 -0
  388. package/lib/grid/themes/halo/light/efx-grid.js +4 -0
  389. package/lib/grid/themes/halo/light/es5/all-elements.js +2 -0
  390. package/lib/grid/themes/halo/light/imports/all-elements.js +1 -0
  391. package/lib/grid/themes/halo/light/imports/custom-elements.js +1 -0
  392. package/lib/grid/themes/halo/light/imports/native-elements.js +0 -0
  393. package/lib/grid/themes/halo/light.js +3 -0
  394. package/lib/grid/themes/solar/charcoal/css/native-elements.css +0 -0
  395. package/lib/grid/themes/solar/charcoal/efx-grid.js +4 -0
  396. package/lib/grid/themes/solar/charcoal/es5/all-elements.js +2 -0
  397. package/lib/grid/themes/solar/charcoal/imports/all-elements.js +1 -0
  398. package/lib/grid/themes/solar/charcoal/imports/custom-elements.js +1 -0
  399. package/lib/grid/themes/solar/charcoal/imports/native-elements.js +0 -0
  400. package/lib/grid/themes/solar/charcoal.js +3 -0
  401. package/lib/grid/themes/solar/efx-grid.less +27 -0
  402. package/lib/grid/themes/solar/index.less +3 -0
  403. package/lib/grid/themes/solar/pearl/css/native-elements.css +0 -0
  404. package/lib/grid/themes/solar/pearl/efx-grid.js +4 -0
  405. package/lib/grid/themes/solar/pearl/es5/all-elements.js +2 -0
  406. package/lib/grid/themes/solar/pearl/imports/all-elements.js +1 -0
  407. package/lib/grid/themes/solar/pearl/imports/custom-elements.js +1 -0
  408. package/lib/grid/themes/solar/pearl/imports/native-elements.js +0 -0
  409. package/lib/grid/themes/solar/pearl.js +3 -0
  410. package/lib/index.d.ts +102 -0
  411. package/lib/index.js +102 -0
  412. package/lib/row-segmenting/es6/RowSegmenting.d.ts +83 -0
  413. package/lib/row-segmenting/es6/RowSegmenting.js +592 -0
  414. package/lib/row-segmenting/es6/index.d.ts +1 -0
  415. package/lib/row-segmenting/es6/index.js +1 -0
  416. package/lib/rt-grid/dist/rt-grid.js +44672 -0
  417. package/lib/rt-grid/dist/rt-grid.min.js +1 -0
  418. package/lib/rt-grid/es6/ColumnDefinition.d.ts +141 -0
  419. package/lib/rt-grid/es6/ColumnDefinition.js +1074 -0
  420. package/lib/rt-grid/es6/DataConnector.d.ts +37 -0
  421. package/lib/rt-grid/es6/DataConnector.js +266 -0
  422. package/lib/rt-grid/es6/FieldDefinition.d.ts +20 -0
  423. package/lib/rt-grid/es6/FieldDefinition.js +418 -0
  424. package/lib/rt-grid/es6/Grid.d.ts +261 -0
  425. package/lib/rt-grid/es6/Grid.js +2893 -0
  426. package/lib/rt-grid/es6/PredefinedFormula.d.ts +16 -0
  427. package/lib/rt-grid/es6/PredefinedFormula.js +33 -0
  428. package/lib/rt-grid/es6/ReferenceCounter.d.ts +38 -0
  429. package/lib/rt-grid/es6/ReferenceCounter.js +230 -0
  430. package/lib/rt-grid/es6/RowDefinition.d.ts +120 -0
  431. package/lib/rt-grid/es6/RowDefinition.js +873 -0
  432. package/lib/rt-grid/es6/SnapshotFiller.d.ts +21 -0
  433. package/lib/rt-grid/es6/SnapshotFiller.js +252 -0
  434. package/lib/rt-grid/es6/StyleLoader.d.ts +17 -0
  435. package/lib/rt-grid/es6/StyleLoader.js +47 -0
  436. package/lib/rt-grid/es6/index.d.ts +8 -0
  437. package/lib/rt-grid/es6/index.js +43 -0
  438. package/lib/statistics-row/es6/StatisticsRow.d.ts +67 -0
  439. package/lib/statistics-row/es6/StatisticsRow.js +786 -0
  440. package/lib/statistics-row/es6/index.d.ts +1 -0
  441. package/lib/statistics-row/es6/index.js +1 -0
  442. package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.d.ts +45 -0
  443. package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +431 -0
  444. package/lib/tr-grid-auto-tooltip/es6/index.d.ts +1 -0
  445. package/lib/tr-grid-auto-tooltip/es6/index.js +1 -0
  446. package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +67 -0
  447. package/lib/tr-grid-cell-selection/es6/CellSelection.js +1777 -0
  448. package/lib/tr-grid-cell-selection/es6/index.d.ts +1 -0
  449. package/lib/tr-grid-cell-selection/es6/index.js +1 -0
  450. package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +69 -0
  451. package/lib/tr-grid-checkbox/es6/Checkbox.js +1476 -0
  452. package/lib/tr-grid-checkbox/es6/index.d.ts +1 -0
  453. package/lib/tr-grid-checkbox/es6/index.js +1 -0
  454. package/lib/tr-grid-column-fitter/es6/ColumnFitter.d.ts +56 -0
  455. package/lib/tr-grid-column-fitter/es6/ColumnFitter.js +1000 -0
  456. package/lib/tr-grid-column-fitter/es6/index.d.ts +1 -0
  457. package/lib/tr-grid-column-fitter/es6/index.js +1 -0
  458. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +89 -0
  459. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +615 -0
  460. package/lib/tr-grid-column-formatting/es6/index.d.ts +1 -0
  461. package/lib/tr-grid-column-formatting/es6/index.js +1 -0
  462. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +60 -0
  463. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +913 -0
  464. package/lib/tr-grid-column-grouping/es6/index.d.ts +1 -0
  465. package/lib/tr-grid-column-grouping/es6/index.js +1 -0
  466. package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +68 -0
  467. package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1013 -0
  468. package/lib/tr-grid-column-resizing/es6/index.d.ts +1 -0
  469. package/lib/tr-grid-column-resizing/es6/index.js +1 -0
  470. package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +70 -0
  471. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +928 -0
  472. package/lib/tr-grid-column-selection/es6/index.d.ts +1 -0
  473. package/lib/tr-grid-column-selection/es6/index.js +1 -0
  474. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +76 -0
  475. package/lib/tr-grid-column-stack/es6/ColumnStack.js +1227 -0
  476. package/lib/tr-grid-column-stack/es6/index.d.ts +1 -0
  477. package/lib/tr-grid-column-stack/es6/index.js +1 -0
  478. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +70 -0
  479. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +947 -0
  480. package/lib/tr-grid-conditional-coloring/es6/index.d.ts +1 -0
  481. package/lib/tr-grid-conditional-coloring/es6/index.js +1 -0
  482. package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +43 -0
  483. package/lib/tr-grid-content-wrap/es6/ContentWrap.js +478 -0
  484. package/lib/tr-grid-content-wrap/es6/index.d.ts +1 -0
  485. package/lib/tr-grid-content-wrap/es6/index.js +1 -0
  486. package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +83 -0
  487. package/lib/tr-grid-contextmenu/es6/ContextMenu.js +471 -0
  488. package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
  489. package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +133 -0
  490. package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +39 -0
  491. package/lib/tr-grid-contextmenu/es6/MenuItem.js +245 -0
  492. package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +29 -0
  493. package/lib/tr-grid-contextmenu/es6/PopupMenu.js +292 -0
  494. package/lib/tr-grid-contextmenu/es6/index.d.ts +1 -0
  495. package/lib/tr-grid-contextmenu/es6/index.js +1 -0
  496. package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +57 -0
  497. package/lib/tr-grid-filter-input/es6/FilterInput.js +928 -0
  498. package/lib/tr-grid-filter-input/es6/index.d.ts +1 -0
  499. package/lib/tr-grid-filter-input/es6/index.js +1 -0
  500. package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +44 -0
  501. package/lib/tr-grid-heat-map/es6/HeatMap.js +394 -0
  502. package/lib/tr-grid-heat-map/es6/index.d.ts +1 -0
  503. package/lib/tr-grid-heat-map/es6/index.js +1 -0
  504. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +129 -0
  505. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +1977 -0
  506. package/lib/tr-grid-in-cell-editing/es6/index.d.ts +1 -0
  507. package/lib/tr-grid-in-cell-editing/es6/index.js +1 -0
  508. package/lib/tr-grid-pagination/es6/Pagination.d.ts +57 -0
  509. package/lib/tr-grid-pagination/es6/Pagination.js +427 -0
  510. package/lib/tr-grid-pagination/es6/index.d.ts +1 -0
  511. package/lib/tr-grid-pagination/es6/index.js +1 -0
  512. package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +60 -0
  513. package/lib/tr-grid-percent-bar/es6/PercentBar.js +801 -0
  514. package/lib/tr-grid-percent-bar/es6/index.d.ts +1 -0
  515. package/lib/tr-grid-percent-bar/es6/index.js +1 -0
  516. package/lib/tr-grid-printer/es6/CellWriter.d.ts +49 -0
  517. package/lib/tr-grid-printer/es6/CellWriter.js +226 -0
  518. package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +12 -0
  519. package/lib/tr-grid-printer/es6/ColumnWriter.js +21 -0
  520. package/lib/tr-grid-printer/es6/GridPrinter.d.ts +32 -0
  521. package/lib/tr-grid-printer/es6/GridPrinter.js +761 -0
  522. package/lib/tr-grid-printer/es6/PrintTrait.d.ts +38 -0
  523. package/lib/tr-grid-printer/es6/PrintTrait.js +481 -0
  524. package/lib/tr-grid-printer/es6/SectionWriter.d.ts +54 -0
  525. package/lib/tr-grid-printer/es6/SectionWriter.js +205 -0
  526. package/lib/tr-grid-printer/es6/index.d.ts +1 -0
  527. package/lib/tr-grid-printer/es6/index.js +1 -0
  528. package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +39 -0
  529. package/lib/tr-grid-range-bar/es6/RangeBar.js +353 -0
  530. package/lib/tr-grid-range-bar/es6/index.d.ts +1 -0
  531. package/lib/tr-grid-range-bar/es6/index.js +1 -0
  532. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +53 -0
  533. package/lib/tr-grid-row-dragging/es6/RowDragging.js +794 -0
  534. package/lib/tr-grid-row-dragging/es6/index.d.ts +1 -0
  535. package/lib/tr-grid-row-dragging/es6/index.js +1 -0
  536. package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +118 -0
  537. package/lib/tr-grid-row-filtering/es6/RowFiltering.js +1884 -0
  538. package/lib/tr-grid-row-filtering/es6/index.d.ts +1 -0
  539. package/lib/tr-grid-row-filtering/es6/index.js +1 -0
  540. package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +109 -0
  541. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1541 -0
  542. package/lib/tr-grid-row-grouping/es6/index.d.ts +1 -0
  543. package/lib/tr-grid-row-grouping/es6/index.js +1 -0
  544. package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +74 -0
  545. package/lib/tr-grid-row-selection/es6/RowSelection.js +1202 -0
  546. package/lib/tr-grid-row-selection/es6/index.d.ts +1 -0
  547. package/lib/tr-grid-row-selection/es6/index.js +1 -0
  548. package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +60 -0
  549. package/lib/tr-grid-rowcoloring/es6/RowColoring.js +611 -0
  550. package/lib/tr-grid-rowcoloring/es6/index.d.ts +1 -0
  551. package/lib/tr-grid-rowcoloring/es6/index.js +1 -0
  552. package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +77 -0
  553. package/lib/tr-grid-textformatting/es6/TextFormatting.js +574 -0
  554. package/lib/tr-grid-textformatting/es6/index.d.ts +1 -0
  555. package/lib/tr-grid-textformatting/es6/index.js +1 -0
  556. package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +29 -0
  557. package/lib/tr-grid-titlewrap/es6/TitleWrap.js +431 -0
  558. package/lib/tr-grid-titlewrap/es6/index.d.ts +1 -0
  559. package/lib/tr-grid-titlewrap/es6/index.js +1 -0
  560. package/lib/tr-grid-util/es6/CellPainter.d.ts +136 -0
  561. package/lib/tr-grid-util/es6/CellPainter.js +1128 -0
  562. package/lib/tr-grid-util/es6/Conflator.d.ts +34 -0
  563. package/lib/tr-grid-util/es6/Conflator.js +193 -0
  564. package/lib/tr-grid-util/es6/CoralItems.d.ts +10 -0
  565. package/lib/tr-grid-util/es6/CoralItems.js +42 -0
  566. package/lib/tr-grid-util/es6/DateTime.d.ts +57 -0
  567. package/lib/tr-grid-util/es6/DateTime.js +508 -0
  568. package/lib/tr-grid-util/es6/Deferred.d.ts +14 -0
  569. package/lib/tr-grid-util/es6/Deferred.js +98 -0
  570. package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
  571. package/lib/tr-grid-util/es6/Delay.js +85 -0
  572. package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
  573. package/lib/tr-grid-util/es6/Dom.js +346 -0
  574. package/lib/tr-grid-util/es6/ElementObserver.d.ts +10 -0
  575. package/lib/tr-grid-util/es6/ElementObserver.js +101 -0
  576. package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
  577. package/lib/tr-grid-util/es6/ElementWrapper.js +83 -0
  578. package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
  579. package/lib/tr-grid-util/es6/ElfDate.js +163 -0
  580. package/lib/tr-grid-util/es6/ElfUtil.d.ts +33 -0
  581. package/lib/tr-grid-util/es6/ElfUtil.js +458 -0
  582. package/lib/tr-grid-util/es6/EventDispatcher.d.ts +26 -0
  583. package/lib/tr-grid-util/es6/EventDispatcher.js +161 -0
  584. package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +27 -0
  585. package/lib/tr-grid-util/es6/ExpanderIcon.js +169 -0
  586. package/lib/tr-grid-util/es6/Ext.d.ts +10 -0
  587. package/lib/tr-grid-util/es6/Ext.js +52 -0
  588. package/lib/tr-grid-util/es6/FieldFormatter.d.ts +55 -0
  589. package/lib/tr-grid-util/es6/FieldFormatter.js +432 -0
  590. package/lib/tr-grid-util/es6/FilterBuilder.d.ts +48 -0
  591. package/lib/tr-grid-util/es6/FilterBuilder.js +521 -0
  592. package/lib/tr-grid-util/es6/FilterOperators.d.ts +41 -0
  593. package/lib/tr-grid-util/es6/FilterOperators.js +181 -0
  594. package/lib/tr-grid-util/es6/GridPlugin.d.ts +72 -0
  595. package/lib/tr-grid-util/es6/GridPlugin.js +747 -0
  596. package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
  597. package/lib/tr-grid-util/es6/Icon.js +61 -0
  598. package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
  599. package/lib/tr-grid-util/es6/MouseDownTrait.js +237 -0
  600. package/lib/tr-grid-util/es6/MultiTableManager.d.ts +32 -0
  601. package/lib/tr-grid-util/es6/MultiTableManager.js +506 -0
  602. package/lib/tr-grid-util/es6/NumberFormatter.d.ts +83 -0
  603. package/lib/tr-grid-util/es6/NumberFormatter.js +471 -0
  604. package/lib/tr-grid-util/es6/PercentBar.d.ts +71 -0
  605. package/lib/tr-grid-util/es6/PercentBar.js +600 -0
  606. package/lib/tr-grid-util/es6/Perf.d.ts +32 -0
  607. package/lib/tr-grid-util/es6/Perf.js +162 -0
  608. package/lib/tr-grid-util/es6/Popup.d.ts +84 -0
  609. package/lib/tr-grid-util/es6/Popup.js +818 -0
  610. package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
  611. package/lib/tr-grid-util/es6/RangeBar.js +259 -0
  612. package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
  613. package/lib/tr-grid-util/es6/RequestQueue.js +239 -0
  614. package/lib/tr-grid-util/es6/RowPainter.d.ts +23 -0
  615. package/lib/tr-grid-util/es6/RowPainter.js +188 -0
  616. package/lib/tr-grid-util/es6/SubTable.d.ts +74 -0
  617. package/lib/tr-grid-util/es6/SubTable.js +558 -0
  618. package/lib/tr-grid-util/es6/Table.d.ts +125 -0
  619. package/lib/tr-grid-util/es6/Table.js +790 -0
  620. package/lib/tr-grid-util/es6/TextHighlighter.d.ts +18 -0
  621. package/lib/tr-grid-util/es6/TextHighlighter.js +273 -0
  622. package/lib/tr-grid-util/es6/TickCodes.d.ts +8 -0
  623. package/lib/tr-grid-util/es6/TickCodes.js +33 -0
  624. package/lib/tr-grid-util/es6/Timer.d.ts +16 -0
  625. package/lib/tr-grid-util/es6/Timer.js +49 -0
  626. package/lib/tr-grid-util/es6/TouchProxy.d.ts +46 -0
  627. package/lib/tr-grid-util/es6/TouchProxy.js +212 -0
  628. package/lib/tr-grid-util/es6/Util.d.ts +65 -0
  629. package/lib/tr-grid-util/es6/Util.js +528 -0
  630. package/lib/tr-grid-util/es6/formula/ADCService.d.ts +11 -0
  631. package/lib/tr-grid-util/es6/formula/ADCService.js +72 -0
  632. package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +17 -0
  633. package/lib/tr-grid-util/es6/formula/ADCSubscription.js +317 -0
  634. package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +12 -0
  635. package/lib/tr-grid-util/es6/formula/AdFinService.js +61 -0
  636. package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +19 -0
  637. package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +310 -0
  638. package/lib/tr-grid-util/es6/formula/Engine.d.ts +56 -0
  639. package/lib/tr-grid-util/es6/formula/Engine.js +592 -0
  640. package/lib/tr-grid-util/es6/formula/Formula.d.ts +68 -0
  641. package/lib/tr-grid-util/es6/formula/Formula.js +882 -0
  642. package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +16 -0
  643. package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +165 -0
  644. package/lib/tr-grid-util/es6/formula/Realtime.d.ts +18 -0
  645. package/lib/tr-grid-util/es6/formula/Realtime.js +279 -0
  646. package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +18 -0
  647. package/lib/tr-grid-util/es6/formula/RealtimeService.js +203 -0
  648. package/lib/tr-grid-util/es6/formula/TSIService.d.ts +11 -0
  649. package/lib/tr-grid-util/es6/formula/TSIService.js +51 -0
  650. package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +18 -0
  651. package/lib/tr-grid-util/es6/formula/TSISubscription.js +1015 -0
  652. package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +30 -0
  653. package/lib/tr-grid-util/es6/formula/VariableToken.js +314 -0
  654. package/lib/tr-grid-util/es6/formula/functions/AdFin.d.ts +9 -0
  655. package/lib/tr-grid-util/es6/formula/functions/AdFin.js +1778 -0
  656. package/lib/tr-grid-util/es6/formula/functions/Excel.d.ts +8 -0
  657. package/lib/tr-grid-util/es6/formula/functions/Excel.js +21 -0
  658. package/lib/tr-grid-util/es6/formula/functions/Info.d.ts +8 -0
  659. package/lib/tr-grid-util/es6/formula/functions/Info.js +192 -0
  660. package/lib/tr-grid-util/es6/formula/functions/Internal.d.ts +8 -0
  661. package/lib/tr-grid-util/es6/formula/functions/Internal.js +90 -0
  662. package/lib/tr-grid-util/es6/formula/functions/Logic.d.ts +12 -0
  663. package/lib/tr-grid-util/es6/formula/functions/Logic.js +176 -0
  664. package/lib/tr-grid-util/es6/formula/functions/Math.d.ts +18 -0
  665. package/lib/tr-grid-util/es6/formula/functions/Math.js +1624 -0
  666. package/lib/tr-grid-util/es6/formula/functions/Statistics.d.ts +18 -0
  667. package/lib/tr-grid-util/es6/formula/functions/Statistics.js +234 -0
  668. package/lib/tr-grid-util/es6/formula/functions/Text.d.ts +10 -0
  669. package/lib/tr-grid-util/es6/formula/functions/Text.js +676 -0
  670. package/lib/tr-grid-util/es6/index.d.ts +63 -0
  671. package/lib/tr-grid-util/es6/index.js +99 -0
  672. package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
  673. package/lib/tr-grid-util/es6/jet/CollectionDict.js +141 -0
  674. package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +114 -0
  675. package/lib/tr-grid-util/es6/jet/DataGenerator.js +827 -0
  676. package/lib/tr-grid-util/es6/jet/DataSet.d.ts +8 -0
  677. package/lib/tr-grid-util/es6/jet/DataSet.js +392 -0
  678. package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +21 -0
  679. package/lib/tr-grid-util/es6/jet/MockArchive.js +56 -0
  680. package/lib/tr-grid-util/es6/jet/MockJET.d.ts +25 -0
  681. package/lib/tr-grid-util/es6/jet/MockJET.js +63 -0
  682. package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +37 -0
  683. package/lib/tr-grid-util/es6/jet/MockQuotes.js +199 -0
  684. package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +72 -0
  685. package/lib/tr-grid-util/es6/jet/MockQuotes2.js +564 -0
  686. package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +8 -0
  687. package/lib/tr-grid-util/es6/jet/MockRTK.js +43 -0
  688. package/lib/tr-grid-util/es6/jet/index.d.ts +9 -0
  689. package/lib/tr-grid-util/es6/jet/index.js +18 -0
  690. package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +11 -0
  691. package/lib/tr-grid-util/es6/jet/mockDataAPI.js +131 -0
  692. package/lib/tr-grid-util/es6/locale/translation-de.d.ts +7 -0
  693. package/lib/tr-grid-util/es6/locale/translation-de.js +51 -0
  694. package/lib/tr-grid-util/es6/locale/translation-en.d.ts +7 -0
  695. package/lib/tr-grid-util/es6/locale/translation-en.js +51 -0
  696. package/lib/tr-grid-util/es6/locale/translation-ja.d.ts +7 -0
  697. package/lib/tr-grid-util/es6/locale/translation-ja.js +51 -0
  698. package/lib/tr-grid-util/es6/locale/translation-zh-hant.d.ts +7 -0
  699. package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +51 -0
  700. package/lib/tr-grid-util/es6/locale/translation-zh.d.ts +7 -0
  701. package/lib/tr-grid-util/es6/locale/translation-zh.js +51 -0
  702. package/lib/tr-grid-util/es6/locale/translation.d.ts +11 -0
  703. package/lib/tr-grid-util/es6/locale/translation.js +18 -0
  704. package/lib/types/es6/AutoTooltip.d.ts +45 -0
  705. package/lib/types/es6/CellSelection.d.ts +67 -0
  706. package/lib/types/es6/Checkbox.d.ts +69 -0
  707. package/lib/types/es6/ColumnFitter.d.ts +56 -0
  708. package/lib/types/es6/ColumnFormatting.d.ts +90 -0
  709. package/lib/types/es6/ColumnGrouping.d.ts +60 -0
  710. package/lib/types/es6/ColumnResizing.d.ts +68 -0
  711. package/lib/types/es6/ColumnSelection.d.ts +70 -0
  712. package/lib/types/es6/ColumnStack.d.ts +76 -0
  713. package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
  714. package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +38 -0
  715. package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
  716. package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +287 -0
  717. package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +22 -0
  718. package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +44 -0
  719. package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +30 -0
  720. package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +42 -0
  721. package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +24 -0
  722. package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +46 -0
  723. package/lib/types/es6/CompositeGrid/index.d.ts +9 -0
  724. package/lib/types/es6/ConditionalColoring.d.ts +70 -0
  725. package/lib/types/es6/ContentWrap.d.ts +43 -0
  726. package/lib/types/es6/ContextMenu.d.ts +83 -0
  727. package/lib/types/es6/CoralButtonFormatter.d.ts +22 -0
  728. package/lib/types/es6/CoralCheckboxFormatter.d.ts +12 -0
  729. package/lib/types/es6/CoralComboBoxFormatter.d.ts +23 -0
  730. package/lib/types/es6/CoralIconFormatter.d.ts +23 -0
  731. package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
  732. package/lib/types/es6/CoralRadioButtonFormatter.d.ts +22 -0
  733. package/lib/types/es6/CoralSelectFormatter.d.ts +23 -0
  734. package/lib/types/es6/CoralToggleFormatter.d.ts +12 -0
  735. package/lib/types/es6/Core/data/ColumnStats.d.ts +42 -0
  736. package/lib/types/es6/Core/data/DataCache.d.ts +81 -0
  737. package/lib/types/es6/Core/data/DataTable.d.ts +125 -0
  738. package/lib/types/es6/Core/data/DataView.d.ts +280 -0
  739. package/lib/types/es6/Core/data/Segment.d.ts +38 -0
  740. package/lib/types/es6/Core/data/SegmentCollection.d.ts +58 -0
  741. package/lib/types/es6/Core/grid/Core.d.ts +387 -0
  742. package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +204 -0
  743. package/lib/types/es6/Core/grid/LayoutGrid.d.ts +23 -0
  744. package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +18 -0
  745. package/lib/types/es6/Core/grid/components/Cell.d.ts +50 -0
  746. package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +19 -0
  747. package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
  748. package/lib/types/es6/Core/grid/components/CellSpans.d.ts +38 -0
  749. package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
  750. package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +125 -0
  751. package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +24 -0
  752. package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +61 -0
  753. package/lib/types/es6/Core/grid/components/StretchedCells.d.ts +17 -0
  754. package/lib/types/es6/Core/grid/components/VScrollbar.d.ts +18 -0
  755. package/lib/types/es6/Core/grid/components/VirtualItems.d.ts +12 -0
  756. package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +16 -0
  757. package/lib/types/es6/Core/grid/event/EventListeners.d.ts +34 -0
  758. package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
  759. package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +28 -0
  760. package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +127 -0
  761. package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -0
  762. package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +18 -0
  763. package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +53 -0
  764. package/lib/types/es6/Core/grid/util/PercentBar.d.ts +43 -0
  765. package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +41 -0
  766. package/lib/types/es6/Core/grid/util/RangeBar.d.ts +25 -0
  767. package/lib/types/es6/Core/grid/util/Reverter.d.ts +14 -0
  768. package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +79 -0
  769. package/lib/types/es6/Core/grid/util/SelectionList.d.ts +50 -0
  770. package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +84 -0
  771. package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
  772. package/lib/types/es6/Core/grid/util/util.d.ts +18 -0
  773. package/lib/types/es6/Core/index.d.ts +84 -0
  774. package/lib/types/es6/Core/tr-grid-theme.d.ts +5 -0
  775. package/lib/types/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
  776. package/lib/types/es6/EFButtonFormatter.d.ts +22 -0
  777. package/lib/types/es6/EFCheckboxFormatter.d.ts +12 -0
  778. package/lib/types/es6/EFComboBoxFormatter.d.ts +23 -0
  779. package/lib/types/es6/EFDateTimePickerFormatter.d.ts +13 -0
  780. package/lib/types/es6/EFIconFormatter.d.ts +23 -0
  781. package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
  782. package/lib/types/es6/EFRadioButtonFormatter.d.ts +22 -0
  783. package/lib/types/es6/EFSelectFormatter.d.ts +23 -0
  784. package/lib/types/es6/EFTextFieldFormatter.d.ts +12 -0
  785. package/lib/types/es6/EFToggleFormatter.d.ts +12 -0
  786. package/lib/types/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
  787. package/lib/types/es6/ExtensionColumnOptions.d.ts +41 -0
  788. package/lib/types/es6/ExtensionOptions.d.ts +52 -0
  789. package/lib/types/es6/Extensions.d.ts +61 -0
  790. package/lib/types/es6/FilterInput.d.ts +57 -0
  791. package/lib/types/es6/FormatterBuilder.d.ts +22 -0
  792. package/lib/types/es6/GridFormatter.d.ts +63 -0
  793. package/lib/types/es6/HeatMap.d.ts +44 -0
  794. package/lib/types/es6/InCellEditing.d.ts +129 -0
  795. package/lib/types/es6/MenuEventAPI.d.ts +22 -0
  796. package/lib/types/es6/MenuItem.d.ts +39 -0
  797. package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
  798. package/lib/types/es6/Pagination.d.ts +57 -0
  799. package/lib/types/es6/PercentBar.d.ts +60 -0
  800. package/lib/types/es6/PercentBarFormatter.d.ts +25 -0
  801. package/lib/types/es6/PopupMenu.d.ts +29 -0
  802. package/lib/types/es6/RangeBar.d.ts +39 -0
  803. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +143 -0
  804. package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +37 -0
  805. package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +20 -0
  806. package/lib/types/es6/RealtimeGrid/Grid.d.ts +263 -0
  807. package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
  808. package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +38 -0
  809. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +120 -0
  810. package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +21 -0
  811. package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +17 -0
  812. package/lib/types/es6/RealtimeGrid/index.d.ts +8 -0
  813. package/lib/types/es6/RowColoring.d.ts +60 -0
  814. package/lib/types/es6/RowDragging.d.ts +53 -0
  815. package/lib/types/es6/RowFiltering.d.ts +118 -0
  816. package/lib/types/es6/RowGrouping.d.ts +109 -0
  817. package/lib/types/es6/RowSegmenting.d.ts +83 -0
  818. package/lib/types/es6/RowSelection.d.ts +74 -0
  819. package/lib/types/es6/SimpleImageFormatter.d.ts +21 -0
  820. package/lib/types/es6/SimpleInputFormatter.d.ts +12 -0
  821. package/lib/types/es6/SimpleLinkFormatter.d.ts +21 -0
  822. package/lib/types/es6/SimpleTickerFormatter.d.ts +25 -0
  823. package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
  824. package/lib/types/es6/StatisticsRow.d.ts +67 -0
  825. package/lib/types/es6/TextFormatter.d.ts +12 -0
  826. package/lib/types/es6/TextFormatting.d.ts +77 -0
  827. package/lib/types/es6/TitleWrap.d.ts +29 -0
  828. package/lib/types/es6/Zoom.d.ts +51 -0
  829. package/lib/types/es6/index.d.ts +76 -0
  830. package/lib/types/index.d.ts +1 -0
  831. package/lib/versions.json +36 -0
  832. package/lib/window-exporter.js +13 -0
  833. package/lib/zoom/es6/Zoom.d.ts +51 -0
  834. package/lib/zoom/es6/Zoom.js +419 -0
  835. package/lib/zoom/es6/index.d.ts +1 -0
  836. package/lib/zoom/es6/index.js +1 -0
  837. package/package.json +42 -0
@@ -0,0 +1,2602 @@
1
+ /* eslint-disable */
2
+ import Ext from "../../../tr-grid-util/es6/Ext.js";
3
+ import Util from "./util/util.js";
4
+ import Cell from "./components/Cell.js";
5
+ import Column from "./components/Column.js";
6
+ import VirtualItems from "./components/VirtualItems.js";
7
+ import StretchedCells from "./components/StretchedCells.js";
8
+ import CellSpans from "./components/CellSpans.js";
9
+ import CellSpan from "./components/CellSpan.js";
10
+ import TrackLayout from "./util/TrackLayout.js";
11
+ import SelectionList from "./util/SelectionList.js";
12
+ import ILayoutGrid from "./ILayoutGrid.js";
13
+ import ElementWrapper from "./components/ElementWrapper.js";
14
+ /* eslint-enable */
15
+
16
+ //#region Events
17
+ /**
18
+ * @event LayoutGrid#rowHighlighted
19
+ */
20
+ /**
21
+ * @event LayoutGrid#rowCountChanged
22
+ */
23
+ /**
24
+ * @event LayoutGrid#rowHeightChanged
25
+ */
26
+ /**
27
+ * @event LayoutGrid#rowAvailable
28
+ * @ignore
29
+ */
30
+ //#endregion Events
31
+
32
+ /**
33
+ * Please see {@link ILayoutGrid} for full APIs and parameter lists.
34
+ * @constructor
35
+ * @param {Element|null=} opt_initializer this can be either element id (string) or DOM element
36
+ * @param {Object=} opt_options
37
+ * @extends {ElementWrapper}
38
+ */
39
+ var LayoutGrid = function (opt_initializer, opt_options) {
40
+ var _t = this;
41
+
42
+ _t._onMouseMove = _t._onMouseMove.bind(_t);
43
+ _t._onMouseOut = _t._onMouseOut.bind(_t);
44
+
45
+ _t._trackX = new TrackLayout();
46
+ _t._trackY = new TrackLayout();
47
+ _t._trackX.setDefaultLaneSize(100);
48
+ _t._trackY.setDefaultLaneSize(32);
49
+
50
+ _t._cellSpans = new CellSpans();
51
+
52
+ _t._element = opt_initializer ? opt_initializer : document.createElement("div");
53
+ _t._element.className = "tr-lg tr-even-shading";
54
+
55
+ _t._ctxRows = new VirtualItems(); // Context rows act as a virtual column storing UI context or metadata for rows
56
+ _t._columns = [];
57
+ _t._cells = [];
58
+ _t._highlightedCells = [];
59
+ _t._stretchedCells = new StretchedCells(_t._trackX, _t._trackY, _t);
60
+ _t._selectionList = new SelectionList();
61
+
62
+ if (opt_options) {
63
+ _t._virOwner = opt_options["owner"] || null;
64
+ }
65
+
66
+ _t._addEvent("rowHighlighted");
67
+ _t._addEvent("rowCountChanged");
68
+ _t._addEvent("rowHeightChanged");
69
+ _t._addEvent("rowAvailable");
70
+ };
71
+
72
+ Ext.inherits(LayoutGrid, ElementWrapper);
73
+
74
+ /**
75
+ * For virtualization in Y-Axis
76
+ * @type {number}
77
+ * @private
78
+ */
79
+ LayoutGrid.prototype._index = -1;
80
+
81
+ /**
82
+ * For virtualization in Y-Axis
83
+ * @type {number}
84
+ * @private
85
+ */
86
+ LayoutGrid.prototype._indexOffset = 0;
87
+
88
+ /**
89
+ * For virtualization in Y-Axis
90
+ * @type {number}
91
+ * @private
92
+ */
93
+ LayoutGrid.prototype._availableRowCount = 0;
94
+
95
+ /**
96
+ * For virtualization in Y-Axis
97
+ * @type {number}
98
+ * @private
99
+ */
100
+ LayoutGrid.prototype._activeRow = 0;
101
+
102
+ /**
103
+ * For virtualization in Y-Axis
104
+ * @type {number}
105
+ * @private
106
+ */
107
+ LayoutGrid.prototype._activeRowEnd = 0;
108
+
109
+ /**
110
+ * Cache of column count.
111
+ * @type {number}
112
+ * @private
113
+ */
114
+ LayoutGrid.prototype._colCount = 0;
115
+
116
+ /** Cache of row count
117
+ * @type {number}
118
+ * @private
119
+ */
120
+ LayoutGrid.prototype._rowCount = 0;
121
+
122
+ /**
123
+ * Cache of hidden row count
124
+ * @type {number}
125
+ * @private
126
+ */
127
+ LayoutGrid.prototype._hiddenRowCount = 0;
128
+
129
+ /**
130
+ * @type {!TrackLayout}
131
+ * @private
132
+ */
133
+ LayoutGrid.prototype._trackX;
134
+
135
+ /**
136
+ * @type {!TrackLayout}
137
+ * @private
138
+ */
139
+ LayoutGrid.prototype._trackY;
140
+
141
+ /**
142
+ * @type {!CellSpans}
143
+ * @private
144
+ */
145
+ LayoutGrid.prototype._cellSpans;
146
+
147
+ /**
148
+ * Div elements that govern column styles
149
+ * @type {!Array.<Column>}
150
+ * @private
151
+ */
152
+ LayoutGrid.prototype._columns;
153
+
154
+ /**
155
+ * @type {Column}
156
+ * @private
157
+ */
158
+ LayoutGrid.prototype._firstColumn;
159
+
160
+ /**
161
+ * @type {Column}
162
+ * @private
163
+ */
164
+ LayoutGrid.prototype._lastColumn;
165
+
166
+ /**
167
+ * @type {Element}
168
+ * @private
169
+ */
170
+ LayoutGrid.prototype._rightSpace;
171
+
172
+ /**
173
+ * @type {boolean}
174
+ * @private
175
+ */
176
+ LayoutGrid.prototype._frozenLayout = false;
177
+
178
+ /**
179
+ * @type {boolean}
180
+ * @private
181
+ */
182
+ LayoutGrid.prototype._rowHighlightEnabled = false;
183
+
184
+ /**
185
+ * Negative value means no row is highlight
186
+ * @type {number}
187
+ * @private
188
+ */
189
+ LayoutGrid.prototype._rowHighlightIndex = -1;
190
+
191
+ /**
192
+ * @type {!Array.<Cell>}
193
+ * @private
194
+ */
195
+ LayoutGrid.prototype._highlightedCells;
196
+
197
+ /**
198
+ * @type {Element}
199
+ * @private
200
+ */
201
+ LayoutGrid.prototype._coverLayer = null;
202
+ /**
203
+ * @type {StretchedCells}
204
+ * @private
205
+ */
206
+ LayoutGrid.prototype._stretchedCells = null;
207
+ /**
208
+ * @type {*}
209
+ * @private
210
+ */
211
+ LayoutGrid.prototype._ctx = null;
212
+
213
+ /**
214
+ * @type {!SelectionList}
215
+ * @private
216
+ */
217
+ LayoutGrid.prototype._selectionList;
218
+
219
+ /** @type {boolean}
220
+ * @private
221
+ */
222
+ LayoutGrid.prototype._colVir = false;
223
+
224
+ /**
225
+ * @type {boolean}
226
+ * @private
227
+ */
228
+ LayoutGrid.prototype._initialized = false;
229
+
230
+ /**
231
+ * @type {string}
232
+ * @private
233
+ */
234
+ LayoutGrid.prototype._hidingMethod = "";
235
+
236
+ /**
237
+ * @type {ILayoutGrid}
238
+ * @private
239
+ */
240
+ LayoutGrid.prototype._virOwner = null;
241
+ /** @type {number}
242
+ * @private
243
+ */
244
+ LayoutGrid.prototype._transformIETimer = 0;
245
+ /** @type {!VirtualItems}
246
+ * @description Context rows act as a virtual column storing UI context or metadata for rows
247
+ * @private
248
+ */
249
+ LayoutGrid.prototype._ctxRows;
250
+
251
+
252
+ /**
253
+ * {@link ElementWrapper#dispose}
254
+ * @override
255
+ */
256
+ LayoutGrid.prototype.dispose = function () {
257
+ this.setRowCount(0); // Fire rowCountChanged
258
+
259
+ this.unlistenAll();
260
+ //this.clearSelectedRows();
261
+
262
+ this._ctxRows.dispose();
263
+ this._stretchedCells.dispose();
264
+ for (var i = this._columns.length; --i >= 0; ) {
265
+ this._columns[i].dispose();
266
+ }
267
+
268
+ this._colCount = this._rowCount = this._activeRowEnd = this._availableRowCount = 0;
269
+
270
+ this._highlightedCells.length = 0;
271
+ this._ctx = null;
272
+
273
+ this._dispose();
274
+ };
275
+ /**
276
+ * {@link ElementWrapper#getWidth}
277
+ * @override
278
+ */
279
+ LayoutGrid.prototype.getWidth = function () {
280
+ if (this.isVisible() === false) {
281
+ return 0;
282
+ }
283
+
284
+ return this.getContentWidth();
285
+ };
286
+
287
+ /**
288
+ * {@link ElementWrapper#setWidth}
289
+ * @override
290
+ */
291
+ LayoutGrid.prototype.setWidth = function (px) {
292
+ if (px < 0) {
293
+ return false;
294
+ }
295
+
296
+ var reserveSpace = this._rightSpace ? this._rightSpace.offsetWidth : 0;
297
+ var changes = this._trackX.setTrackSize(px, reserveSpace); // WARNING: Perform scalling instead of setting width directly
298
+
299
+ if (changes == null) {
300
+ return false;
301
+ }
302
+
303
+ // The size will be applied, only if minimum specification is satisfied.
304
+ this._syncLayoutToColumns(0);
305
+
306
+ return true;
307
+ };
308
+
309
+ /**
310
+ * {@link ElementWrapper#getHeight}
311
+ * @override
312
+ */
313
+ LayoutGrid.prototype.getHeight = function () {
314
+ if (!this.isVisible()) {
315
+ return 0;
316
+ }
317
+
318
+ return this.getContentHeight();
319
+ };
320
+ /**
321
+ * {@link ElementWrapper#setHeight}
322
+ * @override
323
+ */
324
+ LayoutGrid.prototype.setHeight = function (px) {
325
+ if (px < 0) {
326
+ return false;
327
+ }
328
+
329
+ var changes = this._trackY.setTrackSize(px, 0); // WARNING: Perform scalling instead of setting height directly
330
+
331
+ if (changes == null) {
332
+ return true;
333
+ }
334
+
335
+ // The size will be applied, only if minimum specification is satisfied.
336
+ this._syncLayoutToRows(0, this._rowCount);
337
+
338
+ return true;
339
+ };
340
+ /**
341
+ * {@link ElementWrapper#show}
342
+ * @override
343
+ */
344
+ LayoutGrid.prototype.show = function (opt_shown) {
345
+ // warning: this method affect to row only
346
+ this._element.style.display = opt_shown !== false ? "" : "none";
347
+ this._trackY.show(opt_shown);
348
+ this.setFrozenLayout(opt_shown === false);
349
+ this._dispatchRowHeightChangedEvent(0, this._rowCount); // TODO: This is redundant with setFrozenLayout
350
+ };
351
+
352
+ /**
353
+ * {@link ILayoutGrid#hitTest}
354
+ * @inheritDoc
355
+ */
356
+ LayoutGrid.prototype.hitTest = function (x, y, opt_omitSpan) {
357
+ if (x < 0) {
358
+ return null;
359
+ }
360
+
361
+ if (y < 0) {
362
+ return null;
363
+ }
364
+
365
+ if (x >= this.getWidth()) {
366
+ return null;
367
+ }
368
+
369
+ if (y >= this.getHeight()) {
370
+ return null;
371
+ }
372
+
373
+ var hitX = this._trackX.hitTest(x);
374
+
375
+ if (hitX < 0) {
376
+ return null;
377
+ }
378
+
379
+ var hitY = this._trackY.hitTest(y);
380
+
381
+ if (hitY < 0) {
382
+ return null;
383
+ }
384
+
385
+ var result = {};
386
+ result["colIndex"] = hitX;
387
+ result["rowIndex"] = hitY;
388
+
389
+ if (opt_omitSpan !== true) {
390
+ var cellSpan = this._cellSpans.getOccupyingSpan(hitX, hitY);
391
+
392
+ if (cellSpan) {
393
+ result["colIndex"] = cellSpan.indexX;
394
+ result["rowIndex"] = cellSpan.indexY;
395
+ }
396
+ }
397
+
398
+ return result;
399
+ };
400
+
401
+ /**
402
+ * {@link ILayoutGrid#hitTestX}
403
+ * @inheritDoc
404
+ */
405
+ LayoutGrid.prototype.hitTestX = function (x) {
406
+ if (x < 0) {
407
+ return -1;
408
+ }
409
+
410
+ if (x >= this.getWidth()) {
411
+ return ~this._colCount;
412
+ }
413
+
414
+ return this._trackX.hitTest(x);
415
+ };
416
+
417
+ /**
418
+ * {@link ILayoutGrid#hitTestY}
419
+ * @inheritDoc
420
+ */
421
+ LayoutGrid.prototype.hitTestY = function (y) {
422
+ if (y < 0) {
423
+ return -1;
424
+ }
425
+
426
+ if (y >= this.getHeight()) {
427
+ return ~this._rowCount;
428
+ }
429
+
430
+ return this._trackY.hitTest(y);
431
+ };
432
+
433
+ /**
434
+ * {@link ILayoutGrid#getDefaultColumnWidth}
435
+ * @inheritDoc
436
+ */
437
+ LayoutGrid.prototype.getDefaultColumnWidth = function () {
438
+ return this._trackX.getDefaultLaneSize();
439
+ };
440
+
441
+ /**
442
+ * {@link ILayoutGrid#setDefaultColumnWidth}
443
+ * @inheritDoc
444
+ */
445
+ LayoutGrid.prototype.setDefaultColumnWidth = function (val) {
446
+ if (this._trackX.getDefaultLaneSize() !== val) {
447
+ this._trackX.setDefaultLaneSize(val);
448
+ this._syncLayoutToColumns(0);
449
+ }
450
+ };
451
+
452
+ /**
453
+ * {@link ILayoutGrid#getDefaultRowHeight}
454
+ * @inheritDoc
455
+ */
456
+ LayoutGrid.prototype.getDefaultRowHeight = function () {
457
+ return this._trackY.getDefaultLaneSize();
458
+ };
459
+
460
+ /**
461
+ * {@link ILayoutGrid#setDefaultRowHeight}
462
+ * @inheritDoc
463
+ */
464
+ LayoutGrid.prototype.setDefaultRowHeight = function (val) {
465
+ var defaultH = this._trackY.getDefaultLaneSize();
466
+
467
+ if (defaultH !== val) {
468
+ this._trackY.setDefaultLaneSize(val);
469
+
470
+ for (var i = 0; i < this._colCount; ++i) {
471
+ this._columns[i].setHeight(val);
472
+ }
473
+
474
+ this._syncLayoutToRows(0, this._rowCount);
475
+ this._dispatchRowHeightChangedEvent(0, this._rowCount);
476
+ }
477
+ };
478
+
479
+ /**
480
+ * {@link ILayoutGrid#getColumnWidth}
481
+ * @inheritDoc
482
+ */
483
+ LayoutGrid.prototype.getColumnWidth = function (indexX) {
484
+ return this._trackX.getLaneSize(indexX);
485
+ };
486
+
487
+ /**
488
+ * {@link ILayoutGrid#setColumnWidth}
489
+ * @inheritDoc
490
+ */
491
+ LayoutGrid.prototype.setColumnWidth = function (indexX, val) {
492
+ if (this._setColumnWidth(indexX, val)) {
493
+ this._syncLayoutToColumns(indexX);
494
+
495
+ return true;
496
+ }
497
+
498
+ return false;
499
+ };
500
+ /** @public
501
+ * @ignore
502
+ * @param {number} indexX
503
+ * @param {number} val
504
+ * @return {boolean}
505
+ */
506
+ LayoutGrid.prototype._setColumnWidth = function (indexX, val) {
507
+ return this._trackX.setLaneSize(indexX, val);
508
+ };
509
+ /** @public
510
+ * @ignore
511
+ */
512
+ LayoutGrid.prototype._updateColumnLayout = function () {
513
+ this._syncLayoutToColumns(0);
514
+ };
515
+
516
+ /**
517
+ * {@link ILayoutGrid#getRowHeight}
518
+ * @inheritDoc
519
+ */
520
+ LayoutGrid.prototype.getRowHeight = function (indexY) {
521
+ return this._trackY.getLaneSize(indexY);
522
+ };
523
+
524
+ /**
525
+ * {@link ILayoutGrid#setRowHeight}
526
+ * @inheritDoc
527
+ */
528
+ LayoutGrid.prototype.setRowHeight = function (rowIndex, val) {
529
+ if (rowIndex < 0 || rowIndex >= this._rowCount) {
530
+ return false;
531
+ }
532
+
533
+ var dirty = this._trackY.setLaneSize(rowIndex, val);
534
+
535
+ this._syncLayoutToRows(rowIndex, rowIndex + 1); // Update UI. WARNING: Very slow
536
+
537
+ if (dirty) {
538
+ this._dispatchRowHeightChangedEvent(rowIndex, rowIndex + 1);
539
+ }
540
+
541
+ this._resetTransformIETimer();
542
+
543
+ return dirty;
544
+ };
545
+
546
+ /**
547
+ * @description Use internally to quickly update all row heights
548
+ * @public
549
+ * @ignore
550
+ * @param {TrackLayout} track
551
+ * @param {number} start
552
+ * @returns {boolean}
553
+ */
554
+ LayoutGrid.prototype._updateRowHeights = function (track, start) {
555
+ var dirty = 0;
556
+
557
+ for (var i = 0; i < this._rowCount; ++i) {
558
+ var val = track.getLaneSize(start);
559
+
560
+ dirty |= this._trackY.setLaneSize(i, val);
561
+ ++start;
562
+ }
563
+
564
+ this._syncLayoutToRows(0, this._rowCount);
565
+ // if (dirty) { // TODO: Check if need to dispatch the event
566
+ // this._dispatchRowHeightChangedEvent(0, this._rowCount);
567
+ // }
568
+ return dirty;
569
+ };
570
+
571
+ /**
572
+ * {@link ILayoutGrid#isColumnVisible}
573
+ * @inheritDoc
574
+ */
575
+ LayoutGrid.prototype.isColumnVisible = function (indexX) {
576
+ return this._trackX.isLaneVisible(indexX);
577
+ };
578
+
579
+ /**
580
+ * {@link ILayoutGrid#hideColumn}
581
+ * @inheritDoc
582
+ */
583
+ LayoutGrid.prototype.hideColumn = function (indexX, val) {
584
+ return this.setColumnVisibility(indexX, (val === false), 0);
585
+ };
586
+
587
+ /**
588
+ * {@link ILayoutGrid#isRowVisible}
589
+ * @inheritDoc
590
+ */
591
+ LayoutGrid.prototype.isRowVisible = function (indexY) {
592
+ return this._trackY.isLaneVisible(indexY);
593
+ };
594
+
595
+ /**
596
+ * {@link ILayoutGrid#hideRow}
597
+ * @inheritDoc
598
+ */
599
+ LayoutGrid.prototype.hideRow = function (indexY, val) {
600
+ if (this._trackY.hideLane(indexY, val)) {
601
+ if ((val == null || val) && !this.isRowVisible(indexY)) {
602
+ this._hiddenRowCount++;
603
+ } else if (this.isRowVisible(indexY)){
604
+ this._hiddenRowCount--;
605
+ }
606
+
607
+ this._syncLayoutToRows(indexY, this._rowCount);
608
+ this._dispatchRowHeightChangedEvent(indexY, indexY + 1);
609
+
610
+ return true;
611
+ }
612
+
613
+ return false;
614
+ };
615
+
616
+ /**
617
+ * {@link ILayoutGrid#getMinimumColumnWidth}
618
+ * @inheritDoc
619
+ */
620
+ LayoutGrid.prototype.getMinimumColumnWidth = function (indexX) {
621
+ return this._trackX.getMinimumLaneSize(indexX);
622
+ };
623
+
624
+ /**
625
+ * {@link ILayoutGrid#setMinimumColumnWidth}
626
+ * @inheritDoc
627
+ */
628
+ LayoutGrid.prototype.setMinimumColumnWidth = function (indexX, val) {
629
+ if (this._trackX.setMinimumLaneSize(indexX, val)) {
630
+ this._syncLayoutToColumns(indexX);
631
+
632
+ return true;
633
+ }
634
+
635
+ return false;
636
+ };
637
+
638
+ /**
639
+ * {@link ILayoutGrid#getMinimumRowHeight}
640
+ * @inheritDoc
641
+ */
642
+ LayoutGrid.prototype.getMinimumRowHeight = function (indexY) {
643
+ return this._trackY.getMinimumLaneSize(indexY);
644
+ };
645
+
646
+ /**
647
+ * {@link ILayoutGrid#setMinimumRowHeight}
648
+ * @inheritDoc
649
+ */
650
+ LayoutGrid.prototype.setMinimumRowHeight = function (indexY, val) {
651
+ if (this._trackY.setMinimumLaneSize(indexY, val)) {
652
+ this._syncLayoutToRows(indexY, this._rowCount);
653
+ this._dispatchRowHeightChangedEvent(indexY, indexY + 1);
654
+
655
+ return true;
656
+ }
657
+
658
+ return false;
659
+ };
660
+
661
+ /**
662
+ * {@link ILayoutGrid#getCellLeft}
663
+ * @inheritDoc
664
+ */
665
+ LayoutGrid.prototype.getCellLeft = function (indexX) {
666
+ return this._trackX.getLaneStart(indexX);
667
+ };
668
+
669
+ /**
670
+ * {@link ILayoutGrid#getCellTop}
671
+ * @inheritDoc
672
+ */
673
+ LayoutGrid.prototype.getCellTop = function (indexY) {
674
+ return this._trackY.getLaneStart(indexY);
675
+ };
676
+
677
+ /**
678
+ * {@link ILayoutGrid#getCellWidth}
679
+ * @inheritDoc
680
+ */
681
+ LayoutGrid.prototype.getCellWidth = function (indexX, indexY) {
682
+ var cellSpan = this._cellSpans.getOccupyingSpan(indexX, indexY);
683
+
684
+ if (cellSpan) {
685
+ var spanStart = this._trackX.getLaneStart(cellSpan.indexX);
686
+ var spanEnd = this._trackX.getLaneEnd(cellSpan.indexX + cellSpan.colSpan - 1);
687
+
688
+ return spanEnd - spanStart;
689
+ }
690
+
691
+ return this.getColumnWidth(indexX);
692
+ };
693
+
694
+ /**
695
+ * {@link ILayoutGrid#getCellHeight}
696
+ * @inheritDoc
697
+ */
698
+ LayoutGrid.prototype.getCellHeight = function (indexX, indexY) {
699
+ var cellSpan = this._cellSpans.getOccupyingSpan(indexX, indexY);
700
+
701
+ if (cellSpan) {
702
+ var spanStart = this._trackY.getLaneStart(cellSpan.indexY);
703
+ var spanEnd = this._trackY.getLaneEnd(cellSpan.indexY + cellSpan.rowSpan - 1);
704
+
705
+ return spanEnd - spanStart;
706
+ }
707
+
708
+ return this.getRowHeight(indexY);
709
+ };
710
+
711
+ /**
712
+ * {@link ILayoutGrid#hasCellSpan}
713
+ * @inheritDoc
714
+ */
715
+ LayoutGrid.prototype.hasCellSpan = function () {
716
+ return this._cellSpans.hasSpan();
717
+ };
718
+
719
+ /**
720
+ * {@link ILayoutGrid#getCellRowSpan}
721
+ * @inheritDoc
722
+ */
723
+ LayoutGrid.prototype.getCellRowSpan = function (indexX, indexY) {
724
+ return this._cellSpans.getRowSpan(indexX, indexY);
725
+ };
726
+
727
+ /**
728
+ * {@link ILayoutGrid#setCellRowSpan}
729
+ * @inheritDoc
730
+ */
731
+ LayoutGrid.prototype.setCellRowSpan = function (indexX, indexY, spanVal) {
732
+ var cellSpan = this._cellSpans.setRowSpan(indexX, indexY, spanVal);
733
+
734
+ this._updateCellSpanSize(indexX, indexY, cellSpan);
735
+
736
+ if (cellSpan) {
737
+ if (cellSpan.retVal >= 0) { // Expansion
738
+ this._updateCellSpanClass(indexX, indexY, cellSpan.colSpan, cellSpan.rowSpan, true);
739
+ } else { // Shrinking
740
+ if (cellSpan.colSpan > 1) { // Spanning still exists
741
+ this._updateCellSpanClass(indexX, indexY, cellSpan.colSpan, cellSpan.prevRowSpan, false);
742
+ this._updateCellSpanClass(indexX, indexY, cellSpan.colSpan, cellSpan.rowSpan, true);
743
+ } else { // Removing span definition
744
+ this._updateCellSpanClass(indexX, indexY, cellSpan.colSpan, cellSpan.prevRowSpan, false);
745
+ }
746
+ }
747
+
748
+ return cellSpan.retVal !== 0;
749
+ }
750
+
751
+ var cell = this._getCell(indexX, indexY);
752
+
753
+ if (cell && cell._rowSpan > 1) {
754
+ this._updateCellSpanClass(indexX, indexY, cell._colSpan, cell._rowSpan, false);
755
+ }
756
+
757
+ return false;
758
+ };
759
+
760
+ /**
761
+ * {@link ILayoutGrid#getCellColSpan}
762
+ * @inheritDoc
763
+ */
764
+ LayoutGrid.prototype.getCellColSpan = function (indexX, indexY) {
765
+ return this._cellSpans.getColSpan(indexX, indexY);
766
+ };
767
+
768
+ /**
769
+ * {@link ILayoutGrid#setCellColSpan}
770
+ * @inheritDoc
771
+ */
772
+ LayoutGrid.prototype.setCellColSpan = function (indexX, indexY, spanVal) {
773
+ var cellSpan = this._cellSpans.setColSpan(indexX, indexY, spanVal);
774
+
775
+ this._updateCellSpanSize(indexX, indexY, cellSpan);
776
+
777
+ if (cellSpan) {
778
+ if (cellSpan.retVal >= 0) { // Expansion
779
+ this._updateCellSpanClass(indexX, indexY, cellSpan.colSpan, cellSpan.rowSpan, true);
780
+ } else { // Shrinking
781
+ if (cellSpan.colSpan > 1) { // Spanning still exists
782
+ this._updateCellSpanClass(indexX, indexY, cellSpan.prevColSpan, cellSpan.rowSpan, false);
783
+ this._updateCellSpanClass(indexX, indexY, cellSpan.colSpan, cellSpan.rowSpan, true);
784
+ } else { // Removing span definition
785
+ this._updateCellSpanClass(indexX, indexY, cellSpan.prevColSpan, cellSpan.rowSpan, false);
786
+ }
787
+ }
788
+
789
+ return cellSpan.retVal !== 0;
790
+ }
791
+
792
+ var cell = this._getCell(indexX, indexY);
793
+
794
+ if (cell && cell._colSpan > 1) {
795
+ this._updateCellSpanClass(indexX, indexY, cell._colSpan, cell._rowSpan, false);
796
+ }
797
+
798
+ return false;
799
+ };
800
+
801
+ /**
802
+ * {@link ILayoutGrid#clearCellSpans}
803
+ * @inheritDoc
804
+ */
805
+ LayoutGrid.prototype.clearCellSpans = function () {
806
+ var cellSpans = this._cellSpans.clearAllSpans();
807
+
808
+ if (cellSpans == null) {
809
+ return false;
810
+ }
811
+
812
+ for (var i = cellSpans.length; --i >= 0; ) {
813
+ var cellSpan = cellSpans[i];
814
+
815
+ this._updateCellSpan(cellSpan.indexX, cellSpan.indexY, cellSpan, false);
816
+ }
817
+
818
+ return true;
819
+ };
820
+
821
+ /**
822
+ * {@link ILayoutGrid#clearCellSpans}
823
+ * @inheritDoc
824
+ */
825
+ LayoutGrid.prototype.clearColumnSpans = function (indexX) {
826
+ var cellSpans = this._cellSpans.removeSpanByColIndex(indexX);
827
+
828
+ if (cellSpans == null) {
829
+ return false;
830
+ }
831
+
832
+ for (var i = cellSpans.length; --i >= 0; ) {
833
+ var cellSpan = cellSpans[i];
834
+
835
+ this._updateCellSpan(cellSpan.indexX, cellSpan.indexY, cellSpan, false);
836
+ }
837
+
838
+ return true;
839
+ };
840
+
841
+ /**
842
+ * {@link ILayoutGrid#clearColumnCustomizations}
843
+ * @inheritDoc
844
+ */
845
+ LayoutGrid.prototype.clearColumnCustomizations = function () {
846
+ this._trackX.clearLaneCustomizations();
847
+ this._syncLayoutToColumns(0);
848
+ };
849
+
850
+ /**
851
+ * {@link ILayoutGrid#clearRowCustomizations}
852
+ * @inheritDoc
853
+ */
854
+ LayoutGrid.prototype.clearRowCustomizations = function () {
855
+ this._trackY.clearLaneCustomizations();
856
+ this._syncLayoutToRows(0, this._rowCount);
857
+ };
858
+
859
+ /**
860
+ * {@link ILayoutGrid#getColumnScalability}
861
+ * @inheritDoc
862
+ */
863
+ LayoutGrid.prototype.getColumnScalability = function (indexX) {
864
+ return this._trackX.getLaneScalability(indexX);
865
+ };
866
+
867
+ /**
868
+ * {@link ILayoutGrid#setColumnScalability}
869
+ * @inheritDoc
870
+ */
871
+ LayoutGrid.prototype.setColumnScalability = function (indexX, val) {
872
+ return this._trackX.setLaneScalability(indexX, val);
873
+ };
874
+
875
+ /**
876
+ * {@link ILayoutGrid#getRowScalability}
877
+ * @inheritDoc
878
+ */
879
+ LayoutGrid.prototype.getRowScalability = function (indexY) {
880
+ return this._trackY.getLaneScalability(indexY);
881
+ };
882
+
883
+ /**
884
+ * {@link ILayoutGrid#setRowScalability}
885
+ * @inheritDoc
886
+ */
887
+ LayoutGrid.prototype.setRowScalability = function (indexY, val) {
888
+ return this._trackY.setLaneScalability(indexY, val);
889
+ };
890
+
891
+ /**
892
+ * {@link ILayoutGrid#getCell}
893
+ * @inheritDoc
894
+ */
895
+ LayoutGrid.prototype.getCell = function (indexX, indexY, opt_includeSpan) {
896
+ if (opt_includeSpan && this._cellSpans.hasSpan()) {
897
+ var colSpan = this._cellSpans.getColSpan(indexX, indexY);
898
+ var rowSpan = this._cellSpans.getRowSpan(indexX, indexY);
899
+
900
+ if (colSpan < 0) {
901
+ indexX += colSpan;
902
+ }
903
+
904
+ if (rowSpan < 0) {
905
+ indexY += rowSpan;
906
+ }
907
+ }
908
+
909
+ return this._getCell(indexX, indexY);
910
+ };
911
+
912
+ /**
913
+ * {@link ILayoutGrid#getCellContent}
914
+ * @inheritDoc
915
+ */
916
+ LayoutGrid.prototype.getCellContent = function (indexX, indexY) {
917
+ var cell = this.getCell(indexX, indexY);
918
+
919
+ if (cell !== null) {
920
+ return cell.getContent();
921
+ }
922
+
923
+ return null;
924
+ };
925
+
926
+ /**
927
+ * {@link ILayoutGrid#setCellContent}
928
+ * @inheritDoc
929
+ */
930
+ LayoutGrid.prototype.setCellContent = function (indexX, indexY, data) {
931
+ var cell = this.getCell(indexX, indexY);
932
+
933
+ if (cell == null) {
934
+ window.console.log("Error: Accessing nonexistent cell in Grid's Table");
935
+
936
+ return null;
937
+ }
938
+
939
+ return cell.setContent(data);
940
+ };
941
+
942
+ /**
943
+ * {@link ILayoutGrid#getColumnCount}
944
+ * @inheritDoc
945
+ */
946
+ LayoutGrid.prototype.getColumnCount = function () {
947
+ return this._colCount;
948
+ };
949
+
950
+ /**
951
+ * {@link ILayoutGrid#setColumnCount}
952
+ * @inheritDoc
953
+ */
954
+ LayoutGrid.prototype.setColumnCount = function (val) {
955
+ if (val < 0) {
956
+ val = 0;
957
+ }
958
+
959
+ if (this._colCount === val) {
960
+ return;
961
+ }
962
+
963
+ var oldColCount = this._colCount;
964
+
965
+ this._trackX.setLaneCount(val); // Need to be set before syncing layout
966
+ this._colCount = this._trackX.getLaneCount();
967
+
968
+ var i = 0;
969
+ var column = null;
970
+
971
+ if (oldColCount > val) {
972
+ for (i = oldColCount; --i >= val; ) {
973
+ column = this._columns.pop();
974
+ column.dispose();
975
+
976
+ if (column === this._firstColumn) {
977
+ this._firstColumn = null;
978
+ }
979
+
980
+ if (column === this._lastColumn) {
981
+ this._lastColumn = null;
982
+ }
983
+ }
984
+
985
+ // this._updateViewWidth(); // Core grid will guarantee updating width to each section
986
+ } else {
987
+ for (i = oldColCount; i < val; ++i) {
988
+ column = this._newColumn(i);
989
+ }
990
+
991
+ // this._syncLayoutToColumns(oldColCount); // Core grid will guarantee updating width to each section
992
+ }
993
+
994
+ this._updateColumnIndices();
995
+
996
+ for (i = oldColCount; i < val; ++i) {
997
+ this._columns[i].activate(!this._colVir);
998
+ }
999
+
1000
+ if (val <= 0) { // If there is no column at all, clear all selections
1001
+ this._selectionList.clearAllSelections(); // No UI change
1002
+ }
1003
+ };
1004
+
1005
+ /**
1006
+ * {@link ILayoutGrid#getRowCount}
1007
+ * @inheritDoc
1008
+ */
1009
+ LayoutGrid.prototype.getRowCount = function () {
1010
+ return this._rowCount;
1011
+ };
1012
+
1013
+ /**
1014
+ * {@link ILayoutGrid#setRowCount}
1015
+ * @inheritDoc
1016
+ */
1017
+ LayoutGrid.prototype.setRowCount = function (val, noBinding) {
1018
+ if (val < 0) {
1019
+ val = 0;
1020
+ }
1021
+
1022
+ if (this._rowCount === val) {
1023
+ return;
1024
+ }
1025
+
1026
+ var c;
1027
+ var oldRowCount = this._rowCount;
1028
+
1029
+ this._trackY.setLaneCount(val); // Need to be set before syncing layout
1030
+ this._rowCount = this._trackY.getLaneCount();
1031
+
1032
+ this._ctxRows.setItemCount(val);
1033
+ this._stretchedCells.setCellCount(val);
1034
+ for (c = 0; c < this._colCount; ++c) {
1035
+ this._columns[c].setCellCount(val);
1036
+ }
1037
+
1038
+ if (oldRowCount > val) {
1039
+ if (val < this._rowHighlightIndex) {
1040
+ this.setRowHighlight(-1);
1041
+ }
1042
+
1043
+ if (val < this._activeRowEnd) {
1044
+ this._activeRowEnd = val;
1045
+ }
1046
+
1047
+ if (val < this._availableRowCount) {
1048
+ this._availableRowCount = val;
1049
+ }
1050
+
1051
+ this._cellSpans.removeSpanStartedFromRowIndex(val);
1052
+ this._updateViewHeight();
1053
+
1054
+ // Clear selection of the removed rows
1055
+ if (val > 0) {
1056
+ for (var i = val; i < oldRowCount; ++i) {
1057
+ this._selectionList.deselect(i); // No UI change
1058
+ }
1059
+ } else {
1060
+ this._selectionList.clearAllSelections(); // No UI change
1061
+ }
1062
+ } else {
1063
+ this._syncLayoutToRows(oldRowCount, val);
1064
+ }
1065
+
1066
+ var e = {};
1067
+
1068
+ e["prevCount"] = oldRowCount;
1069
+ e["rowCount"] = this._rowCount;
1070
+ this._dispatch("rowCountChanged", e); // This will trigger virtualizer
1071
+
1072
+ if (oldRowCount < val) { // In case of no event is sent back
1073
+ this._insertCells(0, this._rowCount); // Dispatch row available
1074
+ }
1075
+ };
1076
+
1077
+ /**
1078
+ * {@link ILayoutGrid#getVisibleRowCount}
1079
+ * @inheritDoc
1080
+ */
1081
+ LayoutGrid.prototype.getVisibleRowCount = function () {
1082
+ return (this._rowCount - this._hiddenRowCount);
1083
+ };
1084
+
1085
+ /**
1086
+ * {@link ILayoutGrid#addRow}
1087
+ * @inheritDoc
1088
+ */
1089
+ LayoutGrid.prototype.addRow = function (val) {
1090
+ if (val <= 0) {
1091
+ return;
1092
+ }
1093
+
1094
+ if (this._colCount <= 0) {
1095
+ window.console.log("WARNING: Row cannot be added, unless at least one column is added");
1096
+
1097
+ return;
1098
+ }
1099
+
1100
+ this.setRowCount(this._rowCount + val);
1101
+ };
1102
+
1103
+ /**
1104
+ * {@link ILayoutGrid#removeRow}
1105
+ * @inheritDoc
1106
+ */
1107
+ LayoutGrid.prototype.removeRow = function (val) {
1108
+ if (val <= 0) {
1109
+ return;
1110
+ }
1111
+
1112
+ if (val > this._rowCount) {
1113
+ val = this._rowCount;
1114
+ }
1115
+
1116
+ this.setRowCount(this._rowCount - val);
1117
+ };
1118
+
1119
+ /**
1120
+ * {@link ILayoutGrid#setBorders}
1121
+ * @inheritDoc
1122
+ */
1123
+ LayoutGrid.prototype.setBorders = function (lft, top, rgt, btm) {
1124
+
1125
+ };
1126
+
1127
+ /**
1128
+ * {@link ILayoutGrid#getColumnStyle}
1129
+ * @inheritDoc
1130
+ */
1131
+ LayoutGrid.prototype.getColumnStyle = function (colIndex, styleName) {
1132
+ var column = this._columns[colIndex];
1133
+
1134
+ if (column) {
1135
+ return column.getStyle(styleName);
1136
+ }
1137
+
1138
+ return null;
1139
+ };
1140
+
1141
+ /**
1142
+ * {@link ILayoutGrid#setColumnStyle}
1143
+ * @inheritDoc
1144
+ */
1145
+ LayoutGrid.prototype.setColumnStyle = function (colIndex, styleName, value) {
1146
+ var column = this._columns[colIndex];
1147
+ if (column) {
1148
+ column.setStyle(styleName, value);
1149
+ }
1150
+ };
1151
+
1152
+ /**
1153
+ * {@link ILayoutGrid#enableColumnClass}
1154
+ * @inheritDoc
1155
+ */
1156
+ LayoutGrid.prototype.enableColumnClass = function (colIndex, className, enabled) {
1157
+ var column = this._columns[colIndex];
1158
+
1159
+ if (column) {
1160
+ column.enableClass(className, enabled);
1161
+ }
1162
+ };
1163
+
1164
+ /**
1165
+ * {@link ILayoutGrid#enableColumnClass}
1166
+ * @inheritDoc
1167
+ */
1168
+ LayoutGrid.prototype.hasColumnClass = function (colIndex, className) {
1169
+ var column = this._columns[colIndex];
1170
+
1171
+ return (column) ? column.hasClass(className) : false;
1172
+ };
1173
+
1174
+ /**
1175
+ * {@link ILayoutGrid#enableRowClass}
1176
+ * @inheritDoc
1177
+ */
1178
+ LayoutGrid.prototype.enableRowClass = function (rowIndex, className, enabled) {
1179
+ if (rowIndex >= 0 && rowIndex < this._rowCount) {
1180
+ for (var c = 0; c < this._colCount; ++c) {
1181
+ this._columns[c].getCell(rowIndex).enableClass(className, enabled);
1182
+ }
1183
+ }
1184
+ };
1185
+
1186
+ /**
1187
+ * {@link ILayoutGrid#setRowStyle}
1188
+ * @inheritDoc
1189
+ */
1190
+ LayoutGrid.prototype.setRowStyle = function (rowIndex, styleName, value, enabled) {
1191
+ if (rowIndex >= 0 && rowIndex < this._rowCount) {
1192
+ if (!value || (enabled != null && !enabled)) {
1193
+ value = "";
1194
+ }
1195
+
1196
+ for (var c = 0; c < this._colCount; ++c) {
1197
+ this._columns[c].getCell(rowIndex).setStyle(styleName, value);
1198
+ }
1199
+ }
1200
+ };
1201
+
1202
+ /**
1203
+ * {@link ILayoutGrid#getRelativePosition}
1204
+ * @inheritDoc
1205
+ */
1206
+ LayoutGrid.prototype.getRelativePosition = function (obj) {
1207
+ return Util.getRelativePosition(/** @type{Element|MouseEvent|Event} */(obj), this._element);
1208
+ };
1209
+
1210
+ /**
1211
+ * {@link ILayoutGrid#getContentWidth}
1212
+ * @inheritDoc
1213
+ */
1214
+ LayoutGrid.prototype.getContentWidth = function () {
1215
+ return this._trackX.getTrackSize();
1216
+ };
1217
+
1218
+ /**
1219
+ * {@link ILayoutGrid#getContentHeight}
1220
+ * @inheritDoc
1221
+ */
1222
+ LayoutGrid.prototype.getContentHeight = function () {
1223
+ var layoutSize = this._trackY.getTrackSize();
1224
+
1225
+ if (layoutSize <= 0) { // All of the cell has default size of zero
1226
+ if (this._colCount * this.getVisibleRowCount() > 0) {
1227
+ var column = this._columns[0];
1228
+ var bottomCell = column.getCell(this._rowCount - 1);
1229
+ var bottom = bottomCell.getTop() + bottomCell.getHeight();
1230
+
1231
+ return bottom - column.getCell(0).getTop();
1232
+ }
1233
+ }
1234
+
1235
+ return layoutSize;
1236
+ };
1237
+
1238
+ /**
1239
+ * {@link ILayoutGrid#getCellsByRowIndex}
1240
+ * @inheritDoc
1241
+ */
1242
+ LayoutGrid.prototype.getCellsByRowIndex = function (rowIndex) {
1243
+ if (rowIndex < 0 || rowIndex >= this._rowCount) {
1244
+ return null;
1245
+ }
1246
+
1247
+ var ary = new Array(this._colCount);
1248
+
1249
+ for (var c = 0; c < this._colCount; ++c) {
1250
+ ary[c] = this._columns[c].getCell(rowIndex);
1251
+ }
1252
+
1253
+ return ary;
1254
+ };
1255
+
1256
+ /**
1257
+ * {@link ILayoutGrid#disableHorizontalGridLine}
1258
+ * @inheritDoc
1259
+ */
1260
+ LayoutGrid.prototype.disableHorizontalGridLine = function (opt_bool) {
1261
+ this.enableClass("no-horizontal-grid-line", opt_bool !== false);
1262
+ };
1263
+
1264
+ /**
1265
+ * {@link ILayoutGrid#disableVerticalGridLine}
1266
+ * @inheritDoc
1267
+ */
1268
+ LayoutGrid.prototype.disableVerticalGridLine = function (opt_bool) {
1269
+ this.enableClass("no-vertical-grid-line", opt_bool !== false);
1270
+ };
1271
+
1272
+ /**
1273
+ * {@link ILayoutGrid#enableShading}
1274
+ * @inheritDoc
1275
+ */
1276
+ LayoutGrid.prototype.enableShading = function (enabled) {
1277
+ if (enabled !== false) {
1278
+ this.addClass("tr-even-shading");
1279
+ } else {
1280
+ this.removeClass("tr-even-shading");
1281
+ this.removeClass("tr-odd-shading");
1282
+ }
1283
+ };
1284
+
1285
+ /**
1286
+ * {@link ILayoutGrid#setTransposedShading}
1287
+ * @inheritDoc
1288
+ */
1289
+ LayoutGrid.prototype.setTransposedShading = function (enabled) {
1290
+ this.enableClass("transposed-shading", enabled !== false);
1291
+ };
1292
+
1293
+ /**
1294
+ * {@link ILayoutGrid#enableRowHighlighting}
1295
+ * @inheritDoc
1296
+ */
1297
+ LayoutGrid.prototype.enableRowHighlighting = function (opt_bool) {
1298
+ if (opt_bool == null) {
1299
+ opt_bool = true;
1300
+ }
1301
+
1302
+ if (this._rowHighlightEnabled === opt_bool) {
1303
+ return;
1304
+ }
1305
+
1306
+ this._rowHighlightEnabled = opt_bool;
1307
+
1308
+ if (this._rowHighlightEnabled) {
1309
+ this.listen("mousemove", this._onMouseMove);
1310
+ this.listen("mouseout", this._onMouseOut);
1311
+ } else {
1312
+ this.setRowHighlight(-1);
1313
+ this.unlisten("mousemove", this._onMouseMove);
1314
+ this.unlisten("mouseout", this._onMouseOut);
1315
+ }
1316
+ };
1317
+
1318
+ /**
1319
+ * {@link ILayoutGrid#getRowHighlight}
1320
+ * @inheritDoc
1321
+ */
1322
+ LayoutGrid.prototype.getRowHighlight = function () {
1323
+ return this._rowHighlightIndex;
1324
+ };
1325
+
1326
+ /**
1327
+ * {@link ILayoutGrid#setRowHighlight}
1328
+ * @inheritDoc
1329
+ */
1330
+ LayoutGrid.prototype.setRowHighlight = function (rowIndex) {
1331
+ if (!this._rowHighlightEnabled || rowIndex < -1 || rowIndex >= this._rowCount) {
1332
+ rowIndex = -1;
1333
+ }
1334
+
1335
+ if (this._rowHighlightIndex === rowIndex) {
1336
+ return;
1337
+ }
1338
+
1339
+ var prevIndex = this._rowHighlightIndex;
1340
+
1341
+ this._rowHighlightIndex = rowIndex;
1342
+
1343
+ for (var i = this._highlightedCells.length; --i >= 0;) {
1344
+ this._highlightedCells[i].removeClass("highlighted-row"); // This will guarantee that there is no left over highlighted cell
1345
+ }
1346
+
1347
+ if (rowIndex >= 0 && rowIndex < this._rowCount) {
1348
+ this._highlightedCells.length = this._colCount;
1349
+
1350
+ for (var c = this._colCount; --c >= 0;) {
1351
+ var cell = this._columns[c].getCell(rowIndex);
1352
+
1353
+ this._highlightedCells[c] = cell;
1354
+ cell.addClass("highlighted-row");
1355
+ }
1356
+ } else {
1357
+ this._highlightedCells.length = 0;
1358
+ }
1359
+
1360
+ if (this._hasListener("rowHighlighted")) {
1361
+ var e = {};
1362
+
1363
+ e["prevRowIndex"] = prevIndex;
1364
+ e["rowIndex"] = rowIndex;
1365
+ this._dispatch("rowHighlighted", e);
1366
+ }
1367
+ };
1368
+
1369
+ /**
1370
+ * {@link ILayoutGrid#getSelectedRows}
1371
+ * @inheritDoc
1372
+ */
1373
+ LayoutGrid.prototype.getSelectedRows = function () {
1374
+ if (this.getSelectedRowCount() > 0) {
1375
+ return this._selectionList.getAllSelections();
1376
+ }
1377
+
1378
+ return null;
1379
+ };
1380
+
1381
+ /**
1382
+ * {@link ILayoutGrid#getSelectedRowCount}
1383
+ * @inheritDoc
1384
+ */
1385
+ LayoutGrid.prototype.getSelectedRowCount = function () {
1386
+ return this._selectionList.getSelectionCount();
1387
+ };
1388
+
1389
+ /**
1390
+ * {@link ILayoutGrid#isSelectedRow}
1391
+ * @inheritDoc
1392
+ */
1393
+ LayoutGrid.prototype.isSelectedRow = function (at) {
1394
+ return this._selectionList.getSelection(at);
1395
+ };
1396
+
1397
+ /**
1398
+ * {@link ILayoutGrid#setSelectedRow}
1399
+ * @inheritDoc
1400
+ */
1401
+ LayoutGrid.prototype.setSelectedRow = function (rowIndex, opt_selected) {
1402
+ if (rowIndex < 0 || rowIndex >= this._rowCount) {
1403
+ return;
1404
+ }
1405
+
1406
+ this._selectionList.setSelection(rowIndex, opt_selected);
1407
+ this._updateSelectionUI(rowIndex);
1408
+ };
1409
+
1410
+ /**
1411
+ * {@link ILayoutGrid#selectSingleRow}
1412
+ * @inheritDoc
1413
+ */
1414
+ LayoutGrid.prototype.selectSingleRow = function (rowIndex) {
1415
+ if (rowIndex < 0 || rowIndex >= this._rowCount) {
1416
+ return;
1417
+ }
1418
+
1419
+ this.clearSelectedRows();
1420
+ this._selectionList.select(rowIndex);
1421
+ this._addSelectionUI(rowIndex);
1422
+ };
1423
+
1424
+ /**
1425
+ * {@link ILayoutGrid#selectRowRange}
1426
+ * @inheritDoc
1427
+ */
1428
+ LayoutGrid.prototype.selectRowRange = function (rowIndex, len) {
1429
+ if (rowIndex < 0 || rowIndex >= this._rowCount) {
1430
+ return;
1431
+ }
1432
+
1433
+ if (rowIndex + len > this._rowCount) {
1434
+ len = this._rowCount - rowIndex;
1435
+ }
1436
+
1437
+ this._selectionList.selectRange(rowIndex, len);
1438
+
1439
+ for (var r = 0; r < len; ++r) {
1440
+ this._addSelectionUI(r + rowIndex);
1441
+ }
1442
+ };
1443
+
1444
+ /**
1445
+ * {@link ILayoutGrid#clearSelectedRows}
1446
+ * @inheritDoc
1447
+ */
1448
+ LayoutGrid.prototype.clearSelectedRows = function () {
1449
+ var count = this._selectionList.getSelectionCount();
1450
+
1451
+ if (count) {
1452
+ var sels = this._selectionList.getAllSelections(); // Slow
1453
+
1454
+ this._selectionList.clearAllSelections();
1455
+
1456
+ for (var i = 0; i < count; ++i) {
1457
+ this._removeSelectionUI(sels[i]);
1458
+ }
1459
+
1460
+ return count;
1461
+ }
1462
+
1463
+ return 0;
1464
+ };
1465
+
1466
+ /**
1467
+ * {@link ILayoutGrid#getFirstSelectedRow}
1468
+ * @inheritDoc
1469
+ */
1470
+ LayoutGrid.prototype.getFirstSelectedRow = function () {
1471
+ return this._selectionList.getFirstSelectedIndex();
1472
+ };
1473
+
1474
+ /**
1475
+ * {@link ILayoutGrid#getLastSelectedRow}
1476
+ * @inheritDoc
1477
+ */
1478
+ LayoutGrid.prototype.getLastSelectedRow = function () {
1479
+ return this._selectionList.getLastSelectedIndex();
1480
+ };
1481
+
1482
+ /**
1483
+ * {@link ILayoutGrid#getRowAnchor}
1484
+ * @inheritDoc
1485
+ */
1486
+ LayoutGrid.prototype.getRowAnchor = function () {
1487
+ return this._selectionList.getSelectionAnchor();
1488
+ };
1489
+
1490
+ /**
1491
+ * {@link ILayoutGrid#setRowAnchor}
1492
+ * @inheritDoc
1493
+ */
1494
+ LayoutGrid.prototype.setRowAnchor = function (at) {
1495
+ this._selectionList.setSelectionAnchor(at);
1496
+ };
1497
+
1498
+ /**
1499
+ * @inheritDoc
1500
+ */
1501
+ LayoutGrid.prototype.activateColumn = function (colIndex, opt_bool) {
1502
+ var column = this._columns[colIndex];
1503
+
1504
+ if (column) {
1505
+ var dirty = column.activate(opt_bool);
1506
+ if (opt_bool && dirty && this._rightSpace) {
1507
+ var pn = this._rightSpace.parentNode;
1508
+ if (pn) {
1509
+ pn.appendChild(this._rightSpace);
1510
+ }
1511
+ }
1512
+ }
1513
+ };
1514
+
1515
+ /**
1516
+ * {@link ILayoutGrid#activateRows}
1517
+ * @inheritDoc
1518
+ */
1519
+ LayoutGrid.prototype.activateRows = function () {
1520
+ this._onEnterDocument();
1521
+ };
1522
+
1523
+ /**
1524
+ * @inheritDoc
1525
+ */
1526
+ LayoutGrid.prototype.moveRowsToTop = function (numRows) {
1527
+ this._ctxRows.moveItemsToTop(numRows);
1528
+ this._stretchedCells.moveCellsToTop(numRows);
1529
+ for (var c = 0; c < this._colCount; ++c) {
1530
+ this._columns[c].moveCellsToTop(numRows);
1531
+ }
1532
+ };
1533
+
1534
+ /**
1535
+ * {@link ILayoutGrid#getFirstIndexInView}
1536
+ * @inheritDoc
1537
+ */
1538
+ LayoutGrid.prototype.getFirstIndexInView = function () {
1539
+ return 0;
1540
+ };
1541
+
1542
+ /**
1543
+ * {@link ILayoutGrid#getLastIndexInView}
1544
+ * @inheritDoc
1545
+ */
1546
+ LayoutGrid.prototype.getLastIndexInView = function () {
1547
+ return this._availableRowCount - 1;
1548
+ };
1549
+
1550
+ /**
1551
+ * {@link ILayoutGrid#isInCurrentView}
1552
+ * @inheritDoc
1553
+ */
1554
+ LayoutGrid.prototype.isInCurrentView = function (index) {
1555
+ return this._rowCount === 0 ? false : (index >= 0 && index < this._rowCount);
1556
+ };
1557
+
1558
+ /**
1559
+ * {@link ILayoutGrid#getFrozenLayout}
1560
+ * @ignore
1561
+ * @inheritDoc
1562
+ */
1563
+ LayoutGrid.prototype.getFrozenLayout = function () {
1564
+ return this._frozenLayout;
1565
+ };
1566
+
1567
+ /**
1568
+ * {@link ILayoutGrid#setFrozenLayout}
1569
+ * @ignore
1570
+ * @inheritDoc
1571
+ */
1572
+ LayoutGrid.prototype.setFrozenLayout = function (bool) {
1573
+ if (!this.isVisible()) {
1574
+ bool = true;
1575
+ }
1576
+
1577
+ if (this._frozenLayout !== bool) {
1578
+ this._frozenLayout = bool;
1579
+
1580
+ if (!this._frozenLayout) {
1581
+ this._syncLayoutToColumns(0);
1582
+ this._syncLayoutToRows(0, this._rowCount);
1583
+ this._dispatchRowHeightChangedEvent(0, this._rowCount);
1584
+ }
1585
+ }
1586
+ };
1587
+
1588
+ /**
1589
+ * {@link ILayoutGrid#getColumn}
1590
+ * @inheritDoc
1591
+ */
1592
+ LayoutGrid.prototype.getColumn = function (index) {
1593
+ return this._columns[index] || null;
1594
+ };
1595
+
1596
+ /**
1597
+ * {@link ILayoutGrid#insertColumn}
1598
+ * @ignore
1599
+ * @inheritDoc
1600
+ */
1601
+ LayoutGrid.prototype.insertColumn = function (index, opt_json) {
1602
+ if (index < 0) {
1603
+ index = 0;
1604
+ } else if (index > this._colCount) {
1605
+ index = this._colCount;
1606
+ }
1607
+
1608
+ var atTheMiddle = index < this._colCount;
1609
+ var cellSpans = this._cellSpans.getAllSpans();
1610
+
1611
+ this._updateCellSpans(cellSpans, false); // Clear all styling
1612
+ this._trackX.insertLane(index, opt_json);
1613
+ this._colCount = this._trackX.getLaneCount();
1614
+
1615
+ var column = this._newColumn(index);
1616
+
1617
+ this._updateColumnIndices();
1618
+
1619
+ if (this._cellSpans.shiftColumn(index, 1)) {
1620
+ cellSpans = this._cellSpans.getAllSpans();
1621
+ }
1622
+
1623
+ this._updateCellSpans(cellSpans, true); // Restore all styling
1624
+ this._calculateStretchSize(true);
1625
+ this._stretchedCells.updateXAxis();
1626
+ // this._syncLayoutToColumns(index); // Core grid will guarantee updating width to each section
1627
+
1628
+ // Select the newly added cell, if there is a row selection
1629
+ var count = this._selectionList.getSelectionCount();
1630
+
1631
+ if (count) {
1632
+ var sels = this._selectionList.getAllSelections(); // Slow
1633
+
1634
+ for (var i = sels.length; --i >= 0;) {
1635
+ var cell = column.getCell(sels[i]);
1636
+
1637
+ if (cell) {
1638
+ cell.addClass("selected-row");
1639
+ }
1640
+ }
1641
+ }
1642
+
1643
+ column.activate(atTheMiddle || !this._colVir);
1644
+
1645
+ return column;
1646
+ };
1647
+
1648
+ /**
1649
+ * {@link ILayoutGrid#removeColumnAt}
1650
+ * @ignore
1651
+ * @inheritDoc
1652
+ */
1653
+ LayoutGrid.prototype.removeColumnAt = function (index) {
1654
+ var definition = this._trackX.removeLaneAt(index);
1655
+
1656
+ if (definition == null) {
1657
+ return null;
1658
+ }
1659
+
1660
+ var cellSpans = this._cellSpans.getAllSpans();
1661
+
1662
+ this._updateCellSpans(cellSpans, false); // Clear all styling
1663
+ this._colCount = this._trackX.getLaneCount();
1664
+
1665
+ var column = this._columns.splice(index, 1)[0];
1666
+
1667
+ column.dispose();
1668
+ definition["control"] = column;
1669
+ this._updateColumnIndices();
1670
+
1671
+ if (this._cellSpans.removeColumn(index)) {
1672
+ cellSpans = this._cellSpans.getAllSpans();
1673
+ }
1674
+
1675
+ this._updateCellSpans(cellSpans, true); // Restore all styling
1676
+ this._syncLayoutToColumns(index);
1677
+
1678
+ if (index >= this._colCount) {
1679
+ this._updateViewWidth();
1680
+ }
1681
+
1682
+ return definition;
1683
+ };
1684
+
1685
+ /**
1686
+ * {@link ILayoutGrid#moveColumn}
1687
+ * @ignore
1688
+ * @inheritDoc
1689
+ */
1690
+ LayoutGrid.prototype.moveColumn = function (from, to) {
1691
+ if (from < 0) {
1692
+ from = 0;
1693
+ } else if (from >= this._colCount) {
1694
+ return;
1695
+ }
1696
+
1697
+ if (to < 0) {
1698
+ to = 0;
1699
+ } else if (to >= this._colCount) {
1700
+ to = this._colCount - 1;
1701
+ }
1702
+
1703
+ if (from === to) {
1704
+ return;
1705
+ }
1706
+
1707
+ var cellSpans = this._cellSpans.getAllSpans();
1708
+
1709
+ this._updateCellSpans(cellSpans, false); // Clear all styling
1710
+ this._trackX.moveLane(from, to);
1711
+
1712
+ var movedColumn = this._columns[from];
1713
+
1714
+ Util.moveArrayItem(this._columns, from, to);
1715
+
1716
+ var nextSibling = this._columns[to + 1] || null;
1717
+ movedColumn.insertBefore(nextSibling);
1718
+
1719
+ if (this._rightSpace) {
1720
+ var pn = this._rightSpace.parentNode;
1721
+
1722
+ if (pn) {
1723
+ pn.appendChild(this._rightSpace);
1724
+ }
1725
+ }
1726
+
1727
+ this._updateColumnIndices();
1728
+ this._updateCellSpans(cellSpans, true); // Restore all styling
1729
+
1730
+ var minIndex = (from < to) ? from : to;
1731
+
1732
+ this._syncLayoutToColumns(minIndex);
1733
+ };
1734
+
1735
+ /**
1736
+ * {@link ILayoutGrid#enableRowVirtualization}
1737
+ * @ignore
1738
+ * @inheritDoc
1739
+ */
1740
+ LayoutGrid.prototype.enableRowVirtualization = function () {
1741
+ console.log("WARNING: This function is deprecated");
1742
+ };
1743
+
1744
+ /**
1745
+ * {@link ILayoutGrid#enableRowVirtualization}
1746
+ * @ignore
1747
+ * @inheritDoc
1748
+ */
1749
+ LayoutGrid.prototype.enableColumnVirtualization = function (bool) {
1750
+ this._colVir = bool !== false;
1751
+ };
1752
+
1753
+ /**
1754
+ * {@link ILayoutGrid#getColumnIndex}
1755
+ * @ignore
1756
+ * @inheritDoc
1757
+ */
1758
+ LayoutGrid.prototype.getColumnIndex = function (colElem) {
1759
+ if (colElem) {
1760
+ if(colElem["stretched"]) {
1761
+ return this._stretchedCells.getColumnIndex(colElem);
1762
+ }
1763
+ var len = this._columns.length;
1764
+
1765
+ for (var i = 0; i < len; ++i) {
1766
+ if (this._columns[i].getElement() === colElem) {
1767
+ return i;
1768
+ }
1769
+ }
1770
+ }
1771
+
1772
+ return -1;
1773
+ };
1774
+
1775
+ /**
1776
+ * {@link ILayoutGrid#getCellIndex}
1777
+ * @ignore
1778
+ * @inheritDoc
1779
+ */
1780
+ LayoutGrid.prototype.getCellIndex = function (colIndex, cellElem) {
1781
+ if (cellElem) {
1782
+ if(cellElem["stretched"]) {
1783
+ return this._stretchedCells.getRowIndex(cellElem);
1784
+ }
1785
+
1786
+ var column = this._columns[colIndex];
1787
+ if(column) {
1788
+ return column.getCellIndex(cellElem);
1789
+ }
1790
+ }
1791
+ return -1;
1792
+ };
1793
+
1794
+ /**
1795
+ * {@link ILayoutGrid#getIndex}
1796
+ * @inheritDoc
1797
+ */
1798
+ LayoutGrid.prototype.getIndex = function () {
1799
+ return this._index;
1800
+ };
1801
+
1802
+ /**
1803
+ * {@link ILayoutGrid#setIndex}
1804
+ * @ignore
1805
+ * @inheritDoc
1806
+ */
1807
+ LayoutGrid.prototype.setIndex = function (index) {
1808
+ this._index = index;
1809
+ };
1810
+
1811
+ /**
1812
+ * {@link ILayoutGrid#getRowOffset}
1813
+ * @ignore
1814
+ * @inheritDoc
1815
+ */
1816
+ LayoutGrid.prototype.getRowOffset = function () {
1817
+ return this._rowOffset;
1818
+ };
1819
+
1820
+ /**
1821
+ * {@link ILayoutGrid#setRowOffset}
1822
+ * @ignore
1823
+ * @inheritDoc
1824
+ */
1825
+ LayoutGrid.prototype.setRowOffset = function (index) {
1826
+ this._rowOffset = index;
1827
+ };
1828
+
1829
+ /**
1830
+ * {@link ILayoutGrid#updateLayout}
1831
+ * @ignore
1832
+ * @inheritDoc
1833
+ */
1834
+ LayoutGrid.prototype.updateLayout = function () {};
1835
+
1836
+ /**
1837
+ * {@link ILayoutGrid#stretchCell}
1838
+ * @inheritDoc
1839
+ */
1840
+ LayoutGrid.prototype.stretchCell = function (cellRef, rowIndex, opt_stretching, onlyToTheRight) {
1841
+ var colIndex = -1;
1842
+ if (typeof cellRef === "number") {
1843
+ colIndex = cellRef;
1844
+ if(rowIndex == null) {
1845
+ rowIndex = 0;
1846
+ }
1847
+ } else if (cellRef) {
1848
+ if(cellRef["stretched"]) {
1849
+ colIndex = this._stretchedCells.getColumnIndex(cellRef);
1850
+ if(rowIndex == null) {
1851
+ rowIndex = this._stretchedCells.getRowIndex(cellRef);
1852
+ }
1853
+ } else if(cellRef["getParent"]) {
1854
+ colIndex = this.getColumnIndex(cellRef["getParent"]());
1855
+ }
1856
+ }
1857
+ if(colIndex < 0 || rowIndex < 0 || rowIndex == null) {
1858
+ return null;
1859
+ }
1860
+
1861
+ var stretching = (opt_stretching !== false);
1862
+ var cell = null;
1863
+
1864
+ if (stretching) {
1865
+ var coverLayer = this._coverLayer;
1866
+ if(!coverLayer) {
1867
+ coverLayer = this._coverLayer = document.createElement("div");
1868
+ coverLayer.className = "cover-layer";
1869
+ this._updateLayers();
1870
+ }
1871
+
1872
+ this._calculateStretchSize();
1873
+ cell = this._stretchedCells.stretchCell(rowIndex, onlyToTheRight ? colIndex : 0);
1874
+ cell.setParent(coverLayer);
1875
+ } else {
1876
+ cell = this._stretchedCells.unstretchCell(rowIndex);
1877
+ }
1878
+ return cell;
1879
+ };
1880
+
1881
+ /**
1882
+ * {@link ILayoutGrid#unstretchCell}
1883
+ * @inheritDoc
1884
+ */
1885
+ LayoutGrid.prototype.unstretchCell = function (cellRef, rowIndex) {
1886
+ return this.stretchCell(cellRef, rowIndex, false);
1887
+ };
1888
+ /**
1889
+ * {@link ILayoutGrid#unstretchAllCells}
1890
+ * @inheritDoc
1891
+ */
1892
+ LayoutGrid.prototype.unstretchAllCells = function () {
1893
+ this._stretchedCells.unstretchAllCells();
1894
+ };
1895
+
1896
+ /**
1897
+ * {@link ILayoutGrid#getStretchedCell}
1898
+ * @inheritDoc
1899
+ */
1900
+ LayoutGrid.prototype.getStretchedCell = function (cellRef, rowIndex) {
1901
+ if(rowIndex == null) {
1902
+ if(typeof cellRef === "number") {
1903
+ rowIndex = cellRef;
1904
+ } else {
1905
+ rowIndex = this._stretchedCells.getRowIndex(cellRef);
1906
+ }
1907
+ }
1908
+
1909
+ return (typeof rowIndex === "number") ? this._stretchedCells.getCell(rowIndex) : null;
1910
+ };
1911
+ /**
1912
+ * {@link ILayoutGrid#getStretchedCells}
1913
+ * @inheritDoc
1914
+ */
1915
+ LayoutGrid.prototype.getStretchedCells = function () { // TODO: Deprecate this method
1916
+ return this._stretchedCells.getCells();
1917
+ };
1918
+
1919
+ /** {@link ILayoutGrid#updateStretchedCells}
1920
+ * @inheritDoc */
1921
+ LayoutGrid.prototype.updateStretchedCells = function () {
1922
+ this._updateLayers();
1923
+ var childCount = this._coverLayer ? this._coverLayer.children.length : 0; // TODO: Currently assume only stretched cells exists
1924
+ if (childCount <= 0) {
1925
+ return false;
1926
+ }
1927
+ this._calculateStretchSize(true);
1928
+
1929
+ this._stretchedCells.updateCells();
1930
+ return childCount ? true : false;
1931
+ };
1932
+
1933
+ /** @private
1934
+ * @param {boolean=} forceRecal
1935
+ */
1936
+ LayoutGrid.prototype._calculateStretchSize = function (forceRecal) {
1937
+ var ctx = this._ctx;
1938
+ var stretchSize = forceRecal ? 0 : this._stretchedCells.getStretchSize();
1939
+ if(!stretchSize && ctx) {
1940
+ if(ctx["getWidth"]) {
1941
+ stretchSize = ctx["getWidth"]();
1942
+ var contentWidth = this.getContentWidth(); // TODO: Subtract 1px for border
1943
+ if(contentWidth < stretchSize) { // If view width is larger than actual content
1944
+ stretchSize = contentWidth;
1945
+ }
1946
+ this._stretchedCells.setStretchSize(stretchSize);
1947
+ }
1948
+ }
1949
+ };
1950
+
1951
+ /**
1952
+ * {@link ILayoutGrid#getColumnHost}
1953
+ * @inheritDoc
1954
+ */
1955
+ LayoutGrid.prototype.getColumnHost = function () {
1956
+ return this._element;
1957
+ };
1958
+
1959
+ /**
1960
+ * {@link ILayoutGrid#setHidingMethod}
1961
+ * @inheritDoc
1962
+ */
1963
+ LayoutGrid.prototype.setHidingMethod = function (method) {
1964
+ this._hidingMethod = method;
1965
+ };
1966
+
1967
+ /**
1968
+ * {@link ILayoutGrid#getHidingMethod}
1969
+ * @inheritDoc
1970
+ */
1971
+ LayoutGrid.prototype.getHidingMethod = function () {
1972
+ return this._hidingMethod;
1973
+ };
1974
+
1975
+ /**
1976
+ * {@link ILayoutGrid#setColumnVisibility}
1977
+ * @inheritDoc
1978
+ */
1979
+ LayoutGrid.prototype.setColumnVisibility = function (colIndex, bool, flag) {
1980
+ if (this._trackX.hideLane(colIndex, !bool, flag)) {
1981
+ this._syncLayoutToColumns(colIndex);
1982
+
1983
+ return true;
1984
+ }
1985
+
1986
+ return false;
1987
+ };
1988
+
1989
+ /**
1990
+ * {@link ILayoutGrid#setColumnVisibility}
1991
+ * @inheritDoc
1992
+ */
1993
+ LayoutGrid.prototype.getRowLayout = function () {
1994
+ return this._trackY;
1995
+ };
1996
+
1997
+ /**
1998
+ * {@link ILayoutGrid#reserveRightSpace}
1999
+ * @inheritDoc
2000
+ */
2001
+ LayoutGrid.prototype.reserveRightSpace = function (size) {
2002
+ if (size && size > 0) {
2003
+ if (!this._rightSpace) {
2004
+ var rs = this._rightSpace = document.createElement("div");
2005
+ rs.className = "tr-reserved-space";
2006
+ rs.style.height = this.getContentHeight() + "px";
2007
+
2008
+ // warning: The element's style is not completed by this function
2009
+ // so this method should not be called directly in the application level.
2010
+ this._updateLayers();
2011
+ }
2012
+
2013
+ this._rightSpace.style.width = size + "px";
2014
+
2015
+ this._updateViewWidth();
2016
+ } else if (this._rightSpace) {
2017
+ var pn = this._rightSpace.parentNode;
2018
+
2019
+ if (pn) {
2020
+ pn.removeChild(this._rightSpace);
2021
+ }
2022
+
2023
+ this._rightSpace = null;
2024
+
2025
+ this._updateViewWidth();
2026
+ }
2027
+
2028
+ return this._rightSpace;
2029
+ };
2030
+
2031
+ /**
2032
+ * @public
2033
+ * @ignore
2034
+ * @param {boolean} absolutePos if true, the right space element will be positioned absolutely
2035
+ */
2036
+ LayoutGrid.prototype._updateRightSpaceStyle = function(absolutePos) {
2037
+ var rs = this._rightSpace;
2038
+ if (absolutePos) {
2039
+ rs.style.top = this._trackY.getLaneStart(this._activeRow) + "px";
2040
+ rs.style.left = this._trackX.getLaneStart(this._colCount) + "px";
2041
+ rs.style.position = "";
2042
+ rs.style.display = "";
2043
+ } else {
2044
+ rs.style.position = "static";
2045
+ rs.style.display = "inline-block";
2046
+ }
2047
+ };
2048
+
2049
+ /** @public
2050
+ * @ignore
2051
+ */
2052
+ LayoutGrid.prototype._updateLayers = function() {
2053
+ if(this._rightSpace) {
2054
+ var pn = this._rightSpace.parentNode; // rightSpace can be located in two places: layout grid and pane slider
2055
+ if(pn) {
2056
+ pn.appendChild(this._rightSpace);
2057
+ } else {
2058
+ this._element.appendChild(this._rightSpace);
2059
+ }
2060
+ }
2061
+ if(this._coverLayer) {
2062
+ this._element.appendChild(this._coverLayer); // The layer should always on top
2063
+ }
2064
+ };
2065
+
2066
+ /**
2067
+ * {@link ILayoutGrid#reserveRightSpace}
2068
+ * @inheritDoc
2069
+ */
2070
+ LayoutGrid.prototype.getReservedSpace = function () {
2071
+ return this._rightSpace;
2072
+ };
2073
+
2074
+ /**
2075
+ * {@link ILayoutGrid#getComputedStyle}
2076
+ * @inheritDoc
2077
+ */
2078
+ LayoutGrid.prototype.getComputedStyle = function () {
2079
+ var elem = this._element;
2080
+
2081
+ return elem.offsetParent ? getComputedStyle(elem) : null;
2082
+ };
2083
+
2084
+ /**
2085
+ * {@link ILayoutGrid#isColumnActive}
2086
+ * @inheritDoc
2087
+ */
2088
+ LayoutGrid.prototype.isColumnActive = function (colIndex) {
2089
+ var column = this._columns[colIndex];
2090
+
2091
+ return column ? column.isActive() : false;
2092
+ };
2093
+
2094
+ /**
2095
+ * {@link ILayoutGrid#setRowAttributes}
2096
+ * @inheritDoc
2097
+ */
2098
+ LayoutGrid.prototype.setRowAttributes = function (rowIndex, func) {
2099
+ if (rowIndex < 0 || (rowIndex >= this._rowCount)) {
2100
+ return;
2101
+ }
2102
+
2103
+ for (var c = 0; c < this._colCount; ++c) {
2104
+ var result = func(c);
2105
+ for (var i = result.length; --i >= 0;) {
2106
+ var entry = result[i];
2107
+ var cell = this._columns[c].getCell(rowIndex);
2108
+
2109
+ if (!cell) {
2110
+ continue;
2111
+ }
2112
+
2113
+ if (entry["remove"]) {
2114
+ cell.removeAttribute(entry["attribute"]);
2115
+ } else {
2116
+ cell.setAttribute(entry["attribute"], entry["value"]);
2117
+ }
2118
+ }
2119
+ }
2120
+ };
2121
+ /** @public
2122
+ * @param {number} rowIndex
2123
+ * @return {Object}
2124
+ */
2125
+ LayoutGrid.prototype.getContextRow = function (rowIndex) {
2126
+ return this._ctxRows.getItem(rowIndex);
2127
+ };
2128
+
2129
+
2130
+ /**
2131
+ * @private
2132
+ * @param {number} indexX
2133
+ * @param {number} indexY
2134
+ * @return {Cell}
2135
+ */
2136
+ LayoutGrid.prototype._getCell = function (indexX, indexY) {
2137
+ var column = this._columns[indexX];
2138
+
2139
+ return (column) ? column.getCell(indexY) : null;
2140
+ };
2141
+
2142
+ /**
2143
+ * @private
2144
+ * @param {number} from
2145
+ * @param {number} to
2146
+ */
2147
+ LayoutGrid.prototype._insertCells = function (from, to) {
2148
+ this._activeRow = from;
2149
+ this._activeRowEnd = to;
2150
+
2151
+ var top = this._trackY.getLaneStart(from);
2152
+
2153
+ for (var c = 0; c < this._colCount; ++c) {
2154
+ var column = this._columns[c];
2155
+
2156
+ if (!column.hasCollapsedCells()) {
2157
+ column.setTop(top);
2158
+ }
2159
+
2160
+ column.activateCells(from, to);
2161
+ }
2162
+
2163
+ if (this._rightSpace) {
2164
+ this._rightSpace.style.top = top + "px";
2165
+ }
2166
+
2167
+ if (to > this._availableRowCount) {
2168
+ var e = {};
2169
+
2170
+ e["prevRowIndex"] = this._availableRowCount;
2171
+ e["rowIndex"] = to;
2172
+
2173
+ this._availableRowCount = to;
2174
+ this._dispatch("rowAvailable", e);
2175
+ }
2176
+ };
2177
+
2178
+ /**
2179
+ * @private
2180
+ * @param {number} indexX
2181
+ * @return {!ElementWrapper}
2182
+ */
2183
+ LayoutGrid.prototype._newColumn = function (indexX) {
2184
+ var column = new Column(this._virOwner || this);
2185
+
2186
+ column.setHeight(this._trackY.getDefaultLaneSize());
2187
+ column.setCellCount(this._rowCount);
2188
+ column.setTop(this._trackY.getLaneStart(this._activeRow));
2189
+ column.activateCells(this._activeRow, this._activeRowEnd);
2190
+
2191
+ for (var r = 0; r < this._rowCount; ++r) {
2192
+ if (!this._trackY.isAtDefaultSize(r)) {
2193
+ column.getCell(r).setHeight(this._trackY.getLaneSize(r));
2194
+ }
2195
+ }
2196
+
2197
+ if (indexX >= this._columns.length) {
2198
+ this._columns.push(column);
2199
+
2200
+ column.setParent(this._element);
2201
+ } else {
2202
+ this._columns.splice(indexX, 0, column);
2203
+
2204
+ var nextColumn = this._columns[indexX + 1];
2205
+
2206
+ column.insertBefore(nextColumn);
2207
+ }
2208
+
2209
+ if (this._rightSpace) {
2210
+ var pn = this._rightSpace.parentNode;
2211
+
2212
+ if (pn) {
2213
+ pn.appendChild(this._rightSpace);
2214
+ }
2215
+ }
2216
+
2217
+ return column;
2218
+ };
2219
+
2220
+ /**
2221
+ * @private
2222
+ */
2223
+ LayoutGrid.prototype._updateViewWidth = function () { // This method is also called by _syncLayoutToColumns()
2224
+ if (this._frozenLayout) {
2225
+ return;
2226
+ }
2227
+
2228
+ this._calculateStretchSize(true);
2229
+ this._stretchedCells.updateXAxis();
2230
+ var contentWidth = this.getContentWidth();
2231
+
2232
+ if (this._rightSpace) {
2233
+ contentWidth += this._rightSpace.offsetWidth;
2234
+ }
2235
+ this._element.style.width = contentWidth + "px"; // View is kept in sync with content size
2236
+ };
2237
+
2238
+ /**
2239
+ * @private
2240
+ */
2241
+ LayoutGrid.prototype._updateViewHeight = function () {
2242
+ if (this._frozenLayout) {
2243
+ return;
2244
+ }
2245
+
2246
+ var contentHeight = this.getContentHeight();
2247
+
2248
+ this._element.style.height = contentHeight + "px"; // View is kept in sync with content size
2249
+
2250
+ if (this._rightSpace) {
2251
+ this._rightSpace.style.height = contentHeight + "px";
2252
+ }
2253
+ };
2254
+
2255
+ /** @private
2256
+ */
2257
+ LayoutGrid.prototype._updateColumnIndices = function () {
2258
+ var columnCount = this._columns.length;
2259
+ var first = this._columns[0];
2260
+
2261
+ if (first !== this._firstColumn) {
2262
+ if (this._firstColumn) {
2263
+ this._firstColumn.removeClass("first");
2264
+ }
2265
+
2266
+ this._firstColumn = first;
2267
+
2268
+ if (this._firstColumn) {
2269
+ this._firstColumn.addClass("first");
2270
+ }
2271
+ }
2272
+
2273
+ var last = this._columns[columnCount - 1];
2274
+
2275
+ if (last !== this._lastColumn) {
2276
+ if (this._lastColumn) {
2277
+ this._lastColumn.removeClass("last");
2278
+ }
2279
+
2280
+ this._lastColumn = last;
2281
+
2282
+ if (this._lastColumn) { this._lastColumn.addClass("last"); }
2283
+ }
2284
+
2285
+ var sibling = null;
2286
+
2287
+ for (var i = this._columns.length; --i >= 0;) {
2288
+ var column = this._columns[i];
2289
+
2290
+ column.setNextSibling(sibling);
2291
+ sibling = column;
2292
+ }
2293
+ };
2294
+
2295
+ /**
2296
+ * @private
2297
+ * @param {number} from
2298
+ * @returns {boolean}
2299
+ */
2300
+ LayoutGrid.prototype._syncLayoutToColumns = function (from) {
2301
+ if (this._frozenLayout) {
2302
+ return false;
2303
+ }
2304
+
2305
+ if (this._rightSpace) { // Reserved right space must be updated regardless of the given index
2306
+ this._rightSpace.style.left = this._trackX.getLaneStart(this._colCount) + "px";
2307
+ }
2308
+
2309
+ if (from >= this._colCount) {
2310
+ return false;
2311
+ }
2312
+
2313
+ for (var c = from; c < this._colCount; ++c) {
2314
+ var column = this._columns[c];
2315
+
2316
+ column.setLeft(this._trackX.getLaneStart(c));
2317
+ column.setWidth(this._trackX.getLaneSize(c));
2318
+ }
2319
+
2320
+ this._updateCellSpanLayout(this._cellSpans.getAllSpans());
2321
+ this._updateViewWidth();
2322
+ return true;
2323
+ };
2324
+
2325
+ /**
2326
+ * @private
2327
+ * @param {number} indexY
2328
+ * @param {number} toY Exclusive index of end cell in Y-Axis
2329
+ */
2330
+ LayoutGrid.prototype._syncLayoutToRows = function (indexY, toY) {
2331
+ if (this._frozenLayout) {
2332
+ return;
2333
+ }
2334
+
2335
+ for (var r = indexY; r < toY; ++r) {
2336
+ var height = (this._trackY.isAtDefaultSize(r)) ? -1 : this._trackY.getLaneSize(r);
2337
+
2338
+ for (var c = 0; c < this._colCount; ++c) {
2339
+ this._columns[c].getCell(r).setHeight(height);
2340
+ }
2341
+ }
2342
+
2343
+ this._stretchedCells.updateYAxis();
2344
+ if(indexY) {
2345
+ this._updateCellSpanLayout(this._cellSpans.getAllSpans());
2346
+ } else {
2347
+ this._updateCellSpans(this._cellSpans.getAllSpans(), true); // Re-collapsing cells when spans are set before setting row count
2348
+ }
2349
+ this._updateViewHeight();
2350
+ };
2351
+
2352
+ /**
2353
+ * @private
2354
+ * @param {number} from
2355
+ * @param {number} to
2356
+ */
2357
+ LayoutGrid.prototype._dispatchRowHeightChangedEvent = function (from, to) {
2358
+ if (!this._hasListener("rowHeightChanged")) {
2359
+ return;
2360
+ }
2361
+
2362
+ if (from >= to) {
2363
+ return;
2364
+ }
2365
+
2366
+ var e = {};
2367
+
2368
+ e["rowIndex"] = from;
2369
+ e["changeLength"] = to - from;
2370
+ this._dispatch("rowHeightChanged", e);
2371
+ };
2372
+
2373
+ /**
2374
+ * @private
2375
+ * @param {number} indexX
2376
+ * @param {number} indexY
2377
+ * @param {CellSpan} cellSpan
2378
+ */
2379
+ LayoutGrid.prototype._updateCellSpanSize = function (indexX, indexY, cellSpan) {
2380
+ var cell = this._getCell(indexX, indexY);
2381
+
2382
+ if (cell == null) {
2383
+ return;
2384
+ }
2385
+
2386
+ if (cellSpan && cellSpan.colSpan > 1) {
2387
+ cell.setWidth(this.getCellWidth(indexX, indexY));
2388
+ this._columns[indexX].disableDeactivation(); // HACK: If a cell has column span, the column cannot be virtualized
2389
+ } else {
2390
+ cell.setWidth(-1);
2391
+ }
2392
+
2393
+ if (cellSpan && cellSpan.rowSpan > 1) {
2394
+ cell.setHeight(this.getCellHeight(indexX, indexY)); /////
2395
+ } else {
2396
+ var height = this._trackY.isAtDefaultSize(indexY) ? -1 : this._trackY.getLaneSize(indexY);
2397
+
2398
+ cell.setHeight(height);
2399
+ }
2400
+ };
2401
+
2402
+ /**
2403
+ * @private
2404
+ * @param {Array.<CellSpan>} cellSpans
2405
+ */
2406
+ LayoutGrid.prototype._updateCellSpanLayout = function (cellSpans) {
2407
+ if (cellSpans == null) { return; }
2408
+
2409
+ for (var i = cellSpans.length; --i >= 0; ) {
2410
+ var cellSpan = cellSpans[i];
2411
+
2412
+ this._updateCellSpanSize(cellSpan.indexX, cellSpan.indexY, cellSpan);
2413
+ }
2414
+ };
2415
+
2416
+ /**
2417
+ * @private
2418
+ * @param {number} indexX
2419
+ * @param {number} indexY
2420
+ * @param {!CellSpan} cellSpan
2421
+ * @param {boolean} adding
2422
+ */
2423
+ LayoutGrid.prototype._updateCellSpan = function (indexX, indexY, cellSpan, adding) {
2424
+ this._updateCellSpanSize(indexX, indexY, adding ? cellSpan : null);
2425
+ this._updateCellSpanClass(indexX, indexY, cellSpan.colSpan, cellSpan.rowSpan, adding);
2426
+ };
2427
+
2428
+ /**
2429
+ * @private
2430
+ * @param {number} indexX
2431
+ * @param {number} indexY
2432
+ * @param {number} colSpan
2433
+ * @param {number} rowSpan
2434
+ * @param {boolean} adding
2435
+ */
2436
+ LayoutGrid.prototype._updateCellSpanClass = function (indexX, indexY, colSpan, rowSpan, adding) {
2437
+ var column;
2438
+
2439
+ for (var c = 0; c < colSpan; ++c) {
2440
+ column = this._columns[indexX + c];
2441
+
2442
+ if (!column) {
2443
+ break;
2444
+ }
2445
+
2446
+ column.collapseCells(indexY, rowSpan, adding, (c === 0), (c > 0));
2447
+ }
2448
+
2449
+ var cell = this._getCell(indexX, indexY);
2450
+
2451
+ if (cell) {
2452
+ cell._colSpan = (adding) ? colSpan : 1;
2453
+ cell._rowSpan = (adding) ? rowSpan : 1; // For quick rendering
2454
+ }
2455
+ };
2456
+
2457
+ /**
2458
+ * @private
2459
+ * @param {Array.<CellSpan>} cellSpans
2460
+ * @param {boolean} adding
2461
+ */
2462
+ LayoutGrid.prototype._updateCellSpans = function (cellSpans, adding) {
2463
+ if (cellSpans == null) { return; }
2464
+
2465
+ for (var i = cellSpans.length; --i >= 0; ) {
2466
+ var cellSpan = cellSpans[i];
2467
+
2468
+ this._updateCellSpan(cellSpan.indexX, cellSpan.indexY, cellSpan, adding);
2469
+ }
2470
+ };
2471
+
2472
+ /**
2473
+ * @private
2474
+ * @param {Object} e
2475
+ */
2476
+ LayoutGrid.prototype._onMouseMove = function (e) {
2477
+ var target = e["target"];
2478
+ var colElement = Util.closestElement(target, "column");
2479
+ var colIndex = this.getColumnIndex(colElement);
2480
+ var cellElement = (colIndex >= 0) ? Util.closestElement(target, "cell") : null;
2481
+
2482
+ this.setRowHighlight(this.getCellIndex(colIndex, cellElement));
2483
+ };
2484
+
2485
+ /**
2486
+ * @private
2487
+ * @param {Object} e
2488
+ */
2489
+ LayoutGrid.prototype._onMouseOut = function (e) {
2490
+ var rel = e.relatedTarget;
2491
+
2492
+ if (rel) {
2493
+ var thisElem = this._element;
2494
+
2495
+ while (rel.parentNode !== null) {
2496
+ rel = rel.parentNode;
2497
+
2498
+ if (rel === thisElem) {
2499
+ return;
2500
+ }
2501
+ }
2502
+ }
2503
+
2504
+ this.setRowHighlight(-1);
2505
+ };
2506
+
2507
+ /**
2508
+ * @private
2509
+ * @param {number} rowIndex
2510
+ */
2511
+ LayoutGrid.prototype._updateSelectionUI = function (rowIndex) { // Update UI of the specified row index
2512
+ var selected = this._selectionList.getSelection(rowIndex);
2513
+
2514
+ for (var c = 0; c < this._colCount; ++c) {
2515
+ var cell = this._columns[c].getCell(rowIndex);
2516
+
2517
+ if (cell) {
2518
+ cell.enableClass("selected-row", selected);
2519
+ }
2520
+ }
2521
+ };
2522
+
2523
+ /** @private
2524
+ * @param {number} rowIndex
2525
+ */
2526
+ LayoutGrid.prototype._addSelectionUI = function (rowIndex) {
2527
+ for (var c = 0; c < this._colCount; ++c) {
2528
+ var cell = this._columns[c].getCell(rowIndex);
2529
+
2530
+ if (cell) {
2531
+ cell.addClass("selected-row");
2532
+ }
2533
+ }
2534
+ };
2535
+
2536
+ /**
2537
+ * @private
2538
+ * @param {number} rowIndex
2539
+ */
2540
+ LayoutGrid.prototype._removeSelectionUI = function (rowIndex) {
2541
+ for (var c = 0; c < this._colCount; ++c) {
2542
+ var cell = this._columns[c].getCell(rowIndex);
2543
+
2544
+ if (cell) {
2545
+ cell.removeClass("selected-row");
2546
+ }
2547
+ }
2548
+ };
2549
+
2550
+ /**
2551
+ * @public
2552
+ * @ignore
2553
+ */
2554
+ LayoutGrid.prototype._onEnterDocument = function () {
2555
+ if (!this._initialized && this.getParent()) {
2556
+ for (var c = 0; c < this._colCount; ++c) {
2557
+ this._columns[c].enableAutoStyleUpdating();
2558
+ }
2559
+
2560
+ this._syncLayoutToColumns(0);
2561
+ this._initialized = true;
2562
+ }
2563
+ };
2564
+
2565
+ /** @public
2566
+ * @ignore
2567
+ * @param {*} ctx
2568
+ */
2569
+ LayoutGrid.prototype._setContext = function(ctx) {
2570
+ this._ctx = ctx;
2571
+ };
2572
+
2573
+ /** @public
2574
+ * @ignore
2575
+ * @return {*} ctx
2576
+ */
2577
+ LayoutGrid.prototype._getContext = function () {
2578
+ return this._ctx;
2579
+ };
2580
+
2581
+ /** This is a WORKAROUND to fix Internet Explorer couldn't render top 50% with translateX -50% correctly
2582
+ * @private
2583
+ */
2584
+ LayoutGrid.prototype._resetTransformIETimer = function () {
2585
+ if (Util.isIE) {
2586
+ if(!this._transformIETimer) {
2587
+ this.enableClass("reset-transform");
2588
+ this._transformIETimer = setTimeout(this._onResetTransformIE.bind(this), 20);
2589
+ }
2590
+ }
2591
+ };
2592
+ /** @private
2593
+ */
2594
+ LayoutGrid.prototype._onResetTransformIE = function () {
2595
+ this._transformIETimer = 0;
2596
+ this.enableClass("reset-transform", false);
2597
+ };
2598
+
2599
+ LayoutGrid._proto = LayoutGrid.prototype;
2600
+
2601
+ export default LayoutGrid;
2602
+ export { LayoutGrid };