@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,1977 @@
1
+ import { Ext } from "../../tr-grid-util/es6/Ext.js";
2
+ import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
3
+ import { Dom } from "../../tr-grid-util/es6/Dom.js";
4
+ import { Popup } from "../../tr-grid-util/es6/Popup.js";
5
+ import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
6
+ import { isTouchDevice } from "../../tr-grid-util/es6/Util.js";
7
+ import { ElfDate } from "../../tr-grid-util/es6/ElfDate.js";
8
+ import { CoralItems } from "../../tr-grid-util/es6/CoralItems.js";
9
+ /** @typedef {Object} InCellEditingPlugin~Options
10
+ * @description InCellEditingPlugin options that can be specified from `inCellEditing` property of the main grid's options
11
+ * @property {boolean=} balloonMode=false Show editor in a balloon. This is useful when there is not much space in the cell
12
+ * @property {boolean=} editableTitle=false If enabled, all column headers can be edited by double click
13
+ * @property {boolean=} editableContent=false If enabled, all content cells can be edited by double click. This can be overridden individual column configuration.
14
+ * @property {boolean=} autoCommitText=false If enabled, the text will be committed even if user leaving editor midway
15
+ * @property {boolean=} dataBinding=true If disabled, text will not be updated in the grid's data table
16
+ * @property {Element=} popupElement=null Element to be attached under the editor
17
+ * @property {boolean=} doubleClick=true If disabled, double click will not trigger editor
18
+ * @property {boolean=} tabToMove=false If enabled, pressing tab key while editor is active will open editor on the next editable cell.
19
+ * @property {boolean=} contentSource="textContent" By default, the text in the editor will be populated with textContent of the target cell. Use "field" to populated data from grid's data model. Use "empty" to shows empty editor.
20
+ * @property {boolean=} inlineStyling=false force inline styles regardless of elf version.
21
+ * @property {boolean=} disablingScroll=false Scrollbar will be frozen when editor opened.
22
+ * @property {Function=} preEditorOpening=null Handler before editor is opened
23
+ * @property {Function=} editorOpened=null Handler after editor is opened
24
+ * @property {Function=} beforeCommit=null Handler before data binding, allowing data type conversion
25
+ * @property {Function=} editorClosed=null Handler after editor is closed
26
+ * @property {Function=} keyUp=null Handler for each keyup of the input text box
27
+ * @property {Function=} beforeRowCommit=null Handler before all editor in row commit
28
+ * @property {Function=} rowEditorClosed=null Handler after all editors closed
29
+ * @property {boolean=} uiBlocking=false append transparent overlay to block ui interaction
30
+ */
31
+
32
+ /** @typedef {Object} InCellEditingPlugin~Cache
33
+ * @description Stored all important object relate to column that need to use in this plugin.
34
+ * @property {Element} editor Container element of input.
35
+ * @property {Element} balloonPopup balloon popup. It contains balloon element inside.
36
+ * @property {Element} inputElement Input element such as text input, numeric stepper, date-time picker.
37
+ */
38
+
39
+ /** @typedef {Object} InCellEditingPlugin~EditorOptions
40
+ * @description Editor options specified through `inCellEditing` property on the column configuration object
41
+ * @property {string=} type="text" Specify type of the editor. Available types are text, number, dropdown, date, checkbox, and combobox.
42
+ * @property {Array=} entries=null Specify list of items available in the dropdown box
43
+ */
44
+
45
+ /** @typedef {Object} InCellEditingPlugin~ColumnOptions
46
+ * @description Column options that can be specified on each individual grid's column option:
47
+ * @property {boolean=} editableContent=false Make the column editable by double click
48
+ * @property {InCellEditingPlugin~EditorOptions=} inCellEditing Editor options give more refinements, such as "type" for specific editor type or "entries" for dropdown box
49
+ */
50
+
51
+ /** @event InCellEditingPlugin#preEditorOpening
52
+ * @description Fired before the opening of text editor. This allows user to disable the editor on case by case basis
53
+ * @type {Object}
54
+ * @property {boolean=} cancel Set to true to cancel the openning operation.
55
+ * @example
56
+ * var cep = new InCellEditingPlugin();
57
+ * cep.listen("preEditorOpening", function(e) {
58
+ * e["cancel"] = true; // Cancel the editing process
59
+ * });
60
+ */
61
+
62
+ /** @event InCellEditingPlugin#editorOpened
63
+ * @description Fired after the opening of text editor. Any visual customization can be done at this stage, including the text shown in the editor.
64
+ * @type {Object}
65
+ * @property {Object} dataSource DataView
66
+ * @property {number} rowIndex
67
+ * @property {string} field
68
+ * @property {Element} inputElement
69
+ * @example
70
+ * var cep = new InCellEditingPlugin();
71
+ * cep.listen("editorOpened", function(e) {
72
+ * var data = e.dataSource.getDataAt(e.rowIndex, e.field);
73
+ * e.inputElement.value = data + " aaa";
74
+ * });
75
+ */
76
+
77
+ /** @event InCellEditingPlugin#editorClosed
78
+ * @description Fired after the text editor has been closed and all operations are done. This is useful to clean up left over resource and get result text entered.
79
+ * @type {Object}
80
+ * @property {string=} text Text that user has entered
81
+ * @property {boolean} cancelled Readonly flag. Indicates whether the commit operation has been cancelled
82
+ * @property {boolean} committed Readonly flag. The opposite of `cancelled` flag
83
+ */
84
+
85
+ /** @event InCellEditingPlugin#beforeCommit
86
+ * @description Fired before the actual text commit (i.e. after user press enter). This is used for validating or modifying user input, and canceling the operation
87
+ * @type {Object}
88
+ * @property {string=} text Text that user has entered
89
+ * @property {boolean=} cancel Set to true to cancel the commit operation.
90
+ * @example
91
+ * var cep = new InCellEditingPlugin();
92
+ * cep.listen("beforeCommit", function(e) {
93
+ * var num = +e.text; // Cast input type to number
94
+ * if(num === num) { // Check if string can be converted to number
95
+ * e.text = num; // Modify user input and continue commit operation (i.e. set data back to grid model)
96
+ * } else { // User entered something other than number
97
+ * e.cancel = true; // Cancel the commiting process
98
+ * }
99
+ * });
100
+ */
101
+
102
+ /** @event InCellEditingPlugin#beforeRowCommit
103
+ * @description Fired before the actual text in row editor commit (i.e. after call api closeRowEditor(isCommit: true)). This is used for validating or modifying user input, and canceling the operation
104
+ * @type {Object}
105
+ * @property {Object} grid core grid instance
106
+ * @property {number} rowIndex row index that editor placed.
107
+ * @property {number} rowId row id, It's better to use row id as a reference to collect data.
108
+ * @property {object} fieldValue object that contain text in each field
109
+ * @property {boolean=} cancel Set to true to cancel the commit operation.
110
+ * @example
111
+ * var cep = new InCellEditingPlugin();
112
+ * cep.listen("beforeRowCommit", function(e) {
113
+ * var fieldValue = e.fieldValue;
114
+ * for (var field in fieldValue) {
115
+ * if (!fieldValue.hasOwnProperty(field)) continue;
116
+ * var value = fieldValue[field];
117
+ * if (checkValid(value)) { // check value is valid
118
+ * fieldValue[field] = value + "foo bar"; // modify text
119
+ * } else {
120
+ * e.cancel = true; // if not valid maybe cancel commit
121
+ * break;
122
+ * }
123
+ * }
124
+ * });
125
+ */
126
+
127
+ /** @event InCellEditingPlugin#rowEditorClosed
128
+ * @description Fired after the text editor has been closed and all operations are done. This is useful to clean up left over resource and get result text entered.
129
+ * @type {Object}
130
+ * @property {number} rowIndex index of row
131
+ * @property {boolean} committed Indicates whether the commit operation has been done or not.
132
+ * @property {Object} grid grid instance
133
+ * @property {Object} fieldValue object that contain text in each field
134
+ */
135
+
136
+ /** @event InCellEditingPlugin#keyUp
137
+ * @description Fired after user key some letter to editior. This is useful to listen every text chnage.
138
+ */
139
+
140
+ /** Double-click to activate editing mode
141
+ * @constructor
142
+ * @param {InCellEditingPlugin~Options=} options
143
+ * @extends {GridPlugin}
144
+ */
145
+
146
+ var InCellEditingPlugin = function InCellEditingPlugin(options) {
147
+ var t = this;
148
+ t._onDoubleClick = t._onDoubleClick.bind(t);
149
+ t._onPopupHide = t._onPopupHide.bind(t);
150
+ t._onScroll = t._onScroll.bind(t);
151
+ t._onTextKeyDown = t._onTextKeyDown.bind(t);
152
+ t._onTextKeyUp = t._onTextKeyUp.bind(t);
153
+ t._onTouchStart = t._onTouchStart.bind(t);
154
+ t._onTouchEnd = t._onTouchEnd.bind(t);
155
+ t._onTimer = t._onTimer.bind(t);
156
+ t._createContentEditor = t._createContentEditor.bind(t);
157
+ t._createTitleEditor = t._createTitleEditor.bind(t);
158
+ t._onColumnAdded = t._onColumnAdded.bind(t);
159
+ t._onValueChanged = t._onValueChanged.bind(t);
160
+ t._hosts = [];
161
+
162
+ if (options) {
163
+ this.config({
164
+ "inCellEditing": options
165
+ });
166
+ }
167
+ };
168
+
169
+ Ext.inherits(InCellEditingPlugin, GridPlugin);
170
+ /** @type {Object}
171
+ * @private
172
+ * @static
173
+ */
174
+
175
+ InCellEditingPlugin._uiElementTypesMap = {
176
+ "input": "input",
177
+ "text": "input",
178
+ "number": "ef-number-field",
179
+ "select": "ef-select",
180
+ "dropdown": "ef-select",
181
+ "date": "ef-datetime-picker",
182
+ "checkbox": "ef-checkbox",
183
+ "boolean": "ef-checkbox",
184
+ "combobox": "ef-combo-box"
185
+ };
186
+ /** @type {boolean}
187
+ * @private
188
+ */
189
+
190
+ InCellEditingPlugin.prototype._editableTitle = false;
191
+ /** @type {boolean}
192
+ * @private
193
+ */
194
+
195
+ InCellEditingPlugin.prototype._editableContent = false;
196
+ /** Position of text editor is active.
197
+ * @type {Object}
198
+ * @private
199
+ */
200
+
201
+ InCellEditingPlugin.prototype._activePos = null;
202
+ /** Where the cell was user double-cliked.
203
+ * @type {Object}
204
+ * @private
205
+ */
206
+
207
+ InCellEditingPlugin.prototype._activeCell = null;
208
+ /** row id that editor placed
209
+ * @type {string}
210
+ * @private
211
+ */
212
+
213
+ InCellEditingPlugin.prototype._activeRowId = "";
214
+ /** Previous core grid object that editor open.
215
+ * @type {Object}
216
+ * @private
217
+ */
218
+
219
+ InCellEditingPlugin.prototype._lastActiveGrid = null;
220
+ /** Previous content cell before user editited, use to rollback when user cancelled.
221
+ * @type {*}
222
+ * @private
223
+ */
224
+
225
+ InCellEditingPlugin.prototype._prevContent = null;
226
+ /** @type {string}
227
+ * @private
228
+ */
229
+
230
+ InCellEditingPlugin.prototype._initialText = "";
231
+ /** @type {!InCellEditingPlugin~Cache}
232
+ * @private
233
+ */
234
+
235
+ InCellEditingPlugin.prototype._headerInCellCache = null;
236
+ /** @type {!InCellEditingPlugin~Cache}
237
+ * @private
238
+ */
239
+
240
+ InCellEditingPlugin.prototype._activeInCellCache = null;
241
+ /** @type {boolean}
242
+ * @private
243
+ */
244
+
245
+ InCellEditingPlugin.prototype._usingBalloon = false;
246
+ /** @type {boolean}
247
+ * @private
248
+ */
249
+
250
+ InCellEditingPlugin.prototype._balloonMode = false;
251
+ /** @type {boolean}
252
+ * @private
253
+ */
254
+
255
+ InCellEditingPlugin.prototype._dataBinding = true;
256
+ /** @type {boolean}
257
+ * @private
258
+ */
259
+
260
+ InCellEditingPlugin.prototype._dblClick = true;
261
+ /** @type {boolean}
262
+ * @private
263
+ */
264
+
265
+ InCellEditingPlugin.prototype._autoCommitText = false;
266
+ /** @type {number}
267
+ * @private
268
+ */
269
+
270
+ InCellEditingPlugin.prototype._timerId = 0;
271
+ /** @type {number}
272
+ * @private
273
+ */
274
+
275
+ InCellEditingPlugin.prototype._longPressTime = 1000; // For touch screen
276
+
277
+ /** @type {boolean}
278
+ * @private
279
+ */
280
+
281
+ InCellEditingPlugin.prototype._editing = false;
282
+ /** Where other element stored.
283
+ * @type {Element}
284
+ * @private
285
+ */
286
+
287
+ InCellEditingPlugin.prototype._customElement = null;
288
+ /** Popup element where custom element stored.
289
+ * @type {Popup}
290
+ * @private
291
+ */
292
+
293
+ InCellEditingPlugin.prototype._customElementPopup = null;
294
+ /** @type {Number}
295
+ * @private
296
+ */
297
+
298
+ InCellEditingPlugin.prototype._tabToMove = false;
299
+ /** @type {string}
300
+ * @private
301
+ */
302
+
303
+ InCellEditingPlugin.prototype._contentSource = "textContent";
304
+ /** @type {boolean}
305
+ * @private
306
+ */
307
+
308
+ InCellEditingPlugin.prototype._inlineStyling = false;
309
+ /** @type {boolean}
310
+ * @private
311
+ */
312
+
313
+ InCellEditingPlugin.prototype._disablingScroll = false;
314
+ /** @type {boolean}
315
+ * @private
316
+ */
317
+
318
+ InCellEditingPlugin.prototype._uiBlocking = false;
319
+ /** @type {string}
320
+ * @private
321
+ */
322
+
323
+ InCellEditingPlugin.prototype._defaultTag = "input";
324
+ /** status to show that row is closing
325
+ * @type {boolean}
326
+ * @private
327
+ */
328
+
329
+ InCellEditingPlugin.prototype._rowClosing = false;
330
+ /** @type {number}
331
+ * @private
332
+ */
333
+
334
+ InCellEditingPlugin.prototype._elfVersion = 0;
335
+ /** @type {string}
336
+ * @private
337
+ */
338
+
339
+ InCellEditingPlugin._primaryColor = "";
340
+ /** @private
341
+ * @param {Object} colors
342
+ */
343
+
344
+ InCellEditingPlugin._onThemeLoaded = function (colors) {
345
+ if (!InCellEditingPlugin._primaryColor) InCellEditingPlugin._primaryColor = colors.primary;
346
+ };
347
+ /** @private
348
+ * @param {string} tag element tag
349
+ * @return {Element} input element
350
+ */
351
+
352
+
353
+ InCellEditingPlugin.prototype._createInputElement = function (tag) {
354
+ var t = this;
355
+ var elem = document.createElement(tag);
356
+ var typeMap = InCellEditingPlugin._uiElementTypesMap; // Resolve elf theme style
357
+
358
+ elem.style.width = "100%";
359
+ elem.style.height = "100%";
360
+ elem.style.margin = "0";
361
+ elem.style.borderColor = InCellEditingPlugin._primaryColor || "#ee7600";
362
+ elem.style.maxHeight = "unset";
363
+
364
+ if (tag === typeMap.checkbox) {
365
+ elem.style.borderStyle = "solid";
366
+ elem.style.borderWidth = "1px";
367
+ elem.style.boxSizing = "border-box";
368
+ elem.style.display = "flex";
369
+ elem.style.justifyContent = "center";
370
+ elem.addEventListener("keydown", function (e) {
371
+ if (e.keyCode === 13) {
372
+ e.preventDefault();
373
+ }
374
+ });
375
+ } else if (tag === typeMap.select || tag === typeMap.combobox || tag === typeMap.date) {
376
+ elem.addEventListener("value-changed", t._onValueChanged);
377
+ } else if (tag === "ef-input") {
378
+ elem.setAttribute("type", "number");
379
+ } else if (tag === typeMap.input) {
380
+ elem.setAttribute("type", "text");
381
+ }
382
+
383
+ elem.addEventListener("keydown", t._onTextKeyDown, false);
384
+ elem.addEventListener("keyup", t._onTextKeyUp, false);
385
+ elem.addEventListener("mousedown", t._stopPropagation, false);
386
+ elem.addEventListener("mouseup", t._stopPropagation, false);
387
+ elem.addEventListener("click", t._stopPropagation, false);
388
+ elem.addEventListener("copy", t._stopPropagation, false);
389
+ elem.addEventListener("cut", t._stopPropagation, false);
390
+ elem.addEventListener("paste", t._stopPropagation, false);
391
+ return elem;
392
+ };
393
+ /** @private
394
+ * @return {Element}
395
+ */
396
+
397
+
398
+ InCellEditingPlugin.prototype._createEditor = function () {
399
+ var editor = document.createElement("div");
400
+ editor.className = "cell editing";
401
+ editor.style.position = "absolute";
402
+ return editor;
403
+ };
404
+ /** @private
405
+ * @param {Element} editor
406
+ * @return {Popup} popup instance
407
+ */
408
+
409
+
410
+ InCellEditingPlugin.prototype._createBalloonPopup = function (editor) {
411
+ var popup = new Popup(editor, {
412
+ positioning: "over"
413
+ });
414
+ return popup;
415
+ };
416
+ /** @private
417
+ * @param {Object} grid core grid object
418
+ * @param {string} elemTag
419
+ * @return {object} inCellCache
420
+ */
421
+
422
+
423
+ InCellEditingPlugin.prototype._createInCellCache = function (grid, elemTag) {
424
+ var t = this;
425
+
426
+ var editor = t._createEditor();
427
+
428
+ var inputElement = t._createInputElement(elemTag);
429
+
430
+ var balloonPopup = new Popup(editor, {
431
+ positioning: "over"
432
+ });
433
+ editor.appendChild(inputElement);
434
+ return {
435
+ grid: grid,
436
+ inputElement: inputElement,
437
+ editor: editor,
438
+ balloonPopup: balloonPopup
439
+ };
440
+ };
441
+ /** @private
442
+ * @param {Object} grid core grid object
443
+ * @return {object} inCellCache
444
+ */
445
+
446
+
447
+ InCellEditingPlugin.prototype._createTitleEditor = function (grid) {
448
+ var t = this;
449
+
450
+ if (!t._headerInCellCache) {
451
+ t._headerInCellCache = t._createInCellCache(grid, "input");
452
+ }
453
+
454
+ return t._headerInCellCache;
455
+ };
456
+ /** @private
457
+ * @param {number} columnIndex
458
+ * @param {Object} grid core grid object
459
+ * @return {object} inCellCache
460
+ */
461
+
462
+
463
+ InCellEditingPlugin.prototype._createContentEditor = function (columnIndex, grid) {
464
+ var t = this;
465
+ var typeMap = InCellEditingPlugin._uiElementTypesMap;
466
+
467
+ var columnData = t._getColumnData(columnIndex, grid);
468
+
469
+ var inCellColumnConfig = columnData["inCellEditing"];
470
+ var elemTag = typeMap[inCellColumnConfig && inCellColumnConfig.type] || t._defaultTag;
471
+
472
+ if (!columnData["inCellCache"]) {
473
+ columnData["inCellCache"] = t._createInCellCache(grid, elemTag);
474
+ }
475
+
476
+ var inCellCache = columnData["inCellCache"]; // Setup initial value for the editor
477
+
478
+ if (elemTag === typeMap.select || elemTag === typeMap.combobox) {
479
+ inCellCache["inputElement"].data = inCellColumnConfig && inCellColumnConfig.entries;
480
+ }
481
+
482
+ return inCellCache;
483
+ };
484
+ /** @override
485
+ * @return {string}
486
+ */
487
+
488
+
489
+ InCellEditingPlugin.prototype.getName = function () {
490
+ return "InCellEditingPlugin";
491
+ };
492
+ /** @private
493
+ * @param {Event|Element} e
494
+ */
495
+
496
+
497
+ InCellEditingPlugin.prototype._onColumnAdded = function (e) {
498
+ if (e.context && e.colIndex != null) {
499
+ // e.context is a columnOption;
500
+ this._retrieveColumnOption(e.context, e.colIndex);
501
+ }
502
+ };
503
+ /** Called by grid system when initial plugins.
504
+ * @public
505
+ * @param {Object} host core grid object
506
+ * @param {Object} options
507
+ */
508
+
509
+
510
+ InCellEditingPlugin.prototype.initialize = function (host, options) {
511
+ if (this._hosts.indexOf(host) >= 0) {
512
+ return;
513
+ }
514
+
515
+ host.listen("columnAdded", this._onColumnAdded);
516
+ host.getVScrollbar().listen("scroll", this._onScroll);
517
+
518
+ if (this._dblClick) {
519
+ host.listen("dblclick", this._onDoubleClick); // Make a comparable functionality for touchscreen
520
+
521
+ if (isTouchDevice()) {
522
+ host.listen("touchstart", this._onTouchStart);
523
+ host.listen("touchend", this._onTouchEnd);
524
+ host.listen("touchcancel", this._onTouchEnd);
525
+ }
526
+ }
527
+
528
+ this._hosts.push(host);
529
+
530
+ if (ElfUtil.getElfVersion() < 4) {
531
+ // ef-input available in elf version < 4
532
+ InCellEditingPlugin._uiElementTypesMap["number"] = "ef-input";
533
+ }
534
+
535
+ this.config(options);
536
+
537
+ if (!InCellEditingPlugin._primaryColor) {
538
+ ElfUtil.getThemeColors().then(InCellEditingPlugin._onThemeLoaded);
539
+ }
540
+ };
541
+ /** Remove redundant built-in composite-grid feature
542
+ * @public
543
+ * @param {string} optionName
544
+ * @param {*} optionVal
545
+ * @return {*} The transformed value of the option
546
+ */
547
+
548
+
549
+ InCellEditingPlugin.prototype.beforeProcessOption = function (optionName, optionVal) {
550
+ if (optionName == "cellEditing") {
551
+ return null; // eslint-disable-line
552
+ }
553
+
554
+ return; // eslint-disable-line
555
+ };
556
+ /** @private
557
+ * @override
558
+ */
559
+
560
+
561
+ InCellEditingPlugin.prototype._afterInit = function () {
562
+ this._elfVersion = ElfUtil.getElfVersion();
563
+ };
564
+ /** @public
565
+ * @param {Object=} options
566
+ */
567
+
568
+
569
+ InCellEditingPlugin.prototype.config = function (options) {
570
+ if (!options) {
571
+ return;
572
+ }
573
+
574
+ var t = this; // config column
575
+
576
+ var columns = options["columns"];
577
+
578
+ if (columns) {
579
+ var len = columns.length;
580
+
581
+ for (var c = 0; c < len; ++c) {
582
+ t._retrieveColumnOption(columns[c], c);
583
+ }
584
+ }
585
+
586
+ var pluginOption = options["inCellEditing"];
587
+ if (!pluginOption) return; // options
588
+
589
+ if (pluginOption["type"]) t._defaultTag = InCellEditingPlugin._uiElementTypesMap[pluginOption["type"]];
590
+ if (pluginOption["balloonMode"]) t.enableBalloonMode(pluginOption["balloonMode"]);
591
+ if (pluginOption["editableTitle"]) t.enableTitleEditing(pluginOption["editableTitle"]);
592
+ if (pluginOption["editableContent"]) t._editableContent = true;
593
+ if (pluginOption["tabToMove"]) t._tabToMove = true;
594
+ if (pluginOption["autoCommitText"]) t.enableAutoCommitText(pluginOption["autoCommitText"]);
595
+ if (pluginOption["dataBinding"] != null) t.disableDataBinding(!pluginOption["dataBinding"]);
596
+ if (pluginOption["contentSource"] != null) t._contentSource = pluginOption["contentSource"];
597
+
598
+ if (pluginOption["popupElement"]) {
599
+ t.setPopupElement(pluginOption["popupElement"]);
600
+ }
601
+
602
+ if (pluginOption["doubleClick"] != null) t.disableDblClick(!pluginOption["doubleClick"]);
603
+
604
+ if (pluginOption["inlineStyling"]) {
605
+ t._inlineStyling = true;
606
+ }
607
+
608
+ if (pluginOption["disablingScroll"]) {
609
+ t._disablingScroll = true;
610
+ }
611
+
612
+ if (pluginOption["uiBlocking"]) {
613
+ t._uiBlocking = true;
614
+ } // event callback
615
+
616
+
617
+ t.addListener(pluginOption, "preEditorOpening");
618
+ t.addListener(pluginOption, "editorOpened");
619
+ t.addListener(pluginOption, "beforeCommit");
620
+ t.addListener(pluginOption, "editorClosed");
621
+ t.addListener(pluginOption, "keyUp");
622
+ t.addListener(pluginOption, "beforeRowCommit");
623
+ t.addListener(pluginOption, "rowEditorClosed");
624
+ };
625
+ /** Get a current state of grid and extension config
626
+ * @public
627
+ * @param {Object=} out_obj
628
+ * @returns {!Object}
629
+ */
630
+
631
+
632
+ InCellEditingPlugin.prototype.getConfigObject = function (out_obj) {
633
+ var obj = out_obj || {};
634
+ var columns = obj.columns;
635
+
636
+ if (!columns) {
637
+ columns = obj.columns = [];
638
+ }
639
+
640
+ var len = this.getColumnCount();
641
+
642
+ for (var i = 0; i < len; ++i) {
643
+ var col = columns[i];
644
+
645
+ if (!col) {
646
+ col = columns[i] = {};
647
+ }
648
+
649
+ var opt = this._getColumnData(i);
650
+
651
+ if (!opt) {
652
+ continue;
653
+ }
654
+
655
+ if (opt.editableContent != null) {
656
+ col.editableContent = opt.editableContent;
657
+ }
658
+
659
+ if (opt.inCellEditing != null) {
660
+ col.inCellEditing = opt.inCellEditing;
661
+ }
662
+ }
663
+
664
+ var extOptions = obj.inCellEditing;
665
+
666
+ if (!extOptions) {
667
+ extOptions = obj.inCellEditing = {};
668
+ }
669
+
670
+ extOptions.balloonMode = this._balloonMode;
671
+ extOptions.editableTitle = this._editableTitle;
672
+ extOptions.editableContent = this._editableContent;
673
+ extOptions.tabToMove = this._tabToMove;
674
+ extOptions.autoCommitText = this._autoCommitText;
675
+ extOptions.dataBinding = this._dataBinding;
676
+ extOptions.contentSource = this._contentSource;
677
+ extOptions.doubleClick = this._dblClick;
678
+ extOptions.inlineStyling = this._inlineStyling;
679
+ extOptions.disablingScroll = this._disablingScroll;
680
+ extOptions.uiBlocking = this._uiBlocking;
681
+ return obj;
682
+ };
683
+ /** @private
684
+ * @param {Object} columnOption
685
+ * @param {number} colIndex
686
+ */
687
+
688
+
689
+ InCellEditingPlugin.prototype._retrieveColumnOption = function (columnOption, colIndex) {
690
+ var pluginOptions = columnOption["inCellEditing"];
691
+ var editableContent = columnOption["editableContent"];
692
+
693
+ if (pluginOptions != null || editableContent != null) {
694
+ var colData = this._newColumnData(colIndex);
695
+
696
+ if (pluginOptions != null) {
697
+ colData["inCellEditing"] = pluginOptions;
698
+ pluginOptions.entries = CoralItems.create(pluginOptions.entries); // Create entries for coral select and combobox
699
+ }
700
+
701
+ if (editableContent != null) {
702
+ colData["editableContent"] = editableContent;
703
+ }
704
+ }
705
+ };
706
+ /** @override */
707
+
708
+
709
+ InCellEditingPlugin.prototype.unload = function (host) {
710
+ var at = this._hosts.indexOf(host);
711
+
712
+ if (at < 0) {
713
+ return;
714
+ }
715
+
716
+ this._hosts.splice(at, 1);
717
+
718
+ host.unlisten("columnAdded", this._onColumnAdded);
719
+ host.getVScrollbar().unlisten("scroll", this._onScroll);
720
+ host.unlisten("dblclick", this._onDoubleClick);
721
+ host.unlisten("touchstart", this._onTouchStart);
722
+ host.unlisten("touchend", this._onTouchEnd);
723
+ host.unlisten("touchcancel", this._onTouchEnd);
724
+
725
+ this._dispose();
726
+ };
727
+ /** @public
728
+ * @param {number} colIndex
729
+ * @param {number} rowIndex
730
+ * @param {Object=} sectionRef grid SectionReference object
731
+ * @param {Object=} grid core grid object
732
+ * @fires InCellEditingPlugin#editorOpened
733
+ */
734
+
735
+
736
+ InCellEditingPlugin.prototype.openEditor = function (colIndex, rowIndex, sectionRef, grid) {
737
+ if (!grid) {
738
+ grid = this._hosts[0];
739
+
740
+ if (!grid) {
741
+ return;
742
+ }
743
+ }
744
+
745
+ var sectionSettings = grid.getSectionSettings(sectionRef || "content");
746
+ var activePos = this._activePos;
747
+
748
+ if (activePos) {
749
+ var sectionName = sectionSettings ? sectionSettings.getType() : "";
750
+
751
+ if (activePos["colIndex"] === colIndex && activePos["rowIndex"] === rowIndex && activePos["sectionName"] === sectionName && activePos["grid"] === grid) {
752
+ return; // The same cell is open twice
753
+ }
754
+
755
+ this.closeCellEditor(); // Close previously opened cell editor
756
+ }
757
+
758
+ var section = sectionSettings ? sectionSettings.getSection() : null;
759
+ var cell = section ? section.getCell(colIndex, rowIndex) : null;
760
+
761
+ if (!cell) {
762
+ return; // Some input is invalid
763
+ }
764
+
765
+ grid.scrollToColumn(colIndex);
766
+ grid.scrollToRow(null, rowIndex); // TODO: Fix this workaround
767
+
768
+ setTimeout(this._openEditor.bind(this, cell, grid), 100);
769
+ };
770
+ /** @public
771
+ * @param {boolean=} opt_forceCommit
772
+ * @fires InCellEditingPlugin#cancelled
773
+ */
774
+
775
+
776
+ InCellEditingPlugin.prototype.closeCellEditor = function (opt_forceCommit) {
777
+ this._commitText(opt_forceCommit || this._autoCommitText);
778
+ };
779
+ /** @public
780
+ * @param {boolean=} opt_enabled
781
+ */
782
+
783
+
784
+ InCellEditingPlugin.prototype.enableBalloonMode = function (opt_enabled) {
785
+ this._balloonMode = opt_enabled !== false;
786
+ };
787
+ /** @public
788
+ * @param {boolean=} opt_enabled
789
+ */
790
+
791
+
792
+ InCellEditingPlugin.prototype.enableTitleEditing = function (opt_enabled) {
793
+ this._editableTitle = opt_enabled !== false;
794
+ };
795
+ /** Disable editing on all title sections
796
+ * @public
797
+ * @param {boolean=} opt_disabled
798
+ */
799
+
800
+
801
+ InCellEditingPlugin.prototype.disableTitleEditing = function (opt_disabled) {
802
+ this._editableTitle = opt_disabled === false;
803
+ };
804
+ /** Disable editing on a per cell basis
805
+ * @public
806
+ * @param {Object} cell Grid cell object
807
+ * @param {boolean=} opt_disabled
808
+ */
809
+
810
+
811
+ InCellEditingPlugin.prototype.disableCellEditing = function (cell, opt_disabled) {
812
+ if (cell) {
813
+ cell.enableClass("no-editing", opt_disabled !== false);
814
+ }
815
+ };
816
+ /** @public
817
+ * @param {boolean=} opt_disabled
818
+ */
819
+
820
+
821
+ InCellEditingPlugin.prototype.disableDataBinding = function (opt_disabled) {
822
+ this._dataBinding = opt_disabled === false;
823
+ };
824
+ /** @public
825
+ * @param {boolean=} opt_disabled
826
+ */
827
+
828
+
829
+ InCellEditingPlugin.prototype.disableDblClick = function (opt_disabled) {
830
+ var dblClick = opt_disabled === false;
831
+
832
+ if (this._dblClick !== dblClick) {
833
+ this._dblClick = dblClick;
834
+
835
+ for (var i = this._hosts.length; --i >= 0;) {
836
+ this._listenForTriggering(this._hosts[i], dblClick);
837
+ }
838
+ }
839
+ };
840
+ /** Checking Editing is in process.
841
+ * @public
842
+ * @return {boolean}
843
+ */
844
+
845
+
846
+ InCellEditingPlugin.prototype.isEditing = function () {
847
+ return this._editing;
848
+ };
849
+ /**
850
+ * @public
851
+ * @param {number=} columnIndex column index of editor, used in row editing mode
852
+ * @param {Object=} grid grid instance, used in row editing mode
853
+ * @return {Element} editor element or null
854
+ * @description Get input element of opened editor where text is stored.
855
+ * for row editing mode, specific column index and grid instance is need.
856
+ * for cell editing mode. function not require param since only one editor can be opened at a time.
857
+ */
858
+
859
+
860
+ InCellEditingPlugin.prototype.getTextBox = function (columnIndex, grid) {
861
+ if (this._activeRowId) {
862
+ // for row editing mode
863
+ // get rowEditor that's stored in column data
864
+ grid = grid || this._hosts[0];
865
+
866
+ if (grid) {
867
+ var columnData = this._getColumnData(columnIndex, grid);
868
+
869
+ var inCellCache = columnData["inCellCache"];
870
+
871
+ if (inCellCache) {
872
+ return inCellCache["inputElement"];
873
+ }
874
+ }
875
+ } else if (this._activeInCellCache) {
876
+ // for cell editing mode
877
+ return this._activeInCellCache["inputElement"];
878
+ }
879
+
880
+ return null; // no editor open
881
+ };
882
+ /** @public
883
+ * @return {string}
884
+ */
885
+
886
+
887
+ InCellEditingPlugin.prototype.getInitialText = function () {
888
+ return this._initialText;
889
+ };
890
+ /** @private
891
+ * @param {Object} dataSource DataView
892
+ * @param {number} rowIndex
893
+ * @param {string} field
894
+ * @param {Element=} content element that get from cell.getContent
895
+ * @return {*}
896
+ */
897
+
898
+
899
+ InCellEditingPlugin.prototype._getSourceContent = function (dataSource, rowIndex, field, content) {
900
+ if (this._contentSource == "field") {
901
+ return this._getData(dataSource, rowIndex, field);
902
+ } else {
903
+ var textNode, str;
904
+
905
+ if (content) {
906
+ var len = content.childNodes.length;
907
+
908
+ for (var i = 0; i < len; ++i) {
909
+ if (content.childNodes[i].nodeType === 3) {
910
+ textNode = content.childNodes[i]; // To preserve current content structure
911
+
912
+ break;
913
+ }
914
+ }
915
+ }
916
+
917
+ if (textNode) {
918
+ str = textNode.textContent;
919
+ } else if (content) {
920
+ str = content.textContent;
921
+ }
922
+
923
+ return str;
924
+ }
925
+ };
926
+ /**
927
+ * @public
928
+ * @param {string} rowId
929
+ * @return {!number} row index will return -1 if not found
930
+ */
931
+
932
+
933
+ InCellEditingPlugin.prototype._getRowIndex = function (rowId) {
934
+ if (rowId && this._lastActiveGrid) {
935
+ var dv = this._lastActiveGrid.getDataSource();
936
+
937
+ if (dv) return dv.getRowIndex(rowId);
938
+ }
939
+
940
+ return -1;
941
+ };
942
+ /**
943
+ * @public
944
+ * @param {number} rowIndex
945
+ * @return {!string} return empty string if not found
946
+ */
947
+
948
+
949
+ InCellEditingPlugin.prototype._getRowId = function (rowIndex) {
950
+ if (rowIndex != null && this._lastActiveGrid) {
951
+ var dv = this._lastActiveGrid.getDataSource();
952
+
953
+ if (dv) return dv.getRowId(rowIndex);
954
+ }
955
+
956
+ return "";
957
+ };
958
+ /** @public
959
+ * @return {Object|null} core grid object
960
+ */
961
+
962
+
963
+ InCellEditingPlugin.prototype.getActiveGrid = function () {
964
+ return this._activePos ? this._activePos["grid"] : null;
965
+ };
966
+ /** get active column index that editor had opended. Function can work only in cell editing mode.
967
+ * @public
968
+ * @return {number} column index will return -1 if not found
969
+ */
970
+
971
+
972
+ InCellEditingPlugin.prototype.getActiveColIndex = function () {
973
+ if (this._activePos) {
974
+ var colIndex = this._activePos["colIndex"];
975
+ if (colIndex != null) return colIndex;
976
+ }
977
+
978
+ return -1;
979
+ };
980
+ /** get active row index that editor had opended. Function Can work in both cell/row editing modes.
981
+ * @public
982
+ * @return {number} row index will return -1 if not found
983
+ */
984
+
985
+
986
+ InCellEditingPlugin.prototype.getActiveRowIndex = function () {
987
+ if (this._activeRowId) {
988
+ // row editing mode
989
+ return this._getRowIndex(this._activeRowId);
990
+ } else if (this._activePos) {
991
+ // cell editing mode
992
+ var rowIndex = this._activePos["rowIndex"];
993
+ if (rowIndex != null) return rowIndex;
994
+ }
995
+
996
+ return -1;
997
+ };
998
+ /** @public
999
+ * @return {Object}
1000
+ */
1001
+
1002
+
1003
+ InCellEditingPlugin.prototype.getInputElementPosition = function () {
1004
+ return this._activePos || null;
1005
+ };
1006
+ /** @public
1007
+ * @param {boolean=} opt_enable
1008
+ */
1009
+
1010
+
1011
+ InCellEditingPlugin.prototype.enableAutoCommitText = function (opt_enable) {
1012
+ this._autoCommitText = opt_enable !== false;
1013
+ };
1014
+ /** Check if the column can be edited by double click
1015
+ * @public
1016
+ * @param {number} colIndex
1017
+ * @return {boolean}
1018
+ */
1019
+
1020
+
1021
+ InCellEditingPlugin.prototype.isColumnEditable = function (colIndex) {
1022
+ var val = this._getColumnOption(colIndex, "editableContent");
1023
+
1024
+ return val == null ? this._editableContent : val;
1025
+ };
1026
+ /** @private
1027
+ * @param {Event|Element} e
1028
+ * @param {Object=} opt_host core grid object
1029
+ * @fires InCellEditingPlugin#editorOpened
1030
+ */
1031
+
1032
+
1033
+ InCellEditingPlugin.prototype._onDoubleClick = function (e, opt_host) {
1034
+ var t = this;
1035
+ var host = opt_host || t.getRelativeGrid(e);
1036
+
1037
+ if (t.isEditing() || !host) {
1038
+ return;
1039
+ }
1040
+
1041
+ var arg = host.getRelativePosition(e);
1042
+ var sectionType = arg["sectionType"];
1043
+
1044
+ if (sectionType === "content" && !t.isColumnEditable(arg["colIndex"])) {
1045
+ return;
1046
+ } else if (sectionType === "title" && !t._editableTitle) {
1047
+ return;
1048
+ } else if (sectionType === "header") {
1049
+ return;
1050
+ } // Initialize internal states
1051
+
1052
+
1053
+ if (e["preventDefault"]) {
1054
+ Dom.preventDefault(e);
1055
+ }
1056
+
1057
+ t.openEditor(arg.colIndex, arg.rowIndex, arg.section, host);
1058
+ };
1059
+ /** @private
1060
+ * @param {Element} e
1061
+ * @param {Object} host core grid object
1062
+ * @param {Object=} arg
1063
+ */
1064
+
1065
+
1066
+ InCellEditingPlugin.prototype._openEditor = function (e, host, arg) {
1067
+ var t = this;
1068
+
1069
+ if (!host.getElement() || this._hosts.indexOf(host) < 0) {
1070
+ // Check validity due to asyncronous call
1071
+ return;
1072
+ }
1073
+
1074
+ if (!arg) {
1075
+ arg = host.getRelativePosition(e);
1076
+ }
1077
+
1078
+ if (!arg["hit"]) {
1079
+ // The specified cell could be gone during the asyncronous process
1080
+ return;
1081
+ }
1082
+
1083
+ t._dispatch("preEditorOpening", arg);
1084
+
1085
+ if (arg["cancel"]) {
1086
+ return;
1087
+ }
1088
+
1089
+ var colIndex = arg["colIndex"];
1090
+ var rowIndex = arg["rowIndex"];
1091
+ var section = arg["section"];
1092
+ var cell = section.getCell(colIndex, rowIndex);
1093
+
1094
+ if (!cell || cell.hasClass("no-editing") || cell.hasClass("folder")) {
1095
+ // TODO: Allow cell with folder (expander arrow) to be editable for row segmenting
1096
+ return;
1097
+ } // Everything has been verified at this point. We can start the opening process.
1098
+ // close row editor first
1099
+
1100
+
1101
+ t.closeRowEditor(false, host);
1102
+ section.addClass("edit-mode");
1103
+ t._activePos = arg;
1104
+ arg["cell"] = t._activeCell = cell;
1105
+ arg["content"] = t._prevContent = cell.getContent();
1106
+ arg["field"] = t._getField(colIndex); // Initialize UIs
1107
+
1108
+ if (arg["sectionType"] === "title") {
1109
+ t._activeInCellCache = t._createTitleEditor(host);
1110
+ } else {
1111
+ t._activeInCellCache = t._createContentEditor(colIndex, host);
1112
+ }
1113
+
1114
+ var inputElement = arg["inputElement"] = t._activeInCellCache["inputElement"];
1115
+ var editor = arg["editor"] = t._activeInCellCache["editor"];
1116
+ var balloonPopup = t._activeInCellCache["balloonPopup"];
1117
+ var sourceContent = arg ? t._getSourceContent(arg["dataSource"], arg["rowIndex"], arg["field"], arg["content"]) : "";
1118
+
1119
+ if (rowIndex + 1 >= section.getRowCount()) {
1120
+ inputElement.classList.add("bottom");
1121
+ } else {
1122
+ inputElement.classList.remove("bottom");
1123
+ } // Initialize Balloon
1124
+
1125
+
1126
+ t._usingBalloon = t._isBalloonMode(cell);
1127
+
1128
+ if (t._usingBalloon) {
1129
+ editor.classList.add("balloon");
1130
+ } else {
1131
+ editor.classList.remove("balloon");
1132
+ }
1133
+
1134
+ var editorStyle = editor.style;
1135
+
1136
+ if (this._elfVersion || t._inlineStyling) {
1137
+ editorStyle.backgroundColor = section.getComputedStyle().backgroundColor;
1138
+ }
1139
+
1140
+ var rowH = section.getRowHeight(rowIndex);
1141
+ var width = section.getCellWidth(colIndex, rowIndex);
1142
+
1143
+ if (!host.isPinnedColumn(colIndex)) {
1144
+ var hScrollbar = host.getHScrollbar();
1145
+
1146
+ if (hScrollbar.isActive()) {
1147
+ var paneSize = hScrollbar.getPaneSize();
1148
+
1149
+ if (width > paneSize) {
1150
+ width = paneSize;
1151
+ }
1152
+ }
1153
+ }
1154
+
1155
+ if (!t._usingBalloon || width > 208) {
1156
+ editorStyle.width = width + "px";
1157
+ } else {
1158
+ editorStyle.width = "";
1159
+ }
1160
+
1161
+ editorStyle.height = rowH + "px"; // Attach our popup (balloon element)
1162
+
1163
+ var parentElement = document.body;
1164
+
1165
+ if (t._compositeGrid || t._realTimeGrid) {
1166
+ var activeGrid = t.getActiveGrid();
1167
+
1168
+ if (activeGrid) {
1169
+ parentElement = activeGrid.getElement().parentElement;
1170
+ }
1171
+ }
1172
+
1173
+ balloonPopup.enableUIBlocking(t._uiBlocking);
1174
+ balloonPopup.attachTo(cell.getElement());
1175
+ balloonPopup.addEventListener("hidden", t._onPopupHide);
1176
+ balloonPopup.disableAutoHiding(false);
1177
+ balloonPopup.show(true, parentElement); // Attach user element
1178
+
1179
+ if (t._customElement) {
1180
+ t._customElementPopup.attachTo(editor);
1181
+
1182
+ t._customElementPopup.show(true, parentElement);
1183
+
1184
+ t._customElementPopup.disableAutoHiding(false);
1185
+
1186
+ arg["popupElement"] = t._customElement;
1187
+ } // WARNING: value-changed event from ELF v3 component may NOT be triggered due to their design flaw
1188
+
1189
+
1190
+ t._setText(sourceContent, inputElement);
1191
+
1192
+ arg["initialText"] = t._initialText = sourceContent;
1193
+
1194
+ if (t._disablingScroll) {
1195
+ t._freezeScrolling(host, true);
1196
+ } // Dispatch an event for user to setup stuff
1197
+
1198
+
1199
+ t._dispatch("editorOpened", arg); // User may modify the editor
1200
+
1201
+
1202
+ inputElement.focus();
1203
+
1204
+ if (typeof inputElement.select === "function") {
1205
+ inputElement.select();
1206
+ }
1207
+
1208
+ arg["initialText"] = t._initialText = t.getText(); // After all modifications, cache the string for text change event
1209
+
1210
+ t._editing = true; // Editing state cannot be false until a text has been committed or cancelled
1211
+
1212
+ t._lastActiveGrid = host;
1213
+ };
1214
+ /** Using to open row editor.
1215
+ * @public
1216
+ * @param {number} rowIndex
1217
+ * @param {Object=} grid core grid object
1218
+ */
1219
+
1220
+
1221
+ InCellEditingPlugin.prototype.openRowEditor = function (rowIndex, grid) {
1222
+ var t = this;
1223
+ grid = grid || t._hosts[0]; // if open same row we will do nothing
1224
+
1225
+ if (t._getRowIndex(t._activeRowId) === rowIndex || !grid) {
1226
+ return;
1227
+ } // close all open editor
1228
+
1229
+
1230
+ t.closeRowEditor(false, grid);
1231
+
1232
+ t._commitText(false);
1233
+
1234
+ var firstInput, firstPopup;
1235
+ var section = grid.getSection("content");
1236
+ var dataSource = grid.getDataSource();
1237
+ var lastIndex = (section.getColumnCount() || 0) - 1;
1238
+ var isBottom = rowIndex + 1 >= section.getRowCount();
1239
+ var sectionBGColor = this._elfVersion || t._inlineStyling ? section.getComputedStyle().backgroundColor : null;
1240
+ var rowH = section.getRowHeight(rowIndex); // if normally parent popup will be document.body
1241
+
1242
+ var parentElement = document.body; // but if grid is _compositeGrid or _realTimeGrid then
1243
+ // then we will use grid parent instead
1244
+
1245
+ if (t._compositeGrid || t._realTimeGrid) {
1246
+ parentElement = grid.getElement().parentElement;
1247
+ } // loop for all column
1248
+
1249
+
1250
+ for (var columnIndex = 0; columnIndex <= lastIndex; columnIndex++) {
1251
+ // ignore column that can't edit
1252
+ if (!t.isColumnEditable(columnIndex)) {
1253
+ continue;
1254
+ }
1255
+
1256
+ var cell = section.getCell(columnIndex, rowIndex);
1257
+
1258
+ if (!cell || cell.hasClass("no-editing") || cell.hasClass("folder")) {
1259
+ continue;
1260
+ } // all verify is done
1261
+ // create editor, popup, inputElement
1262
+
1263
+
1264
+ var inCellCache = t._createContentEditor(columnIndex, grid);
1265
+
1266
+ var content = cell.getContent();
1267
+
1268
+ var field = t._getField(columnIndex);
1269
+
1270
+ var sourceContent = t._getSourceContent(dataSource, rowIndex, field, content);
1271
+
1272
+ var inputElement = inCellCache["inputElement"];
1273
+ var editor = inCellCache["editor"];
1274
+ var balloonPopup = inCellCache["balloonPopup"];
1275
+
1276
+ if (!firstInput) {
1277
+ firstInput = inputElement;
1278
+ firstPopup = balloonPopup;
1279
+ balloonPopup.enableUIBlocking(t._uiBlocking);
1280
+ } else {
1281
+ balloonPopup.enableUIBlocking(false);
1282
+ }
1283
+
1284
+ t._setText(sourceContent, inputElement); // WARNING: value-changed event from ELF v3 component may be triggered due to their design flaw
1285
+
1286
+
1287
+ if (isBottom) {
1288
+ inputElement.classList.add("bottom");
1289
+ } else {
1290
+ inputElement.classList.remove("bottom");
1291
+ }
1292
+
1293
+ var editorStyle = editor.style;
1294
+
1295
+ if (sectionBGColor) {
1296
+ editorStyle.backgroundColor = sectionBGColor;
1297
+ }
1298
+
1299
+ editorStyle.height = rowH + "px"; // this is different from single edit mode
1300
+ // row edit mode not support balloon mode
1301
+
1302
+ var width = section.getCellWidth(columnIndex, rowIndex);
1303
+ editorStyle.width = width + "px";
1304
+ editor.classList.remove("balloon"); // Attach our popup (editor element)
1305
+
1306
+ balloonPopup.attachTo(cell.getElement());
1307
+ balloonPopup.show(true, parentElement);
1308
+ balloonPopup.disableAutoHiding(true); // this._updateEditorLayout(inputElement); // Adjust sizes after append to the DOM
1309
+ } // if firstInput not undefined that mean at lease one popup is open
1310
+
1311
+
1312
+ if (firstInput) {
1313
+ firstPopup.addEventListener("hidden", t._onPopupHide);
1314
+ t._lastActiveGrid = grid;
1315
+ t._editing = true; // Editing state cannot be false until a text has been committed or cancelled
1316
+
1317
+ t._activeRowId = this._getRowId(rowIndex);
1318
+ firstInput.focus();
1319
+ section.addClass("edit-mode");
1320
+
1321
+ if (t._disablingScroll) {
1322
+ t._freezeScrolling(grid, true);
1323
+ }
1324
+ }
1325
+ };
1326
+ /** Using to close row editor.
1327
+ * @public
1328
+ * @param {boolean=} isCommit=true Default is true, to save change that user made to datasource
1329
+ * @fires InCellEditingPlugin#beforeRowCommit
1330
+ * @fires InCellEditingPlugin#rowEditorClosed
1331
+ */
1332
+
1333
+
1334
+ InCellEditingPlugin.prototype.closeRowEditor = function (isCommit) {
1335
+ var t = this;
1336
+ var grid = t._lastActiveGrid; // if no row active then do nothing
1337
+
1338
+ if (!t._activeRowId || !grid) {
1339
+ return;
1340
+ }
1341
+
1342
+ var rowId = t._activeRowId;
1343
+
1344
+ var rowIndex = t._getRowIndex(rowId);
1345
+
1346
+ if (rowIndex <= -1) {
1347
+ isCommit = false; // rowIndex -1 mean row is not found or already disposed
1348
+ } else {
1349
+ isCommit = isCommit !== false; // default is true
1350
+ }
1351
+
1352
+ var section = grid.getSection("content");
1353
+ var columnLength = grid.getColumnCount();
1354
+ var fieldValue = {};
1355
+ var inCellCaches = [];
1356
+ var inCellCache; // in this section we just prepare data
1357
+
1358
+ for (var columnIndex = 0; columnIndex < columnLength; columnIndex++) {
1359
+ var columnData = t._getColumnData(columnIndex, grid);
1360
+
1361
+ inCellCache = columnData && columnData["inCellCache"]; // if not have inCellCache then this column not have editor
1362
+
1363
+ if (!inCellCache) {
1364
+ continue;
1365
+ }
1366
+
1367
+ inCellCache.columnIndex = columnIndex;
1368
+ inCellCaches.push(inCellCache);
1369
+
1370
+ if (isCommit) {
1371
+ var field = t._getField(columnIndex);
1372
+
1373
+ inCellCache.field = field;
1374
+ fieldValue[field] = this._getValue(inCellCache["inputElement"]);
1375
+ }
1376
+ }
1377
+
1378
+ var length = inCellCaches.length;
1379
+ var i, e; // dispatch event beforeRowCommit
1380
+
1381
+ if (isCommit) {
1382
+ if (t.hasListener("beforeRowCommit")) {
1383
+ e = {
1384
+ grid: grid,
1385
+ rowIndex: rowIndex,
1386
+ fieldValue: fieldValue,
1387
+ cancel: false,
1388
+ rowId: t._activeRowId
1389
+ };
1390
+
1391
+ t._dispatch("beforeRowCommit", e); // e.cancel = true mean user want to cancel closeRowEditor operation
1392
+
1393
+
1394
+ isCommit = !e.cancel;
1395
+ }
1396
+
1397
+ if (isCommit) {
1398
+ var dataSource = grid.getDataSource();
1399
+
1400
+ for (i = 0; i < length; i++) {
1401
+ inCellCache = inCellCaches[i];
1402
+ var value = fieldValue[inCellCache.field]; // set data to datasource
1403
+
1404
+ if (dataSource) {
1405
+ // only use value from fieldValue
1406
+ // because fieldValue maybe mutate from beforeRowCommit event
1407
+ t._setData(dataSource, rowIndex, inCellCache.field, value);
1408
+ } // set value to ui if content is a build in text
1409
+
1410
+
1411
+ var cell = section.getCell(inCellCache.columnIndex, rowIndex);
1412
+ var content = cell.getContent();
1413
+
1414
+ if (content && content.classList.contains("text")) {
1415
+ cell.setContent(value);
1416
+ }
1417
+ }
1418
+ }
1419
+ }
1420
+
1421
+ if (t.hasListener("rowEditorClosed")) {
1422
+ e = {
1423
+ grid: grid,
1424
+ rowIndex: rowIndex,
1425
+ fieldValue: fieldValue,
1426
+ committed: isCommit
1427
+ };
1428
+
1429
+ t._dispatch("rowEditorClosed", e);
1430
+ } // hide editor by remove popup from dom
1431
+
1432
+
1433
+ for (i = 0; i < length; i++) {
1434
+ var popup = inCellCaches[i].balloonPopup;
1435
+ popup.removeEventListener("hidden", t._onPopupHide); // remove event every popup to make sure nothing left
1436
+
1437
+ popup.hide();
1438
+ }
1439
+
1440
+ t._freezeScrolling(grid, false); // reset status and resource
1441
+
1442
+
1443
+ section.removeClass("edit-mode");
1444
+ t._editing = false;
1445
+ t._activeRowId = "";
1446
+ t._lastActiveGrid = null;
1447
+ grid.focus();
1448
+ };
1449
+ /** open row editor if no any row editor opened, and close row editor if it already opened
1450
+ * @public
1451
+ * @param {number} rowIndex
1452
+ * @param {boolean=} isCommit=true Default is true, save change that user made to datasource
1453
+ * @param {Object=} grid grid instance
1454
+ * @fires InCellEditingPlugin#beforeRowCommit
1455
+ * @fires InCellEditingPlugin#rowEditorClosed
1456
+ */
1457
+
1458
+
1459
+ InCellEditingPlugin.prototype.toggleRowEditor = function (rowIndex, isCommit, grid) {
1460
+ if (this._getRowIndex(this._activeRowId) === rowIndex) {
1461
+ this.closeRowEditor(isCommit, grid);
1462
+ } else if (this._activeRowId) {
1463
+ this.closeRowEditor(isCommit, grid);
1464
+ this.openRowEditor(rowIndex, grid);
1465
+ } else {
1466
+ this.openRowEditor(rowIndex, grid);
1467
+ }
1468
+ };
1469
+ /** handle grid scrolling not window scroll
1470
+ * @private
1471
+ * @param {Object} e
1472
+ */
1473
+
1474
+
1475
+ InCellEditingPlugin.prototype._onScroll = function (e) {
1476
+ // just close editor
1477
+ this.closeRowEditor(false);
1478
+
1479
+ this._commitText(false);
1480
+ };
1481
+ /** handle popup hidden event
1482
+ * @private
1483
+ * @param {Object} e
1484
+ */
1485
+
1486
+
1487
+ InCellEditingPlugin.prototype._onPopupHide = function (e) {
1488
+ // in cell editing mode, when popup hide for any reason
1489
+ // cell editing will be close and make a commit. (depend on _autoCommitText flag)
1490
+ // WARNING: when user scroll outside grid. it will call _onPopupHide as well
1491
+ this._commitText(this._autoCommitText); // for row editing mode if editor hide by any reason
1492
+ // we will call close closeRowEditor to reset all internal flag status
1493
+ // row editing mode not care about _autoCommitText. (for the time being)
1494
+
1495
+
1496
+ this.closeRowEditor(false);
1497
+ };
1498
+ /** @private
1499
+ * @param {Object} e
1500
+ */
1501
+
1502
+
1503
+ InCellEditingPlugin.prototype._onValueChanged = function (e) {
1504
+ if (this._activeRowId) {
1505
+ return;
1506
+ } // do nothing in rowEditMode
1507
+
1508
+
1509
+ this._commitText(true);
1510
+ };
1511
+ /** @private
1512
+ * @param {Object} e
1513
+ */
1514
+
1515
+
1516
+ InCellEditingPlugin.prototype._onTextKeyDown = function (e) {
1517
+ e.stopPropagation();
1518
+
1519
+ if (this._activeRowId) {
1520
+ return;
1521
+ } // do nothing in rowEditMode
1522
+ // KeyCodes.ESC = 27
1523
+
1524
+
1525
+ if (e.keyCode === 27) {
1526
+ this._commitText(this._autoCommitText);
1527
+ } // KeyCodes.TAB = 9
1528
+
1529
+
1530
+ if (e.keyCode === 9) {
1531
+ e.preventDefault(); // stop losing focus
1532
+ }
1533
+ };
1534
+ /** @private
1535
+ * @param {Object} e
1536
+ */
1537
+
1538
+
1539
+ InCellEditingPlugin.prototype._onTextKeyUp = function (e) {
1540
+ e.stopPropagation();
1541
+
1542
+ if (this._activeRowId) {
1543
+ return;
1544
+ } // do nothing in rowEditMode
1545
+
1546
+
1547
+ if (this.hasListener("keyUp")) {
1548
+ this._activePos["text"] = this._activePos["enteredText"] = this._activeInCellCache["inputElement"].value;
1549
+
1550
+ this._dispatch("keyUp", this._activePos);
1551
+ } // KeyCodes.ENTER = 13 && KeyCodes.TAB = 9
1552
+
1553
+
1554
+ var tabKey = e.keyCode === 9;
1555
+
1556
+ if (tabKey || e.keyCode === 13) {
1557
+ var text = this.getText();
1558
+ var cellInfo = this._activePos;
1559
+
1560
+ if (this._initialText !== text) {
1561
+ this._commitText(true);
1562
+
1563
+ e.preventDefault(); // TODO: Check if this is needed
1564
+ } else {
1565
+ this._commitText(false);
1566
+ }
1567
+
1568
+ if (tabKey && this._tabToMove && !e.altKey && !e.ctrlKey) {
1569
+ var host = cellInfo ? cellInfo["grid"] : null;
1570
+
1571
+ if (host && host["getCellInfo"]) {
1572
+ var dv = host.getDataSource();
1573
+
1574
+ while (cellInfo) {
1575
+ cellInfo = e.shiftKey ? host.getPrevCell(cellInfo) : host.getNextCell(cellInfo);
1576
+
1577
+ if (cellInfo && cellInfo["cell"]) {
1578
+ if (dv.getRowDataAt(cellInfo["rowIndex"])) {
1579
+ // Check group header row
1580
+ if (this.isColumnEditable(cellInfo["colIndex"])) {
1581
+ this.openEditor(cellInfo["colIndex"], cellInfo["rowIndex"], cellInfo["sectionName"], cellInfo["grid"]);
1582
+ break;
1583
+ }
1584
+ }
1585
+ } else {
1586
+ cellInfo = null;
1587
+ }
1588
+ }
1589
+ }
1590
+ }
1591
+ }
1592
+ };
1593
+ /** Commit text from editor to cell.
1594
+ * @private
1595
+ * @param {boolean} committed
1596
+ */
1597
+
1598
+
1599
+ InCellEditingPlugin.prototype._commitText = function (committed) {
1600
+ var t = this;
1601
+ var arg = t._activePos;
1602
+
1603
+ if (!t.isEditing() || !arg) {
1604
+ return;
1605
+ }
1606
+
1607
+ arg["section"].removeClass("edit-mode");
1608
+ t._editing = false;
1609
+ var enteredValue = arg["text"] = this.getValue();
1610
+
1611
+ if (committed) {
1612
+ if (t.hasListener("beforeCommit")) {
1613
+ t._dispatch("beforeCommit", arg);
1614
+
1615
+ committed = !arg["cancel"];
1616
+ enteredValue = arg["text"];
1617
+ }
1618
+
1619
+ if (committed && t._dataBinding) {
1620
+ var sectionSettings = arg["sectionSettings"];
1621
+ var sectionType = sectionSettings.getType(); // case edit content
1622
+
1623
+ if ("content" === sectionType) {
1624
+ var dv = sectionSettings.getDataSource();
1625
+
1626
+ if (dv) {
1627
+ t._setData(dv, arg["rowIndex"], arg["field"], enteredValue);
1628
+
1629
+ if (t._prevContent && t._prevContent.classList.contains("text")) {
1630
+ // Bind data only if previous content is a build in text
1631
+ t._activeCell.setContent(enteredValue);
1632
+ }
1633
+ }
1634
+ } // case edit title
1635
+ else if ("title" === sectionType) {
1636
+ var _grid = this._compositeGrid || this._realTimeGrid || null;
1637
+
1638
+ if (_grid) {
1639
+ _grid.setColumnName(arg["colIndex"], enteredValue);
1640
+ }
1641
+ } else {
1642
+ t._activeCell.setContent(enteredValue);
1643
+ }
1644
+ }
1645
+ }
1646
+
1647
+ if (t.hasListener("editorClosed")) {
1648
+ arg["canceled"] = arg["cancelled"] = !committed;
1649
+ arg["committed"] = committed;
1650
+
1651
+ t._dispatch("editorClosed", arg);
1652
+ }
1653
+
1654
+ if (t._activeInCellCache && t._activeInCellCache.balloonPopup) {
1655
+ t._activeInCellCache.balloonPopup.removeEventListener("hidden", t._onPopupHide);
1656
+
1657
+ t._activeInCellCache.balloonPopup.hide();
1658
+ }
1659
+
1660
+ Dom.removeParent(t._customElement);
1661
+
1662
+ t._freezeScrolling(arg["grid"], false);
1663
+
1664
+ arg["grid"].focus();
1665
+ t._activePos = t._activeCell = t._prevContent = t._lastActiveGrid = t._activeInCellCache = null;
1666
+ };
1667
+ /** @private
1668
+ * @param {Event} e
1669
+ */
1670
+
1671
+
1672
+ InCellEditingPlugin.prototype._stopPropagation = function (e) {
1673
+ e.stopPropagation();
1674
+ };
1675
+ /** Using for Check balloon mode is turn on/off.
1676
+ * @private
1677
+ * @param {Object} cell Grid cell object
1678
+ * @return {boolean}
1679
+ */
1680
+
1681
+
1682
+ InCellEditingPlugin.prototype._isBalloonMode = function (cell) {
1683
+ var cellElem = cell.getElement();
1684
+ var compStyles = cellElem ? window.getComputedStyle(cellElem) : {};
1685
+ return this._balloonMode || compStyles.display === "none" || compStyles.visibility === "hidden";
1686
+ };
1687
+ /** @private
1688
+ * @param {Object} host core grid object
1689
+ * @param {boolean} bool
1690
+ */
1691
+
1692
+
1693
+ InCellEditingPlugin.prototype._listenForTriggering = function (host, bool) {
1694
+ if (bool) {
1695
+ host.listen("dblclick", this._onDoubleClick); // Make a comparable functionality for touchscreen
1696
+
1697
+ if (isTouchDevice()) {
1698
+ host.listen("touchstart", this._onTouchStart);
1699
+ host.listen("touchend", this._onTouchEnd);
1700
+ host.listen("touchcancel", this._onTouchEnd);
1701
+ }
1702
+ } else {
1703
+ host.unlisten("dblclick", this._onDoubleClick);
1704
+ host.unlisten("touchstart", this._onTouchStart);
1705
+ host.unlisten("touchend", this._onTouchEnd);
1706
+ host.unlisten("touchcancel", this._onTouchEnd);
1707
+ }
1708
+ };
1709
+ /** Use only On-Touch-Start event on mobile devices.
1710
+ * @private
1711
+ * @param {Object} e
1712
+ */
1713
+
1714
+
1715
+ InCellEditingPlugin.prototype._onTouchStart = function (e) {
1716
+ this._resetTimer();
1717
+
1718
+ this._timerId = setTimeout(this._onTimer, this._longPressTime);
1719
+ };
1720
+ /** Use only press time on mobile devices.
1721
+ * @private
1722
+ * @param {Object} e
1723
+ */
1724
+
1725
+
1726
+ InCellEditingPlugin.prototype._onTimer = function (e) {
1727
+ this._timerId = 0;
1728
+ };
1729
+ /** Use only On-Touch-End event on mobile devices.
1730
+ * @private
1731
+ * @param {Event} e
1732
+ */
1733
+
1734
+
1735
+ InCellEditingPlugin.prototype._onTouchEnd = function (e) {
1736
+ if (!this._resetTimer()) {
1737
+ this._onDoubleClick(e); // Trigger cell editor
1738
+
1739
+ }
1740
+ };
1741
+ /** Use only to reset timer on mobile devices.
1742
+ * @private
1743
+ * @return {boolean}
1744
+ */
1745
+
1746
+
1747
+ InCellEditingPlugin.prototype._resetTimer = function () {
1748
+ if (this._timerId) {
1749
+ clearTimeout(this._timerId);
1750
+ this._timerId = 0;
1751
+ return true;
1752
+ }
1753
+
1754
+ return false;
1755
+ };
1756
+ /** Set other elements to using like popup when editing cell.
1757
+ * @public
1758
+ * @param {Element} elm
1759
+ */
1760
+
1761
+
1762
+ InCellEditingPlugin.prototype.setPopupElement = function (elm) {
1763
+ var balloonPopup = this._activeInCellCache && this._activeInCellCache["balloonPopup"];
1764
+
1765
+ if (this._customElement) {
1766
+ balloonPopup && balloonPopup.removeFocusElement(this._customElement);
1767
+
1768
+ this._customElementPopup.dispose();
1769
+
1770
+ this._customElementPopup = null;
1771
+ }
1772
+
1773
+ this._customElement = elm;
1774
+
1775
+ if (this._customElement) {
1776
+ this._customElementPopup = new Popup(this._customElement);
1777
+ balloonPopup && balloonPopup.addFocusElement(this._customElement);
1778
+ }
1779
+ };
1780
+ /** Set content to the editor but do not commit anything to internal storage.
1781
+ * @public
1782
+ * @param {*} content
1783
+ */
1784
+
1785
+
1786
+ InCellEditingPlugin.prototype.setText = function (content) {
1787
+ // TODO: since we have inputElement per each column
1788
+ // we should receive column index to set value in specific column
1789
+ this._activeInCellCache && this._setText(content, this._activeInCellCache["inputElement"]);
1790
+ };
1791
+ /** @private
1792
+ * @param {*} content
1793
+ * @param {Element} inputElement editor element
1794
+ */
1795
+
1796
+
1797
+ InCellEditingPlugin.prototype._setText = function (content, inputElement) {
1798
+ inputElement._origValue = content;
1799
+ var inputTag = inputElement.tagName.toLowerCase();
1800
+ var typeMap = InCellEditingPlugin._uiElementTypesMap;
1801
+
1802
+ if (inputTag === typeMap.checkbox) {
1803
+ var checked = content ? !(content === "f" || content === "false") : false;
1804
+
1805
+ if (checked) {
1806
+ inputElement.setAttribute("checked", "true");
1807
+ } else {
1808
+ inputElement.removeAttribute("checked");
1809
+ }
1810
+ } else if (inputTag === typeMap.combobox) {
1811
+ if (this._elfVersion <= 3) {
1812
+ inputElement.value = "";
1813
+ inputElement.value = {
1814
+ value: content,
1815
+ label: content
1816
+ };
1817
+ } else {
1818
+ inputElement.value = content;
1819
+ }
1820
+ } else if (inputTag === typeMap.date) {
1821
+ ElfDate.setDate(inputElement, content);
1822
+ } else {
1823
+ var txt = "";
1824
+
1825
+ if (content != null) {
1826
+ if (typeof content === "string") {
1827
+ txt = content;
1828
+ } else {
1829
+ // content could be false, 0, NaN or etc.
1830
+ txt = content + "";
1831
+ }
1832
+ }
1833
+
1834
+ inputElement.value = txt;
1835
+ }
1836
+ };
1837
+ /** Get current text from the editor
1838
+ * @public
1839
+ * @return {string}
1840
+ * @see {@link InCellEditingPlugin#getValue}
1841
+ */
1842
+
1843
+
1844
+ InCellEditingPlugin.prototype.getText = function () {
1845
+ // TODO: since we have inputElement per each column
1846
+ // we should receive column index to return text of inputElement in specific column
1847
+ if (this._activeInCellCache) return this._getText(this._activeInCellCache["inputElement"]);else return "";
1848
+ };
1849
+ /** @private
1850
+ * @param {Element} inputElement editor element
1851
+ * @return {string}
1852
+ */
1853
+
1854
+
1855
+ InCellEditingPlugin.prototype._getText = function (inputElement) {
1856
+ var inputTag = inputElement.tagName.toLowerCase();
1857
+ var typeMap = InCellEditingPlugin._uiElementTypesMap;
1858
+
1859
+ if (inputTag === typeMap.checkbox) {
1860
+ return inputElement.checked + "";
1861
+ } else if (inputTag === typeMap.combobox) {
1862
+ if (this._elfVersion <= 3) {
1863
+ return inputElement.value ? inputElement.value.value : "";
1864
+ }
1865
+ } else if (inputTag === typeMap.date) {
1866
+ return inputElement.value + "";
1867
+ }
1868
+
1869
+ return inputElement.value;
1870
+ };
1871
+ /** Convert current text from the editor to value corresponding to the type of the editor
1872
+ * @public
1873
+ * @return {*} Returned type is based on the type of the editor
1874
+ * @see {@link InCellEditingPlugin#getText}
1875
+ */
1876
+
1877
+
1878
+ InCellEditingPlugin.prototype.getValue = function () {
1879
+ // TODO: since we have inputElement per each column
1880
+ // we should receive column index to return value of inputElement in specific column
1881
+ return this._activeInCellCache ? this._getValue(this._activeInCellCache["inputElement"]) : null;
1882
+ };
1883
+ /** @private
1884
+ * @param {Element} inputElement editor element
1885
+ * @return {*} Returned type is based on the type of the editor
1886
+ */
1887
+
1888
+
1889
+ InCellEditingPlugin.prototype._getValue = function (inputElement) {
1890
+ var inputTag = inputElement.tagName.toLowerCase();
1891
+ var typeMap = InCellEditingPlugin._uiElementTypesMap;
1892
+
1893
+ if (inputTag === typeMap.checkbox) {
1894
+ return inputElement.checked ? true : false;
1895
+ } else if (inputTag === typeMap.date) {
1896
+ return ElfDate.getDate(inputElement);
1897
+ } else if (inputTag === typeMap.number || typeof inputElement._origValue === "number" // Smart data conversion based orignal value
1898
+ ) {
1899
+ return +inputElement.value;
1900
+ }
1901
+
1902
+ return this._getText(inputElement);
1903
+ };
1904
+ /** Use to clear text in text editor.
1905
+ * @public
1906
+ */
1907
+
1908
+
1909
+ InCellEditingPlugin.prototype.clearText = function () {
1910
+ this.setText("");
1911
+ };
1912
+ /** Use to append text in text editor. WARNING: Only works with the text type editor
1913
+ * @public
1914
+ * @param {string} word
1915
+ */
1916
+
1917
+
1918
+ InCellEditingPlugin.prototype.appendText = function (word) {
1919
+ // TODO: since we have inputElement per each column
1920
+ // we should receive column index to return append text in specific column
1921
+ if (word && this._activeInCellCache) {
1922
+ this._activeInCellCache["inputElement"].value += word;
1923
+ }
1924
+ };
1925
+ /** Commit text will set text and commit to cell.
1926
+ * @public
1927
+ * @param {string=} word
1928
+ */
1929
+
1930
+
1931
+ InCellEditingPlugin.prototype.commitText = function (word) {
1932
+ if (word) {
1933
+ this.setText(word);
1934
+ }
1935
+
1936
+ this._commitText(true);
1937
+ };
1938
+ /** Get Balloon Popup Element to access any API provided.
1939
+ * @public
1940
+ * @return {Popup|null}
1941
+ */
1942
+
1943
+
1944
+ InCellEditingPlugin.prototype.getBalloonPopup = function () {
1945
+ // TODO: since we have balloonPopup per each column
1946
+ // we should receive column index to return balloonPopup in specific column
1947
+ return this._activeInCellCache ? this._activeInCellCache["balloonPopup"] : null;
1948
+ };
1949
+ /**
1950
+ * @public
1951
+ * @param {boolean=} disabled
1952
+ * @return {boolean} previous disablingScroll status
1953
+ */
1954
+
1955
+
1956
+ InCellEditingPlugin.prototype.setDisablingScroll = function (disabled) {
1957
+ var prev = disabled;
1958
+ this._disablingScroll = disabled;
1959
+ return prev;
1960
+ };
1961
+ /** stop scrolling to move to prevent editor close
1962
+ * @private
1963
+ * @param {Object} grid grid instance
1964
+ * @param {boolean=} frozen
1965
+ */
1966
+
1967
+
1968
+ InCellEditingPlugin.prototype._freezeScrolling = function (grid, frozen) {
1969
+ if (!grid) return;
1970
+ var vs = grid.getVScrollbar();
1971
+ var hs = grid.getHScrollbar();
1972
+ vs && vs.freezeScrolling(frozen);
1973
+ hs && hs.freezeScrolling(frozen);
1974
+ };
1975
+
1976
+ export default InCellEditingPlugin;
1977
+ export { InCellEditingPlugin, InCellEditingPlugin as InCellEditing, InCellEditingPlugin as InCellEditingExtension };