@sme.up/ketchup 4.0.0 → 4.2.0-SNAPSHOT

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 (295) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/cell-utils-1d44a3f0.js +168 -0
  3. package/dist/cjs/f-button-a5788453.js +105 -0
  4. package/dist/cjs/f-cell-eba6f39e.js +727 -0
  5. package/dist/cjs/f-chip-ce69b7d2.js +141 -0
  6. package/dist/cjs/{f-image-5f4f29ca.js → f-image-e03842eb.js} +4 -5
  7. package/dist/cjs/{index-3c471303.js → index-0416afab.js} +73 -64
  8. package/dist/cjs/ketchup.cjs.js +3 -3
  9. package/dist/cjs/kup-accordion.cjs.entry.js +6 -8
  10. package/dist/cjs/{kup-autocomplete_29.cjs.entry.js → kup-autocomplete_28.cjs.entry.js} +1678 -2558
  11. package/dist/cjs/kup-calendar.cjs.entry.js +30 -30
  12. package/dist/cjs/kup-cell.cjs.entry.js +201 -0
  13. package/dist/cjs/kup-dash-list.cjs.entry.js +15 -7
  14. package/dist/cjs/kup-dash_2.cjs.entry.js +104 -62
  15. package/dist/cjs/kup-drawer.cjs.entry.js +4 -6
  16. package/dist/cjs/kup-field.cjs.entry.js +3 -5
  17. package/dist/cjs/kup-iframe.cjs.entry.js +3 -4
  18. package/dist/cjs/kup-lazy.cjs.entry.js +4 -6
  19. package/dist/cjs/kup-magic-box.cjs.entry.js +21 -31
  20. package/dist/cjs/kup-manager-75f1a2cd.js +5794 -0
  21. package/dist/cjs/kup-nav-bar.cjs.entry.js +4 -6
  22. package/dist/cjs/kup-probe.cjs.entry.js +3 -4
  23. package/dist/cjs/kup-qlik.cjs.entry.js +2 -3
  24. package/dist/cjs/kup-snackbar.cjs.entry.js +152 -0
  25. package/dist/cjs/loader.cjs.js +3 -3
  26. package/dist/cjs/{utils-2af73538.js → utils-b3ec89fe.js} +18 -26
  27. package/dist/collection/assets/cell.js +51 -0
  28. package/dist/collection/assets/data-table.js +518 -45
  29. package/dist/collection/assets/index.js +8 -0
  30. package/dist/collection/assets/snackbar.js +32 -0
  31. package/dist/collection/collection-manifest.json +6 -6
  32. package/dist/collection/components/kup-accordion/kup-accordion.css +0 -213
  33. package/dist/collection/components/kup-accordion/kup-accordion.js +15 -16
  34. package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +2 -2
  35. package/dist/collection/components/kup-autocomplete/kup-autocomplete.css +5 -2381
  36. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +83 -111
  37. package/dist/collection/components/kup-badge/kup-badge.css +1 -35
  38. package/dist/collection/components/kup-badge/kup-badge.js +13 -14
  39. package/dist/collection/components/kup-box/kup-box.css +47 -780
  40. package/dist/collection/components/kup-box/kup-box.js +240 -366
  41. package/dist/collection/components/kup-button/kup-button.css +0 -333
  42. package/dist/collection/components/kup-button/kup-button.js +27 -28
  43. package/dist/collection/components/kup-button-list/kup-button-list.css +0 -332
  44. package/dist/collection/components/kup-button-list/kup-button-list.js +19 -20
  45. package/dist/collection/components/kup-calendar/kup-calendar.css +0 -517
  46. package/dist/collection/components/kup-calendar/kup-calendar.js +47 -45
  47. package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +18 -0
  48. package/dist/collection/components/kup-card/kup-card-helper.js +19 -1
  49. package/dist/collection/components/kup-card/kup-card.css +147 -216
  50. package/dist/collection/components/kup-card/kup-card.js +80 -29
  51. package/dist/collection/components/kup-card/standard/kup-card-standard.js +75 -0
  52. package/dist/collection/components/kup-cell/kup-cell-declarations.js +11 -0
  53. package/dist/collection/components/kup-cell/kup-cell.css +20 -0
  54. package/dist/collection/components/kup-cell/kup-cell.js +413 -0
  55. package/dist/collection/components/kup-chart/kup-chart.js +41 -42
  56. package/dist/collection/components/kup-checkbox/kup-checkbox.css +0 -214
  57. package/dist/collection/components/kup-checkbox/kup-checkbox.js +19 -20
  58. package/dist/collection/components/kup-chip/kup-chip.css +0 -217
  59. package/dist/collection/components/kup-chip/kup-chip.js +15 -16
  60. package/dist/collection/components/kup-color-picker/kup-color-picker.css +7 -2380
  61. package/dist/collection/components/kup-color-picker/kup-color-picker.js +41 -41
  62. package/dist/collection/components/kup-combobox/kup-combobox-declarations.js +1 -0
  63. package/dist/collection/components/kup-combobox/kup-combobox.css +5 -2381
  64. package/dist/collection/components/kup-combobox/kup-combobox.js +68 -28
  65. package/dist/collection/components/kup-dash-list/kup-dash-list.js +13 -4
  66. package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +3 -1
  67. package/dist/collection/components/kup-data-table/kup-data-table-helper.js +61 -102
  68. package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
  69. package/dist/collection/components/kup-data-table/kup-data-table.css +127 -3203
  70. package/dist/collection/components/kup-data-table/kup-data-table.js +568 -1085
  71. package/dist/collection/components/kup-date-picker/kup-date-picker.css +6 -8
  72. package/dist/collection/components/kup-date-picker/kup-date-picker.js +77 -106
  73. package/dist/collection/components/kup-drawer/kup-drawer.js +9 -10
  74. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.css +12 -340
  75. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +56 -45
  76. package/dist/collection/components/kup-field/kup-field.js +21 -22
  77. package/dist/collection/components/kup-gauge/kup-gauge.js +17 -18
  78. package/dist/collection/components/kup-grid/kup-grid.css +2 -1
  79. package/dist/collection/components/kup-grid/kup-grid.js +13 -14
  80. package/dist/collection/components/kup-iframe/kup-iframe.js +4 -4
  81. package/dist/collection/components/kup-image/assets/svg/ketchup.svg +74 -0
  82. package/dist/collection/components/kup-image/assets/svg/smeup.svg +59 -0
  83. package/dist/collection/components/kup-image/kup-image.css +0 -32
  84. package/dist/collection/components/kup-image/kup-image.js +25 -26
  85. package/dist/collection/components/kup-lazy/kup-lazy.js +17 -18
  86. package/dist/collection/components/kup-list/kup-list-declarations.js +1 -1
  87. package/dist/collection/components/kup-list/kup-list.css +4 -260
  88. package/dist/collection/components/kup-list/kup-list.js +39 -49
  89. package/dist/collection/components/kup-magic-box/kup-magic-box.css +13 -39
  90. package/dist/collection/components/kup-magic-box/kup-magic-box.js +29 -38
  91. package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +11 -12
  92. package/dist/collection/components/kup-paginator/kup-paginator.css +0 -332
  93. package/dist/collection/components/kup-paginator/kup-paginator.js +44 -12
  94. package/dist/collection/components/kup-probe/kup-probe.js +9 -9
  95. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +21 -22
  96. package/dist/collection/components/kup-radio/kup-radio.js +17 -18
  97. package/dist/collection/components/kup-rating/kup-rating.js +15 -16
  98. package/dist/collection/components/kup-snackbar/kup-snackbar-declarations.js +13 -0
  99. package/dist/collection/components/kup-snackbar/kup-snackbar.css +75 -0
  100. package/dist/collection/components/kup-snackbar/kup-snackbar.js +390 -0
  101. package/dist/collection/components/kup-spinner/kup-spinner.js +23 -24
  102. package/dist/collection/components/kup-switch/kup-switch.css +0 -156
  103. package/dist/collection/components/kup-switch/kup-switch.js +17 -18
  104. package/dist/collection/components/kup-tab-bar/kup-tab-bar.css +0 -199
  105. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +13 -14
  106. package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +1 -0
  107. package/dist/collection/components/kup-text-field/kup-text-field.css +3 -2371
  108. package/dist/collection/components/kup-text-field/kup-text-field.js +77 -51
  109. package/dist/collection/components/kup-time-picker/kup-time-picker.css +6 -0
  110. package/dist/collection/components/kup-time-picker/kup-time-picker.js +55 -85
  111. package/dist/collection/components/kup-tooltip/kup-tooltip.js +24 -14
  112. package/dist/collection/components/kup-tree/kup-tree.css +27 -371
  113. package/dist/collection/components/kup-tree/kup-tree.js +158 -383
  114. package/dist/collection/f-components/f-button/f-button.js +4 -2
  115. package/dist/collection/f-components/f-cell/f-cell-declarations.js +143 -0
  116. package/dist/collection/f-components/f-cell/f-cell.js +467 -0
  117. package/dist/collection/f-components/f-checkbox/f-checkbox.js +1 -1
  118. package/dist/collection/f-components/f-chip/f-chip.js +2 -2
  119. package/dist/collection/f-components/f-image/f-image.js +2 -3
  120. package/dist/collection/f-components/f-switch/f-switch.js +1 -1
  121. package/dist/collection/f-components/f-text-field/f-text-field-mdc.js +1 -1
  122. package/dist/collection/f-components/f-text-field/f-text-field.js +25 -21
  123. package/dist/collection/utils/cell-utils.js +18 -222
  124. package/dist/collection/utils/filters/filters.js +31 -37
  125. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +15 -3
  126. package/dist/collection/utils/kup-dates/kup-dates.js +14 -2
  127. package/dist/collection/utils/kup-debug/kup-debug-browser-utils.js +3 -3
  128. package/dist/collection/utils/kup-debug/kup-debug.js +57 -29
  129. package/dist/collection/utils/kup-dynamic-position/kup-dynamic-position.js +5 -7
  130. package/dist/collection/utils/kup-interact/kup-interact-declarations.js +48 -0
  131. package/dist/collection/utils/kup-interact/kup-interact.js +379 -0
  132. package/dist/collection/utils/kup-language/kup-language-declarations.js +2 -0
  133. package/dist/collection/utils/kup-language/kup-language.js +1 -1
  134. package/dist/collection/utils/kup-manager/kup-manager.js +47 -10
  135. package/dist/collection/utils/kup-objects/kup-objects.js +9 -33
  136. package/dist/collection/utils/kup-scroll-on-hover/kup-scroll-on-hover.js +60 -62
  137. package/dist/collection/utils/kup-search/kup-search-declarations.js +1 -0
  138. package/dist/collection/utils/kup-search/kup-search.js +76 -0
  139. package/dist/collection/utils/kup-theme/kup-theme-declarations.js +1 -0
  140. package/dist/collection/utils/kup-theme/kup-theme.js +4 -3
  141. package/dist/collection/utils/kup-toolbar/kup-toolbar.js +16 -18
  142. package/dist/collection/utils/utils.js +15 -23
  143. package/dist/esm/cell-utils-9a2914fc.js +160 -0
  144. package/dist/esm/f-button-55a9ed88.js +103 -0
  145. package/dist/esm/f-cell-ac520cb2.js +723 -0
  146. package/dist/esm/f-chip-babf1740.js +139 -0
  147. package/dist/esm/{f-image-68b34fab.js → f-image-70ca9dfe.js} +4 -5
  148. package/dist/esm/{index-bf2824a6.js → index-e0e67c23.js} +74 -65
  149. package/dist/esm/ketchup.js +3 -3
  150. package/dist/esm/kup-accordion.entry.js +6 -8
  151. package/dist/esm/{kup-autocomplete_29.entry.js → kup-autocomplete_28.entry.js} +1451 -2330
  152. package/dist/esm/kup-calendar.entry.js +10 -10
  153. package/dist/esm/kup-cell.entry.js +197 -0
  154. package/dist/esm/kup-dash-list.entry.js +15 -7
  155. package/dist/esm/kup-dash_2.entry.js +104 -62
  156. package/dist/esm/kup-drawer.entry.js +4 -6
  157. package/dist/esm/kup-field.entry.js +3 -5
  158. package/dist/esm/kup-iframe.entry.js +3 -4
  159. package/dist/esm/kup-lazy.entry.js +4 -6
  160. package/dist/esm/kup-magic-box.entry.js +21 -31
  161. package/dist/esm/kup-manager-bba32828.js +5781 -0
  162. package/dist/esm/kup-nav-bar.entry.js +4 -6
  163. package/dist/esm/kup-probe.entry.js +3 -4
  164. package/dist/esm/kup-qlik.entry.js +2 -3
  165. package/dist/esm/kup-snackbar.entry.js +148 -0
  166. package/dist/esm/loader.js +3 -3
  167. package/dist/esm/{utils-13dd007a.js → utils-cfcbe33f.js} +16 -23
  168. package/dist/ketchup/assets/svg/ketchup.svg +74 -0
  169. package/dist/ketchup/assets/svg/smeup.svg +59 -0
  170. package/dist/ketchup/ketchup.esm.js +1 -1
  171. package/dist/ketchup/p-03ae1be9.entry.js +1 -0
  172. package/dist/ketchup/p-06c209a5.js +1 -0
  173. package/dist/ketchup/p-1ce9a037.js +1 -0
  174. package/dist/ketchup/p-1e2c3497.js +1 -0
  175. package/dist/ketchup/p-40df35de.entry.js +1 -0
  176. package/dist/ketchup/{p-c7ee1fbc.js → p-4748be4b.js} +2 -2
  177. package/dist/ketchup/p-52038ccb.js +1 -0
  178. package/dist/ketchup/p-5db41fae.entry.js +45 -0
  179. package/dist/ketchup/p-5faf7715.entry.js +1 -0
  180. package/dist/ketchup/p-62208488.entry.js +1 -0
  181. package/dist/ketchup/p-69a705ae.entry.js +1 -0
  182. package/dist/ketchup/p-6cc8264d.entry.js +1 -0
  183. package/dist/ketchup/p-74259992.entry.js +1 -0
  184. package/dist/ketchup/p-756aa8b1.entry.js +1 -0
  185. package/dist/ketchup/p-a7687c0e.entry.js +27 -0
  186. package/dist/ketchup/p-cb5f4994.js +1 -0
  187. package/dist/ketchup/p-d58dbf0e.js +1 -0
  188. package/dist/ketchup/p-d6ce1ac6.entry.js +1 -0
  189. package/dist/ketchup/p-daf03877.entry.js +1 -0
  190. package/dist/ketchup/p-e90934b5.entry.js +1 -0
  191. package/dist/ketchup/p-ea387b49.entry.js +1 -0
  192. package/dist/ketchup/p-f6bff949.js +1 -0
  193. package/dist/ketchup/p-ff7d590e.entry.js +1 -0
  194. package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +2 -6
  195. package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +7 -13
  196. package/dist/types/components/kup-box/kup-box-declarations.d.ts +13 -4
  197. package/dist/types/components/kup-box/kup-box.d.ts +13 -6
  198. package/dist/types/components/kup-card/dialog/kup-card-dialog.d.ts +6 -0
  199. package/dist/types/components/kup-card/kup-card.d.ts +9 -0
  200. package/dist/types/components/kup-card/standard/kup-card-standard.d.ts +6 -0
  201. package/dist/types/components/kup-cell/kup-cell-declarations.d.ts +10 -0
  202. package/dist/types/components/kup-cell/kup-cell.d.ts +67 -0
  203. package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +1 -1
  204. package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +3 -2
  205. package/dist/types/components/kup-combobox/kup-combobox.d.ts +5 -0
  206. package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +4 -0
  207. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +21 -32
  208. package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +1 -15
  209. package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
  210. package/dist/types/components/kup-data-table/kup-data-table.d.ts +32 -81
  211. package/dist/types/components/kup-date-picker/kup-date-picker.d.ts +12 -14
  212. package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +1 -4
  213. package/dist/types/components/kup-list/kup-list-declarations.d.ts +1 -1
  214. package/dist/types/components/kup-list/kup-list.d.ts +2 -3
  215. package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +1 -0
  216. package/dist/types/components/kup-paginator/kup-paginator.d.ts +6 -0
  217. package/dist/types/components/kup-snackbar/kup-snackbar-declarations.d.ts +12 -0
  218. package/dist/types/components/kup-snackbar/kup-snackbar.d.ts +79 -0
  219. package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +2 -1
  220. package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
  221. package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +8 -11
  222. package/dist/types/components/kup-tooltip/kup-tooltip.d.ts +1 -0
  223. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +4 -4
  224. package/dist/types/components/kup-tree/kup-tree.d.ts +12 -23
  225. package/dist/types/components.d.ts +346 -174
  226. package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +153 -0
  227. package/dist/types/f-components/f-cell/f-cell.d.ts +3 -0
  228. package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
  229. package/dist/types/f-components/f-text-field/f-text-field-mdc.d.ts +1 -1
  230. package/dist/types/utils/cell-utils.d.ts +0 -19
  231. package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +2 -0
  232. package/dist/types/utils/kup-dates/kup-dates.d.ts +9 -4
  233. package/dist/types/utils/kup-debug/kup-debug.d.ts +1 -1
  234. package/dist/types/utils/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +1 -1
  235. package/dist/types/utils/kup-dynamic-position/kup-dynamic-position.d.ts +2 -2
  236. package/dist/types/utils/kup-interact/kup-interact-declarations.d.ts +127 -0
  237. package/dist/types/utils/kup-interact/kup-interact.d.ts +93 -0
  238. package/dist/types/utils/kup-language/kup-language-declarations.d.ts +2 -0
  239. package/dist/types/utils/kup-language/kup-language.d.ts +1 -1
  240. package/dist/types/utils/kup-manager/kup-manager-declarations.d.ts +28 -8
  241. package/dist/types/utils/kup-manager/kup-manager.d.ts +18 -5
  242. package/dist/types/utils/kup-objects/kup-objects.d.ts +1 -7
  243. package/dist/types/utils/kup-search/kup-search-declarations.d.ts +7 -0
  244. package/dist/types/utils/kup-search/kup-search.d.ts +20 -0
  245. package/dist/types/utils/kup-theme/kup-theme-declarations.d.ts +2 -0
  246. package/dist/types/utils/kup-theme/kup-theme.d.ts +2 -2
  247. package/dist/types/utils/utils.d.ts +0 -1
  248. package/package.json +4 -6
  249. package/dist/cjs/cell-utils-1f89a299.js +0 -1527
  250. package/dist/cjs/drag-and-drop-4787ff6f.js +0 -281
  251. package/dist/cjs/f-chip-2d58c8f7.js +0 -239
  252. package/dist/cjs/kup-grid.cjs.entry.js +0 -130
  253. package/dist/cjs/kup-manager-59ad8bdc.js +0 -4845
  254. package/dist/cjs/kup-objects-59ea949c.js +0 -717
  255. package/dist/collection/assets/images/drag-multiple.js +0 -1
  256. package/dist/collection/components/kup-editor/kup-editor.css +0 -5
  257. package/dist/collection/components/kup-editor/kup-editor.js +0 -59
  258. package/dist/collection/components/kup-layout/kup-layout.css +0 -53
  259. package/dist/collection/components/kup-layout/kup-layout.js +0 -156
  260. package/dist/collection/utils/drag-and-drop.js +0 -109
  261. package/dist/collection/utils/kup-dialog/kup-dialog-declarations.js +0 -36
  262. package/dist/collection/utils/kup-dialog/kup-dialog.js +0 -310
  263. package/dist/esm/cell-utils-cb612463.js +0 -1510
  264. package/dist/esm/drag-and-drop-321cb4ca.js +0 -265
  265. package/dist/esm/f-chip-125d5dd6.js +0 -236
  266. package/dist/esm/kup-grid.entry.js +0 -126
  267. package/dist/esm/kup-manager-e7d7b353.js +0 -4842
  268. package/dist/esm/kup-objects-d38d2fa2.js +0 -711
  269. package/dist/ketchup/p-00fe1e3e.js +0 -1
  270. package/dist/ketchup/p-0320e24e.entry.js +0 -1
  271. package/dist/ketchup/p-08c7a092.js +0 -1
  272. package/dist/ketchup/p-1165f4ea.entry.js +0 -1
  273. package/dist/ketchup/p-170d3cba.js +0 -1
  274. package/dist/ketchup/p-18cb3ba3.js +0 -1
  275. package/dist/ketchup/p-23541a97.entry.js +0 -45
  276. package/dist/ketchup/p-64ea7e37.entry.js +0 -1
  277. package/dist/ketchup/p-7896031c.entry.js +0 -1
  278. package/dist/ketchup/p-876da4c2.entry.js +0 -1
  279. package/dist/ketchup/p-8fb9d9b2.entry.js +0 -1
  280. package/dist/ketchup/p-940ab57a.entry.js +0 -1
  281. package/dist/ketchup/p-9c858a38.entry.js +0 -1
  282. package/dist/ketchup/p-a12a5690.entry.js +0 -1
  283. package/dist/ketchup/p-a5424073.js +0 -1
  284. package/dist/ketchup/p-b0724035.entry.js +0 -1
  285. package/dist/ketchup/p-b14e77f0.js +0 -1
  286. package/dist/ketchup/p-d24cfdea.entry.js +0 -1
  287. package/dist/ketchup/p-ee89966f.entry.js +0 -27
  288. package/dist/ketchup/p-fcd2fd8f.js +0 -1
  289. package/dist/ketchup/p-fce3b9d8.entry.js +0 -1
  290. package/dist/types/assets/images/drag-multiple.d.ts +0 -1
  291. package/dist/types/components/kup-editor/kup-editor.d.ts +0 -16
  292. package/dist/types/components/kup-layout/kup-layout.d.ts +0 -25
  293. package/dist/types/utils/drag-and-drop.d.ts +0 -53
  294. package/dist/types/utils/kup-dialog/kup-dialog-declarations.d.ts +0 -43
  295. package/dist/types/utils/kup-dialog/kup-dialog.d.ts +0 -50
