@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,1884 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+
3
+ import { Ext } from '../../tr-grid-util/es6/Ext.js';
4
+ import { GridPlugin } from '../../tr-grid-util/es6/GridPlugin.js';
5
+ import { FilterBuilder } from '../../tr-grid-util/es6/FilterBuilder.js';
6
+ import { ElfUtil } from '../../tr-grid-util/es6/ElfUtil.js';
7
+ /** @event RowFilteringPlugin#click
8
+ * @description click event is dispatched when a user clicks the column filter icon.
9
+ */
10
+
11
+ /** @event RowFilteringPlugin#iconCreated
12
+ * @description iconCreated event is dispatched when a new column filter icon is created.
13
+ * @property {Element} icon Filter icon element
14
+ * @property {number} colIndex Column index
15
+ * @property {Object} grid Core grid instance
16
+ */
17
+
18
+ /** @event RowFilteringPlugin#filterChanged
19
+ * @description Fired whenever global or column filter is changed by either adding or removing. The change will not immediately applied to grid's data view
20
+ * @property {string} filterType This can be either "global" or "column"
21
+ * @property {string} changeType This can be either "add" or "remove"
22
+ * @property {number} colIndex Column index
23
+ * @property {string} field specified by the current column
24
+ */
25
+
26
+ /** @event RowFilteringPlugin#refreshed
27
+ * @description Fired after new filter is applied to grid's data view
28
+ */
29
+
30
+ /** @callback RowFilteringPlugin~FilterLogic
31
+ * @description Logic used to filter in or out on each row
32
+ * @param {Object.<string, *>} rowData Row data is an object with field as key and user data as value
33
+ * @param {string} rid Row Id used in DataView
34
+ * @param {*} ctx Context object contains context/states given by user
35
+ * @return {boolean}
36
+ */
37
+
38
+ /** @typedef {*} RowFilteringPlugin~Expression
39
+ * @description An expression that can be parsed into RowFilteringPlugin~FilterLogic. The expression is intended for saving and restoring filters, so it is serializable by JSON.stringify.
40
+ The expression can take various forms:<br>
41
+ * 1. String for free style text input e.g., "[col1] > 10", "[field] == 20"<br>
42
+ * 2. 2D-Array for predefined filter operators e.g., [["GT", 10, "AND"], ["EQ", "text"]]<br>
43
+ * 3. Object map for value filters e.g., {"value": true, "10": true}<br>
44
+ * 4. Function for RowFilteringPlugin~FilterLogic
45
+ */
46
+
47
+ /** @typedef {Object} RowFilteringPlugin~FilterExpression
48
+ * @description FilterExpression contains all data used for saving and restoring filter in a column
49
+ * @property {string} field
50
+ * @property {RowFilteringPlugin~Expression} expression Expression representing filter function
51
+ * @property {*} context Context object contains context/states given by user
52
+ */
53
+
54
+ /** @typedef {Object} RowFilteringPlugin~ColumnOptions
55
+ * @description Extension column options that can be specified on each individual grid's column option:
56
+ * @property {RowFilteringPlugin~Expression=} filter An expression string or Function
57
+ * @property {*=} filterState Context object that will be passed as the third parameter for the filter logic
58
+ */
59
+
60
+ /** @typedef {Object} RowFilteringPlugin~FilterDialogOptions
61
+ * @description Options that specific UI of filter dialog
62
+ * @property {boolean=} sortUI show/hide sort UI
63
+ * @property {boolean=} filterUI show/hide filter UI
64
+ * @property {string=} fieldDataType data type of column
65
+ * @property {string=} lang dialog language
66
+ * @property {Function=} rawDataAccessor In case you have custom data type for the specified field, data getter is needed to retrieve raw value for filtering
67
+ * @property {Function=} formattedDataAccessor In case you have custom data type for the specified field, data getter is needed to retrieve formatted value for display
68
+ * @property {Function=} sortLogic sorting function for sort autosuggest list in filter dialog, the values for comparison are raw value not a formatted value
69
+ */
70
+
71
+ /** @typedef {Object} RowFilteringPlugin~Options
72
+ * @description The options can be specified by `rowFiltering` property of the main grid's options
73
+ * @property {boolean=} disabledUI=false If enabled, filter icon will not be created/shown.
74
+ * @property {Function=} click=null Event handler dispatched when a user clicks the column filter icon.
75
+ * @property {Function=} clicked=null Alias to `click` event handler
76
+ * @property {Function=} iconCreated=null Event handler dispatched when a new column filter icon is created.
77
+ * @property {Function=} filterChanged=null Event handler dispatched whenever global or column filter is changed by either adding or removing.
78
+ */
79
+
80
+ /** @private
81
+ * @function
82
+ * @param {Object} cfo
83
+ * @return {!RowFilteringPlugin~FilterExpression}
84
+ */
85
+
86
+ var toFilterExpression = function toFilterExpression(cfo) {
87
+ var ctx = cfo._context[0]; // TODO: Handle rawDataAccessor and formattedDataAccessor (saving and loading of functions)
88
+
89
+ return {
90
+ field: cfo._field || "",
91
+ expression: cfo._expressions[0],
92
+ context: ctx != null && !ctx._autoGenerated ? ctx : null
93
+ };
94
+ };
95
+ /** @constructor
96
+ * @extends {GridPlugin}
97
+ */
98
+
99
+
100
+ var RowFilteringPlugin = function RowFilteringPlugin() {
101
+ var t = this;
102
+ t._onPreSectionRender = t._onPreSectionRender.bind(t);
103
+ t._onColumnAdded = t._onColumnAdded.bind(t);
104
+ t._onColumnRemoved = t._onColumnRemoved.bind(t);
105
+ t._onIconClick = t._onIconClick.bind(t);
106
+ t._filterLogic = t._filterLogic.bind(t);
107
+ t._updateAllColumnIcons = t._updateAllColumnIcons.bind(t);
108
+ t.refresh = t.refresh.bind(t);
109
+ t._requestFilterRefresh = t._requestFilterRefresh.bind(t);
110
+ t._globalFilters = [];
111
+ t._globalContexts = [];
112
+ t._columnFilters = [];
113
+ t._hosts = [];
114
+ t._dvs = [];
115
+ t._funcMap = {};
116
+ t._nameMap = {};
117
+ };
118
+
119
+ Ext.inherits(RowFilteringPlugin, GridPlugin);
120
+ /** @type {!Object.<string, Function>}
121
+ * @private
122
+ */
123
+
124
+ RowFilteringPlugin.prototype._funcMap = null; // For preventing repetition of resolving the same expression
125
+
126
+ /** @type {!Object.<string, Function>}
127
+ * @private
128
+ */
129
+
130
+ RowFilteringPlugin.prototype._nameMap; // Mapping name to filter function for referencing
131
+
132
+ /** @type {boolean}
133
+ * @private
134
+ */
135
+
136
+ RowFilteringPlugin.prototype._disabled = false;
137
+ /** @type {boolean}
138
+ * @private
139
+ */
140
+
141
+ RowFilteringPlugin.prototype._disabledUI = false;
142
+ /** @type {Object.<string, boolean>}
143
+ * @private
144
+ */
145
+
146
+ RowFilteringPlugin.prototype._disablingIds = null; // For nested disabling
147
+
148
+ /** @type {!Array.<Function>}
149
+ * @private
150
+ */
151
+
152
+ RowFilteringPlugin.prototype._globalFilters;
153
+ /** @type {!Array.<Object>}
154
+ * @private
155
+ */
156
+
157
+ RowFilteringPlugin.prototype._globalContexts;
158
+ /** @type {!Array.<Object>}
159
+ * @private
160
+ */
161
+
162
+ RowFilteringPlugin.prototype._columnFilters;
163
+ /** @type {Array.<Object>}
164
+ * @private
165
+ */
166
+
167
+ RowFilteringPlugin.prototype._activeColFilters = null;
168
+ /** @type {number}
169
+ * @private
170
+ */
171
+
172
+ RowFilteringPlugin.prototype._filterId = 0;
173
+ /** @type {number}
174
+ * @private
175
+ */
176
+
177
+ RowFilteringPlugin.prototype._uiTimerId = 0;
178
+ /** @type {number}
179
+ * @private
180
+ */
181
+
182
+ RowFilteringPlugin.prototype._dvTimerId = 0;
183
+ /** @type {Function}
184
+ * @private
185
+ */
186
+
187
+ RowFilteringPlugin.prototype._overridingFilter = null;
188
+ /** @type {Function}
189
+ * @private
190
+ */
191
+
192
+ RowFilteringPlugin.prototype._preTransform = null;
193
+ /** @type {Function}
194
+ * @private
195
+ */
196
+
197
+ RowFilteringPlugin.prototype._rowTransform = null;
198
+ /** @type {Element}
199
+ * @private
200
+ */
201
+
202
+ RowFilteringPlugin.prototype._filterDialog = null;
203
+ /** @type {FilterBuilder}
204
+ * @private
205
+ */
206
+
207
+ RowFilteringPlugin._filterBuilder = null;
208
+ /** Array of DataView objects
209
+ * @type {!Array.<Object>}
210
+ * @private
211
+ */
212
+
213
+ RowFilteringPlugin.prototype._dvs;
214
+ /** @public
215
+ * @return {string}
216
+ */
217
+
218
+ RowFilteringPlugin.prototype.getName = function () {
219
+ return "RowFilteringPlugin"; // Read Only
220
+ };
221
+ /** @public
222
+ * @param {Object} host core grid instance
223
+ * @param {Object=} options
224
+ */
225
+
226
+
227
+ RowFilteringPlugin.prototype.initialize = function (host, options) {
228
+ if (this._hosts.indexOf(host) >= 0) {
229
+ return;
230
+ }
231
+
232
+ this._hosts.push(host);
233
+
234
+ host.unloadPlugin("ColumnFilterPlugin");
235
+ host.listen("preSectionRender", this._onPreSectionRender);
236
+ host.listen("postDataSourceChanged", this._requestFilterRefresh); // TODO: Check if this is necessary
237
+
238
+ host.listen("columnAdded", this._onColumnAdded);
239
+ host.listen("columnRemoved", this._onColumnRemoved);
240
+ this.config(options); // In case of lazy loading
241
+ // TODO
242
+ };
243
+ /** @public
244
+ * @param {Object} host core grid instance
245
+ */
246
+
247
+
248
+ RowFilteringPlugin.prototype.unload = function (host) {
249
+ var at = this._hosts.indexOf(host);
250
+
251
+ if (at < 0) {
252
+ return;
253
+ }
254
+
255
+ this._hosts.splice(at, 1);
256
+
257
+ host.unlisten("preSectionRender", this._onPreSectionRender);
258
+ host.unlisten("postDataSourceChanged", this._requestFilterRefresh);
259
+ host.unlisten("columnAdded", this._onColumnAdded);
260
+ host.unlisten("columnRemoved", this._onColumnRemoved);
261
+
262
+ this._dispose();
263
+ };
264
+ /** @public
265
+ * @param {Object=} options
266
+ */
267
+
268
+
269
+ RowFilteringPlugin.prototype.config = function (options) {
270
+ if (!options) {
271
+ return;
272
+ }
273
+
274
+ var rowFiltering = options["rowFiltering"];
275
+
276
+ if (rowFiltering) {
277
+ if (rowFiltering["disabledUI"] || rowFiltering["uiDisabled"]) {
278
+ this._disabledUI = true;
279
+ }
280
+
281
+ if (rowFiltering["clicked"]) {
282
+ rowFiltering["click"] = rowFiltering["clicked"];
283
+ }
284
+
285
+ this.addListener(rowFiltering, "click");
286
+ this.addListener(rowFiltering, "iconCreated");
287
+ this.addListener(rowFiltering, "filterChanged");
288
+ this.addListener(rowFiltering, "refreshed");
289
+ }
290
+
291
+ var columns = options["columns"];
292
+
293
+ if (!columns) {
294
+ return;
295
+ } // var host = this._hosts[0];
296
+
297
+
298
+ var len = columns.length;
299
+
300
+ for (var i = 0; i < len; ++i) {
301
+ var column = columns[i];
302
+
303
+ this._setColumnOptions(i, column);
304
+ }
305
+ };
306
+ /** @public
307
+ * @param {Object=} gridOptions
308
+ * @return {!Object}
309
+ */
310
+
311
+
312
+ RowFilteringPlugin.prototype.getConfigObject = function (gridOptions) {
313
+ var obj = gridOptions || {};
314
+ var columns = obj.columns;
315
+
316
+ if (!columns) {
317
+ columns = obj.columns = [];
318
+ }
319
+
320
+ var len = this.getColumnCount();
321
+
322
+ for (var i = 0; i < len; ++i) {
323
+ var column = columns[i];
324
+
325
+ if (!column) {
326
+ column = columns[i] = {};
327
+ }
328
+
329
+ var colOptions = this._getColumnFilterOption(i);
330
+
331
+ if (colOptions) {
332
+ var exp = colOptions._expressions[0];
333
+
334
+ if (exp && typeof exp !== "function") {
335
+ // TODO: Accept function type
336
+ column.filter = exp; // This could be string, array, or object
337
+ }
338
+
339
+ var ctx = colOptions._context[0];
340
+
341
+ if (ctx != null) {
342
+ if (_typeof(ctx) !== "object" || !ctx._autoGenerated) {
343
+ column.filterState = ctx;
344
+ }
345
+ }
346
+ }
347
+ }
348
+
349
+ var extOptions = obj.rowFiltering;
350
+
351
+ if (!extOptions) {
352
+ extOptions = obj.rowFiltering = {};
353
+ }
354
+
355
+ extOptions.disabledUI = this._disabledUI;
356
+ return obj;
357
+ };
358
+ /** All filter logics in DataView will be temporarily removed until re-enabling. This is useful when trying to insert an item at the specified index. After re-enabling, both logics and icons will be restored.
359
+ * @public
360
+ * @param {boolean=} opt_disabled
361
+ * @param {string=} opt_id For handling nested called
362
+ */
363
+
364
+
365
+ RowFilteringPlugin.prototype.disable = function (opt_disabled, opt_id) {
366
+ var disabled = opt_disabled !== false;
367
+
368
+ if (!this._disablingIds) {
369
+ this._disablingIds = {};
370
+ }
371
+
372
+ if (!opt_id) {
373
+ opt_id = "_";
374
+ }
375
+
376
+ this._disablingIds[opt_id] = disabled;
377
+ disabled = false;
378
+
379
+ for (var key in this._disablingIds) {
380
+ // Find cumulative state
381
+ if (this._disablingIds[key]) {
382
+ disabled = true;
383
+ break;
384
+ }
385
+ }
386
+
387
+ if (this._disabled !== disabled) {
388
+ this._disabled = disabled;
389
+
390
+ if (disabled) {
391
+ this.refresh(); // Take an effect immediately
392
+
393
+ this._updateAllColumnIcons();
394
+ } else {
395
+ this._requestFilterRefresh(); // Take an effect later
396
+
397
+
398
+ this._setTimerForUpdatingIcons();
399
+ }
400
+ }
401
+ };
402
+ /** Add a global filter that is not related to any column. No filter icon is created in this way
403
+ * @public
404
+ * @param {RowFilteringPlugin~Expression} exp Expression or Function
405
+ * @param {string=} funcName Optional function name for referencing the given function
406
+ * @param {*=} ctx Context that will be passed as the third parameter for the filter logic
407
+ * @return {string} If success, function name is returned, otherwise empty string
408
+ * @fires RowFilteringPlugin#filterChanged
409
+ */
410
+
411
+
412
+ RowFilteringPlugin.prototype.addFilter = function (exp, funcName, ctx) {
413
+ var func = this._parseFilter(exp, -1);
414
+
415
+ if (!func) {
416
+ return "";
417
+ }
418
+
419
+ if (!funcName) {
420
+ funcName = "_" + this._filterId++;
421
+ }
422
+
423
+ if (this._nameMap[funcName] || this._globalFilters.indexOf(func) >= 0) {
424
+ return ""; // Function is already exists
425
+ }
426
+
427
+ ctx = ctx != null ? ctx : null;
428
+ this._nameMap[funcName] = func;
429
+
430
+ this._globalFilters.push(func);
431
+
432
+ this._globalContexts.push(ctx);
433
+
434
+ this._dispatch("filterChanged", {
435
+ "filterType": "global",
436
+ "changeType": "add",
437
+ "colIndex": -1,
438
+ "field": null
439
+ });
440
+
441
+ this._requestFilterRefresh();
442
+
443
+ return funcName;
444
+ };
445
+ /** Add a global filter that is not related to any column. No filter icon is created in this way
446
+ * @public
447
+ * @param {RowFilteringPlugin~Expression} exp Expression or Function
448
+ * @param {*=} ctx Context that will be passed as the third parameter for the filter logic
449
+ * @return {string} If success, function name is returned, otherwise empty string
450
+ * @fires RowFilteringPlugin#filterChanged
451
+ */
452
+
453
+
454
+ RowFilteringPlugin.prototype.addGridFilter = function (exp, ctx) {
455
+ return this.addFilter(exp, null, ctx);
456
+ };
457
+ /** @private
458
+ * @param {RowFilteringPlugin~Expression} exp
459
+ * @param {number=} colIndex
460
+ * @param {*=} ctx
461
+ * @return {Function}
462
+ */
463
+
464
+
465
+ RowFilteringPlugin.prototype._parseFilter = function (exp, colIndex, ctx) {
466
+ if (!exp) {
467
+ return null;
468
+ }
469
+
470
+ if (typeof exp === "function") {
471
+ return exp;
472
+ }
473
+
474
+ var filterBuilder = RowFilteringPlugin._getFilterBuilder();
475
+
476
+ var validIdx = colIndex || colIndex === 0;
477
+ var field = validIdx ? this._getField(colIndex) : "";
478
+ var formatter = validIdx ? this._getFormatter(colIndex) : null;
479
+ var func = null;
480
+
481
+ if (typeof exp === "string") {
482
+ // Free text does not need data accessors
483
+ func = this._funcMap[exp];
484
+
485
+ if (func == null) {
486
+ func = this._funcMap[exp] = filterBuilder.parse(exp, field, formatter, field);
487
+ }
488
+ } else {
489
+ var rawDataAccessor = null;
490
+ var formattedDataAccessor = null;
491
+
492
+ if (ctx) {
493
+ rawDataAccessor = ctx.rawDataAccessor || null;
494
+ formattedDataAccessor = ctx.formattedDataAccessor || null;
495
+ }
496
+
497
+ func = filterBuilder.parse(exp, field, formatter, field, rawDataAccessor, formattedDataAccessor);
498
+ }
499
+
500
+ return func;
501
+ };
502
+ /** If you want the column to always have one single filter, please use {@link RowFilteringPlugin#setColumnFilter} instead. This method allow a single column to have multiple filters.
503
+ * @public
504
+ * @param {number} colIndex
505
+ * @param {RowFilteringPlugin~Expression} exp Expression can be string, Array, Object, or Function
506
+ * @param {(Object|string)=} ctx Context object that will be passed as the third parameter for the filter logic
507
+ * @return {boolean} True if success
508
+ * @fires RowFilteringPlugin#filterChanged
509
+ */
510
+
511
+
512
+ RowFilteringPlugin.prototype.addColumnFilter = function (colIndex, exp, ctx) {
513
+ var func = null;
514
+
515
+ if (typeof exp === "function") {
516
+ func =
517
+ /** @type{Function} */
518
+ exp;
519
+ exp = ctx && typeof ctx === "string" ? ctx : null; // for saving. TODO: Support saving for function type
520
+ } else {
521
+ func = this._parseFilter(exp, colIndex, ctx);
522
+ }
523
+
524
+ if (!func) {
525
+ return false;
526
+ }
527
+
528
+ if (ctx == null) {
529
+ ctx = {
530
+ "_autoGenerated": true
531
+ };
532
+ }
533
+
534
+ var field = this._getField(colIndex);
535
+
536
+ if (ctx && _typeof(ctx) === "object") {
537
+ ctx["field"] = field;
538
+ }
539
+
540
+ var cfo = this._initColumnFilterOption(colIndex);
541
+
542
+ cfo._field = field; // TODO: Handle fieldDataType
543
+
544
+ cfo._filters.push(func);
545
+
546
+ cfo._expressions.push(exp);
547
+
548
+ cfo._context.push(ctx);
549
+
550
+ cfo._rawDataAccessor = ctx.rawDataAccessor || null;
551
+ cfo._formattedDataAccessor = ctx.formattedDataAccessor || null;
552
+
553
+ this._columnFilters.push(cfo);
554
+
555
+ this._dispatch("filterChanged", {
556
+ "filterType": "column",
557
+ "changeType": "add",
558
+ "colIndex": colIndex,
559
+ "field": field
560
+ }); // UI
561
+
562
+
563
+ this._requestFilterRefresh();
564
+
565
+ this._updateColumnIcon(colIndex);
566
+
567
+ return true;
568
+ };
569
+ /** This method guarantees that the column can have at most one filter at the time. It performs {@link RowFilteringPlugin#removeColumnFilters} before {@link RowFilteringPlugin#addColumnFilter}
570
+ * @public
571
+ * @param {number} colIndex
572
+ * @param {RowFilteringPlugin~Expression} exp Expression can be string, Array, Object, or Function
573
+ * @param {(Object|string)=} ctx Context object that will be passed as the third parameter for the filter logic
574
+ * @return {boolean} True If there is any change
575
+ * @fires RowFilteringPlugin#filterChanged
576
+ */
577
+
578
+
579
+ RowFilteringPlugin.prototype.setColumnFilter = function (colIndex, exp, ctx) {
580
+ var removed = this._removeColumnFilters(colIndex);
581
+
582
+ var added = this.addColumnFilter(colIndex, exp, ctx);
583
+
584
+ if (!added && removed) {
585
+ this._updateColumnIcon(colIndex);
586
+ }
587
+
588
+ return removed || added;
589
+ };
590
+ /** @private
591
+ * @param {number} colIndex
592
+ * @param {RowFilteringPlugin~ColumnOptions} columnOptions
593
+ * @example
594
+ * var colDef = {
595
+ * "filter": "gt♦0♣"
596
+ * };
597
+ * var colDef2 = {
598
+ * "filter": "[PCTCHNG] > 0"
599
+ * };
600
+ * var colDef3 = {
601
+ * "filter": function() { }
602
+ * };
603
+ */
604
+
605
+
606
+ RowFilteringPlugin.prototype._setColumnOptions = function (colIndex, columnOptions) {
607
+ var fieldDataType = columnOptions["fieldDataType"]; // TODO: This should not be set here
608
+
609
+ if (fieldDataType) {
610
+ var colOptions = this._newExtColumnOptions(colIndex);
611
+
612
+ colOptions.fieldDataType = fieldDataType; // TODO: This should not be set here
613
+ }
614
+
615
+ var exp = columnOptions["filter"];
616
+
617
+ if (exp) {
618
+ this.addColumnFilter(colIndex, exp, columnOptions["filterState"]);
619
+ }
620
+ };
621
+ /** @private
622
+ * @param {number} colIndex
623
+ * @return {Object|null}
624
+ */
625
+
626
+
627
+ RowFilteringPlugin.prototype._getExtColumnOptions = function (colIndex) {
628
+ return this._getColumnOption(colIndex, "rowFiltering");
629
+ };
630
+ /** @private
631
+ * @param {number} colIndex
632
+ * @return {!Object} Newly created extension column option or the existing one
633
+ */
634
+
635
+
636
+ RowFilteringPlugin.prototype._newExtColumnOptions = function (colIndex) {
637
+ var colDef = this._newColumnData(colIndex);
638
+
639
+ var colExtOptions = colDef["rowFiltering"];
640
+
641
+ if (!colExtOptions) {
642
+ colExtOptions = colDef["rowFiltering"] = {};
643
+ }
644
+
645
+ return colExtOptions;
646
+ };
647
+ /** @private
648
+ * @param {number} colIndex
649
+ * @return {Object|null}
650
+ */
651
+
652
+
653
+ RowFilteringPlugin.prototype._getColumnFilterOption = function (colIndex) {
654
+ var colOptions = this._getExtColumnOptions(colIndex);
655
+
656
+ if (colOptions) {
657
+ return colOptions["filterOption"] || null;
658
+ } else {
659
+ return null;
660
+ }
661
+ };
662
+ /** @private
663
+ * @param {number} colIndex
664
+ * @param {Object} filterOption
665
+ */
666
+
667
+
668
+ RowFilteringPlugin.prototype._setColumnFilterOption = function (colIndex, filterOption) {
669
+ var colOptions = this._newExtColumnOptions(colIndex);
670
+
671
+ if (filterOption) {
672
+ colOptions["filterOption"] = filterOption;
673
+ } else {
674
+ var cfo = colOptions["filterOption"];
675
+
676
+ if (cfo) {
677
+ colOptions["filterOption"] = null;
678
+
679
+ if (cfo._filters.length) {
680
+ this._dispatch("filterChanged", {
681
+ "filterType": "column",
682
+ "changeType": "remove",
683
+ "colIndex": colIndex,
684
+ "field": this._getField(colIndex)
685
+ });
686
+ }
687
+ }
688
+ }
689
+ };
690
+ /** @private
691
+ * @param {number} colIndex
692
+ * @return {!Object}
693
+ */
694
+
695
+
696
+ RowFilteringPlugin.prototype._initColumnFilterOption = function (colIndex) {
697
+ var cfo = this._getColumnFilterOption(colIndex);
698
+
699
+ if (!cfo) {
700
+ cfo = {};
701
+ cfo._filters = [];
702
+ cfo._expressions = [];
703
+ cfo._context = [];
704
+
705
+ this._setColumnFilterOption(colIndex, cfo);
706
+ }
707
+
708
+ return cfo;
709
+ };
710
+ /** Remove the registered global filter. The column filter cannot be removed
711
+ * @public
712
+ * @param {Function|string} funcRef Function object or the function name can be used to remove
713
+ * @return {boolean} True if success
714
+ */
715
+
716
+
717
+ RowFilteringPlugin.prototype.removeFilter = function (funcRef) {
718
+ var func = null;
719
+ var funcName = "";
720
+ var funcIndex = -1;
721
+
722
+ if (typeof funcRef === "string") {
723
+ funcName =
724
+ /** @type{string} */
725
+ funcRef;
726
+ func = this._nameMap[funcRef];
727
+ funcIndex = this._globalFilters.indexOf(func);
728
+ } else {
729
+ func =
730
+ /** @type{Function} */
731
+ funcRef;
732
+ funcIndex = this._globalFilters.indexOf(func);
733
+
734
+ if (funcIndex >= 0) {
735
+ for (var key in this._nameMap) {
736
+ if (this._nameMap[key] === func) {
737
+ funcName = key;
738
+ }
739
+ }
740
+ }
741
+ }
742
+
743
+ if (funcIndex < 0) {
744
+ return false;
745
+ }
746
+
747
+ delete this._nameMap[funcName];
748
+
749
+ this._globalFilters.splice(funcIndex, 1);
750
+
751
+ this._globalContexts.splice(funcIndex, 1);
752
+
753
+ this._requestFilterRefresh();
754
+
755
+ return true;
756
+ };
757
+ /** Remove all filters in from the specified column
758
+ * @public
759
+ * @param {number} colIndex
760
+ * @return {boolean} True if there is any change
761
+ */
762
+
763
+
764
+ RowFilteringPlugin.prototype.removeColumnFilters = function (colIndex) {
765
+ if (colIndex == null) {
766
+ // Prevent user mistake
767
+ return this.removeAllColumnFilters();
768
+ }
769
+
770
+ var dirty = this._removeColumnFilters(colIndex);
771
+
772
+ if (dirty) {
773
+ this._updateColumnIcon(colIndex);
774
+ }
775
+
776
+ return dirty;
777
+ };
778
+ /** @private
779
+ * @param {number} colIndex
780
+ * @return {boolean} True if there is any change
781
+ */
782
+
783
+
784
+ RowFilteringPlugin.prototype._removeColumnFilters = function (colIndex) {
785
+ var cfo = this._getColumnFilterOption(colIndex);
786
+
787
+ if (cfo) {
788
+ var funcIndex = this._columnFilters.indexOf(cfo);
789
+
790
+ if (funcIndex >= 0) {
791
+ this._columnFilters.splice(funcIndex, 1);
792
+ }
793
+
794
+ this._setColumnFilterOption(colIndex, null); // filterChanged fired
795
+
796
+
797
+ var inputExt = this._getPlugin('FilterInputPlugin'); // TODO: Use the event instead
798
+
799
+
800
+ inputExt && inputExt.updateUI(colIndex, '');
801
+
802
+ this._requestFilterRefresh();
803
+ }
804
+
805
+ return cfo ? true : false;
806
+ };
807
+ /** Alias to {@link RowFilteringPlugin#removeColumnFilters} Remove all filters from the specified column
808
+ * @public
809
+ * @function
810
+ * @param {number} colIndex
811
+ * @return {boolean} True if there is any change
812
+ */
813
+
814
+
815
+ RowFilteringPlugin.prototype.removeColumnFilter = RowFilteringPlugin.prototype.removeColumnFilters;
816
+ /** Remove all column filters from all columns, excluding global filters
817
+ * @public
818
+ * @return {boolean} Return true if there is any change
819
+ */
820
+
821
+ RowFilteringPlugin.prototype.removeAllColumnFilters = function () {
822
+ if (this._columnFilters.length) {
823
+ this._columnFilters.length = 0;
824
+
825
+ var inputExt = this._getPlugin('FilterInputPlugin');
826
+
827
+ var colCount = this._getColumnCount();
828
+
829
+ for (var i = 0; i < colCount; ++i) {
830
+ this._setColumnFilterOption(i, null); // filterChanged fired
831
+
832
+
833
+ inputExt && inputExt.updateUI(i, ''); // TODO: Use the event instead
834
+ }
835
+
836
+ this._updateAllColumnIcons();
837
+
838
+ this._requestFilterRefresh();
839
+
840
+ return true;
841
+ }
842
+
843
+ return false;
844
+ };
845
+ /** Remove all column and global filters. OverridingFilters are not removed by this method
846
+ * @public
847
+ */
848
+
849
+
850
+ RowFilteringPlugin.prototype.removeAllFilters = function () {
851
+ var totalFilter = this._globalFilters.length + this._columnFilters.length;
852
+
853
+ if (totalFilter <= 0) {
854
+ return;
855
+ }
856
+
857
+ if (this._globalFilters.length) {
858
+ this._globalFilters.length = 0;
859
+ this._nameMap = {};
860
+
861
+ this._dispatch("filterChanged", {
862
+ "filterType": "global",
863
+ "changeType": "remove",
864
+ "colIndex": -1,
865
+ "field": ""
866
+ });
867
+ }
868
+
869
+ this.removeAllColumnFilters();
870
+
871
+ this._requestFilterRefresh();
872
+ };
873
+ /** Column overriding function is processed before column filters and after global filters. If it returns non-zero, the result will override all other column filter results. If it returns 1, the row will be always included. If it returns -1, the row will be always excluded. If it returns 0, the column filters will be used as normal.
874
+ * @public
875
+ * @param {Function} func
876
+ */
877
+
878
+
879
+ RowFilteringPlugin.prototype.setOverridingFilter = function (func) {
880
+ this._overridingFilter = func;
881
+ };
882
+ /** PreTransform is used to minimize the same data transformation on multiple filters. Output from the given method will be used on all subsequent filters. Note that it will be used for every existing row, so performance should be critical in here. This is optional setting.
883
+ * @public
884
+ * @param {Function} func This function must return object with key and value pairs
885
+ */
886
+
887
+
888
+ RowFilteringPlugin.prototype.setPreTransform = function (func) {
889
+ this._preTransform = func;
890
+ };
891
+ /** This is the same as preTransform, only it is executed just before column filters and after the global filters. This is optional setting.
892
+ * @public
893
+ * @param {Function} func This function must return object with key and value pairs
894
+ */
895
+
896
+
897
+ RowFilteringPlugin.prototype.setRowTransform = function (func) {
898
+ this._rowTransform = func;
899
+ };
900
+ /** @public
901
+ * @return {!Array.<Function>} All global filters
902
+ */
903
+
904
+
905
+ RowFilteringPlugin.prototype.getFilters = function () {
906
+ return this._globalFilters;
907
+ };
908
+ /** Return filter functions. Use getFilterExpressions for saving and loading instead of this function
909
+ * @public
910
+ * @return {!Array.<Function>} All column filters
911
+ * @see {@link RowFilteringPlugin.getFilterExpressions}
912
+ */
913
+
914
+
915
+ RowFilteringPlugin.prototype.getAllColumnFilters = function () {
916
+ var filters = [];
917
+ var len = this._columnFilters.length;
918
+
919
+ for (var i = 0; i < len; ++i) {
920
+ var cfo = this._columnFilters[i];
921
+ var jLen = cfo._filters.length;
922
+
923
+ for (var j = 0; j < jLen; ++j) {
924
+ filters.push(cfo._filters[j]);
925
+ }
926
+ }
927
+
928
+ return filters;
929
+ };
930
+ /** Get existing filter expressions for saving and restoring.
931
+ * @public
932
+ * @return {Array.<RowFilteringPlugin~FilterExpression>} Return null if there is no column filter
933
+ * @see {@link RowFilteringPlugin.setFilterExpressions}
934
+ */
935
+
936
+
937
+ RowFilteringPlugin.prototype.getFilterExpressions = function () {
938
+ if (this._columnFilters.length) {
939
+ return this._columnFilters.map(toFilterExpression);
940
+ }
941
+
942
+ return null;
943
+ };
944
+ /** Clear all existing column filters and restore column filters from the given valid filter expressions. If the parameter is null, the result is equivalent to calling removeAllColumnFilters();
945
+ * @public
946
+ * @param {Array.<RowFilteringPlugin~FilterExpression>} filterExps
947
+ */
948
+
949
+
950
+ RowFilteringPlugin.prototype.setFilterExpressions = function (filterExps) {
951
+ this.removeAllColumnFilters();
952
+
953
+ if (Array.isArray(filterExps)) {
954
+ var api = this.getGridApi();
955
+ var fields = api.getColumnFields();
956
+ var len = filterExps.length;
957
+
958
+ for (var i = 0; i < len; ++i) {
959
+ var filterExp = filterExps[i];
960
+ var field = filterExp.field;
961
+ var colIndex = fields.indexOf(field);
962
+
963
+ if (colIndex >= 0) {
964
+ this.addColumnFilter(colIndex, filterExp.expression, filterExp.context);
965
+ }
966
+ }
967
+ }
968
+ };
969
+ /** @public
970
+ * @return {boolean}
971
+ */
972
+
973
+
974
+ RowFilteringPlugin.prototype.hasColumnFilter = function () {
975
+ return this._columnFilters.length > 0;
976
+ };
977
+ /** @public
978
+ * @param {number} colIndex
979
+ * @return {Array.<Element>} icons
980
+ */
981
+
982
+
983
+ RowFilteringPlugin.prototype.getColumnFilterIcons = function (colIndex) {
984
+ var icons = [];
985
+
986
+ for (var i = this._hosts.length; --i >= 0;) {
987
+ var host = this._hosts[i];
988
+ var tsect = host.getSection("title");
989
+
990
+ if (!tsect) {
991
+ continue;
992
+ }
993
+
994
+ var rCount = tsect.getRowCount();
995
+ var cell = tsect.getCell(colIndex, rCount - 1, true); // Get bottom cell
996
+
997
+ if (cell && cell._filterIcon) {
998
+ icons.push(cell._filterIcon);
999
+ }
1000
+ }
1001
+
1002
+ return icons;
1003
+ };
1004
+ /** @public */
1005
+
1006
+
1007
+ RowFilteringPlugin.prototype.updateAllColumnIcons = function () {
1008
+ if (this._uiTimerId) {
1009
+ clearTimeout(this._uiTimerId);
1010
+ this._uiTimerId = 0;
1011
+ }
1012
+
1013
+ this._updateAllColumnIcons();
1014
+ };
1015
+ /** Specify a list of data views to be filtered, excluding default data views used by UI. <br>
1016
+ * This is useful when multiple shared or nested data views are employed.
1017
+ * @public
1018
+ * @param {Object} dv DataView
1019
+ */
1020
+
1021
+
1022
+ RowFilteringPlugin.prototype.addDataView = function (dv) {
1023
+ var at = this._dvs.indexOf(dv);
1024
+
1025
+ if (at < 0) {
1026
+ this._dvs.push(dv);
1027
+
1028
+ this._requestFilterRefresh();
1029
+ }
1030
+ };
1031
+ /** @public
1032
+ * @param {Object} dv DataView
1033
+ */
1034
+
1035
+
1036
+ RowFilteringPlugin.prototype.removeDataView = function (dv) {
1037
+ var at = this._dvs.indexOf(dv);
1038
+
1039
+ if (at >= 0) {
1040
+ this._dvs.splice(at, 1);
1041
+
1042
+ this._requestFilterRefresh(); // This could be unnecessary
1043
+
1044
+ }
1045
+ };
1046
+ /** @private
1047
+ * @param {Object} e
1048
+ */
1049
+
1050
+
1051
+ RowFilteringPlugin.prototype._onPreSectionRender = function (e) {
1052
+ if (e["sectionType"] !== "title") {
1053
+ return;
1054
+ }
1055
+
1056
+ this._setTimerForUpdatingIcons();
1057
+ };
1058
+ /** @private
1059
+ * @param {Event} e
1060
+ */
1061
+
1062
+
1063
+ RowFilteringPlugin.prototype._onIconClick = function (e) {
1064
+ var host = this._hosts[0];
1065
+
1066
+ if (!host) {
1067
+ return;
1068
+ }
1069
+
1070
+ var pos = host.getRelativePosition(e); // TODO: Support reopenning with fieldDataType
1071
+
1072
+ this.openDialog(pos.colIndex);
1073
+ e.stopPropagation();
1074
+ e.preventDefault();
1075
+
1076
+ this._dispatch("click", e);
1077
+ };
1078
+ /** @private
1079
+ * @param {string} rid
1080
+ * @param {Object} rowData
1081
+ * @return {boolean}
1082
+ */
1083
+
1084
+
1085
+ RowFilteringPlugin.prototype._filterLogic = function (rid, rowData) {
1086
+ if (rowData) {
1087
+ if (this._rowGetter) {
1088
+ rowData = this._rowGetter(rowData);
1089
+ }
1090
+
1091
+ if (this._preTransform) {
1092
+ rowData = this._preTransform(rowData);
1093
+ }
1094
+
1095
+ var i;
1096
+ var len = this._globalFilters.length;
1097
+
1098
+ for (i = 0; i < len; ++i) {
1099
+ if (!this._globalFilters[i](rowData, rid, this._globalContexts[i])) {
1100
+ return false;
1101
+ }
1102
+ }
1103
+
1104
+ len = this._activeColFilters.length;
1105
+
1106
+ if (len) {
1107
+ if (this._overridingFilter) {
1108
+ var ret = this._overridingFilter(rowData, rid);
1109
+
1110
+ if (ret) {
1111
+ return ret > 0;
1112
+ }
1113
+ }
1114
+
1115
+ if (this._rowTransform) {
1116
+ rowData = this._rowTransform(rowData);
1117
+ }
1118
+
1119
+ for (i = 0; i < len; ++i) {
1120
+ var cfo = this._activeColFilters[i];
1121
+ var jLen = cfo._filters.length;
1122
+
1123
+ for (var j = 0; j < jLen; ++j) {
1124
+ if (!cfo._filters[j](rowData, rid, cfo._context[j])) {
1125
+ return false;
1126
+ }
1127
+ }
1128
+ }
1129
+ }
1130
+ }
1131
+
1132
+ return true;
1133
+ };
1134
+ /** @private */
1135
+
1136
+
1137
+ RowFilteringPlugin.prototype._requestFilterRefresh = function () {
1138
+ if (!this._dvTimerId) {
1139
+ this._dvTimerId = setTimeout(this.refresh, 10);
1140
+ }
1141
+ };
1142
+ /** @private */
1143
+
1144
+
1145
+ RowFilteringPlugin.prototype._setTimerForUpdatingIcons = function () {
1146
+ if (this._disabledUI) {
1147
+ return;
1148
+ }
1149
+
1150
+ if (!this._uiTimerId) {
1151
+ this._uiTimerId = setTimeout(this._updateAllColumnIcons, 10);
1152
+ }
1153
+ };
1154
+ /** Perform filtering with the same parameters. Do not call this method repeatedly as the operation is quite expensive.
1155
+ * @public
1156
+ * @suppress {checkTypes}
1157
+ * @fires RowFilteringPlugin#refreshed
1158
+ */
1159
+
1160
+
1161
+ RowFilteringPlugin.prototype.refresh = function () {
1162
+ this._dvTimerId = 0;
1163
+
1164
+ var cstkp = this._getPlugin("ColumnStackingPlugin");
1165
+
1166
+ this._activeColFilters = this._columnFilters;
1167
+
1168
+ if (cstkp && this._activeColFilters.length) {
1169
+ var colIndex, cfo;
1170
+
1171
+ var colCount = this._getColumnCount();
1172
+
1173
+ var hasInactiveColumn = false;
1174
+
1175
+ for (colIndex = 0; colIndex < colCount; ++colIndex) {
1176
+ cfo = this._getColumnFilterOption(colIndex);
1177
+
1178
+ if (cfo) {
1179
+ if (cstkp.isInactiveStackedColumn(colIndex)) {
1180
+ hasInactiveColumn = true;
1181
+ break;
1182
+ }
1183
+ }
1184
+ }
1185
+
1186
+ if (hasInactiveColumn) {
1187
+ this._activeColFilters = [];
1188
+
1189
+ for (colIndex = 0; colIndex < colCount; ++colIndex) {
1190
+ cfo = this._getColumnFilterOption(colIndex);
1191
+
1192
+ if (cfo && !cstkp.isInactiveStackedColumn(colIndex)) {
1193
+ this._activeColFilters.push(cfo);
1194
+ }
1195
+ }
1196
+ }
1197
+ }
1198
+
1199
+ var totalFilter = this._globalFilters.length + this._activeColFilters.length;
1200
+ var logic = !this._disabled && totalFilter ? this._filterLogic : null;
1201
+ var dirty = 0;
1202
+
1203
+ var dvs = this._getAvailableDataViews();
1204
+
1205
+ for (var i = dvs.length; --i >= 0;) {
1206
+ dirty |= dvs[i].filterIn(logic);
1207
+ }
1208
+
1209
+ if (dirty) {
1210
+ this._dispatch("refreshed", {});
1211
+ }
1212
+ };
1213
+ /** @private
1214
+ * @param {number} colIndex
1215
+ */
1216
+
1217
+
1218
+ RowFilteringPlugin.prototype._updateColumnIcon = function (colIndex) {
1219
+ if (this._disabledUI) {
1220
+ return;
1221
+ }
1222
+
1223
+ var cfo = this._getColumnFilterOption(colIndex);
1224
+
1225
+ var hasFilter = cfo ? cfo._filters.length : 0;
1226
+
1227
+ for (var i = this._hosts.length; --i >= 0;) {
1228
+ var host = this._hosts[i];
1229
+ var tsect = host.getSection("title");
1230
+
1231
+ if (!tsect) {
1232
+ continue;
1233
+ }
1234
+
1235
+ var rCount = tsect.getRowCount();
1236
+ var cell = tsect.getCell(colIndex, rCount - 1, true); // Get bottom cell
1237
+
1238
+ if (!cell) {
1239
+ continue;
1240
+ } // HACK: Update cell padding for all type of icons (sorting and column grouping icons)
1241
+
1242
+
1243
+ if (cell["updatePadding"]) {
1244
+ cell["updatePadding"]();
1245
+ }
1246
+
1247
+ if (!this._disabled && hasFilter) {
1248
+ if (!cell._filterIcon) {
1249
+ cell.addClass("filtering");
1250
+ var filterIcon;
1251
+
1252
+ if (ElfUtil.hasComponent("ef-icon") >= 3) {
1253
+ filterIcon = document.createElement("ef-icon");
1254
+ filterIcon.setAttribute("icon", "filter");
1255
+ } else {
1256
+ filterIcon = document.createElement("div");
1257
+ filterIcon.className = "filter-symbol icon-filter ef-icon";
1258
+ }
1259
+
1260
+ filterIcon.addEventListener("click", this._onIconClick, false);
1261
+
1262
+ this._dispatch("iconCreated", {
1263
+ "icon": filterIcon,
1264
+ "colIndex": colIndex,
1265
+ "grid": host
1266
+ });
1267
+
1268
+ cell.insertFloatingIcon(filterIcon, 10);
1269
+ cell._filterIcon = filterIcon;
1270
+ }
1271
+ } else {
1272
+ if (cell._filterIcon) {
1273
+ cell.removeFloatingIcon(cell._filterIcon);
1274
+ cell._filterIcon = null;
1275
+ cell.removeClass("filtering");
1276
+ }
1277
+ }
1278
+ }
1279
+ };
1280
+ /** @private */
1281
+
1282
+
1283
+ RowFilteringPlugin.prototype._updateAllColumnIcons = function () {
1284
+ this._uiTimerId = 0;
1285
+
1286
+ var colCount = this._getColumnCount();
1287
+
1288
+ for (var i = 0; i < colCount; ++i) {
1289
+ this._updateColumnIcon(i);
1290
+ }
1291
+ };
1292
+ /** @private
1293
+ * @return {number}
1294
+ */
1295
+
1296
+
1297
+ RowFilteringPlugin.prototype._getColumnCount = function () {
1298
+ var grid = this._hosts[0];
1299
+
1300
+ if (grid) {
1301
+ return grid.getColumnCount();
1302
+ }
1303
+
1304
+ return 0;
1305
+ };
1306
+ /** Update existing filter state by replacing the old one. Note that filtering will be performed asynchronously after executing this method.
1307
+ * @public
1308
+ * @param {number} colIndex
1309
+ * @param {*} ctx Context object that will be passed as the third parameter for the filter logic
1310
+ * @return {boolean} Returns true if there is any change
1311
+ */
1312
+
1313
+
1314
+ RowFilteringPlugin.prototype.setColumnFilterState = function (colIndex, ctx) {
1315
+ var cfo = this._getColumnFilterOption(colIndex);
1316
+
1317
+ if (cfo) {
1318
+ cfo._context[0] = ctx;
1319
+
1320
+ this._requestFilterRefresh();
1321
+
1322
+ return true;
1323
+ }
1324
+
1325
+ return false;
1326
+ };
1327
+ /** Get the stored user context from the specified column
1328
+ * @public
1329
+ * @param {number} colIndex
1330
+ * @return {*} Context object that is passed as the third parameter for the filter logic
1331
+ */
1332
+
1333
+
1334
+ RowFilteringPlugin.prototype.getColumnFilterState = function (colIndex) {
1335
+ var cfo = this._getColumnFilterOption(colIndex);
1336
+
1337
+ if (cfo) {
1338
+ return cfo._context[0];
1339
+ }
1340
+
1341
+ return null;
1342
+ };
1343
+ /** Get the stored user context from all columns. The column with no filter will return null value
1344
+ * @public
1345
+ * @return {!Array} Array of context objects
1346
+ * @see {@link RowFilteringPlugin.getFilterExpressions}
1347
+ */
1348
+
1349
+
1350
+ RowFilteringPlugin.prototype.getColumnFilterStates = function () {
1351
+ var colCount = this._hosts[0] ? this._hosts[0].getColumnCount() : 0;
1352
+ var states = new Array(colCount);
1353
+
1354
+ for (var c = 0; c < colCount; ++c) {
1355
+ states[c] = this.getColumnFilterState(c);
1356
+ }
1357
+
1358
+ return states;
1359
+ };
1360
+ /** @private
1361
+ * @return {!Array.<Object>} array of DataView
1362
+ */
1363
+
1364
+
1365
+ RowFilteringPlugin.prototype._getAvailableDataViews = function () {
1366
+ if (this._dvs.length) {
1367
+ return this._dvs;
1368
+ } else {
1369
+ var len = this._hosts.length;
1370
+ var ary = [];
1371
+
1372
+ for (var i = 0; i < len; ++i) {
1373
+ var host = this._hosts[i];
1374
+ var dv = host.getDataSource();
1375
+
1376
+ if (dv) {
1377
+ ary.push(dv);
1378
+ }
1379
+ }
1380
+
1381
+ return ary;
1382
+ }
1383
+ };
1384
+ /** @private
1385
+ * @param {Object} dv DataView
1386
+ * @return {Object} DataTable
1387
+ */
1388
+
1389
+
1390
+ RowFilteringPlugin.prototype._getDataTable = function (dv) {
1391
+ var dt = dv ? dv.getDataSource() : null;
1392
+
1393
+ while (dt && dt.getDataSource()) {
1394
+ dt = dt.getDataSource();
1395
+ }
1396
+
1397
+ return dt;
1398
+ };
1399
+ /** @public
1400
+ * @param {string} field A field name for getting raw value from row data
1401
+ * @param {Function=} formatter A formatter that takes row data, retrieves data, and modified the data for display.
1402
+ * @param {string=} fmtField A field name to be used instead of formatter for getting formatted value
1403
+ * @param {Function=} rawDataAccessor Data getter to retrieve raw value
1404
+ * @param {Function=} formattedDataAccessor Data getter to retrieve formatted value. This paramter will override formatted and fmtField parameters
1405
+ * @return {Object} Object that maps formatted value to array of raw values
1406
+ */
1407
+
1408
+
1409
+ RowFilteringPlugin.prototype.getUniqueValues = function (field, formatter, fmtField, rawDataAccessor, formattedDataAccessor) {
1410
+ if (!field) {
1411
+ return null;
1412
+ }
1413
+
1414
+ var dvs = this._getAvailableDataViews();
1415
+
1416
+ var dts = dvs.map(this._getDataTable);
1417
+ var tblCount = dts.length;
1418
+ var uniqueValues = {};
1419
+
1420
+ for (var t = 0; t < tblCount; ++t) {
1421
+ var rows = dts[t].getAllRowData();
1422
+ var rowCount = rows.length;
1423
+
1424
+ for (var r = 0; r < rowCount; ++r) {
1425
+ var row = rows[r];
1426
+
1427
+ if (this._rowGetter) {
1428
+ row = this._rowGetter(row);
1429
+ }
1430
+
1431
+ if (this._rowTransform) {
1432
+ row = this._rowTransform(row);
1433
+ }
1434
+
1435
+ var fieldVal = row[field];
1436
+ var rawVal = fieldVal;
1437
+
1438
+ if (rawDataAccessor) {
1439
+ rawVal = rawDataAccessor(rawVal);
1440
+ }
1441
+
1442
+ if (!rawVal) {
1443
+ // Only valid values are accepted
1444
+ if (rawVal !== 0 && rawVal !== false) {
1445
+ continue;
1446
+ }
1447
+ }
1448
+
1449
+ var formattedVal = rawVal;
1450
+
1451
+ if (formattedDataAccessor) {
1452
+ formattedVal = formattedDataAccessor(fieldVal); // The function takes data value
1453
+ } else if (formatter) {
1454
+ formattedVal = formatter(row); // The function takes row data
1455
+ } else if (fmtField) {
1456
+ formattedVal = row[fmtField];
1457
+ }
1458
+
1459
+ if (typeof formattedVal != "string") {
1460
+ if (formattedVal) {
1461
+ if (_typeof(formattedVal) != "object") {
1462
+ formattedVal = rawVal + "";
1463
+ } else if (formattedVal instanceof Date) {
1464
+ formattedVal = formattedVal.toLocaleString("en-GB");
1465
+ } else {
1466
+ // Object type cannot be converted to string
1467
+ formattedVal = "";
1468
+ }
1469
+ } else if (formattedVal === 0) {
1470
+ formattedVal = "0";
1471
+ } else if (formattedVal === false) {
1472
+ formattedVal = "false";
1473
+ }
1474
+ }
1475
+
1476
+ if (!formattedVal) {
1477
+ continue;
1478
+ }
1479
+
1480
+ var rawValues = uniqueValues[formattedVal];
1481
+
1482
+ if (rawValues) {
1483
+ if (rawValues.indexOf(rawVal) < 0) {
1484
+ // Check for unique raw values
1485
+ rawValues.push(rawVal);
1486
+ }
1487
+ } else {
1488
+ // The first unique formatted value detected
1489
+ uniqueValues[formattedVal] = [rawVal];
1490
+ }
1491
+ }
1492
+ }
1493
+
1494
+ return uniqueValues;
1495
+ };
1496
+ /** @public
1497
+ * @param {number} colIndex
1498
+ * @param {RowFilteringPlugin~FilterDialogOptions=} options
1499
+ */
1500
+
1501
+
1502
+ RowFilteringPlugin.prototype.openDialog = function (colIndex, options) {
1503
+ var stp = this._getPlugin("SortableTitlePlugin");
1504
+
1505
+ if (!this._filterDialog) {
1506
+ // Check if dialog is filter v1 or v3
1507
+ var dialogVersion = ElfUtil.hasComponent('filter-dialog');
1508
+
1509
+ if (!dialogVersion) {
1510
+ console.log("Filter dialog doesn't exist");
1511
+ return;
1512
+ }
1513
+
1514
+ if (dialogVersion >= 3) {
1515
+ this._filterDialog = document.createElement("filter-dialog");
1516
+ } else if (dialogVersion < 2) {
1517
+ this._filterDialog = document.createElement("tr-grid-filter-dialog");
1518
+ }
1519
+
1520
+ if (!stp) {
1521
+ this._filterDialog.hideSortUI();
1522
+ } else {
1523
+ this._filterDialog.addEventListener("sortChanged", this._onDialogSortChanged.bind(this));
1524
+ }
1525
+
1526
+ this._filterDialog.addEventListener("filterChanged", this._onDialogFilterChanged.bind(this));
1527
+ }
1528
+
1529
+ if (this._filterDialog.isShown) {
1530
+ this._filterDialog.hide(); // Hide previously openned dialog
1531
+
1532
+
1533
+ if (this._filterDialog._colIndex === colIndex) {
1534
+ // The dialog is already openned
1535
+ return; // Toggle open state
1536
+ }
1537
+ }
1538
+
1539
+ var host = this._hosts[0];
1540
+
1541
+ if (!host) {
1542
+ return;
1543
+ } // Find target cell for positioning filter dialog
1544
+
1545
+
1546
+ var tsect = host.getSection("title");
1547
+
1548
+ if (!tsect) {
1549
+ return;
1550
+ }
1551
+
1552
+ var rCount = tsect.getRowCount();
1553
+ var cell = tsect.getCell(colIndex, rCount - 1, true); // Get bottom cell
1554
+
1555
+ if (!cell || !cell.getElement()) {
1556
+ return;
1557
+ } // TODO: Handle newly inserted/added columns
1558
+
1559
+
1560
+ var field = this._getField(colIndex);
1561
+
1562
+ if (!field) {
1563
+ return; // The specified column has no field
1564
+ }
1565
+
1566
+ if (stp) {
1567
+ this._filterDialog.setSortState(stp.getSortOrder(colIndex)); // This is for ELF v3
1568
+
1569
+ } // TODO: _initColumnFilterOption is just a lazy (bad) way to populate the non-existing object.
1570
+
1571
+
1572
+ var cfo = this._initColumnFilterOption(colIndex);
1573
+
1574
+ var rawDataAccessor = cfo._rawDataAccessor || null;
1575
+ var formattedDataAccessor = cfo._formattedDataAccessor || null;
1576
+
1577
+ if (options && _typeof(options) === "object") {
1578
+ if (options.rawDataAccessor != null) {
1579
+ rawDataAccessor = cfo._rawDataAccessor = options.rawDataAccessor || null;
1580
+ }
1581
+
1582
+ if (options.formattedDataAccessor != null) {
1583
+ formattedDataAccessor = cfo._formattedDataAccessor = options.formattedDataAccessor || null;
1584
+ }
1585
+ } // Populate data for filter dialog based on existing states
1586
+
1587
+
1588
+ var customFilter = cfo._expressions[0] || "";
1589
+ var ctx = cfo._context[0];
1590
+ var selectedItems = ctx ? ctx.selectedItems : null;
1591
+
1592
+ if (selectedItems) {
1593
+ customFilter = "";
1594
+ } else {
1595
+ selectedItems = {};
1596
+ }
1597
+
1598
+ var uniqueValues = cfo.uniqueValues = this.getUniqueValues(field, this._getFormatter(colIndex), "", rawDataAccessor, formattedDataAccessor);
1599
+ var keys = Object.keys(uniqueValues);
1600
+
1601
+ if (options && options.sortLogic) {
1602
+ var sortLogic = options.sortLogic;
1603
+ keys.sort(function (a, b) {
1604
+ var rawValueA = uniqueValues[a][0];
1605
+ var rawValueB = uniqueValues[b][0];
1606
+ return sortLogic(rawValueA, rawValueB); // Compare with rawValue
1607
+ });
1608
+ }
1609
+
1610
+ var items = keys.map(function (formattedVal, idx) {
1611
+ return {
1612
+ id: idx,
1613
+ title: formattedVal,
1614
+ nodes: [],
1615
+ checked: selectedItems[formattedVal] ? true : false
1616
+ };
1617
+ });
1618
+
1619
+ var colOptions = this._getExtColumnOptions(colIndex);
1620
+
1621
+ var fdt = "";
1622
+
1623
+ if (colOptions && colOptions.fieldDataType) {
1624
+ // TODO: Retrieve data type from Composite/Realtime Grid instead
1625
+ fdt = colOptions.fieldDataType;
1626
+ }
1627
+
1628
+ var dialogConfig = {
1629
+ sortUI: true,
1630
+ filterUI: true,
1631
+ fieldDataType: fdt
1632
+ };
1633
+
1634
+ if (options && _typeof(options) === "object") {
1635
+ if (options.sortUI === false) {
1636
+ dialogConfig.sortUI = options.sortUI;
1637
+ }
1638
+
1639
+ if (options.filterUI === false) {
1640
+ dialogConfig.filterUI = options.filterUI;
1641
+ }
1642
+
1643
+ if (options.fieldDataType != null) {
1644
+ dialogConfig.fieldDataType = options.fieldDataType;
1645
+ }
1646
+
1647
+ if (options.lang != null) {
1648
+ dialogConfig.lang = options.lang;
1649
+ }
1650
+ }
1651
+
1652
+ if (this._filterDialog.init) {
1653
+ // TODO: support initiailization in v1
1654
+ this._filterDialog.init(dialogConfig);
1655
+ }
1656
+
1657
+ this._filterDialog.target = cell.getElement();
1658
+ this._filterDialog._colIndex = colIndex;
1659
+ this._filterDialog.data = items; // TODO: Move all settings to configuration object
1660
+
1661
+ this._filterDialog.filterMode = customFilter ? "advanced" : ""; // this._filterDialog.customFilter = customFilter;
1662
+
1663
+ this._filterDialog.conditions = customFilter; // WARNING: This must be 2D Array
1664
+
1665
+ this._filterDialog.show();
1666
+ };
1667
+ /** @private
1668
+ * @param {number} colIndex
1669
+ * @return {Function}
1670
+ */
1671
+
1672
+
1673
+ RowFilteringPlugin.prototype._getFormatter = function (colIndex) {
1674
+ var tfp = this._getPlugin("TextFormattingPlugin");
1675
+
1676
+ if (tfp) {
1677
+ var formatter = tfp.getFormatter(colIndex);
1678
+
1679
+ if (formatter) {
1680
+ return formatter.format || null;
1681
+ }
1682
+ }
1683
+
1684
+ return null;
1685
+ };
1686
+ /** @private
1687
+ * @return {!FilterBuilder}
1688
+ */
1689
+
1690
+
1691
+ RowFilteringPlugin._getFilterBuilder = function () {
1692
+ if (!RowFilteringPlugin._filterBuilder) {
1693
+ RowFilteringPlugin._filterBuilder = new FilterBuilder();
1694
+ }
1695
+
1696
+ return RowFilteringPlugin._filterBuilder;
1697
+ };
1698
+ /** @private
1699
+ * @param {Object} e
1700
+ */
1701
+
1702
+
1703
+ RowFilteringPlugin.prototype._onDialogFilterChanged = function (e) {
1704
+ var colIndex = this._filterDialog._colIndex;
1705
+
1706
+ var cfo = this._getColumnFilterOption(colIndex);
1707
+
1708
+ var uniqueValues = cfo.uniqueValues; // Unique values have to be stored before the removal of the filter
1709
+
1710
+ var rawDataAccessor = cfo._rawDataAccessor;
1711
+ var formattedDataAccessor = cfo._formattedDataAccessor;
1712
+ var ctx = null;
1713
+
1714
+ if (rawDataAccessor || formattedDataAccessor) {
1715
+ ctx = {
1716
+ "rawDataAccessor": rawDataAccessor || null,
1717
+ "formattedDataAccessor": formattedDataAccessor || null
1718
+ };
1719
+ }
1720
+
1721
+ this.removeColumnFilters(colIndex); // Check inputs from advanced filter UIs
1722
+
1723
+ var conditions = e.detail.conditions;
1724
+
1725
+ if (Array.isArray(conditions)) {
1726
+ // Advanced condition filtering. Expecting 2D-Array
1727
+ // Ensure rawValue input for number field data type
1728
+ var condCount = conditions.length;
1729
+
1730
+ for (var m = 0; m < condCount; ++m) {
1731
+ var cond = conditions[m];
1732
+ var inputVal = cond[1]; // inputVal is hardcoded at index 1
1733
+
1734
+ var rawValues = uniqueValues[inputVal];
1735
+
1736
+ if (rawValues) {
1737
+ cond[1] = rawValues[0];
1738
+ }
1739
+ }
1740
+
1741
+ if (ctx) {
1742
+ ctx["_autoGenerated"] = true;
1743
+ }
1744
+
1745
+ this.addColumnFilter(colIndex, conditions, ctx);
1746
+ return;
1747
+ } // Check input from free text input
1748
+
1749
+
1750
+ var selVal = e.detail.value;
1751
+ var selAry = null;
1752
+
1753
+ if (selVal) {
1754
+ if (typeof selVal === "string") {
1755
+ // Custom filter mode (free style text).
1756
+ // WARNING: Free style text is no longer available anymore from the newer dialog
1757
+ this.addColumnFilter(colIndex, selVal);
1758
+ return;
1759
+ } else {
1760
+ selAry =
1761
+ /** @type{Array} */
1762
+ selVal; // Expecting Array of object
1763
+ }
1764
+ }
1765
+
1766
+ var selCount = selAry ? selAry.length : 0;
1767
+
1768
+ if (!selCount) {
1769
+ return;
1770
+ } // The given input is from simple text filter selector
1771
+ // Validate if the input is correct and prepare selected items for building filter
1772
+
1773
+
1774
+ var itemMap = {};
1775
+ var selectedItems = {};
1776
+ var atLeastOne = false;
1777
+
1778
+ for (var i = 0; i < selCount; ++i) {
1779
+ var formattedVal = selAry[i].title; // title is defined by the multi-select element
1780
+ // var selIdx = selAry[i].index; // index cannot be used due to filtering
1781
+
1782
+ var rawVals = uniqueValues[formattedVal];
1783
+
1784
+ if (!rawVals) {
1785
+ continue;
1786
+ }
1787
+
1788
+ atLeastOne = true;
1789
+ selectedItems[formattedVal] = true;
1790
+ var jLen = rawVals.length;
1791
+
1792
+ for (var j = 0; j < jLen; ++j) {
1793
+ itemMap[rawVals[j]] = true;
1794
+ }
1795
+ }
1796
+
1797
+ if (atLeastOne) {
1798
+ if (!ctx) {
1799
+ ctx = {};
1800
+ }
1801
+
1802
+ if (ctx) {
1803
+ ctx["selectedItems"] = selectedItems; // For restore item in the dialog
1804
+ }
1805
+
1806
+ this.addColumnFilter(colIndex, itemMap, ctx);
1807
+ }
1808
+
1809
+ this._dispatch("dialogCommitted", {
1810
+ "value": e.detail.value,
1811
+ "fieldDataType": e.detail.fieldDataType,
1812
+ "colIndex": colIndex
1813
+ });
1814
+ };
1815
+ /** @private
1816
+ * @param {Object} e
1817
+ */
1818
+
1819
+
1820
+ RowFilteringPlugin.prototype._onDialogSortChanged = function (e) {
1821
+ var stp = this._getPlugin("SortableTitlePlugin");
1822
+
1823
+ if (stp) {
1824
+ var colIndex = this._filterDialog._colIndex;
1825
+ var eDetail = e.detail.value ? e.detail.value : e.detail;
1826
+
1827
+ if (stp.getSortOrder(colIndex) === eDetail) {
1828
+ stp.sortColumn(colIndex, "n");
1829
+ } else {
1830
+ stp.sortColumn(colIndex, eDetail);
1831
+ }
1832
+
1833
+ this._dispatch("dialogCommitted", {
1834
+ "sortOrder": e.detail.value,
1835
+ "colIndex": colIndex
1836
+ });
1837
+ }
1838
+ };
1839
+ /** @private
1840
+ * @param {Object} e
1841
+ */
1842
+
1843
+
1844
+ RowFilteringPlugin.prototype._onColumnAdded = function (e) {
1845
+ if (e["context"]) {
1846
+ this._setColumnOptions(e["colIndex"], e["context"]);
1847
+ }
1848
+ };
1849
+ /** @private
1850
+ * @param {Object} e
1851
+ */
1852
+
1853
+
1854
+ RowFilteringPlugin.prototype._onColumnRemoved = function (e) {
1855
+ var colData =
1856
+ /** @type{Object} */
1857
+ e.columnData;
1858
+
1859
+ if (!colData) {
1860
+ return;
1861
+ }
1862
+
1863
+ var cfo = colData["filterOption"];
1864
+
1865
+ if (cfo) {
1866
+ var funcIndex = this._columnFilters.indexOf(cfo);
1867
+
1868
+ if (funcIndex >= 0) {
1869
+ this._columnFilters.splice(funcIndex, 1);
1870
+ }
1871
+
1872
+ this._dispatch("filterChanged", {
1873
+ "filterType": "column",
1874
+ "changeType": "remove",
1875
+ "colIndex": e.colIndex,
1876
+ "field": cfo._field || ""
1877
+ });
1878
+
1879
+ this._requestFilterRefresh();
1880
+ }
1881
+ };
1882
+
1883
+ export default RowFilteringPlugin;
1884
+ export { RowFilteringPlugin, RowFilteringPlugin as RowFiltering, RowFilteringPlugin as RowFilteringExtension };