@@ -1,14 +1,12 @@
1
- import { Component, Element, Event, forceUpdate, getAssetPath, h, Host, Method, Prop, State, Watch, } from '@stencil/core';
2
- import { FixedCellsClasses, FixedCellsCSSVarsBase, GroupLabelDisplayMode, KupDataTableColumnDragType, KupDataTableRowDragType, KupDataTableColumnDragRemoveType, LoadMoreMode, PaginatorPos, ShowGrid, SortMode, TotalMode, totalMenuOpenID, TotalLabel, KupDataTableProps, fieldColumn, iconColumn, keyColumn, SelectionMode, KupDataTableColumnDragGroupType, } from './kup-data-table-declarations';
3
- import { isRating, isGauge, isKnob, getCellType, getColumnByName, getCellValueForDisplay, } from '../../utils/cell-utils';
4
- import { calcTotals, normalizeRows, filterRows, groupRows, paginateRows, sortRows, styleHasBorderRadius, styleHasWritingMode, dropHandlersCell, } from './kup-data-table-helper';
5
- import { stringToNumber, numberToFormattedStringNumber, identify, deepEqual, getProps, setProps, } from '../../utils/utils';
1
+ import { Component, Element, Event, forceUpdate, h, Host, Method, Prop, State, Watch, } from '@stencil/core';
2
+ import { FixedCellsClasses, FixedCellsCSSVarsBase, GroupLabelDisplayMode, LoadMoreMode, PaginatorPos, ShowGrid, SortMode, TotalMode, TotalLabel, KupDataTableProps, fieldColumn, iconColumn, keyColumn, SelectionMode, } from './kup-data-table-declarations';
3
+ import { getColumnByName } from '../../utils/cell-utils';
4
+ import { calcTotals, normalizeRows, filterRows, groupRows, paginateRows, sortRows, } from './kup-data-table-helper';
5
+ import { numberToFormattedStringNumber, identify, deepEqual, getProps, setProps, } from '../../utils/utils';
6
6
  import { ItemsDisplayMode, } from '../kup-list/kup-list-declarations';
7
7
  import { kupManagerInstance, } from '../../utils/kup-manager/kup-manager';
8
8
  import { KupDataTableState } from './kup-data-table-state';
9
9
  import { setTooltip, unsetTooltip } from '../../utils/helpers';
10
- import { setDragEffectAllowed, setKetchupDraggable, setKetchupDroppable, setDragDropPayload, getDragDropPayload, } from '../../utils/drag-and-drop';
11
- import { dragMultipleImg } from '../../assets/images/drag-multiple';
12
10
  import { FImage } from '../../f-components/f-image/f-image';
13
11
  import { FTextField } from '../../f-components/f-text-field/f-text-field';
14
12
  import { FChip } from '../../f-components/f-chip/f-chip';
@@ -26,6 +24,9 @@ import { KupLanguageDensity, KupLanguageFontsize, KupLanguageGeneric, KupLanguag
26
24
  import { KupThemeColorValues, KupThemeIconValues, } from '../../utils/kup-theme/kup-theme-declarations';
27
25
  import { componentWrapperId } from '../../variables/GenericVariables';
28
26
  import { KupDatesFormats } from '../../utils/kup-dates/kup-dates-declarations';
27
+ import { kupDragActiveAttr, KupDragEffect, kupDraggableCellAttr, kupDraggableColumnAttr, KupDropEventTypes, KupPointerEventTypes, } from '../../utils/kup-interact/kup-interact-declarations';
28
+ import { FCellPadding, } from '../../f-components/f-cell/f-cell-declarations';
29
+ import { FCell } from '../../f-components/f-cell/f-cell';
29
30
  export class KupDataTable {
30
31
  constructor() {
31
32
  //////////////////////////////
@@ -33,6 +34,11 @@ export class KupDataTable {
33
34
  //////////////////////////////
34
35
  this.stateId = '';
35
36
  this.state = new KupDataTableState();
37
+ /**
38
+ * When true and when a row is missing some columns, the missing cells will be autogenerated.
39
+ * @default false
40
+ */
41
+ this.autoFillMissingCells = false;
36
42
  /**
37
43
  * Custom style of the component. For more information: https://ketchup.smeup.com/ketchup-showcase/#/customization
38
44
  */
@@ -40,7 +46,7 @@ export class KupDataTable {
40
46
  /**
41
47
  * The density of the rows, defaults at 'medium' and can be also set to 'large' or 'small'.
42
48
  */
43
- this.density = 'dense';
49
+ this.density = FCellPadding.DENSE;
44
50
  /**
45
51
  * Enables drag.
46
52
  */
@@ -159,6 +165,10 @@ export class KupDataTable {
159
165
  * Sets the possibility to remove the selected column.
160
166
  */
161
167
  this.removableColumns = false;
168
+ /**
169
+ * Gives the possibility to resize columns by dragging on their right edge.
170
+ */
171
+ this.resizableColumns = true;
162
172
  /**
163
173
  * Sets the number of rows per page to display.
164
174
  */
@@ -244,10 +254,6 @@ export class KupDataTable {
244
254
  * name of the column with the opened total menu
245
255
  */
246
256
  this.openedTotalMenu = null;
247
- /**
248
- * name of the column with the opened group menu
249
- */
250
- this.openedGroupMenu = null;
251
257
  this.openedCustomSettings = false;
252
258
  this.fontsize = 'medium';
253
259
  /**
@@ -264,32 +270,6 @@ export class KupDataTable {
264
270
  this.renderedRows = [];
265
271
  this.loadMoreEventCounter = 0;
266
272
  this.loadMoreEventPreviousQuantity = 0;
267
- /**
268
- * Internal not reactive state used to keep track if a column is being dragged.
269
- * @private
270
- */
271
- this.columnsAreBeingDragged = false;
272
- /**
273
- * Attribute to set when a column is being dragged on the whole thead element
274
- * @const
275
- * @default 'columns-dragging'
276
- * @private
277
- */
278
- this.dragFlagAttribute = 'columns-dragging';
279
- /**
280
- * The string representing the drag over attribute
281
- * @const
282
- * @default 'drag-over'
283
- * @private
284
- */
285
- this.dragOverAttribute = 'drag-over';
286
- /**
287
- * The string representing the drag starter attribute to set onto the element
288
- * @const
289
- * @default 'drag-starter'
290
- * @private
291
- */
292
- this.dragStarterAttribute = 'drag-starter';
293
273
  /**
294
274
  * contains the original data, used in transposed function
295
275
  * @private
@@ -300,13 +280,22 @@ export class KupDataTable {
300
280
  this.navBarHeight = 0;
301
281
  this.theadIntersecting = false;
302
282
  this.tableIntersecting = false;
303
- this.iconPaths = undefined;
304
283
  this.isSafariBrowser = false;
305
284
  this.isRestoringState = false;
306
285
  this.totalMenuCoords = null;
307
286
  this.clickTimeout = [];
287
+ this.thRefs = [];
308
288
  this.rowsRefs = [];
309
289
  this.oldWidth = null;
290
+ this.hold = false;
291
+ this.interactableDrag = [];
292
+ this.interactableDrop = [];
293
+ this.interactableResize = [];
294
+ this.interactableTouch = [];
295
+ this.dropareaRef = null;
296
+ this.removeDropareaRef = null;
297
+ this.groupsDropareaRef = null;
298
+ this.clickCb = null;
310
299
  /**
311
300
  * Reference to the row detail card.
312
301
  */
@@ -338,7 +327,6 @@ export class KupDataTable {
338
327
  'format-color-text',
339
328
  'format-font-size-increase',
340
329
  ];
341
- this.DENSITY_CODES = ['dense', 'medium', 'wide'];
342
330
  this.DENSITY_DECODES = ['Dense', 'Normal', 'Wide'];
343
331
  this.DENSITY_ICONS = [
344
332
  'format-align-justify',
@@ -627,16 +615,6 @@ export class KupDataTable {
627
615
  this.columnMenuCard.layoutNumber = 12;
628
616
  this.columnMenuCard.sizeX = 'auto';
629
617
  this.columnMenuCard.sizeY = 'auto';
630
- this.columnMenuCard.tabIndex = -1;
631
- this.columnMenuCard.onclick = (e) => e.stopPropagation();
632
- this.columnMenuCard.addEventListener('blur', () => {
633
- if (this.kupManager.utilities.lastPointerDownPath.includes(this.columnMenuCard)) {
634
- this.columnMenuCard.focus();
635
- }
636
- else {
637
- this.closeColumnMenu();
638
- }
639
- });
640
618
  this.columnMenuCard.addEventListener('kup-card-click', (e) => {
641
619
  this.kupDataTableColumnMenu.emit({
642
620
  comp: this,
@@ -685,6 +663,32 @@ export class KupDataTable {
685
663
  this.resizeTimeout = window.setTimeout(() => this.refresh(), 300);
686
664
  }
687
665
  }
666
+ /**
667
+ * Sets the focus on an editable table cell.
668
+ * @param {string} column - Name of the column.
669
+ * @param {string} rowId - Id of the row.
670
+ */
671
+ async setFocus(column, rowId) {
672
+ const cells = this.rootElement.shadowRoot.querySelectorAll('td[data-column="' + column + '"]');
673
+ for (let index = 0; cells && index < cells.length; index++) {
674
+ const cell = cells[index];
675
+ if (cell['data-row'] && cell['data-row'].id == rowId) {
676
+ const input = cell.querySelector('input');
677
+ if (input) {
678
+ input.focus();
679
+ }
680
+ else {
681
+ const kupInput = cell.querySelector('.hydrated');
682
+ if (kupInput) {
683
+ try {
684
+ kupInput.setFocus();
685
+ }
686
+ catch (error) { }
687
+ }
688
+ }
689
+ }
690
+ }
691
+ }
688
692
  /**
689
693
  * Sets the props to the component.
690
694
  * @param {GenericObject} props - Object containing props that will be set to the component.
@@ -911,7 +915,7 @@ export class KupDataTable {
911
915
  cells[cellName].icon = oldColumn.icon;
912
916
  }
913
917
  if (oldColumn.shape && !cells[cellName].shape) {
914
- cells[cellName].shape = oldColumn.icon;
918
+ cells[cellName].shape = oldColumn.shape;
915
919
  }
916
920
  }
917
921
  // If a record is key and no column argument is provided, it will be placed on top
@@ -951,14 +955,16 @@ export class KupDataTable {
951
955
  else {
952
956
  this.navBarHeight = 0;
953
957
  }
954
- this.stickyTheadRef.style.top = this.navBarHeight + 'px';
955
- const widthTable = this.tableAreaRef.offsetWidth;
956
- this.stickyTheadRef.style.maxWidth = widthTable + 'px';
957
- const thCollection = this.theadRef.querySelectorAll('th');
958
- const thStickyCollection = this.stickyTheadRef.querySelectorAll('th-sticky');
959
- for (let i = 0; i < thCollection.length; i++) {
960
- const widthTH = thCollection[i].offsetWidth;
961
- thStickyCollection[i].style.width = widthTH + 'px';
958
+ if (this.stickyTheadRef) {
959
+ this.stickyTheadRef.style.top = this.navBarHeight + 'px';
960
+ const widthTable = this.tableAreaRef.offsetWidth;
961
+ this.stickyTheadRef.style.maxWidth = widthTable + 'px';
962
+ const thCollection = this.theadRef.querySelectorAll('th');
963
+ const thStickyCollection = this.stickyTheadRef.querySelectorAll('th-sticky');
964
+ for (let i = 0; i < thCollection.length; i++) {
965
+ const widthTH = thCollection[i].offsetWidth;
966
+ thStickyCollection[i].style.width = widthTH + 'px';
967
+ }
962
968
  }
963
969
  }
964
970
  setObserver() {
@@ -1010,9 +1016,237 @@ export class KupDataTable {
1010
1016
  };
1011
1017
  this.intObserver = new IntersectionObserver(callback, options);
1012
1018
  }
1013
- didRenderObservers() {
1014
- if (this.paginatedRowsLength < this.rowsLength && this.lazyLoadRows) {
1015
- this.intObserver.observe(this.rowsRefs[this.paginatedRowsLength - 1]);
1019
+ didLoadInteractables() {
1020
+ this.interactableTouch.push(this.tableRef);
1021
+ const tapCb = (e) => {
1022
+ if (this.hold) {
1023
+ this.hold = false;
1024
+ return;
1025
+ }
1026
+ switch (e.button) {
1027
+ // left click
1028
+ case 0:
1029
+ // Note: event must be cloned
1030
+ // otherwise inside setTimeout will be exiting the Shadow DOM scope(causing loss of information, including target).
1031
+ const clone = {};
1032
+ for (const key in e) {
1033
+ clone[key] = e[key];
1034
+ }
1035
+ this.clickTimeout.push(setTimeout(() => {
1036
+ this.kupDataTableClick.emit({
1037
+ comp: this,
1038
+ id: this.rootElement.id,
1039
+ details: this.clickHandler(clone),
1040
+ });
1041
+ }, 300));
1042
+ break;
1043
+ // right click
1044
+ case 2:
1045
+ this.kupDataTableContextMenu.emit({
1046
+ comp: this,
1047
+ id: this.rootElement.id,
1048
+ details: this.contextMenuHandler(e),
1049
+ });
1050
+ break;
1051
+ }
1052
+ };
1053
+ const doubletapCb = (e) => {
1054
+ switch (e.button) {
1055
+ // left click
1056
+ case 0:
1057
+ for (let index = 0; index < this.clickTimeout.length; index++) {
1058
+ clearTimeout(this.clickTimeout[index]);
1059
+ this.kupManager.debug.logMessage(this, 'Cleared clickHandler timeout(' +
1060
+ this.clickTimeout[index] +
1061
+ ').');
1062
+ }
1063
+ this.clickTimeout = [];
1064
+ this.kupDataTableDblClick.emit({
1065
+ comp: this,
1066
+ id: this.rootElement.id,
1067
+ details: this.dblClickHandler(e),
1068
+ });
1069
+ break;
1070
+ }
1071
+ };
1072
+ const holdCb = (e) => {
1073
+ if (e.pointerType === 'pen' || e.pointerType === 'touch') {
1074
+ this.hold = true;
1075
+ this.kupDataTableContextMenu.emit({
1076
+ comp: this,
1077
+ id: this.rootElement.id,
1078
+ details: this.contextMenuHandler(e),
1079
+ });
1080
+ }
1081
+ };
1082
+ this.kupManager.interact.on(this.tableRef, KupPointerEventTypes.TAP, tapCb);
1083
+ this.kupManager.interact.on(this.tableRef, KupPointerEventTypes.DOUBLETAP, doubletapCb);
1084
+ this.kupManager.interact.on(this.tableRef, KupPointerEventTypes.HOLD, holdCb);
1085
+ }
1086
+ didRenderInteractables() {
1087
+ if (this.showGroups) {
1088
+ if (!this.interactableDrop.includes(this.groupsDropareaRef)) {
1089
+ this.interactableDrop.push(this.groupsDropareaRef);
1090
+ this.kupManager.interact.dropzone(this.groupsDropareaRef, {
1091
+ accept: `[${kupDraggableColumnAttr}]`,
1092
+ }, null, {
1093
+ drop: (e) => {
1094
+ const draggedTh = e.relatedTarget;
1095
+ const grouped = getColumnByName(this.getColumns(), draggedTh.dataset.column);
1096
+ this.handleColumnGroup(grouped);
1097
+ this.tableRef.removeAttribute(kupDragActiveAttr);
1098
+ },
1099
+ });
1100
+ }
1101
+ }
1102
+ if (this.removableColumns) {
1103
+ if (!this.interactableDrop.includes(this.removeDropareaRef)) {
1104
+ this.interactableDrop.push(this.removeDropareaRef);
1105
+ this.kupManager.interact.dropzone(this.removeDropareaRef, {
1106
+ accept: `[${kupDraggableColumnAttr}]`,
1107
+ }, null, {
1108
+ drop: (e) => {
1109
+ const draggedTh = e.relatedTarget;
1110
+ const deleted = getColumnByName(this.getColumns(), draggedTh.dataset.column);
1111
+ this.handleColumnRemove(deleted);
1112
+ this.tableRef.removeAttribute(kupDragActiveAttr);
1113
+ },
1114
+ });
1115
+ }
1116
+ }
1117
+ if (this.enableSortableColumns) {
1118
+ const dataCb = (e) => {
1119
+ const draggable = e.target;
1120
+ return {
1121
+ cell: null,
1122
+ column: getColumnByName(this.getVisibleColumns(), draggable.dataset.column),
1123
+ id: this.rootElement.id,
1124
+ multiple: !!(this.selection === SelectionMode.MULTIPLE ||
1125
+ this.selection === SelectionMode.MULTIPLE_CHECKBOX),
1126
+ row: null,
1127
+ selectedRows: this.selectedRows,
1128
+ };
1129
+ };
1130
+ const dropCb = (e) => {
1131
+ const draggable = e.relatedTarget;
1132
+ const sorted = draggable.kupDragDrop.column;
1133
+ const receiving = getColumnByName(this.getColumns(), e.target.dataset.column);
1134
+ if (receiving && sorted) {
1135
+ this.handleColumnSort(receiving, sorted);
1136
+ }
1137
+ this.tableRef.removeAttribute(kupDragActiveAttr);
1138
+ };
1139
+ const startCb = (e) => {
1140
+ const draggable = e.target;
1141
+ this.hideShowColumnDropArea(true, draggable);
1142
+ };
1143
+ const endCb = () => {
1144
+ this.hideShowColumnDropArea(false);
1145
+ };
1146
+ const dropCallbacks = {
1147
+ drop: dropCb,
1148
+ };
1149
+ const dragCallbacks = {
1150
+ start: startCb,
1151
+ end: endCb,
1152
+ };
1153
+ for (let index = 0; index < this.thRefs.length; index++) {
1154
+ const th = this.thRefs[index];
1155
+ if (th && !this.interactableDrag.includes(th)) {
1156
+ this.interactableDrag.push(th);
1157
+ this.kupManager.interact.dropzone(th, {
1158
+ accept: `[${kupDraggableColumnAttr}]`,
1159
+ }, null, dropCallbacks);
1160
+ this.kupManager.interact.draggable(th, {
1161
+ cursorChecker() {
1162
+ return null;
1163
+ },
1164
+ ignoreFrom: '.header-cell__drag-handler',
1165
+ }, {
1166
+ callback: dataCb,
1167
+ }, KupDragEffect.CLONE, dragCallbacks);
1168
+ }
1169
+ }
1170
+ }
1171
+ if (this.resizableColumns) {
1172
+ const moveCb = (e) => {
1173
+ const column = getColumnByName(this.getVisibleColumns(), e.target.dataset.column);
1174
+ column.size = e.rect.width + 'px';
1175
+ this.refresh();
1176
+ };
1177
+ const callbacks = {
1178
+ move: moveCb,
1179
+ };
1180
+ for (let index = 0; index < this.thRefs.length; index++) {
1181
+ const th = this.thRefs[index];
1182
+ if (th && !this.interactableResize.includes(th)) {
1183
+ this.interactableResize.push(th);
1184
+ this.kupManager.interact.resizable(th, {
1185
+ allowFrom: '.header-cell__drag-handler',
1186
+ edges: {
1187
+ left: false,
1188
+ right: true,
1189
+ bottom: false,
1190
+ top: false,
1191
+ },
1192
+ ignoreFrom: '.header-cell__content',
1193
+ }, callbacks);
1194
+ }
1195
+ }
1196
+ }
1197
+ if (this.dragEnabled) {
1198
+ for (let index = 0; index < this.rowsRefs.length; index++) {
1199
+ const row = this.rowsRefs[index];
1200
+ const dataCb = () => {
1201
+ const cellEl = this.rootElement.shadowRoot.querySelector('td:hover');
1202
+ return {
1203
+ cell: cellEl['data-cell'],
1204
+ column: getColumnByName(this.getVisibleColumns(), cellEl.dataset.column),
1205
+ id: this.rootElement.id,
1206
+ multiple: !!(this.selection === SelectionMode.MULTIPLE ||
1207
+ this.selection === SelectionMode.MULTIPLE_CHECKBOX),
1208
+ row: cellEl['data-row'],
1209
+ selectedRows: this.selectedRows,
1210
+ };
1211
+ };
1212
+ if (row && !this.interactableDrag.includes(row)) {
1213
+ this.interactableDrag.push(row);
1214
+ this.kupManager.interact.draggable(row, {
1215
+ allowFrom: 'td',
1216
+ cursorChecker() {
1217
+ return null;
1218
+ },
1219
+ }, {
1220
+ callback: dataCb,
1221
+ }, KupDragEffect.BADGE);
1222
+ }
1223
+ }
1224
+ }
1225
+ if (this.dropEnabled) {
1226
+ const dataCb = () => {
1227
+ const receivingDetails = this.getEventDetails([
1228
+ this.rootElement.shadowRoot.querySelector('td:hover'),
1229
+ ]);
1230
+ return {
1231
+ cell: receivingDetails.cell,
1232
+ column: receivingDetails.column,
1233
+ id: this.rootElement.id,
1234
+ row: receivingDetails.row,
1235
+ };
1236
+ };
1237
+ for (let index = 0; index < this.rowsRefs.length; index++) {
1238
+ const row = this.rowsRefs[index];
1239
+ if (row && !this.interactableDrop.includes(row)) {
1240
+ this.interactableDrop.push(row);
1241
+ this.kupManager.interact.dropzone(row, {
1242
+ accept: `[${kupDraggableCellAttr}]`,
1243
+ }, {
1244
+ callback: dataCb,
1245
+ dispatcher: this.rootElement,
1246
+ type: KupDropEventTypes.DATATABLE,
1247
+ });
1248
+ }
1249
+ }
1016
1250
  }
1017
1251
  }
1018
1252
  didLoadObservers() {
@@ -1023,6 +1257,11 @@ export class KupDataTable {
1023
1257
  this.intObserver.observe(this.theadRef);
1024
1258
  }
1025
1259
  }
1260
+ didRenderObservers() {
1261
+ if (this.paginatedRowsLength < this.rowsLength && this.lazyLoadRows) {
1262
+ this.intObserver.observe(this.rowsRefs[this.paginatedRowsLength - 1]);
1263
+ }
1264
+ }
1026
1265
  didLoadEventHandling() {
1027
1266
  this.tableAreaRef.addEventListener('scroll', () => this.scrollStickyHeader());
1028
1267
  }
@@ -1130,7 +1369,7 @@ export class KupDataTable {
1130
1369
  componentDidRender() {
1131
1370
  const root = this.rootElement.shadowRoot;
1132
1371
  if (root) {
1133
- const fs = root.querySelectorAll('.f-text-field--wrapper');
1372
+ const fs = root.querySelectorAll('.f-text-field');
1134
1373
  for (let index = 0; index < fs.length; index++) {
1135
1374
  FTextFieldMDC(fs[index]);
1136
1375
  }
@@ -1141,6 +1380,7 @@ export class KupDataTable {
1141
1380
  this.totalMenuPosition();
1142
1381
  this.checkScrollOnHover();
1143
1382
  this.didRenderObservers();
1383
+ this.didRenderInteractables();
1144
1384
  this.hideShowColumnDropArea(false);
1145
1385
  this.setDynPosElements();
1146
1386
  if (this.headerIsPersistent &&
@@ -1160,7 +1400,7 @@ export class KupDataTable {
1160
1400
  componentDidLoad() {
1161
1401
  this.didLoadObservers();
1162
1402
  this.didLoadEventHandling();
1163
- // automatic row selection
1403
+ this.didLoadInteractables();
1164
1404
  if (this.selectRowsById) {
1165
1405
  this.setSelectedRows(this.selectRowsById);
1166
1406
  }
@@ -1181,6 +1421,17 @@ export class KupDataTable {
1181
1421
  this.kupManager.debug.logLoad(this, true);
1182
1422
  }
1183
1423
  //======== Utility methods ========
1424
+ getEventPath(e) {
1425
+ let path = [];
1426
+ let currentEl = e.target;
1427
+ while (currentEl !== this.rootElement && currentEl !== document.body) {
1428
+ path.push(currentEl);
1429
+ currentEl = currentEl.parentNode
1430
+ ? currentEl.parentNode
1431
+ : currentEl.host;
1432
+ }
1433
+ return path;
1434
+ }
1184
1435
  resetSelectedRows() {
1185
1436
  if (!this.data || !this.data.rows || this.data.rows.length === 0)
1186
1437
  return;
@@ -1361,12 +1612,58 @@ export class KupDataTable {
1361
1612
  }
1362
1613
  this.detailCard.data = cardData;
1363
1614
  this.detailCard.style.position = 'fixed';
1364
- this.detailCard.style.left = x + 'px';
1365
- this.detailCard.style.top = y + 'px';
1615
+ this.detailCard.style.left = '0';
1616
+ this.detailCard.style.top = '0';
1617
+ this.detailCard.setAttribute('data-x', x.toString());
1618
+ this.detailCard.setAttribute('data-y', y.toString());
1619
+ this.detailCard.style.transform = 'translate(' + x + 'px,' + y + 'px)';
1366
1620
  this.rootElement.shadowRoot.append(this.detailCard);
1367
1621
  }
1368
- getEventDetails(el) {
1369
- const isHeader = !!el.closest('thead'), isBody = !!el.closest('tbody'), isFooter = !!el.closest('tfoot'), td = el.closest('td'), textfield = el.closest('.f-text-field--wrapper'), th = el.closest('th'), tr = el.closest('tr'), filterRemove = el.closest('th .filter-remove');
1622
+ getEventDetails(path) {
1623
+ let isHeader, isBody, isFooter, td, textfield, th, tr, filterRemove;
1624
+ if (path) {
1625
+ for (let i = path.length - 1; i >= 0; i--) {
1626
+ let p = path[i];
1627
+ if (!p.tagName) {
1628
+ continue;
1629
+ }
1630
+ switch (p.tagName.toUpperCase()) {
1631
+ case 'THEAD': {
1632
+ isHeader = true;
1633
+ break;
1634
+ }
1635
+ case 'TBODY': {
1636
+ isBody = true;
1637
+ break;
1638
+ }
1639
+ case 'TFOOT': {
1640
+ isFooter = true;
1641
+ break;
1642
+ }
1643
+ case 'TD': {
1644
+ td = p;
1645
+ break;
1646
+ }
1647
+ case 'TH': {
1648
+ th = p;
1649
+ break;
1650
+ }
1651
+ case 'TR': {
1652
+ tr = p;
1653
+ break;
1654
+ }
1655
+ default: {
1656
+ if (p.classList.contains('f-text-field')) {
1657
+ textfield = p;
1658
+ }
1659
+ else if (p.classList.contains(KupThemeIconValues.FILTER_REMOVE.replace('--', ''))) {
1660
+ filterRemove = p;
1661
+ }
1662
+ break;
1663
+ }
1664
+ }
1665
+ }
1666
+ }
1370
1667
  let cell = null, column = null, isGroupRow = false, row = null;
1371
1668
  if (isBody) {
1372
1669
  if (tr) {
@@ -1414,7 +1711,7 @@ export class KupDataTable {
1414
1711
  };
1415
1712
  }
1416
1713
  clickHandler(e) {
1417
- const details = this.getEventDetails(e.target);
1714
+ const details = this.getEventDetails(this.getEventPath(e));
1418
1715
  if (details.area === 'header') {
1419
1716
  if (details.th && details.column) {
1420
1717
  if (details.filterRemove) {
@@ -1446,15 +1743,14 @@ export class KupDataTable {
1446
1743
  return details;
1447
1744
  }
1448
1745
  if (details.td && details.row && !details.textfield) {
1449
- this.onRowClick(e, details.row, true);
1746
+ this.onRowClick(details.row, details.td, true);
1450
1747
  return details;
1451
1748
  }
1452
1749
  }
1453
1750
  return details;
1454
1751
  }
1455
1752
  contextMenuHandler(e) {
1456
- e.preventDefault();
1457
- const details = this.getEventDetails(e.target);
1753
+ const details = this.getEventDetails(this.getEventPath(e));
1458
1754
  if (details.area === 'header') {
1459
1755
  if (details.th && details.column) {
1460
1756
  this.openColumnMenu(details.column.name);
@@ -1463,7 +1759,7 @@ export class KupDataTable {
1463
1759
  }
1464
1760
  else if (details.area === 'body') {
1465
1761
  const _hasTooltip = details.cell.obj
1466
- ? this.kupManager.objects.hasTooltip(details.cell.obj)
1762
+ ? !this.kupManager.objects.isEmptyKupObj(details.cell.obj)
1467
1763
  : false;
1468
1764
  if (_hasTooltip &&
1469
1765
  this.showTooltipOnRightClick &&
@@ -1484,37 +1780,18 @@ export class KupDataTable {
1484
1780
  return details;
1485
1781
  }
1486
1782
  dblClickHandler(e) {
1487
- const details = this.getEventDetails(e.target);
1783
+ const details = this.getEventDetails(this.getEventPath(e));
1488
1784
  if (details.area === 'body') {
1489
1785
  if (this.selection == SelectionMode.MULTIPLE) {
1490
1786
  this.resetSelectedRows();
1491
1787
  }
1492
1788
  if (this.selection == SelectionMode.SINGLE ||
1493
1789
  this.selection == SelectionMode.MULTIPLE) {
1494
- this.onRowClick(e, details.row, false);
1790
+ this.onRowClick(details.row, details.td, false);
1495
1791
  }
1496
1792
  }
1497
1793
  return details;
1498
1794
  }
1499
- mouseMoveHandler(e) {
1500
- const details = this.getEventDetails(e.target);
1501
- const hoverEl = this.rootElement.shadowRoot.querySelector('.hover');
1502
- if (hoverEl) {
1503
- hoverEl.classList.remove('hover');
1504
- }
1505
- if (details.area === 'body') {
1506
- if (details.tr) {
1507
- details.tr.classList.add('hover');
1508
- return;
1509
- }
1510
- }
1511
- }
1512
- mouseOutHandler() {
1513
- const hoverEl = this.rootElement.shadowRoot.querySelector('.hover');
1514
- if (hoverEl) {
1515
- hoverEl.classList.remove('hover');
1516
- }
1517
- }
1518
1795
  getVisibleColumns() {
1519
1796
  // TODO: change into `visible ?? true` when TS dependency has been updated
1520
1797
  const visibleColumns = this.getColumns().filter(({ visible }) => visible !== undefined ? visible : true);
@@ -1559,12 +1836,6 @@ export class KupDataTable {
1559
1836
  getRows() {
1560
1837
  return this.data && this.data.rows ? this.data.rows : [];
1561
1838
  }
1562
- // TODO if is not shared, move this in the third parameter of setKetchupDraggable method
1563
- addMultiSelectDragImageToEvent(event) {
1564
- const dragImage = document.createElement('img');
1565
- dragImage.src = dragMultipleImg;
1566
- event.dataTransfer.setDragImage(dragImage, 0, 0);
1567
- }
1568
1839
  initRows() {
1569
1840
  this.filterRows();
1570
1841
  this.footer = calcTotals(normalizeRows(this.getColumns(), this.rows), this.totals);
@@ -1803,9 +2074,7 @@ export class KupDataTable {
1803
2074
  this.currentRowsPerPage = detail.newRowsPerPage;
1804
2075
  this.adjustPaginator();
1805
2076
  }
1806
- onRowClick(event, row, emitEvent) {
1807
- // checking target
1808
- const target = event.target;
2077
+ onRowClick(row, td, emitEvent) {
1809
2078
  // selecting row
1810
2079
  if (!row.unselectable) {
1811
2080
  switch (this.selection) {
@@ -1830,18 +2099,9 @@ export class KupDataTable {
1830
2099
  }
1831
2100
  }
1832
2101
  // find clicked column
1833
- let clickedColumn = null;
1834
- if (target instanceof HTMLElement) {
1835
- if (target.tagName !== 'TR') {
1836
- let currentElement = target;
1837
- while (currentElement.tagName !== 'TD') {
1838
- currentElement = currentElement.parentElement;
1839
- }
1840
- clickedColumn = currentElement.dataset.column;
1841
- }
1842
- }
2102
+ const clickedColumn = td.dataset.column;
1843
2103
  // selecting clicked column
1844
- if (clickedColumn) {
2104
+ if (this.selection !== SelectionMode.NONE && clickedColumn) {
1845
2105
  this.deselectColumn(this.selectedColumn);
1846
2106
  this.selectedColumn = clickedColumn;
1847
2107
  this.selectColumn(this.selectedColumn);
@@ -1896,33 +2156,6 @@ export class KupDataTable {
1896
2156
  type: 'expander',
1897
2157
  });
1898
2158
  }
1899
- cellUpdate(e, value, cell, column, row) {
1900
- if (this.kupManager.objects.isCheckbox(cell.obj)) {
1901
- if (cell.data && cell.data['checked'] !== undefined) {
1902
- cell.data['checked'] = value === 'on' ? false : true;
1903
- }
1904
- }
1905
- else {
1906
- if (cell.obj) {
1907
- cell.obj.k = value;
1908
- }
1909
- cell.value = value;
1910
- cell.displayedValue = null;
1911
- cell.displayedValue = getCellValueForDisplay(column, cell);
1912
- if (cell.data && cell.data['value'] !== undefined) {
1913
- cell.data['value'] = value;
1914
- }
1915
- }
1916
- this.refresh();
1917
- this.kupDataTableCellUpdate.emit({
1918
- comp: this,
1919
- id: this.rootElement.id,
1920
- cell: cell,
1921
- column: column,
1922
- row: row,
1923
- event: e,
1924
- });
1925
- }
1926
2159
  handleRowSelect(row) {
1927
2160
  const index = this.selectedRows.indexOf(row);
1928
2161
  if (index < 0) {
@@ -1973,93 +2206,14 @@ export class KupDataTable {
1973
2206
  }
1974
2207
  closeTotalMenu() {
1975
2208
  this.openedTotalMenu = null;
2209
+ this.kupManager.removeClickCallback(this.clickCb);
1976
2210
  }
1977
- /* TODO
1978
- private openGroupMenu(column: Column) {
1979
- this.openedGroupMenu = column.name;
1980
- }
1981
-
1982
- private closeGroupMenu() {
1983
- this.openedGroupMenu = null;
1984
- }
1985
- */
1986
2211
  closeMenuAndTooltip() {
1987
2212
  unsetTooltip(this.tooltip);
1988
2213
  }
1989
- isOpenedTotalMenu() {
1990
- return this.openedTotalMenu != null;
1991
- }
1992
2214
  isOpenedTotalMenuForColumn(column) {
1993
2215
  return this.openedTotalMenu === column;
1994
2216
  }
1995
- isOpenedGroupMenu() {
1996
- return this.openedGroupMenu != null;
1997
- }
1998
- isOpenedGroupMenuForColumn(column) {
1999
- return this.openedGroupMenu === column;
2000
- }
2001
- /**
2002
- * Type guard needed to be sure that an object returned from composePath() is an HTMLElement with classes
2003
- * @param node
2004
- */
2005
- isHTMLElementFromEventTarget(node) {
2006
- return node.classList !== undefined;
2007
- }
2008
- hasOverlayActions(column) {
2009
- if (column == null || column.obj == null) {
2010
- return false;
2011
- }
2012
- return this.kupManager.objects.canHaveAutomaticDerivedColumn(column.obj);
2013
- }
2014
- onHeaderCellContextMenuClose(event) {
2015
- // Gets the path of the event (does not work in IE11 or previous)
2016
- const eventPath = event.composedPath();
2017
- let fromTotalMenu = false;
2018
- let fromSameTable = false;
2019
- // Examine the path
2020
- for (let elem of eventPath) {
2021
- // TODO When the footer is considered stable please do this in another dedicated method
2022
- // check if is the open menu button the element which fired the event
2023
- // TODO Maybe a better approach would be to use the blur event in order to hide the menu
2024
- if (elem.id === totalMenuOpenID) {
2025
- return;
2026
- }
2027
- // If we encounter our table we can stop looping the elements
2028
- if (elem === this.tableAreaRef) {
2029
- fromSameTable = true;
2030
- break;
2031
- }
2032
- // TODO When the footer is considered stable please do this in another dedicated method
2033
- // If the event comes from a menu of the table footer
2034
- if (this.isHTMLElementFromEventTarget(elem) &&
2035
- elem.classList &&
2036
- elem.classList.contains('total-menu')) {
2037
- fromTotalMenu = true;
2038
- }
2039
- }
2040
- // TODO When the footer is considered stable please do this in another dedicated method
2041
- if (this.isOpenedTotalMenu() && !(fromTotalMenu && fromSameTable)) {
2042
- this.closeTotalMenu();
2043
- }
2044
- }
2045
- onJ4btnClicked(row, column, cell) {
2046
- // Since this function is called with bind, the event from the kup-button gets passed into the arguments array
2047
- const buttonEvent = arguments[3];
2048
- if (buttonEvent) {
2049
- // Prevents double events to be fired.
2050
- buttonEvent.stopPropagation();
2051
- }
2052
- else {
2053
- throw 'kup-data-table error: missing event';
2054
- }
2055
- this.kupCellButtonClick.emit({
2056
- comp: this,
2057
- id: this.rootElement.id,
2058
- cell: cell,
2059
- column: column,
2060
- row: row,
2061
- });
2062
- }
2063
2217
  // utility methods
2064
2218
  groupRows() {
2065
2219
  if (!this.isGrouping()) {
@@ -2219,7 +2373,7 @@ export class KupDataTable {
2219
2373
  * @param extraCells - the extra cells rendered into the table
2220
2374
  */
2221
2375
  composeHeaderCellClassAndStyle(columnIndex, extraCells = 0, column) {
2222
- let columnClass = {}, thStyle = {};
2376
+ let columnClass = { ['header-cell']: true }, thStyle = column.style ? Object.assign({}, column.style) : {};
2223
2377
  if (this.kupManager.objects.isBar(column.obj) ||
2224
2378
  this.kupManager.objects.isButton(column.obj) ||
2225
2379
  this.kupManager.objects.isChart(column.obj) ||
@@ -2229,13 +2383,13 @@ export class KupDataTable {
2229
2383
  this.kupManager.objects.isProgressBar(column.obj) ||
2230
2384
  this.kupManager.objects.isRadio(column.obj) ||
2231
2385
  this.kupManager.objects.isVoCodver(column.obj)) {
2232
- columnClass.centered = true;
2386
+ columnClass['header-cell--centered'] = true;
2233
2387
  }
2234
2388
  if (this.kupManager.objects.isNumber(column.obj)) {
2235
- columnClass.number = true;
2389
+ columnClass['header-cell--is-number'] = true;
2236
2390
  }
2237
2391
  if (this.kupManager.objects.isIcon(column.obj)) {
2238
- columnClass.icon = true;
2392
+ columnClass['header-cell--is-icon'] = true;
2239
2393
  }
2240
2394
  // For fixed cells styles and classes
2241
2395
  const fixedCellStyle = this.composeFixedCellStyleAndClass(columnIndex + 1 + extraCells, 0, extraCells);
@@ -2281,30 +2435,17 @@ export class KupDataTable {
2281
2435
  }
2282
2436
  // Renders normal cells
2283
2437
  const dataColumns = this.getVisibleColumns().map((column, columnIndex) => {
2284
- // Composes column cell style and classes
2285
2438
  const { columnClass, thStyle } = this.composeHeaderCellClassAndStyle(columnIndex, specialExtraCellsCount, column);
2286
- const overlay = null;
2287
- //---- Filter ----
2288
2439
  let filter = null;
2289
2440
  if (this.filtersColumnMenuInstance.hasFiltersForColumn(this.filters, column)) {
2290
2441
  const svgLabel = this.kupManager.language.translate(KupLanguageGeneric.REMOVE_FILTERS) + `: '${this.getFilterValueForTooltip(column)}'`;
2291
- /**
2292
- * When column has a filter but filters must not be displayed, shows an icon to remove the filter.
2293
- * Upon click, the filter gets removed.
2294
- * The payload event is simulated here.
2295
- */
2296
2442
  filter = (h("span", { title: svgLabel, class: `kup-icon ${KupThemeIconValues.FILTER_REMOVE.replace('--', '')}` }));
2297
2443
  }
2298
- //---- Sort ----
2299
2444
  let sortIcon = null;
2300
- // When sorting is enabled, there are two things to do:
2301
- // 1 - Add correct icon to the table
2302
- // 2 - stores the handler to be later set onto the whole cell
2303
2445
  let iconClass = this.getSortIcon(column.name);
2304
2446
  if (iconClass !== '') {
2305
2447
  sortIcon = (h("span", { class: iconClass, title: this.getSortDecode(column.name) }));
2306
2448
  }
2307
- // Adds the sortable class to the header cell
2308
2449
  columnClass['header-cell--sortable'] = true;
2309
2450
  let keyIcon = null;
2310
2451
  if (column.isKey) {
@@ -2326,97 +2467,14 @@ export class KupDataTable {
2326
2467
  }
2327
2468
  }
2328
2469
  }
2329
- // Reference for drag events and what they permit or not
2330
- // https://html.spec.whatwg.org/multipage/dnd.html#concept-dnd-p
2331
- const dragHandlers = {
2332
- onDragStart: (e) => {
2333
- // Sets the type of drag
2334
- setDragEffectAllowed(e, 'move');
2335
- const overElement = this.getThElement(e.target);
2336
- // Remember that the current target is different from the one print out in the console
2337
- // Sets which element has started the drag
2338
- overElement.setAttribute(this.dragStarterAttribute, '');
2339
- this.theadRef.setAttribute(this.dragFlagAttribute, '');
2340
- this.columnsAreBeingDragged = true;
2341
- this.hideShowColumnDropArea(true, overElement);
2342
- // TODO set drag payload and get it in the other methods when need it
2343
- // setDragDropPayload
2344
- // getDragDropPayload
2345
- // replace the used flags set with attribute
2346
- },
2347
- onDragEnd: (e) => {
2348
- // When the drag has ended, checks if the element still exists or it was destroyed by JSX
2349
- const overElement = this.getThElement(e.target);
2350
- if (overElement) {
2351
- // If it still exists, removes the attribute so that it can perform a new drag again
2352
- overElement.removeAttribute(this.dragStarterAttribute);
2353
- }
2354
- // Remove the over attribute
2355
- const dragDropPayload = getDragDropPayload();
2356
- if (dragDropPayload && dragDropPayload.overElement) {
2357
- dragDropPayload.overElement.removeAttribute(this.dragOverAttribute);
2358
- }
2359
- this.theadRef.removeAttribute(this.dragFlagAttribute);
2360
- this.columnsAreBeingDragged = false;
2361
- this.hideShowColumnDropArea(false);
2362
- },
2363
- };
2364
- const dropHandlers = {
2365
- onDrop: (e) => {
2366
- const transferredData = JSON.parse(e.dataTransfer.getData(KupDataTableColumnDragType));
2367
- // We are sure the tables have been dropped in a valid location -> starts sorting the columns
2368
- this.handleColumnSort(column, transferredData);
2369
- return KupDataTableColumnDragType;
2370
- },
2371
- onDragLeave: (e) => {
2372
- if (e.dataTransfer.types.indexOf(KupDataTableColumnDragType) >= 0) {
2373
- const overElement = this.getThElement(e.target);
2374
- if (overElement) {
2375
- overElement.removeAttribute(this.dragOverAttribute);
2376
- }
2377
- }
2378
- },
2379
- onDragOver: (e) => {
2380
- if (e.dataTransfer.types.indexOf(KupDataTableColumnDragType) >= 0) {
2381
- const overElement = this.getThElement(e.target);
2382
- overElement.setAttribute(this.dragOverAttribute, '');
2383
- // TODO do it without using the element but with data like id, etc.
2384
- setDragDropPayload({
2385
- overElement,
2386
- });
2387
- // If element can have a drop effect
2388
- if (!overElement.hasAttribute(this.dragStarterAttribute) &&
2389
- this.columnsAreBeingDragged) {
2390
- setDragEffectAllowed(e, 'move');
2391
- return true;
2392
- }
2393
- else {
2394
- setDragEffectAllowed(e, 'none');
2395
- return false;
2396
- }
2397
- }
2398
- },
2399
- };
2400
- columnClass.number = this.kupManager.objects.isNumber(column.obj);
2401
- return (h("th", Object.assign({ "data-cell": column, "data-column": column.name, class: columnClass, style: thStyle }, (this.enableSortableColumns
2402
- ? setKetchupDraggable(dragHandlers, {
2403
- [KupDataTableColumnDragType]: column,
2404
- 'kup-drag-source-element': {
2405
- column: column,
2406
- id: this.rootElement.id,
2407
- },
2408
- })
2409
- : {}), (this.enableSortableColumns
2410
- ? setKetchupDroppable(dropHandlers, [KupDataTableColumnDragType], this.rootElement, {
2411
- column: column,
2412
- id: this.rootElement.id,
2413
- })
2414
- : {})),
2415
- h("span", { class: "column-title" }, this.applyLineBreaks(column.title)),
2416
- overlay,
2417
- keyIcon,
2418
- sortIcon,
2419
- filter));
2470
+ return (h("th", { ref: (el) => this.thRefs.push(el), "data-cell": column, "data-column": column.name, class: columnClass, style: thStyle },
2471
+ h("div", { class: "header-cell__content" },
2472
+ h("span", { class: "header-cell__title" }, this.applyLineBreaks(column.title)),
2473
+ h("span", { class: "header-cell__icons" },
2474
+ keyIcon,
2475
+ sortIcon,
2476
+ filter)),
2477
+ this.resizableColumns ? (h("span", { class: "header-cell__drag-handler" })) : null));
2420
2478
  });
2421
2479
  return [multiSelectColumn, actionsColumn, ...dataColumns];
2422
2480
  // return [multiSelectColumn, groupColumn, actionsColumn, ...dataColumns];
@@ -2455,10 +2513,10 @@ export class KupDataTable {
2455
2513
  const dataColumns = this.getVisibleColumns().map((column, columnIndex) => {
2456
2514
  const { columnClass, thStyle } = this.composeHeaderCellClassAndStyle(columnIndex, specialExtraCellsCount, column);
2457
2515
  return (h("th-sticky", { class: columnClass, style: thStyle },
2458
- h("span", { class: "column-title" }, this.applyLineBreaks(column.title))));
2516
+ h("div", { class: "header-cell__content" },
2517
+ h("span", { class: "header-cell__title" }, this.applyLineBreaks(column.title)))));
2459
2518
  });
2460
2519
  return [multiSelectColumn, actionsColumn, ...dataColumns];
2461
- //return [multiSelectColumn, groupColumn, actionsColumn, ...dataColumns];
2462
2520
  }
2463
2521
  renderTooltip() {
2464
2522
  if (this.tooltipEnabled == false) {
@@ -2466,9 +2524,7 @@ export class KupDataTable {
2466
2524
  }
2467
2525
  return (h("kup-tooltip", { class: "datatable-tooltip", owner: this.rootElement.tagName, loadTimeout: this.showTooltipOnRightClick == true
2468
2526
  ? 0
2469
- : this.tooltipLoadTimeout, onBlur: () => {
2470
- this.tooltip.data = null;
2471
- }, detailTimeout: this.tooltipDetailTimeout, ref: (el) => (this.tooltip = el), tabindex: 0 }));
2527
+ : this.tooltipLoadTimeout, detailTimeout: this.tooltipDetailTimeout, ref: (el) => (this.tooltip = el) }));
2472
2528
  }
2473
2529
  areTotalsSelected(column) {
2474
2530
  return this.totals && this.totals[column.name] ? true : false;
@@ -2496,10 +2552,16 @@ export class KupDataTable {
2496
2552
  if (this.rootElement.shadowRoot) {
2497
2553
  const menu = this.rootElement.shadowRoot.querySelector('#totals-menu');
2498
2554
  if (menu) {
2499
- this.kupManager.dynamicPosition.register(menu, this.totalMenuCoords, 0, KupDynamicPositionPlacement.TOP_RIGHT);
2555
+ this.kupManager.dynamicPosition.register(menu, this.totalMenuCoords);
2556
+ this.clickCb = {
2557
+ cb: () => {
2558
+ this.closeTotalMenu();
2559
+ },
2560
+ el: menu,
2561
+ };
2562
+ this.kupManager.addClickCallback(this.clickCb, true);
2500
2563
  this.kupManager.dynamicPosition.start(menu);
2501
- menu.classList.add('visible');
2502
- setTimeout(() => menu.focus(), 0);
2564
+ menu.menuVisible = true;
2503
2565
  }
2504
2566
  }
2505
2567
  }
@@ -2511,18 +2573,12 @@ export class KupDataTable {
2511
2573
  renderFooter() {
2512
2574
  let extraCells = 0;
2513
2575
  // Composes initial cells if necessary
2514
- let actionRowCell = null;
2515
2576
  let selectRowCell = null;
2516
2577
  if (this.selection === SelectionMode.MULTIPLE_CHECKBOX) {
2517
2578
  extraCells++;
2518
2579
  const fixedCellStyle = this.composeFixedCellStyleAndClass(extraCells, 0, extraCells);
2519
2580
  selectRowCell = (h("td", { class: fixedCellStyle ? fixedCellStyle.fixedCellClasses : null, style: fixedCellStyle ? fixedCellStyle.fixedCellStyle : null }));
2520
2581
  }
2521
- if (this.rowActions) {
2522
- extraCells++;
2523
- const fixedCellStyle = this.composeFixedCellStyleAndClass(extraCells, 0, extraCells);
2524
- actionRowCell = (h("td", { class: fixedCellStyle ? fixedCellStyle.fixedCellClasses : null, style: fixedCellStyle ? fixedCellStyle.fixedCellStyle : null }));
2525
- }
2526
2582
  // Action cell
2527
2583
  let actionsCell = null;
2528
2584
  if (this.hasRowActions()) {
@@ -2639,7 +2695,7 @@ export class KupDataTable {
2639
2695
  });
2640
2696
  }
2641
2697
  }
2642
- totalMenu = (h("kup-list", { class: `kup-menu total-menu`, data: listData, id: "totals-menu", "is-menu": true, keyboardNavigation: true, "menu-visible": true, onBlur: () => this.closeTotalMenu(), "onkup-list-click": (event) => this.onTotalsChange(event, column), tabindex: 0 }));
2698
+ totalMenu = (h("kup-list", { class: `total-menu`, data: listData, id: "totals-menu", "is-menu": true, keyboardNavigation: true, "menu-visible": true, "onkup-list-click": (event) => this.onTotalsChange(event, column), tabindex: 0 }));
2643
2699
  }
2644
2700
  // TODO please use getValueForDisplay
2645
2701
  let value;
@@ -2748,33 +2804,6 @@ export class KupDataTable {
2748
2804
  value = numberToFormattedStringNumber(totalValue, column.decimals, column.obj ? column.obj.p : '');
2749
2805
  }
2750
2806
  }
2751
- /*
2752
- TODO Group Menu
2753
- const groupMenu = undefined;
2754
- if (this.isOpenedGroupMenuForColumn(column.name)) {
2755
- const listData: KupListData[] = [
2756
- {
2757
- text: 'Matrice dei totali',
2758
- value: 'MATTOT',
2759
- selected: false,
2760
- },
2761
- ];
2762
-
2763
- groupMenu = (
2764
- <kup-list
2765
- class={`kup-menu group-menu`}
2766
- data={...listData}
2767
- id="group-menu"
2768
- is-menu
2769
- menu-visible
2770
- onBlur={() => this.closeGroupMenu()}
2771
- onkup-list-click={(event) => console.log(event)}
2772
- tabindex={0}
2773
- ></kup-list>
2774
- );
2775
- }
2776
- {groupMenu}
2777
- */
2778
2807
  cells.push(h("td", { class: totalClass }, value));
2779
2808
  }
2780
2809
  jsxRows.push(h("tr", { ref: (el) => this.rowsRefs.push(el), "data-row": row, class: "group group-label" }, grouplabelcell));
@@ -2884,26 +2913,33 @@ export class KupDataTable {
2884
2913
  indend.push(h("span", { class: "indent" }));
2885
2914
  }
2886
2915
  }
2887
- const cell = row.cells[name];
2888
- const jsxCell = this.renderCell(indend, cell, row, currentColumn, hideValuesRepetitions && previousRow
2889
- ? previousRow.cells[name].value
2890
- : undefined);
2891
- // Classes which will be set onto the single data-table cell
2892
- let cellClass = {
2893
- // 'has-options': !!options,
2894
- 'is-graphic': this.kupManager.objects.isBar(cell.obj),
2895
- number: this.kupManager.objects.isNumber(cell.obj) &&
2896
- !isRating(cell, null) &&
2897
- !isGauge(cell, null) &&
2898
- !isKnob(cell, null),
2899
- };
2900
- if (cell.cssClass) {
2901
- cellClass[cell.cssClass] = true;
2902
- }
2903
- let cellStyle = null;
2904
- if (!styleHasBorderRadius(cell)) {
2905
- cellStyle = Object.assign({}, cell.style);
2916
+ const cell = row.cells[name] ? row.cells[name] : null;
2917
+ if (!cell) {
2918
+ if (this.autoFillMissingCells) {
2919
+ return h("td", { "data-column": name, "data-row": row });
2920
+ }
2921
+ else {
2922
+ return null;
2923
+ }
2906
2924
  }
2925
+ const cellProps = {
2926
+ cell: cell,
2927
+ column: currentColumn,
2928
+ component: this,
2929
+ density: this.density,
2930
+ editable: this.editableData,
2931
+ indents: indend,
2932
+ previousValue: hideValuesRepetitions && previousRow
2933
+ ? previousRow.cells[name].value
2934
+ : undefined,
2935
+ renderKup: this.lazyLoadCells,
2936
+ row: row,
2937
+ setSizes: true,
2938
+ };
2939
+ const jsxCell = h(FCell, Object.assign({}, cellProps));
2940
+ // Classes which will be set onto the single data-table cell;
2941
+ let cellClass = null;
2942
+ let cellStyle = Object.assign({}, cell.style);
2907
2943
  //-- For fixed cells --
2908
2944
  const fixedStyles = this.composeFixedCellStyleAndClass(cellIndex + 1 + specialExtraCellsCount, rowCssIndex, specialExtraCellsCount);
2909
2945
  if (fixedStyles) {
@@ -2936,20 +2972,10 @@ export class KupDataTable {
2936
2972
  * Controls if current cell needs a tooltip and eventually adds it.
2937
2973
  * @todo When the option forceOneLine is active, there is a problem with the current implementation of the tooltip. See documentation in the mauer wiki for better understanding.
2938
2974
  */
2939
- const _hasTooltip = this.kupManager.objects.hasTooltip(cell.obj);
2975
+ const _hasTooltip = !this.kupManager.objects.isEmptyKupObj(cell.obj);
2940
2976
  let eventHandlers = undefined;
2941
2977
  let title = undefined;
2942
2978
  if (_hasTooltip) {
2943
- cellClass['is-obj'] = true;
2944
- if (this.kupManager.debug.isDebug()) {
2945
- title =
2946
- cell.obj.t +
2947
- '; ' +
2948
- cell.obj.p +
2949
- '; ' +
2950
- cell.obj.k +
2951
- ';';
2952
- }
2953
2979
  if (!this.showTooltipOnRightClick) {
2954
2980
  eventHandlers = {
2955
2981
  onMouseEnter: (ev) => {
@@ -2961,14 +2987,8 @@ export class KupDataTable {
2961
2987
  };
2962
2988
  }
2963
2989
  }
2964
- return (h("td", Object.assign({}, (this.dropEnabled
2965
- ? setKetchupDroppable(dropHandlersCell, [KupDataTableRowDragType], this.rootElement, {
2966
- row: row,
2967
- cell: cell,
2968
- column: currentColumn,
2969
- id: this.rootElement.id,
2970
- })
2971
- : {}), { title: title, "data-cell": cell, "data-column": name, "data-row": row, style: cellStyle, class: cellClass }, eventHandlers), jsxCell));
2990
+ cellClass = Object.assign({}, cellClass);
2991
+ return (h("td", Object.assign({ title: title, colSpan: cell.span && cell.span.col ? cell.span.col : null, rowSpan: cell.span && cell.span.row ? cell.span.row : null, "data-cell": cell, "data-column": name, "data-row": row, style: cellStyle, class: cellClass }, eventHandlers), jsxCell));
2972
2992
  });
2973
2993
  // adding row to rendered rows
2974
2994
  this.renderedRows.push(row);
@@ -2978,67 +2998,10 @@ export class KupDataTable {
2978
2998
  if (row.cssClass) {
2979
2999
  rowClass[row.cssClass] = true;
2980
3000
  }
2981
- const dragHandlersRow = {
2982
- onDragStart: (e) => {
2983
- // get the tr tag
2984
- const trElement = e.target;
2985
- let cell = {};
2986
- let column = {};
2987
- if (trElement) {
2988
- // get the elements inside the row that were touched
2989
- const hoverElements = trElement.querySelectorAll(':hover');
2990
- if (hoverElements) {
2991
- // the td in position 0 is ALWAYS the last td touched
2992
- const tdElement = hoverElements[0];
2993
- if (tdElement) {
2994
- // get the column name in td element
2995
- const columnName = tdElement.getAttribute('data-column');
2996
- if (columnName) {
2997
- // finally get the cell
2998
- cell = row.cells[columnName];
2999
- // and the column
3000
- column = getColumnByName(this.getColumns(), columnName);
3001
- }
3002
- }
3003
- }
3004
- }
3005
- // because I found the cell and the column inside this method I have to set here the event data
3006
- // in this scenario it is not necessary pass the data parameter in setKetchupDraggable method
3007
- const sourceElementData = {
3008
- id: this.rootElement.id,
3009
- row,
3010
- selectedRows: this.selectedRows,
3011
- cell,
3012
- column,
3013
- };
3014
- // set event data
3015
- // this is mandatory in order to add the source element data in the kup drop event
3016
- e.dataTransfer.setData('kup-drag-source-element', JSON.stringify(sourceElementData));
3017
- // Sets the type of drag
3018
- setDragEffectAllowed(e, 'move');
3019
- if (this.selectedRows.length > 1 ||
3020
- (this.selectedRows.length == 1 &&
3021
- !this.selectedRows.includes(row))) {
3022
- this.addMultiSelectDragImageToEvent(e);
3023
- }
3024
- },
3025
- onDragEnd: (_e) => {
3026
- // Remove the over class
3027
- const dragDropPayload = getDragDropPayload();
3028
- if (dragDropPayload && dragDropPayload.overElement) {
3029
- dragDropPayload.overElement.classList.remove('selected');
3030
- }
3031
- },
3032
- };
3033
3001
  const style = {
3034
3002
  '--kup_datatable_row_actions': rowActionsCount,
3035
3003
  };
3036
- return (h("tr", Object.assign({ ref: (el) => this.rowsRefs.push(el), "data-row": row, class: rowClass, style: style }, (this.dragEnabled
3037
- ? setKetchupDraggable(dragHandlersRow, {
3038
- [KupDataTableRowDragType]: row,
3039
- 'kup-drag-source-element': {}, // I put nothing in there because I overwrite the content inside the onDragStart method
3040
- })
3041
- : {})),
3004
+ return (h("tr", { ref: (el) => this.rowsRefs.push(el), "data-row": row, class: rowClass, style: style },
3042
3005
  selectRowCell,
3043
3006
  rowActionsCell,
3044
3007
  cells));
@@ -3063,356 +3026,6 @@ export class KupDataTable {
3063
3026
  return h(FImage, Object.assign({}, props));
3064
3027
  });
3065
3028
  }
3066
- /**
3067
- * FActory function for cells.
3068
- * @param cell - cell object
3069
- * @param column - the cell's column name
3070
- * @param previousRowCellValue - An optional value of the previous cell on the same column. If set and equal to the value of the current cell, makes the value of the current cell go blank.
3071
- * @param cellData - Additional data for the current cell.
3072
- * @param cellData.column - The column object to which the cell belongs.
3073
- * @param cellData.row - The row object to which the cell belongs.
3074
- */
3075
- renderCell(indend, cell, row, column, previousRowCellValue) {
3076
- const isEditable = cell.isEditable && this.editableData ? true : false;
3077
- const classObj = {
3078
- 'cell-content': true,
3079
- clickable: !!column.clickable,
3080
- 'force-one-line': this.forceOneLine == true ? true : null,
3081
- };
3082
- // When the previous row value is different from the current value, we can show the current value.
3083
- const valueToDisplay = previousRowCellValue !== cell.value ? cell.value : '';
3084
- // Sets the default value
3085
- let content = valueToDisplay;
3086
- const cellType = this.getCellType(cell);
3087
- const props = Object.assign({}, cell.data);
3088
- classObj[cellType + '-cell'] = true;
3089
- if (isEditable &&
3090
- (cellType === 'checkbox' ||
3091
- cellType === 'date' ||
3092
- cellType === 'number' ||
3093
- cellType === 'string')) {
3094
- content = this.setEditableCell(cellType, cell, column, row);
3095
- }
3096
- else if (cellType === 'checkbox' ||
3097
- cellType === 'date' ||
3098
- cellType === 'time' ||
3099
- cellType === 'datetime' ||
3100
- cellType === 'icon' ||
3101
- cellType === 'image' ||
3102
- cellType === 'link' ||
3103
- cellType === 'number' ||
3104
- cellType === 'string') {
3105
- this.setCellSize(cellType, props, cell);
3106
- content = this.setCell(cellType, props, content, classObj, cell, column);
3107
- }
3108
- else if (cell.data) {
3109
- this.setCellSizeKup(cellType, props, cell);
3110
- if (!this.lazyLoadCells) {
3111
- content = this.setLazyKupCell(cellType, props);
3112
- }
3113
- else {
3114
- content = this.setKupCell(cellType, classObj, props, cell, row, column);
3115
- }
3116
- }
3117
- const style = cell.style;
3118
- if (styleHasWritingMode(cell)) {
3119
- classObj['is-vertical'] = true;
3120
- }
3121
- let icon = undefined;
3122
- if (!isEditable && (column.icon || cell.icon) && content) {
3123
- let svg = '';
3124
- if (cell.icon) {
3125
- svg = cell.icon;
3126
- }
3127
- else {
3128
- svg = column.icon;
3129
- }
3130
- svg = this.getIconPath(svg);
3131
- const iconStyle = {
3132
- mask: svg,
3133
- webkitMask: svg,
3134
- };
3135
- icon = h("span", { style: iconStyle, class: "kup-icon obj-icon" });
3136
- }
3137
- let cellTitle = null;
3138
- if (cell.title != null && cell.title.trim() != '') {
3139
- cellTitle = cell.title;
3140
- }
3141
- // Informational icon
3142
- let infoEl = null;
3143
- if (cell.info && cell.info.message) {
3144
- const info = Object.assign({}, cell.info);
3145
- if (!info.color) {
3146
- info.color = `var(${KupThemeColorValues.INFO})`;
3147
- }
3148
- if (!info.icon) {
3149
- info.icon = 'info';
3150
- }
3151
- let fProps = {
3152
- color: info.color,
3153
- resource: info.icon,
3154
- sizeX: '1.25em',
3155
- sizeY: '1.25em',
3156
- title: info.message,
3157
- wrapperClass: 'cell-info',
3158
- };
3159
- infoEl = h(FImage, Object.assign({}, fProps));
3160
- }
3161
- return (h("span", { class: classObj, style: style, title: cellTitle },
3162
- indend,
3163
- infoEl,
3164
- icon,
3165
- content));
3166
- }
3167
- getIconPath(icon) {
3168
- let svg = '';
3169
- if (this.iconPaths) {
3170
- for (let index = 0; index < this.iconPaths.length || svg !== ''; index++) {
3171
- if (this.iconPaths[index].icon === icon) {
3172
- return this.iconPaths[index].path;
3173
- }
3174
- }
3175
- }
3176
- svg = `url('${getAssetPath(`./assets/svg/${icon}.svg`)}') no-repeat center`;
3177
- if (!this.iconPaths) {
3178
- this.iconPaths = [
3179
- {
3180
- icon: icon,
3181
- path: svg,
3182
- },
3183
- ];
3184
- }
3185
- else {
3186
- this.iconPaths.push({ icon: icon, path: svg });
3187
- }
3188
- return svg;
3189
- }
3190
- // TODO: cell type can depend also from shape (see isRating)
3191
- // NOTE: keep care to change conditions order... shape wins on object .. -> so if isNumber after shape checks.. ->
3192
- // TODO: more clear conditions when refactoring...
3193
- getCellType(cell) {
3194
- return getCellType(cell);
3195
- }
3196
- setLazyKupCell(cellType, props) {
3197
- const lazyClass = 'cell-' + cellType + ' placeholder';
3198
- const style = { minHeight: props.sizeY };
3199
- return h("span", { style: style, class: lazyClass });
3200
- }
3201
- setCellSize(cellType, props, cell) {
3202
- switch (cellType) {
3203
- case 'checkbox':
3204
- case 'icon':
3205
- if (!props.sizeX) {
3206
- props['sizeX'] = '18px';
3207
- }
3208
- if (!props.sizeY) {
3209
- props['sizeY'] = '18px';
3210
- }
3211
- if (cell.style) {
3212
- if (!cell.style.height) {
3213
- cell.style['minHeight'] = props['sizeY'];
3214
- }
3215
- }
3216
- else {
3217
- cell.style = {
3218
- minHeight: props['sizeY'],
3219
- };
3220
- }
3221
- break;
3222
- case 'image':
3223
- if (!props.sizeX) {
3224
- props['sizeX'] = 'auto';
3225
- }
3226
- if (!props.sizeY) {
3227
- props['sizeY'] = '64px';
3228
- }
3229
- break;
3230
- }
3231
- }
3232
- setCellSizeKup(cellType, props, cell) {
3233
- switch (cellType) {
3234
- case 'bar':
3235
- if (!props.sizeY) {
3236
- props['sizeY'] = '26px';
3237
- if (this.density === 'medium') {
3238
- props['sizeY'] = '36px';
3239
- }
3240
- if (this.density === 'wide') {
3241
- props['sizeY'] = '50px';
3242
- }
3243
- }
3244
- break;
3245
- case 'button':
3246
- let height = '';
3247
- if (props.label) {
3248
- height = '36px';
3249
- }
3250
- if (cell.style) {
3251
- if (!cell.style.height) {
3252
- cell.style['minHeight'] = height;
3253
- }
3254
- }
3255
- else {
3256
- cell.style = { minHeight: height };
3257
- }
3258
- break;
3259
- case 'chart':
3260
- if (!props.sizeX) {
3261
- props['sizeX'] = '100%';
3262
- }
3263
- if (!props.sizeY) {
3264
- props['sizeY'] = '100%';
3265
- }
3266
- break;
3267
- case 'chips':
3268
- if (cell.style) {
3269
- if (!cell.style.height) {
3270
- cell.style['minHeight'] = '40px';
3271
- }
3272
- }
3273
- else {
3274
- cell.style = { minHeight: '40px' };
3275
- }
3276
- break;
3277
- case 'radio':
3278
- if (cell.style) {
3279
- if (!cell.style.height) {
3280
- cell.style['minHeight'] = '40px';
3281
- }
3282
- }
3283
- else {
3284
- cell.style = { minHeight: '40px' };
3285
- }
3286
- break;
3287
- }
3288
- }
3289
- setEditableCell(cellType, cell, column, row) {
3290
- switch (cellType) {
3291
- case 'checkbox':
3292
- return (h(FCheckbox, { checked: cell.data['checked'], onChange: (e) => this.cellUpdate(e, e.target.value, cell, column, row) }));
3293
- case 'date':
3294
- return (h("kup-date-picker", { "onkup-datepicker-change": (e) => this.cellUpdate(e, e.detail.value, cell, column, row), data: {
3295
- 'kup-text-field': {
3296
- fullWidth: true,
3297
- },
3298
- }, initialValue: cell.value }));
3299
- case 'number':
3300
- return (h(FTextField, { icon: cell.icon
3301
- ? cell.icon
3302
- : column.icon
3303
- ? column.icon
3304
- : null, fullWidth: true, inputType: "number", value: stringToNumber(cell.value).toString(), onBlur: (e) => this.cellUpdate(e, e.target.value, cell, column, row), onChange: (e) => this.cellUpdate(e, e.target.value, cell, column, row) }));
3305
- case 'string':
3306
- return (h(FTextField, { icon: cell.icon
3307
- ? cell.icon
3308
- : column.icon
3309
- ? column.icon
3310
- : null, fullWidth: true, value: cell.value, onBlur: (e) => this.cellUpdate(e, e.target.value, cell, column, row), onChange: (e) => this.cellUpdate(e, e.target.value, cell, column, row) }));
3311
- }
3312
- }
3313
- setKupCell(cellType, classObj, props, cell, row, column) {
3314
- switch (cellType) {
3315
- case 'bar':
3316
- if (!props.data) {
3317
- return h("kup-image", Object.assign({}, props));
3318
- }
3319
- else {
3320
- const barStyle = {
3321
- height: props.sizeY,
3322
- };
3323
- return (h("div", { class: "bar-cell-content", style: barStyle },
3324
- h(FImage, Object.assign({}, props))));
3325
- }
3326
- case 'button':
3327
- classObj['is-centered'] = true;
3328
- props['onkup-button-click'] = this.onJ4btnClicked.bind(this, row, column, cell);
3329
- return h("kup-button", Object.assign({}, props));
3330
- case 'btn':
3331
- classObj['is-centered'] = true;
3332
- props['data-storage'] = {
3333
- cell: cell,
3334
- row: row,
3335
- column: column,
3336
- };
3337
- return h("kup-button-list", Object.assign({}, props));
3338
- case 'chart':
3339
- classObj['is-centered'] = true;
3340
- return h("kup-chart", Object.assign({}, props));
3341
- case 'chips':
3342
- return h(FChip, Object.assign({}, props));
3343
- case 'color-picker':
3344
- return (h("kup-color-picker", Object.assign({ value: cell.value }, props, { disabled: true })));
3345
- case 'gauge':
3346
- return (h("kup-gauge", Object.assign({ value: stringToNumber(cell.value), "width-component": "100%" }, props)));
3347
- case 'knob':
3348
- case 'progress-bar':
3349
- return h("kup-progress-bar", Object.assign({}, props));
3350
- case 'rating':
3351
- return (h("kup-rating", Object.assign({ value: stringToNumber(cell.value) }, props, { disabled: true })));
3352
- case 'radio':
3353
- classObj['is-centered'] = true;
3354
- props['disabled'] = row.readOnly;
3355
- return h("kup-radio", Object.assign({}, props));
3356
- case 'text-field':
3357
- props['disabled'] = row.readOnly;
3358
- props['dataSet'] = {
3359
- 'data-cell': cell,
3360
- 'data-column': column,
3361
- 'data-row': row,
3362
- };
3363
- return h(FTextField, Object.assign({}, props));
3364
- }
3365
- }
3366
- setCell(cellType, props, content, classObj, cell, column) {
3367
- switch (cellType) {
3368
- case 'checkbox':
3369
- classObj['is-centered'] = true;
3370
- props['resource'] = props.checked
3371
- ? 'check_box'
3372
- : 'check_box_outline_blank';
3373
- return h(FImage, Object.assign({}, props));
3374
- case 'date':
3375
- if (content && content != '') {
3376
- const cellValue = getCellValueForDisplay(column, cell);
3377
- return cellValue;
3378
- }
3379
- return content;
3380
- case 'datetime':
3381
- if (content && content != '') {
3382
- const cellValue = getCellValueForDisplay(column, cell);
3383
- return cellValue;
3384
- }
3385
- return content;
3386
- case 'icon':
3387
- case 'image':
3388
- classObj['is-centered'] = true;
3389
- if (props.badgeData) {
3390
- classObj['has-padding'] = true;
3391
- }
3392
- return h(FImage, Object.assign({}, props));
3393
- case 'link':
3394
- return (h("a", { class: "cell-link", href: content, target: "_blank" }, cell.value));
3395
- case 'number':
3396
- if (content && content != '') {
3397
- const cellValueNumber = stringToNumber(cell.value);
3398
- const cellValue = getCellValueForDisplay(column, cell);
3399
- if (cellValueNumber < 0) {
3400
- classObj['negative-number'] = true;
3401
- }
3402
- return cellValue;
3403
- }
3404
- return content;
3405
- case 'time':
3406
- if (content && content != '') {
3407
- const cellValue = getCellValueForDisplay(column, cell);
3408
- return cellValue;
3409
- }
3410
- return content;
3411
- case 'string':
3412
- default:
3413
- return content;
3414
- }
3415
- }
3416
3029
  renderLoadMoreButton(isSlotted = true) {
3417
3030
  return (h("kup-button", { styling: FButtonStyling.FLAT, class: "load-more-button", label: this.kupManager.language.translate(KupLanguageGeneric.LOAD_MORE), icon: "plus", slot: isSlotted ? 'more-results' : null, "onkup-button-click": () => {
3418
3031
  this.onLoadMoreClick();
@@ -3480,134 +3093,26 @@ export class KupDataTable {
3480
3093
  totalsMatrix));
3481
3094
  }
3482
3095
  columnRemoveArea() {
3483
- const dropHandlersRemoveCols = {
3484
- onDrop: (e) => {
3485
- const transferredData = JSON.parse(e.dataTransfer.getData(KupDataTableColumnDragType));
3486
- const overElement = this.getElementById(e.target, 'remove-column-area');
3487
- overElement.removeAttribute(this.dragOverAttribute);
3488
- // We are sure the tables have been dropped in a valid location -> starts ...
3489
- this.handleColumnRemove(transferredData);
3490
- return KupDataTableColumnDragRemoveType;
3491
- },
3492
- onDragOver: (e) => {
3493
- const overElement = this.getElementById(e.target, 'remove-column-area');
3494
- overElement.setAttribute(this.dragOverAttribute, '');
3495
- return true;
3496
- },
3497
- onDragLeave: (e) => {
3498
- const overElement = this.getElementById(e.target, 'remove-column-area');
3499
- overElement.removeAttribute(this.dragOverAttribute);
3500
- return true;
3501
- },
3502
- };
3503
- return (h("div", Object.assign({ id: "remove-column-area" }, setKetchupDroppable(dropHandlersRemoveCols, [
3504
- KupDataTableColumnDragType,
3505
- KupDataTableColumnDragRemoveType,
3506
- ], this.rootElement, {})),
3096
+ return (h("div", { class: "droparea__remove", ref: (el) => (this.removeDropareaRef = el) },
3507
3097
  h(FImage, { resource: "delete", color: `var(${KupThemeColorValues.DANGER})`, sizeX: "30px", sizeY: "50px" }),
3508
3098
  h(FImage, { resource: "delete-empty", color: `var(${KupThemeColorValues.DANGER})`, sizeX: "30px", sizeY: "50px" })));
3509
3099
  }
3510
3100
  columnGroupArea() {
3511
- const dropHandlersGroupCols = {
3512
- onDrop: (e) => {
3513
- const transferredData = JSON.parse(e.dataTransfer.getData(KupDataTableColumnDragType));
3514
- const overElement = this.getElementById(e.target, 'group-column-area');
3515
- overElement.removeAttribute(this.dragOverAttribute);
3516
- // We are sure the tables have been dropped in a valid location -> starts ...
3517
- this.handleColumnGroup(transferredData);
3518
- return KupDataTableColumnDragGroupType;
3519
- },
3520
- onDragOver: (e) => {
3521
- const overElement = this.getElementById(e.target, 'group-column-area');
3522
- overElement.setAttribute(this.dragOverAttribute, '');
3523
- return true;
3524
- },
3525
- onDragLeave: (e) => {
3526
- const overElement = this.getElementById(e.target, 'group-column-area');
3527
- overElement.removeAttribute(this.dragOverAttribute);
3528
- return true;
3529
- },
3530
- };
3531
- return (h("div", Object.assign({ id: "group-column-area" }, setKetchupDroppable(dropHandlersGroupCols, [
3532
- KupDataTableColumnDragType,
3533
- KupDataTableColumnDragGroupType,
3534
- ], this.rootElement, {})),
3535
- h(FImage, { resource: "bookmark", color: `var(${KupThemeColorValues.DANGER})`, sizeX: "30px", sizeY: "50px" }),
3536
- h(FImage, { resource: "book", color: `var(${KupThemeColorValues.DANGER})`, sizeX: "30px", sizeY: "50px" })));
3537
- }
3538
- startDynamicPositioning(dropArea, th) {
3539
- if (this.kupManager.dynamicPosition.isRegistered(dropArea)) {
3540
- this.kupManager.dynamicPosition.changeAnchor(dropArea, th);
3541
- }
3542
- else {
3543
- this.kupManager.dynamicPosition.register(dropArea, th, 10, KupDynamicPositionPlacement.TOP);
3544
- }
3545
- this.kupManager.dynamicPosition.start(dropArea);
3546
- dropArea.classList.add('visible');
3547
- }
3548
- stopDynamicPositioning(dropArea) {
3549
- dropArea.classList.remove('visible');
3550
- this.kupManager.dynamicPosition.stop(dropArea);
3551
- // Chrome workaround: dropArea is draggable even with the display:none rule
3552
- dropArea.style.top = '-50px';
3553
- dropArea.style.left = '-50px';
3554
- }
3555
- getElementById(target, id) {
3556
- let element = target;
3557
- if (element) {
3558
- if (element.nodeType == Node.TEXT_NODE) {
3559
- element = element.parentNode;
3560
- }
3561
- if (element.id !== id) {
3562
- element = element.closest('#' + id);
3563
- }
3564
- }
3565
- return element;
3566
- }
3567
- getThElement(target) {
3568
- let element = target;
3569
- if (element) {
3570
- if (element.nodeType == Node.TEXT_NODE) {
3571
- element = element.parentNode;
3572
- }
3573
- if (element.tagName !== 'TH') {
3574
- element = element.closest('th');
3575
- }
3576
- }
3577
- return element;
3101
+ return (h("div", { class: "droparea__groups", ref: (el) => (this.groupsDropareaRef = el) },
3102
+ h(FImage, { resource: "bookmark", color: `var(${KupThemeColorValues.TEXT})`, sizeX: "30px", sizeY: "50px" }),
3103
+ h(FImage, { resource: "book", color: `var(${KupThemeColorValues.TEXT})`, sizeX: "30px", sizeY: "50px" })));
3578
3104
  }
3579
3105
  hideShowColumnDropArea(show, th) {
3580
- this.hideShowColumnRemoveDropArea(show, th);
3581
- this.hideShowColumnGroupDropArea(show, th);
3582
- }
3583
- hideShowColumnRemoveDropArea(show, th) {
3584
- if (!this.removableColumns) {
3585
- return;
3586
- }
3587
- const dropArea = this.rootElement.shadowRoot.querySelector('#remove-column-area');
3588
- if (show) {
3589
- const offset = this.showGroups ? '0px' : '25px';
3590
- dropArea.style.marginLeft =
3591
- 'calc(' + th.clientWidth / 2 + 'px - ' + offset + ')';
3592
- this.startDynamicPositioning(dropArea, th);
3593
- }
3594
- else {
3595
- this.stopDynamicPositioning(dropArea);
3596
- }
3597
- }
3598
- hideShowColumnGroupDropArea(show, th) {
3599
- if (!this.showGroups) {
3600
- return;
3601
- }
3602
- const dropArea = this.rootElement.shadowRoot.querySelector('#group-column-area');
3603
- if (show) {
3604
- const offset = this.removableColumns ? '51px' : '25px';
3605
- dropArea.style.marginLeft =
3606
- 'calc(' + th.clientWidth / 2 + 'px - ' + offset + ')';
3607
- this.startDynamicPositioning(dropArea, th);
3106
+ if (show && th && (this.removableColumns || this.showGroups)) {
3107
+ this.dropareaRef.classList.add('droparea--visible');
3108
+ this.kupManager.dynamicPosition.register(this.dropareaRef, th, 10, KupDynamicPositionPlacement.TOP);
3109
+ this.kupManager.dynamicPosition.start(this.dropareaRef);
3110
+ this.dropareaRef.style.marginLeft =
3111
+ th.clientWidth / 2 - this.dropareaRef.clientWidth / 2 + 'px';
3608
3112
  }
3609
3113
  else {
3610
- this.stopDynamicPositioning(dropArea);
3114
+ this.dropareaRef.classList.remove('droparea--visible');
3115
+ +this.kupManager.dynamicPosition.stop(this.dropareaRef);
3611
3116
  }
3612
3117
  }
3613
3118
  handleColumnRemove(column2remove) {
@@ -3724,14 +3229,11 @@ export class KupDataTable {
3724
3229
  this.fontsize = this.getFontSizeCodeFromDecode(e.detail.value);
3725
3230
  } })));
3726
3231
  }
3727
- getDensityDecodeFromCode(code) {
3728
- return this.transcodeItem(code, this.DENSITY_CODES, this.DENSITY_DECODES);
3729
- }
3730
3232
  getDensityCodeFromDecode(decode) {
3731
- return this.transcodeItem(decode, this.DENSITY_DECODES, this.DENSITY_CODES);
3233
+ return this.transcodeItem(decode, this.DENSITY_DECODES, Object.values(FCellPadding));
3732
3234
  }
3733
3235
  renderDensityPanel() {
3734
- const listItems = this.createListData(this.DENSITY_CODES, this.DENSITY_ICONS, this.density);
3236
+ const listItems = this.createListData(Object.values(FCellPadding), this.DENSITY_ICONS, this.density);
3735
3237
  const listData = { data: listItems, showIcons: true };
3736
3238
  const textfieldData = {
3737
3239
  trailingIcon: true,
@@ -3813,6 +3315,7 @@ export class KupDataTable {
3813
3315
  } })));
3814
3316
  }
3815
3317
  render() {
3318
+ this.thRefs = [];
3816
3319
  this.rowsRefs = [];
3817
3320
  this.renderedRows = [];
3818
3321
  let elStyle = undefined;
@@ -3820,14 +3323,7 @@ export class KupDataTable {
3820
3323
  let rows = null;
3821
3324
  if (this.paginatedRowsLength === 0) {
3822
3325
  rows = (h("tr", { ref: (el) => this.rowsRefs.push(el) },
3823
- h("td", Object.assign({}, (this.dropEnabled
3824
- ? setKetchupDroppable(dropHandlersCell, [KupDataTableRowDragType], this.rootElement, {
3825
- row: null,
3826
- cell: null,
3827
- column: null,
3828
- id: this.rootElement.id,
3829
- })
3830
- : {}), { colSpan: this.calculateColspan() }), this.emptyDataLabel)));
3326
+ h("td", { colSpan: this.calculateColspan() }, this.emptyDataLabel)));
3831
3327
  }
3832
3328
  else {
3833
3329
  rows = [];
@@ -3884,10 +3380,10 @@ export class KupDataTable {
3884
3380
  data: chipsData,
3885
3381
  id: 'group-chips',
3886
3382
  type: FChipType.INPUT,
3887
- onClick: [],
3383
+ onIconClick: [],
3888
3384
  };
3889
3385
  for (let i = 0; i < chipsData.length; i++) {
3890
- props.onClick.push(() => this.removeGroup(i));
3386
+ props.onIconClick.push(() => this.removeGroup(i));
3891
3387
  }
3892
3388
  groupChips = h(FChip, Object.assign({}, props));
3893
3389
  }
@@ -3930,9 +3426,8 @@ export class KupDataTable {
3930
3426
  if (this.tableHeight !== undefined || this.tableWidth !== undefined) {
3931
3427
  belowClass += ' custom-size';
3932
3428
  }
3933
- const customStyle = this.kupManager.theme.setCustomStyle(this.rootElement);
3934
3429
  const compCreated = (h(Host, null,
3935
- customStyle ? h("style", null, customStyle) : null,
3430
+ h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)),
3936
3431
  h("div", { id: componentWrapperId },
3937
3432
  h("div", { class: "above-wrapper" },
3938
3433
  this.globalFilter ? (h("div", { id: "global-filter" },
@@ -3944,6 +3439,9 @@ export class KupDataTable {
3944
3439
  } }))) : null,
3945
3440
  paginatorTop),
3946
3441
  h("div", { class: "group-wrapper" }, groupChips),
3442
+ h("div", { class: "droparea", ref: (el) => (this.dropareaRef = el) },
3443
+ this.showGroups ? this.columnGroupArea() : null,
3444
+ this.removableColumns ? this.columnRemoveArea() : null),
3947
3445
  h("div", { style: elStyle, class: belowClass, ref: (el) => (this.tableAreaRef = el) },
3948
3446
  this.showCustomization
3949
3447
  ? [
@@ -3960,40 +3458,9 @@ export class KupDataTable {
3960
3458
  h("table", { class: tableClass, ref: (el) => (this.tableRef = el), onMouseLeave: (ev) => {
3961
3459
  ev.stopPropagation();
3962
3460
  unsetTooltip(this.tooltip);
3963
- }, onClick: (e) => {
3964
- // Note: event must be cloned
3965
- // otherwise inside setTimeout will be exiting the Shadow DOM scope(causing loss of information, including target).
3966
- const clone = {};
3967
- for (const key in e) {
3968
- clone[key] = e[key];
3969
- }
3970
- this.clickTimeout.push(setTimeout(() => {
3971
- this.kupDataTableClick.emit({
3972
- comp: this,
3973
- id: this.rootElement.id,
3974
- details: this.clickHandler(clone),
3975
- });
3976
- }, 300));
3977
3461
  }, onContextMenu: (e) => {
3978
- this.kupDataTableContextMenu.emit({
3979
- comp: this,
3980
- id: this.rootElement.id,
3981
- details: this.contextMenuHandler(e),
3982
- });
3983
- }, onDblClick: (e) => {
3984
- for (let index = 0; index < this.clickTimeout.length; index++) {
3985
- clearTimeout(this.clickTimeout[index]);
3986
- this.kupManager.debug.logMessage(this, 'Cleared clickHandler timeout(' +
3987
- this.clickTimeout[index] +
3988
- ').');
3989
- }
3990
- this.clickTimeout = [];
3991
- this.kupDataTableDblClick.emit({
3992
- comp: this,
3993
- id: this.rootElement.id,
3994
- details: this.dblClickHandler(e),
3995
- });
3996
- }, onMouseMove: (e) => this.mouseMoveHandler(e), onMouseOut: () => this.mouseOutHandler() },
3462
+ e.preventDefault();
3463
+ } },
3997
3464
  h("thead", { hidden: !this.showHeader, ref: (el) => (this.theadRef = el) },
3998
3465
  h("tr", null, header)),
3999
3466
  h("tbody", null, rows),
@@ -4002,12 +3469,11 @@ export class KupDataTable {
4002
3469
  : null),
4003
3470
  stickyEl),
4004
3471
  tooltip,
4005
- paginatorBottom),
4006
- this.showGroups ? this.columnGroupArea() : null,
4007
- this.removableColumns ? this.columnRemoveArea() : null));
3472
+ paginatorBottom)));
4008
3473
  return compCreated;
4009
3474
  }
4010
3475
  disconnectedCallback() {
3476
+ this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop, this.interactableResize, this.interactableTouch));
4011
3477
  this.kupManager.language.unregister(this);
4012
3478
  this.kupManager.theme.unregister(this);
4013
3479
  const dynamicPositionElements = this.rootElement.shadowRoot.querySelectorAll('[' + kupDynamicPositionAttribute + ']');
@@ -4070,6 +3536,27 @@ export class KupDataTable {
4070
3536
  "text": ""
4071
3537
  }
4072
3538
  },
3539
+ "autoFillMissingCells": {
3540
+ "type": "boolean",
3541
+ "mutable": false,
3542
+ "complexType": {
3543
+ "original": "boolean",
3544
+ "resolved": "boolean",
3545
+ "references": {}
3546
+ },
3547
+ "required": false,
3548
+ "optional": false,
3549
+ "docs": {
3550
+ "tags": [{
3551
+ "name": "default",
3552
+ "text": "false"
3553
+ }],
3554
+ "text": "When true and when a row is missing some columns, the missing cells will be autogenerated."
3555
+ },
3556
+ "attribute": "auto-fill-missing-cells",
3557
+ "reflect": false,
3558
+ "defaultValue": "false"
3559
+ },
4073
3560
  "customStyle": {
4074
3561
  "type": "string",
4075
3562
  "mutable": false,
@@ -4112,9 +3599,14 @@ export class KupDataTable {
4112
3599
  "type": "string",
4113
3600
  "mutable": false,
4114
3601
  "complexType": {
4115
- "original": "string",
4116
- "resolved": "string",
4117
- "references": {}
3602
+ "original": "FCellPadding",
3603
+ "resolved": "FCellPadding.DENSE | FCellPadding.MEDIUM | FCellPadding.NONE | FCellPadding.WIDE",
3604
+ "references": {
3605
+ "FCellPadding": {
3606
+ "location": "import",
3607
+ "path": "../../f-components/f-cell/f-cell-declarations"
3608
+ }
3609
+ }
4118
3610
  },
4119
3611
  "required": false,
4120
3612
  "optional": false,
@@ -4124,7 +3616,7 @@ export class KupDataTable {
4124
3616
  },
4125
3617
  "attribute": "density",
4126
3618
  "reflect": false,
4127
- "defaultValue": "'dense'"
3619
+ "defaultValue": "FCellPadding.DENSE"
4128
3620
  },
4129
3621
  "dragEnabled": {
4130
3622
  "type": "boolean",
@@ -4141,7 +3633,7 @@ export class KupDataTable {
4141
3633
  "text": "Enables drag."
4142
3634
  },
4143
3635
  "attribute": "drag-enabled",
4144
- "reflect": false,
3636
+ "reflect": true,
4145
3637
  "defaultValue": "false"
4146
3638
  },
4147
3639
  "dropEnabled": {
@@ -4159,7 +3651,7 @@ export class KupDataTable {
4159
3651
  "text": "Enables drop."
4160
3652
  },
4161
3653
  "attribute": "drop-enabled",
4162
- "reflect": false,
3654
+ "reflect": true,
4163
3655
  "defaultValue": "false"
4164
3656
  },
4165
3657
  "editableData": {
@@ -4174,8 +3666,8 @@ export class KupDataTable {
4174
3666
  "optional": false,
4175
3667
  "docs": {
4176
3668
  "tags": [{
4177
- "text": "false",
4178
- "name": "default"
3669
+ "name": "default",
3670
+ "text": "false"
4179
3671
  }],
4180
3672
  "text": "When set to true, editable cells will be rendered using input components."
4181
3673
  },
@@ -4288,8 +3780,8 @@ export class KupDataTable {
4288
3780
  "optional": false,
4289
3781
  "docs": {
4290
3782
  "tags": [{
4291
- "text": "fixedRows",
4292
- "name": "see"
3783
+ "name": "see",
3784
+ "text": "fixedRows"
4293
3785
  }],
4294
3786
  "text": "Fixes the given number of columns so that they stay visible when horizontally scrolling the data-table.\nIf grouping is active or the value of the prop is <= 0, this prop will have no effect.\nCan be combined with fixedRows."
4295
3787
  },
@@ -4309,8 +3801,8 @@ export class KupDataTable {
4309
3801
  "optional": false,
4310
3802
  "docs": {
4311
3803
  "tags": [{
4312
- "text": "fixedColumns",
4313
- "name": "see"
3804
+ "name": "see",
3805
+ "text": "fixedColumns"
4314
3806
  }],
4315
3807
  "text": "Fixes the given number of rows so that they stay visible when vertically scrolling the data-table.\nIf grouping is active or the value of the prop is <= 0, this prop will have no effect.\nCan be combined with fixedColumns."
4316
3808
  },
@@ -4449,8 +3941,8 @@ export class KupDataTable {
4449
3941
  "optional": false,
4450
3942
  "docs": {
4451
3943
  "tags": [{
4452
- "text": "false",
4453
- "name": "default"
3944
+ "name": "default",
3945
+ "text": "false"
4454
3946
  }],
4455
3947
  "text": "When set to true, clicked-on rows will have a visual feedback."
4456
3948
  },
@@ -4529,11 +4021,11 @@ export class KupDataTable {
4529
4021
  "optional": false,
4530
4022
  "docs": {
4531
4023
  "tags": [{
4532
- "text": "loadMoreStep *",
4533
- "name": "see"
4024
+ "name": "see",
4025
+ "text": "loadMoreStep *"
4534
4026
  }, {
4535
- "text": "loadMoreLimit",
4536
- "name": "see"
4027
+ "name": "see",
4028
+ "text": "loadMoreLimit"
4537
4029
  }],
4538
4030
  "text": "Establish the modality of how many new records will be downloaded.\n\nThis property is regulated also by loadMoreStep."
4539
4031
  },
@@ -4553,11 +4045,11 @@ export class KupDataTable {
4553
4045
  "optional": false,
4554
4046
  "docs": {
4555
4047
  "tags": [{
4556
- "text": "loadMoreMode *",
4557
- "name": "see"
4048
+ "name": "see",
4049
+ "text": "loadMoreMode *"
4558
4050
  }, {
4559
- "text": "loadMoreLimit",
4560
- "name": "see"
4051
+ "name": "see",
4052
+ "text": "loadMoreLimit"
4561
4053
  }],
4562
4054
  "text": "The number of records which will be requested to be downloaded when clicking on the load more button.\n\nThis property is regulated also by loadMoreMode."
4563
4055
  },
@@ -4624,6 +4116,24 @@ export class KupDataTable {
4624
4116
  "reflect": false,
4625
4117
  "defaultValue": "false"
4626
4118
  },
4119
+ "resizableColumns": {
4120
+ "type": "boolean",
4121
+ "mutable": false,
4122
+ "complexType": {
4123
+ "original": "boolean",
4124
+ "resolved": "boolean",
4125
+ "references": {}
4126
+ },
4127
+ "required": false,
4128
+ "optional": false,
4129
+ "docs": {
4130
+ "tags": [],
4131
+ "text": "Gives the possibility to resize columns by dragging on their right edge."
4132
+ },
4133
+ "attribute": "resizable-columns",
4134
+ "reflect": false,
4135
+ "defaultValue": "true"
4136
+ },
4627
4137
  "rowActions": {
4628
4138
  "type": "unknown",
4629
4139
  "mutable": false,
@@ -4847,8 +4357,8 @@ export class KupDataTable {
4847
4357
  "optional": false,
4848
4358
  "docs": {
4849
4359
  "tags": [{
4850
- "text": "KupDataTable.showHeader",
4851
- "name": "namespace"
4360
+ "name": "namespace",
4361
+ "text": "KupDataTable.showHeader"
4852
4362
  }],
4853
4363
  "text": "Enables rendering of the table header."
4854
4364
  },
@@ -5088,7 +4598,6 @@ export class KupDataTable {
5088
4598
  "columnMenuAnchor": {},
5089
4599
  "groupState": {},
5090
4600
  "openedTotalMenu": {},
5091
- "openedGroupMenu": {},
5092
4601
  "openedCustomSettings": {},
5093
4602
  "fontsize": {},
5094
4603
  "triggerColumnSortRerender": {}
@@ -5193,26 +4702,6 @@ export class KupDataTable {
5193
4702
  }
5194
4703
  }
5195
4704
  }
5196
- }, {
5197
- "method": "kupDataTableCellUpdate",
5198
- "name": "kup-datatable-cellupdate",
5199
- "bubbles": true,
5200
- "cancelable": false,
5201
- "composed": true,
5202
- "docs": {
5203
- "tags": [],
5204
- "text": "Emitted when a cell's data has been updated."
5205
- },
5206
- "complexType": {
5207
- "original": "KupDatatableCellUpdateEventPayload",
5208
- "resolved": "KupDatatableCellUpdateEventPayload",
5209
- "references": {
5210
- "KupDatatableCellUpdateEventPayload": {
5211
- "location": "import",
5212
- "path": "./kup-data-table-declarations"
5213
- }
5214
- }
5215
- }
5216
4705
  }, {
5217
4706
  "method": "kupDataTableClick",
5218
4707
  "name": "kup-datatable-click",
@@ -5333,46 +4822,6 @@ export class KupDataTable {
5333
4822
  }
5334
4823
  }
5335
4824
  }
5336
- }, {
5337
- "method": "kupCellButtonClick",
5338
- "name": "kup-datatable-cellbuttonclick",
5339
- "bubbles": true,
5340
- "cancelable": false,
5341
- "composed": true,
5342
- "docs": {
5343
- "tags": [],
5344
- "text": ""
5345
- },
5346
- "complexType": {
5347
- "original": "KupDataTableCellButtonClickEventPayload",
5348
- "resolved": "KupDataTableCellButtonClickEventPayload",
5349
- "references": {
5350
- "KupDataTableCellButtonClickEventPayload": {
5351
- "location": "import",
5352
- "path": "./kup-data-table-declarations"
5353
- }
5354
- }
5355
- }
5356
- }, {
5357
- "method": "kupCellTextFieldInput",
5358
- "name": "kup-datatable-textfieldinput",
5359
- "bubbles": true,
5360
- "cancelable": false,
5361
- "composed": true,
5362
- "docs": {
5363
- "tags": [],
5364
- "text": ""
5365
- },
5366
- "complexType": {
5367
- "original": "KupDataTableCellTextFieldInputEventPayload",
5368
- "resolved": "KupDataTableCellTextFieldInputEventPayload",
5369
- "references": {
5370
- "KupDataTableCellTextFieldInputEventPayload": {
5371
- "location": "import",
5372
- "path": "./kup-data-table-declarations"
5373
- }
5374
- }
5375
- }
5376
4825
  }]; }
5377
4826
  static get methods() { return {
5378
4827
  "closeColumnMenu": {
@@ -5428,8 +4877,8 @@ export class KupDataTable {
5428
4877
  "signature": "(descriptions?: boolean) => Promise<GenericObject>",
5429
4878
  "parameters": [{
5430
4879
  "tags": [{
5431
- "text": "descriptions - When provided and true, the result will be the list of props with their description.",
5432
- "name": "param"
4880
+ "name": "param",
4881
+ "text": "descriptions - When provided and true, the result will be the list of props with their description."
5433
4882
  }],
5434
4883
  "text": "- When provided and true, the result will be the list of props with their description."
5435
4884
  }],
@@ -5460,8 +4909,8 @@ export class KupDataTable {
5460
4909
  "signature": "(column: string) => Promise<void>",
5461
4910
  "parameters": [{
5462
4911
  "tags": [{
5463
- "text": "column - Name of the column.",
5464
- "name": "param"
4912
+ "name": "param",
4913
+ "text": "column - Name of the column."
5465
4914
  }],
5466
4915
  "text": "- Name of the column."
5467
4916
  }],
@@ -5523,13 +4972,47 @@ export class KupDataTable {
5523
4972
  "tags": []
5524
4973
  }
5525
4974
  },
4975
+ "setFocus": {
4976
+ "complexType": {
4977
+ "signature": "(column: string, rowId: string) => Promise<void>",
4978
+ "parameters": [{
4979
+ "tags": [{
4980
+ "name": "param",
4981
+ "text": "column - Name of the column."
4982
+ }],
4983
+ "text": "- Name of the column."
4984
+ }, {
4985
+ "tags": [{
4986
+ "name": "param",
4987
+ "text": "rowId - Id of the row."
4988
+ }],
4989
+ "text": "- Id of the row."
4990
+ }],
4991
+ "references": {
4992
+ "Promise": {
4993
+ "location": "global"
4994
+ }
4995
+ },
4996
+ "return": "Promise<void>"
4997
+ },
4998
+ "docs": {
4999
+ "text": "Sets the focus on an editable table cell.",
5000
+ "tags": [{
5001
+ "name": "param",
5002
+ "text": "column - Name of the column."
5003
+ }, {
5004
+ "name": "param",
5005
+ "text": "rowId - Id of the row."
5006
+ }]
5007
+ }
5008
+ },
5526
5009
  "setProps": {
5527
5010
  "complexType": {
5528
5011
  "signature": "(props: GenericObject) => Promise<void>",
5529
5012
  "parameters": [{
5530
5013
  "tags": [{
5531
- "text": "props - Object containing props that will be set to the component.",
5532
- "name": "param"
5014
+ "name": "param",
5015
+ "text": "props - Object containing props that will be set to the component."
5533
5016
  }],
5534
5017
  "text": "- Object containing props that will be set to the component."
5535
5018
  }],
@@ -5557,14 +5040,14 @@ export class KupDataTable {
5557
5040
  "signature": "(rowsById: string, emitEvent?: boolean) => Promise<void>",
5558
5041
  "parameters": [{
5559
5042
  "tags": [{
5560
- "text": "rowsById - String containing the ids separated by \";\".",
5561
- "name": "param"
5043
+ "name": "param",
5044
+ "text": "rowsById - String containing the ids separated by \";\"."
5562
5045
  }],
5563
5046
  "text": "- String containing the ids separated by \";\"."
5564
5047
  }, {
5565
5048
  "tags": [{
5566
- "text": "emitEvent - The event will always be emitted unless emitEvent is set to false.",
5567
- "name": "param"
5049
+ "name": "param",
5050
+ "text": "emitEvent - The event will always be emitted unless emitEvent is set to false."
5568
5051
  }],
5569
5052
  "text": "- The event will always be emitted unless emitEvent is set to false."
5570
5053
  }],