@sme.up/ketchup 4.3.0-SNAPSHOT → 5.1.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 (343) hide show
  1. package/README.md +107 -3
  2. package/dist/cjs/{cell-utils-dc0884a3.js → cell-utils-9b1d6563.js} +4 -4
  3. package/dist/cjs/{component-8fbc31a2.js → component-d1496215.js} +203 -174
  4. package/dist/cjs/{f-button-2ba74fb5.js → f-button-02a7cde4.js} +2 -2
  5. package/dist/cjs/{f-cell-fe60a08d.js → f-cell-4d1450a8.js} +38 -28
  6. package/dist/cjs/f-chip-a50b9f00.js +130 -0
  7. package/dist/cjs/{f-image-d3bd4e08.js → f-image-db55ac49.js} +3 -3
  8. package/dist/cjs/{index-0416afab.js → index-ab119fad.js} +23 -0
  9. package/dist/cjs/ketchup.cjs.js +3 -3
  10. package/dist/cjs/kup-accordion.cjs.entry.js +7 -7
  11. package/dist/cjs/{kup-autocomplete_28.cjs.entry.js → kup-autocomplete_27.cjs.entry.js} +4636 -4073
  12. package/dist/cjs/kup-calendar.cjs.entry.js +626 -359
  13. package/dist/cjs/kup-cell.cjs.entry.js +15 -13
  14. package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
  15. package/dist/cjs/kup-dash_2.cjs.entry.js +8 -7
  16. package/dist/cjs/kup-drawer.cjs.entry.js +3 -3
  17. package/dist/cjs/kup-echart.cjs.entry.js +93039 -0
  18. package/dist/cjs/kup-field.cjs.entry.js +2 -2
  19. package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
  20. package/dist/cjs/kup-lazy.cjs.entry.js +22 -5
  21. package/dist/cjs/kup-magic-box.cjs.entry.js +95 -42
  22. package/dist/cjs/{kup-manager-1a2688ca.js → kup-manager-5877b2ee.js} +3392 -753
  23. package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
  24. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  25. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  26. package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
  27. package/dist/cjs/loader.cjs.js +3 -3
  28. package/dist/cjs/{tslib.es6-4360c099.js → tslib.es6-0ee02c67.js} +13 -0
  29. package/dist/cjs/utils-1b5c8c70.js +482 -0
  30. package/dist/collection/assets/calendar.js +46 -1
  31. package/dist/collection/assets/card.js +15 -15
  32. package/dist/collection/assets/data-table.js +18 -6
  33. package/dist/collection/assets/index.js +8 -0
  34. package/dist/collection/assets/kupdata.js +937 -0
  35. package/dist/collection/collection-manifest.json +4 -4
  36. package/dist/collection/components/kup-accordion/kup-accordion.css +0 -1
  37. package/dist/collection/components/kup-accordion/kup-accordion.js +2 -2
  38. package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +2 -0
  39. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +148 -52
  40. package/dist/collection/components/kup-badge/kup-badge.js +2 -2
  41. package/dist/collection/components/kup-box/kup-box.js +31 -17
  42. package/dist/collection/components/kup-button/kup-button.js +2 -2
  43. package/dist/collection/components/kup-button-list/kup-button-list.js +26 -8
  44. package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +14 -8
  45. package/dist/collection/components/kup-calendar/kup-calendar.css +2 -2
  46. package/dist/collection/components/kup-calendar/kup-calendar.js +185 -315
  47. package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +38 -0
  48. package/dist/collection/components/kup-card/{builtin → built-in}/kup-card-calendar.js +1 -1
  49. package/dist/collection/components/kup-card/{builtin → built-in}/kup-card-clock.js +32 -32
  50. package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +167 -0
  51. package/dist/collection/components/kup-card/collapsible/kup-card-collapsible.js +1 -1
  52. package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +2 -2
  53. package/dist/collection/components/kup-card/free/kup-card-free.js +11 -2
  54. package/dist/collection/components/kup-card/kup-card-declarations.js +14 -14
  55. package/dist/collection/components/kup-card/kup-card-helper.js +3 -3
  56. package/dist/collection/components/kup-card/kup-card.css +423 -137
  57. package/dist/collection/components/kup-card/kup-card.js +62 -11
  58. package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +1 -1
  59. package/dist/collection/components/kup-card/standard/kup-card-standard.js +18 -5
  60. package/dist/collection/components/kup-cell/kup-cell.js +15 -13
  61. package/dist/collection/components/kup-chart/kup-chart-builder.js +3 -4
  62. package/dist/collection/components/kup-chart/kup-chart.js +7 -7
  63. package/dist/collection/components/kup-checkbox/kup-checkbox.js +1 -1
  64. package/dist/collection/components/kup-chip/kup-chip.css +1 -0
  65. package/dist/collection/components/kup-chip/kup-chip.js +51 -92
  66. package/dist/collection/components/kup-color-picker/kup-color-picker.css +1 -265
  67. package/dist/collection/components/kup-color-picker/kup-color-picker.js +93 -48
  68. package/dist/collection/components/kup-combobox/kup-combobox.js +148 -115
  69. package/dist/collection/components/kup-dash/kup-dash.js +1 -1
  70. package/dist/collection/components/kup-dash-list/kup-dash-list.js +5 -5
  71. package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +3 -1
  72. package/dist/collection/components/kup-data-table/kup-data-table-helper.js +28 -56
  73. package/dist/collection/components/kup-data-table/kup-data-table.css +4 -0
  74. package/dist/collection/components/kup-data-table/kup-data-table.js +345 -158
  75. package/dist/collection/components/kup-date-picker/kup-date-picker.js +8 -5
  76. package/dist/collection/components/kup-drawer/kup-drawer.js +1 -1
  77. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +2 -2
  78. package/dist/collection/components/kup-echart/assets/maps/africa.json +6116 -0
  79. package/dist/collection/components/kup-echart/assets/maps/america.json +5416 -0
  80. package/dist/collection/components/kup-echart/assets/maps/asia.json +6053 -0
  81. package/dist/collection/components/kup-echart/assets/maps/europe.json +5051 -0
  82. package/dist/collection/components/kup-echart/assets/maps/italy.json +3562 -0
  83. package/dist/collection/components/kup-echart/assets/maps/oceania.json +1069 -0
  84. package/dist/collection/components/kup-echart/assets/maps/world.json +23685 -0
  85. package/dist/collection/components/kup-echart/kup-echart-declarations.js +45 -0
  86. package/dist/collection/components/kup-echart/kup-echart.css +13 -0
  87. package/dist/collection/components/kup-echart/kup-echart.js +1165 -0
  88. package/dist/collection/components/kup-field/kup-field.js +2 -2
  89. package/dist/collection/components/kup-gauge/kup-gauge.js +3 -3
  90. package/dist/collection/components/kup-grid/kup-grid.css +2 -2
  91. package/dist/collection/components/kup-grid/kup-grid.js +6 -5
  92. package/dist/collection/components/kup-iframe/kup-iframe.js +2 -2
  93. package/dist/collection/components/kup-image/assets/svg/science.svg +1 -0
  94. package/dist/collection/components/kup-image/kup-image.js +3 -3
  95. package/dist/collection/components/kup-lazy/kup-lazy.css +21 -11
  96. package/dist/collection/components/kup-lazy/kup-lazy.js +62 -3
  97. package/dist/collection/components/kup-list/kup-list-helper.js +7 -1
  98. package/dist/collection/components/kup-list/kup-list.css +3 -0
  99. package/dist/collection/components/kup-list/kup-list.js +219 -288
  100. package/dist/collection/components/kup-magic-box/kup-magic-box-declarations.js +11 -7
  101. package/dist/collection/components/kup-magic-box/kup-magic-box.js +90 -41
  102. package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +1 -1
  103. package/dist/collection/components/kup-probe/kup-probe.js +1 -1
  104. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +1 -1
  105. package/dist/collection/components/kup-qlik/kup-qlik.js +1 -1
  106. package/dist/collection/components/kup-radio/kup-radio.js +1 -1
  107. package/dist/collection/components/kup-rating/kup-rating.js +1 -1
  108. package/dist/collection/components/kup-snackbar/kup-snackbar.js +1 -1
  109. package/dist/collection/components/kup-spinner/kup-spinner.js +1 -1
  110. package/dist/collection/components/kup-state/mock-store.js +1 -1
  111. package/dist/collection/components/kup-switch/kup-switch.js +1 -1
  112. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +3 -3
  113. package/dist/collection/components/kup-text-field/kup-text-field.css +2 -0
  114. package/dist/collection/components/kup-text-field/kup-text-field.js +2 -2
  115. package/dist/collection/components/kup-time-picker/kup-time-picker.js +8 -5
  116. package/dist/collection/components/kup-tooltip/kup-tooltip.js +3 -3
  117. package/dist/collection/components/kup-tree/kup-tree-declarations.js +0 -5
  118. package/dist/collection/components/kup-tree/kup-tree-faker.js +2 -3
  119. package/dist/collection/components/kup-tree/kup-tree.css +2 -0
  120. package/dist/collection/components/kup-tree/kup-tree.js +145 -70
  121. package/dist/collection/f-components/f-cell/f-cell-declarations.js +3 -1
  122. package/dist/collection/f-components/f-cell/f-cell.js +29 -19
  123. package/dist/collection/f-components/f-chip/f-chip.js +76 -87
  124. package/dist/collection/f-components/f-image/f-image.js +2 -2
  125. package/dist/collection/f-components/f-paginator/f-paginator-declarations.js +5 -0
  126. package/dist/collection/f-components/f-paginator/f-paginator-utils.js +28 -0
  127. package/dist/collection/f-components/f-paginator/f-paginator.js +91 -0
  128. package/dist/collection/f-components/f-text-field/f-text-field.js +4 -4
  129. package/dist/collection/managers/kup-data/kup-data-cell-helper.js +52 -0
  130. package/dist/collection/managers/kup-data/kup-data-column-helper.js +272 -0
  131. package/dist/collection/managers/kup-data/kup-data-declarations.js +9 -0
  132. package/dist/collection/managers/kup-data/kup-data-node-helper.js +72 -0
  133. package/dist/collection/managers/kup-data/kup-data-row-helper.js +28 -0
  134. package/dist/collection/managers/kup-data/kup-data.js +382 -0
  135. package/dist/collection/{utils → managers}/kup-dates/kup-dates-declarations.js +0 -0
  136. package/dist/collection/{utils → managers}/kup-dates/kup-dates.js +53 -19
  137. package/dist/collection/{utils → managers}/kup-debug/kup-debug-browser-utils.js +1 -1
  138. package/dist/collection/{utils → managers}/kup-debug/kup-debug-declarations.js +0 -0
  139. package/dist/collection/{utils → managers}/kup-debug/kup-debug.js +79 -124
  140. package/dist/collection/{utils → managers}/kup-dynamic-position/kup-dynamic-position-declarations.js +0 -0
  141. package/dist/collection/{utils → managers}/kup-dynamic-position/kup-dynamic-position.js +10 -1
  142. package/dist/collection/{utils → managers}/kup-interact/kup-interact-declarations.js +1 -0
  143. package/dist/collection/{utils → managers}/kup-interact/kup-interact.js +22 -13
  144. package/dist/collection/{utils → managers}/kup-language/kup-language-declarations.js +10 -0
  145. package/dist/collection/{utils → managers}/kup-language/kup-language.js +5 -5
  146. package/dist/collection/{utils → managers}/kup-manager/kup-manager-declarations.js +0 -0
  147. package/dist/collection/{utils → managers}/kup-manager/kup-manager.js +45 -4
  148. package/dist/collection/managers/kup-math/kup-math-declarations.js +13 -0
  149. package/dist/collection/managers/kup-math/kup-math-helper.js +39 -0
  150. package/dist/collection/managers/kup-math/kup-math.js +151 -0
  151. package/dist/collection/{utils → managers}/kup-objects/kup-objects-declarations.js +0 -0
  152. package/dist/collection/{utils → managers}/kup-objects/kup-objects.js +15 -0
  153. package/dist/collection/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +0 -0
  154. package/dist/collection/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover.js +0 -0
  155. package/dist/collection/{utils → managers}/kup-search/kup-search-declarations.js +0 -0
  156. package/dist/collection/{utils → managers}/kup-search/kup-search.js +0 -0
  157. package/dist/collection/{utils → managers}/kup-theme/kup-theme-declarations.js +99 -0
  158. package/dist/collection/{utils → managers}/kup-theme/kup-theme.js +117 -68
  159. package/dist/collection/{utils → managers}/kup-toolbar/kup-toolbar-declarations.js +0 -0
  160. package/dist/collection/{utils → managers}/kup-toolbar/kup-toolbar.js +0 -0
  161. package/dist/collection/types/GenericTypes.js +48 -1
  162. package/dist/collection/utils/cell-utils.js +3 -4
  163. package/dist/collection/utils/filters/filters-column-menu.js +7 -7
  164. package/dist/collection/utils/filters/filters-rows.js +2 -2
  165. package/dist/collection/utils/filters/filters-tree-items.js +12 -12
  166. package/dist/collection/utils/filters/filters.js +3 -2
  167. package/dist/collection/utils/kup-column-menu/kup-column-menu-declarations.js +1 -0
  168. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +100 -68
  169. package/dist/collection/utils/utils.js +4 -4
  170. package/dist/esm/{cell-utils-8f512ea9.js → cell-utils-571978d6.js} +4 -4
  171. package/dist/esm/{component-d2803feb.js → component-c4eb6153.js} +204 -170
  172. package/dist/esm/{f-button-30dbcaa9.js → f-button-b3011cc2.js} +2 -2
  173. package/dist/esm/{f-cell-95c186c6.js → f-cell-b88b2731.js} +38 -28
  174. package/dist/esm/f-chip-a52489ec.js +128 -0
  175. package/dist/esm/{f-image-3bc8b24f.js → f-image-5e5ed7e2.js} +3 -3
  176. package/dist/esm/{index-e0e67c23.js → index-78f3699d.js} +23 -0
  177. package/dist/esm/ketchup.js +3 -3
  178. package/dist/esm/kup-accordion.entry.js +7 -7
  179. package/dist/esm/{kup-autocomplete_28.entry.js → kup-autocomplete_27.entry.js} +4420 -3856
  180. package/dist/esm/kup-calendar.entry.js +626 -359
  181. package/dist/esm/kup-cell.entry.js +15 -13
  182. package/dist/esm/kup-dash-list.entry.js +4 -4
  183. package/dist/esm/kup-dash_2.entry.js +8 -7
  184. package/dist/esm/kup-drawer.entry.js +3 -3
  185. package/dist/esm/kup-echart.entry.js +93035 -0
  186. package/dist/esm/kup-field.entry.js +2 -2
  187. package/dist/esm/kup-iframe.entry.js +3 -3
  188. package/dist/esm/kup-lazy.entry.js +22 -5
  189. package/dist/esm/kup-magic-box.entry.js +95 -42
  190. package/dist/esm/{kup-manager-7fc234da.js → kup-manager-1f76a3ef.js} +3388 -753
  191. package/dist/esm/kup-nav-bar.entry.js +3 -3
  192. package/dist/esm/kup-probe.entry.js +2 -2
  193. package/dist/esm/kup-qlik.entry.js +2 -2
  194. package/dist/esm/kup-snackbar.entry.js +5 -5
  195. package/dist/esm/loader.js +3 -3
  196. package/dist/esm/polyfills/css-shim.js +1 -1
  197. package/dist/esm/{tslib.es6-e6137777.js → tslib.es6-8f2d44b6.js} +13 -1
  198. package/dist/esm/utils-93ae800f.js +461 -0
  199. package/dist/ketchup/assets/maps/africa.json +6116 -0
  200. package/dist/ketchup/assets/maps/america.json +5416 -0
  201. package/dist/ketchup/assets/maps/asia.json +6053 -0
  202. package/dist/ketchup/assets/maps/europe.json +5051 -0
  203. package/dist/ketchup/assets/maps/italy.json +3562 -0
  204. package/dist/ketchup/assets/maps/oceania.json +1069 -0
  205. package/dist/ketchup/assets/maps/world.json +23685 -0
  206. package/dist/ketchup/assets/svg/science.svg +1 -0
  207. package/dist/ketchup/ketchup.esm.js +1 -1
  208. package/dist/ketchup/{p-a878016f.entry.js → p-088a886c.entry.js} +1 -1
  209. package/dist/ketchup/p-135cabdc.entry.js +1 -0
  210. package/dist/ketchup/{p-1c6178e4.entry.js → p-1c1e830f.entry.js} +1 -1
  211. package/dist/ketchup/{p-62816d0b.entry.js → p-29208220.entry.js} +1 -1
  212. package/dist/ketchup/{p-ca0ca27f.entry.js → p-2b9f2019.entry.js} +1 -1
  213. package/dist/ketchup/p-52d0582a.js +1 -0
  214. package/dist/ketchup/p-554bd5f0.entry.js +39 -0
  215. package/dist/ketchup/{p-de83f2f6.js → p-5f52e313.js} +1 -1
  216. package/dist/ketchup/{p-ccda584a.entry.js → p-65449480.entry.js} +1 -1
  217. package/dist/ketchup/p-79cf3874.entry.js +1 -0
  218. package/dist/ketchup/p-7a85cda4.js +1 -0
  219. package/dist/ketchup/p-84cce555.entry.js +27 -0
  220. package/dist/ketchup/p-8c44c3b9.js +135 -0
  221. package/dist/ketchup/{p-65adc15b.entry.js → p-9d49cdb2.entry.js} +1 -1
  222. package/dist/ketchup/{p-5a4a5fdc.js → p-a0b1d769.js} +1 -1
  223. package/dist/ketchup/{p-dbb6998b.entry.js → p-a2b6672e.entry.js} +1 -1
  224. package/dist/ketchup/{p-a378ba56.entry.js → p-a4be630b.entry.js} +1 -1
  225. package/dist/ketchup/p-c072b270.js +1 -0
  226. package/dist/ketchup/{p-1baf1205.entry.js → p-c648972c.entry.js} +1 -1
  227. package/dist/ketchup/{p-af4a6191.entry.js → p-d67d39c0.entry.js} +1 -1
  228. package/dist/ketchup/p-d6e2f2b0.entry.js +1 -0
  229. package/dist/ketchup/{p-44375e49.js → p-da387e0e.js} +1 -1
  230. package/dist/ketchup/p-e5c9ec9e.js +1 -0
  231. package/dist/ketchup/{p-cb5f4994.js → p-ed0b8666.js} +0 -0
  232. package/dist/ketchup/p-ef539eda.js +9 -0
  233. package/dist/ketchup/p-f316234c.entry.js +143 -0
  234. package/dist/types/components/kup-accordion/kup-accordion-declarations.d.ts +2 -2
  235. package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +6 -0
  236. package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +29 -22
  237. package/dist/types/components/kup-box/kup-box-declarations.d.ts +7 -11
  238. package/dist/types/components/kup-box/kup-box.d.ts +4 -4
  239. package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +6 -1
  240. package/dist/types/components/kup-button-list/kup-button-list.d.ts +4 -3
  241. package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +28 -10
  242. package/dist/types/components/kup-calendar/kup-calendar.d.ts +19 -47
  243. package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +27 -0
  244. package/dist/types/components/kup-card/{builtin → built-in}/kup-card-calendar.d.ts +0 -0
  245. package/dist/types/components/kup-card/{builtin → built-in}/kup-card-clock.d.ts +0 -0
  246. package/dist/types/components/kup-card/built-in/kup-card-column-drop-menu.d.ts +3 -0
  247. package/dist/types/components/kup-card/free/kup-card-free.d.ts +7 -1
  248. package/dist/types/components/kup-card/kup-card-declarations.d.ts +46 -21
  249. package/dist/types/components/kup-card/kup-card.d.ts +9 -2
  250. package/dist/types/components/kup-cell/kup-cell.d.ts +3 -3
  251. package/dist/types/components/kup-chart/kup-chart-builder.d.ts +5 -5
  252. package/dist/types/components/kup-chart/kup-chart-declarations.d.ts +3 -3
  253. package/dist/types/components/kup-chart/kup-chart.d.ts +2 -2
  254. package/dist/types/components/kup-chip/kup-chip-declarations.d.ts +6 -3
  255. package/dist/types/components/kup-chip/kup-chip.d.ts +9 -13
  256. package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +7 -3
  257. package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +4 -0
  258. package/dist/types/components/kup-combobox/kup-combobox.d.ts +11 -33
  259. package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +2 -2
  260. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +45 -104
  261. package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +8 -11
  262. package/dist/types/components/kup-data-table/kup-data-table.d.ts +49 -27
  263. package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +55 -0
  264. package/dist/types/components/kup-echart/kup-echart.d.ts +100 -0
  265. package/dist/types/components/kup-lazy/kup-lazy.d.ts +13 -1
  266. package/dist/types/components/kup-list/kup-list-declarations.d.ts +2 -1
  267. package/dist/types/components/kup-list/kup-list.d.ts +4 -35
  268. package/dist/types/components/kup-magic-box/kup-magic-box-declarations.d.ts +6 -10
  269. package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +7 -11
  270. package/dist/types/components/kup-tooltip/kup-tooltip-declarations.d.ts +11 -13
  271. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +14 -35
  272. package/dist/types/components/kup-tree/kup-tree-faker.d.ts +10 -10
  273. package/dist/types/components/kup-tree/kup-tree.d.ts +45 -35
  274. package/dist/types/components.d.ts +305 -186
  275. package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +11 -10
  276. package/dist/types/f-components/f-chip/f-chip-declarations.d.ts +7 -22
  277. package/dist/types/f-components/f-paginator/f-paginator-declarations.d.ts +22 -0
  278. package/dist/types/f-components/f-paginator/f-paginator-utils.d.ts +2 -0
  279. package/dist/types/f-components/f-paginator/f-paginator.d.ts +3 -0
  280. package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +24 -0
  281. package/dist/types/managers/kup-data/kup-data-column-helper.d.ts +31 -0
  282. package/dist/types/managers/kup-data/kup-data-declarations.d.ts +160 -0
  283. package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +23 -0
  284. package/dist/types/managers/kup-data/kup-data-row-helper.d.ts +14 -0
  285. package/dist/types/managers/kup-data/kup-data.d.ts +77 -0
  286. package/dist/types/{utils → managers}/kup-dates/kup-dates-declarations.d.ts +0 -0
  287. package/dist/types/{utils → managers}/kup-dates/kup-dates.d.ts +24 -2
  288. package/dist/types/{utils → managers}/kup-debug/kup-debug-declarations.d.ts +0 -0
  289. package/dist/types/{utils → managers}/kup-debug/kup-debug.d.ts +6 -13
  290. package/dist/types/{utils → managers}/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +1 -0
  291. package/dist/types/{utils → managers}/kup-dynamic-position/kup-dynamic-position.d.ts +0 -0
  292. package/dist/types/{utils → managers}/kup-interact/kup-interact-declarations.d.ts +9 -8
  293. package/dist/types/{utils → managers}/kup-interact/kup-interact.d.ts +7 -6
  294. package/dist/types/{utils → managers}/kup-language/kup-language-declarations.d.ts +11 -1
  295. package/dist/types/{utils → managers}/kup-language/kup-language.d.ts +3 -3
  296. package/dist/types/{utils → managers}/kup-manager/kup-manager-declarations.d.ts +21 -2
  297. package/dist/types/{utils → managers}/kup-manager/kup-manager.d.ts +4 -0
  298. package/dist/types/managers/kup-math/kup-math-declarations.d.ts +21 -0
  299. package/dist/types/managers/kup-math/kup-math-helper.d.ts +17 -0
  300. package/dist/types/managers/kup-math/kup-math.d.ts +60 -0
  301. package/dist/types/{utils → managers}/kup-objects/kup-objects-declarations.d.ts +0 -0
  302. package/dist/types/{utils → managers}/kup-objects/kup-objects.d.ts +6 -0
  303. package/dist/types/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +0 -0
  304. package/dist/types/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +0 -0
  305. package/dist/types/{utils → managers}/kup-search/kup-search-declarations.d.ts +0 -0
  306. package/dist/types/{utils → managers}/kup-search/kup-search.d.ts +0 -0
  307. package/dist/types/{utils → managers}/kup-theme/kup-theme-declarations.d.ts +37 -1
  308. package/dist/types/{utils → managers}/kup-theme/kup-theme.d.ts +19 -19
  309. package/dist/types/{utils → managers}/kup-toolbar/kup-toolbar-declarations.d.ts +0 -0
  310. package/dist/types/{utils → managers}/kup-toolbar/kup-toolbar.d.ts +0 -0
  311. package/dist/types/stencil-public-runtime.d.ts +6 -4
  312. package/dist/types/types/GenericTypes.d.ts +53 -6
  313. package/dist/types/utils/cell-utils.d.ts +7 -6
  314. package/dist/types/utils/filters/filters-column-menu.d.ts +16 -16
  315. package/dist/types/utils/filters/filters-rows.d.ts +10 -10
  316. package/dist/types/utils/filters/filters-tree-items.d.ts +7 -7
  317. package/dist/types/utils/helpers.d.ts +2 -2
  318. package/dist/types/utils/kup-column-menu/kup-column-menu-declarations.d.ts +1 -0
  319. package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +27 -33
  320. package/dist/types/utils/utils.d.ts +4 -2
  321. package/package.json +31 -26
  322. package/dist/cjs/f-chip-90d95d22.js +0 -141
  323. package/dist/cjs/utils-0cc466b9.js +0 -1492
  324. package/dist/collection/components/kup-card/builtin/kup-card-builtin.js +0 -20
  325. package/dist/collection/components/kup-paginator/kup-paginator-declarations.js +0 -5
  326. package/dist/collection/components/kup-paginator/kup-paginator.css +0 -46
  327. package/dist/collection/components/kup-paginator/kup-paginator.js +0 -408
  328. package/dist/esm/f-chip-c0e9c0ff.js +0 -139
  329. package/dist/esm/utils-6c73709d.js +0 -1470
  330. package/dist/ketchup/p-15321eae.js +0 -1
  331. package/dist/ketchup/p-5a5f2a53.js +0 -1
  332. package/dist/ketchup/p-61faaa38.js +0 -8
  333. package/dist/ketchup/p-7e23ea7c.entry.js +0 -1
  334. package/dist/ketchup/p-9d02a676.js +0 -134
  335. package/dist/ketchup/p-a96e6e32.entry.js +0 -1
  336. package/dist/ketchup/p-ad32821e.entry.js +0 -1
  337. package/dist/ketchup/p-c18c7bb0.entry.js +0 -27
  338. package/dist/ketchup/p-d4aa4922.js +0 -1
  339. package/dist/ketchup/p-ec3a3db9.js +0 -1
  340. package/dist/ketchup/p-ecccb3a4.entry.js +0 -45
  341. package/dist/types/components/kup-card/builtin/kup-card-builtin.d.ts +0 -14
  342. package/dist/types/components/kup-paginator/kup-paginator-declarations.d.ts +0 -11
  343. package/dist/types/components/kup-paginator/kup-paginator.d.ts +0 -48
@@ -4,7 +4,7 @@ import { getColumnByName } from '../../utils/cell-utils';
4
4
  import { calcTotals, normalizeRows, filterRows, groupRows, paginateRows, sortRows, } from './kup-data-table-helper';
5
5
  import { numberToFormattedStringNumber, identify, deepEqual, getProps, setProps, } from '../../utils/utils';
6
6
  import { ItemsDisplayMode, } from '../kup-list/kup-list-declarations';
7
- import { kupManagerInstance, } from '../../utils/kup-manager/kup-manager';
7
+ import { kupManagerInstance, } from '../../managers/kup-manager/kup-manager';
8
8
  import { KupDataTableState } from './kup-data-table-state';
9
9
  import { setTooltip, unsetTooltip } from '../../utils/helpers';
10
10
  import { FImage } from '../../f-components/f-image/f-image';
@@ -12,26 +12,25 @@ import { FTextField } from '../../f-components/f-text-field/f-text-field';
12
12
  import { FChip } from '../../f-components/f-chip/f-chip';
13
13
  import { FTextFieldMDC } from '../../f-components/f-text-field/f-text-field-mdc';
14
14
  import { FChipType, } from '../../f-components/f-chip/f-chip-declarations';
15
- import { FButtonStyling } from '../../f-components/f-button/f-button-declarations';
16
15
  import { FCheckbox } from '../../f-components/f-checkbox/f-checkbox';
17
16
  import { KupColumnMenu } from '../../utils/kup-column-menu/kup-column-menu';
18
17
  import { FiltersColumnMenu } from '../../utils/filters/filters-column-menu';
19
18
  import { FiltersRows } from '../../utils/filters/filters-rows';
20
- import { kupDynamicPositionAttribute, KupDynamicPositionPlacement, } from '../../utils/kup-dynamic-position/kup-dynamic-position-declarations';
19
+ import { kupDynamicPositionAttribute, KupDynamicPositionPlacement, } from '../../managers/kup-dynamic-position/kup-dynamic-position-declarations';
21
20
  import { KupCardFamily, } from '../kup-card/kup-card-declarations';
22
- import { KupDebugCategory } from '../../utils/kup-debug/kup-debug-declarations';
23
- import { KupLanguageDensity, KupLanguageFontsize, KupLanguageGeneric, KupLanguageGrid, KupLanguageRow, KupLanguageSearch, KupLanguageTotals, } from '../../utils/kup-language/kup-language-declarations';
24
- import { KupThemeColorValues, KupThemeIconValues, } from '../../utils/kup-theme/kup-theme-declarations';
21
+ import { KupDebugCategory } from '../../managers/kup-debug/kup-debug-declarations';
22
+ import { KupLanguageDensity, KupLanguageFontsize, KupLanguageGeneric, KupLanguageGrid, KupLanguageRow, KupLanguageSearch, KupLanguageTotals, } from '../../managers/kup-language/kup-language-declarations';
23
+ import { KupThemeColorValues, KupThemeIconValues, } from '../../managers/kup-theme/kup-theme-declarations';
25
24
  import { componentWrapperId } from '../../variables/GenericVariables';
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';
25
+ import { KupDatesFormats } from '../../managers/kup-dates/kup-dates-declarations';
26
+ import { kupDragActiveAttr, KupDragEffect, kupDraggableCellAttr, kupDraggableColumnAttr, KupDropEventTypes, KupPointerEventTypes, } from '../../managers/kup-interact/kup-interact-declarations';
28
27
  import { FCellPadding, } from '../../f-components/f-cell/f-cell-declarations';
29
28
  import { FCell } from '../../f-components/f-cell/f-cell';
29
+ import { FPaginator } from '../../f-components/f-paginator/f-paginator';
30
+ import { pageChange, rowsPerPageChange, } from '../../f-components/f-paginator/f-paginator-utils';
31
+ import { KupDataNewColumnTypes, } from '../../managers/kup-data/kup-data-declarations';
30
32
  export class KupDataTable {
31
33
  constructor() {
32
- //////////////////////////////
33
- // Begin state stuff
34
- //////////////////////////////
35
34
  this.stateId = '';
36
35
  this.state = new KupDataTableState();
37
36
  /**
@@ -64,10 +63,20 @@ export class KupDataTable {
64
63
  * Defines the label to show when the table is empty.
65
64
  */
66
65
  this.emptyDataLabel = null;
66
+ /**
67
+ * Enables the choice to set formulas on columns by dragging them into different columns.
68
+ * @default true
69
+ */
70
+ this.enableColumnsFormula = true;
67
71
  /**
68
72
  * Enables the extracolumns add buttons.
69
73
  */
70
74
  this.enableExtraColumns = true;
75
+ /**
76
+ * Enables the merging of columns by dragging them into different columns.
77
+ * @default true
78
+ */
79
+ this.enableMergeColumns = true;
71
80
  /**
72
81
  * Enables the sorting of columns by dragging them into different columns.
73
82
  */
@@ -256,11 +265,6 @@ export class KupDataTable {
256
265
  this.openedTotalMenu = null;
257
266
  this.openedCustomSettings = false;
258
267
  this.fontsize = 'medium';
259
- /**
260
- * This is a flag to be used for the draggable columns to force rerender
261
- * by changing the internal state.
262
- */
263
- this.triggerColumnSortRerender = false;
264
268
  this.rowsLength = 0;
265
269
  this.paginatedRowsLength = 0;
266
270
  /**
@@ -297,14 +301,11 @@ export class KupDataTable {
297
301
  this.groupsDropareaRef = null;
298
302
  this.clickCb = null;
299
303
  this.clickCbCustomPanel = null;
300
- /**
301
- * Reference to the row detail card.
302
- */
304
+ this.clickCbDropCard = null;
303
305
  this.detailCard = null;
304
- /**
305
- * Reference to the column menu card.
306
- */
307
306
  this.columnMenuCard = null;
307
+ this.columnDropCard = null;
308
+ this.columnDropCardAnchor = null;
308
309
  this.stickyHeaderPosition = () => {
309
310
  if (this.tableRef) {
310
311
  if (this.tableIntersecting) {
@@ -604,6 +605,33 @@ export class KupDataTable {
604
605
  async getProps(descriptions) {
605
606
  return getProps(this, KupDataTableProps, descriptions);
606
607
  }
608
+ /**
609
+ * Hides the given column.
610
+ * @param {KupDataColumn} column - Column to hide.
611
+ */
612
+ async hideColumn(column) {
613
+ this.kupManager.data.column.hide(this.data, [column.name]);
614
+ this.kupColumnRemove.emit({
615
+ comp: this,
616
+ id: this.rootElement.id,
617
+ column: column,
618
+ });
619
+ this.refresh();
620
+ }
621
+ /**
622
+ * Invokes the KupData API for column creation, then refreshes the component in case no errors were catched.
623
+ * @param {KupDataNewColumnTypes} type - Type of the column creation.
624
+ * @param {KupDataNewColumnOptions} options - Options of the creation.
625
+ * @returns {string|KupDataColumn} Returns the new column created or a string containing the error message if something went wrong.
626
+ */
627
+ async newColumn(type, options) {
628
+ const result = this.kupManager.data.column.new(this.data, type, options);
629
+ const error = !!(typeof result === 'string' || result instanceof String);
630
+ if (!error) {
631
+ this.refresh();
632
+ }
633
+ return result;
634
+ }
607
635
  /**
608
636
  * Opens the column menu of the given column.
609
637
  * @param {string} column - Name of the column.
@@ -719,6 +747,57 @@ export class KupDataTable {
719
747
  });
720
748
  }
721
749
  }
750
+ closeDropCard() {
751
+ this.kupManager.dynamicPosition.stop(this.columnDropCard);
752
+ this.kupManager.removeClickCallback(this.clickCbDropCard);
753
+ this.columnDropCard.remove();
754
+ this.columnDropCard = null;
755
+ }
756
+ createDropCard(starter, receiving) {
757
+ if (this.columnDropCard) {
758
+ this.closeDropCard();
759
+ }
760
+ this.columnDropCard = document.createElement('kup-card');
761
+ this.columnDropCard.data = {
762
+ options: {
763
+ data: this.data,
764
+ enableFormula: this.enableColumnsFormula,
765
+ enableMerge: this.enableMergeColumns,
766
+ enableMove: this.enableSortableColumns,
767
+ receivingColumn: receiving,
768
+ starterColumn: starter,
769
+ formulaCb: () => {
770
+ this.closeDropCard();
771
+ this.refresh();
772
+ },
773
+ mergeCb: () => {
774
+ this.newColumn(KupDataNewColumnTypes.CONCATENATE, {
775
+ columns: [receiving.name, starter.name],
776
+ });
777
+ this.closeDropCard();
778
+ },
779
+ moveCb: () => {
780
+ this.handleColumnSort(receiving, starter);
781
+ this.closeDropCard();
782
+ },
783
+ },
784
+ };
785
+ this.columnDropCard.layoutFamily = KupCardFamily.BUILT_IN;
786
+ this.columnDropCard.layoutNumber = 3;
787
+ this.columnDropCard.isMenu = true;
788
+ this.columnDropCard.sizeX = '280px';
789
+ this.columnDropCard.sizeY = 'auto';
790
+ this.kupManager.dynamicPosition.register(this.columnDropCard, this.columnDropCardAnchor, 0, KupDynamicPositionPlacement.AUTO, true);
791
+ this.kupManager.dynamicPosition.start(this.columnDropCard);
792
+ this.clickCbDropCard = {
793
+ cb: () => {
794
+ this.closeDropCard();
795
+ },
796
+ el: this.columnDropCard,
797
+ };
798
+ this.kupManager.addClickCallback(this.clickCbDropCard, true);
799
+ this.columnDropCard.menuVisible = true;
800
+ }
722
801
  calculateData() {
723
802
  if (!this.transpose) {
724
803
  // restore
@@ -735,7 +814,7 @@ export class KupDataTable {
735
814
  // transpose
736
815
  this.originalData = Object.assign({}, this.data);
737
816
  if (this.data.columns.length > 0) {
738
- this.data = this.getTransposedData(this.data.columns[0]);
817
+ this.data = this.getTransposedData(this.data.columns[0].name);
739
818
  }
740
819
  }
741
820
  switchToTotalsMatrix() {
@@ -868,85 +947,10 @@ export class KupDataTable {
868
947
  }
869
948
  }
870
949
  getTransposedData(column) {
871
- const transposedData = {};
872
- // TODO manage better the filters, this is just a fix in order to release the function
873
950
  if (column) {
874
951
  this.filters = {};
875
952
  }
876
- // calc columns
877
- const columns = [];
878
- // first item
879
- let firstHead = null;
880
- if (column) {
881
- firstHead = column;
882
- columns.push(firstHead);
883
- this.data.rows.forEach((row) => {
884
- columns.push(this.getColumnFromCell(row.cells[firstHead.name], row.id));
885
- });
886
- }
887
- else {
888
- firstHead = { name: fieldColumn.toUpperCase(), title: fieldColumn };
889
- columns.push(firstHead);
890
- for (let index = 0; index < this.data.rows.length; index++) {
891
- columns.push({
892
- name: this.data.rows[index].id,
893
- title: '#' + index,
894
- });
895
- }
896
- }
897
- // fill columns with the cells in the first original column
898
- // set columns
899
- transposedData.columns = columns;
900
- // calc rows
901
- const rows = [];
902
- for (let index = column ? 1 : 0; index < this.data.columns.length; index++) {
903
- const oldColumn = this.data.columns[index];
904
- const cells = {};
905
- // set first cell from previous columns
906
- // TODO set obj? like this --> obj: oldColumn.obj
907
- cells[firstHead.name] = {
908
- value: oldColumn.title,
909
- };
910
- for (let index = 1; index < transposedData.columns.length; index++) {
911
- const newColumn = transposedData.columns[index];
912
- const oldRow = this.data.rows[index - 1];
913
- const cellName = column ? newColumn.name : oldRow.id;
914
- cells[cellName] = oldRow.cells[oldColumn.name];
915
- if (oldColumn.icon && !cells[cellName].icon) {
916
- cells[cellName].icon = oldColumn.icon;
917
- }
918
- if (oldColumn.shape && !cells[cellName].shape) {
919
- cells[cellName].shape = oldColumn.shape;
920
- }
921
- }
922
- // If a record is key and no column argument is provided, it will be placed on top
923
- if (!column && oldColumn.isKey) {
924
- rows.unshift({
925
- id: String(index),
926
- cells,
927
- name: oldColumn.name,
928
- });
929
- }
930
- else {
931
- rows.push({
932
- id: String(index),
933
- cells,
934
- name: oldColumn.name,
935
- });
936
- }
937
- }
938
- // set rows
939
- transposedData.rows = rows;
940
- // return
941
- return transposedData;
942
- }
943
- getColumnFromCell(cell, id) {
944
- const title = cell.displayedValue ? cell.displayedValue : cell.value;
945
- // TODO set obj? like this --> obj: cell.obj
946
- return {
947
- name: cell.value + '_' + id,
948
- title,
949
- };
953
+ return this.kupManager.data.transpose(this.data, column);
950
954
  }
951
955
  updateStickyHeaderSize() {
952
956
  const navBar = document.querySelectorAll('.header')[0];
@@ -1109,13 +1113,15 @@ export class KupDataTable {
1109
1113
  drop: (e) => {
1110
1114
  const draggedTh = e.relatedTarget;
1111
1115
  const deleted = getColumnByName(this.getColumns(), draggedTh.dataset.column);
1112
- this.handleColumnRemove(deleted);
1116
+ this.hideColumn(deleted);
1113
1117
  this.tableRef.removeAttribute(kupDragActiveAttr);
1114
1118
  },
1115
1119
  });
1116
1120
  }
1117
1121
  }
1118
- if (this.enableSortableColumns) {
1122
+ if (this.enableSortableColumns ||
1123
+ this.enableMergeColumns ||
1124
+ this.enableColumnsFormula) {
1119
1125
  const dataCb = (e) => {
1120
1126
  const draggable = e.target;
1121
1127
  return {
@@ -1129,11 +1135,28 @@ export class KupDataTable {
1129
1135
  };
1130
1136
  };
1131
1137
  const dropCb = (e) => {
1138
+ const onlyMerge = !!(!this.enableSortableColumns &&
1139
+ !this.enableColumnsFormula &&
1140
+ this.enableMergeColumns);
1141
+ const onlySort = !!(this.enableSortableColumns &&
1142
+ !this.enableColumnsFormula &&
1143
+ !this.enableMergeColumns);
1132
1144
  const draggable = e.relatedTarget;
1133
- const sorted = draggable.kupDragDrop.column;
1145
+ const starter = draggable.kupDragDrop.column;
1134
1146
  const receiving = getColumnByName(this.getColumns(), e.target.dataset.column);
1135
- if (receiving && sorted) {
1136
- this.handleColumnSort(receiving, sorted);
1147
+ this.columnDropCardAnchor = e.target;
1148
+ if (receiving && starter) {
1149
+ if (onlySort) {
1150
+ this.handleColumnSort(receiving, starter);
1151
+ }
1152
+ else if (onlyMerge) {
1153
+ this.newColumn(KupDataNewColumnTypes.CONCATENATE, {
1154
+ columns: [receiving.name, starter.name],
1155
+ });
1156
+ }
1157
+ else {
1158
+ this.createDropCard(starter, receiving);
1159
+ }
1137
1160
  }
1138
1161
  this.tableRef.removeAttribute(kupDragActiveAttr);
1139
1162
  };
@@ -1423,7 +1446,9 @@ export class KupDataTable {
1423
1446
  getEventPath(e) {
1424
1447
  let path = [];
1425
1448
  let currentEl = e.target;
1426
- while (currentEl !== this.rootElement && currentEl !== document.body) {
1449
+ while (currentEl &&
1450
+ currentEl !== this.rootElement &&
1451
+ currentEl !== document.body) {
1427
1452
  path.push(currentEl);
1428
1453
  currentEl = currentEl.parentNode
1429
1454
  ? currentEl.parentNode
@@ -1465,7 +1490,7 @@ export class KupDataTable {
1465
1490
  }
1466
1491
  /**
1467
1492
  * Opens a card containing the detail of the given row.
1468
- * @param {Row} row - Row for which the detail was requested.
1493
+ * @param {KupDataTableRow} row - Row for which the detail was requested.
1469
1494
  * @param {number} x - Initial x coordinates of the card.
1470
1495
  * @param {number} y - Initial y coordinates of the card.
1471
1496
  * @private
@@ -1532,7 +1557,7 @@ export class KupDataTable {
1532
1557
  // Setting up icons
1533
1558
  let keyCell = null;
1534
1559
  for (let index = 0; index < rows.length; index++) {
1535
- const column = this.data.columns.find((x) => x.name === rows[index].name);
1560
+ const column = this.data.columns.find((x) => x.name === rows[index].transposedColumnName);
1536
1561
  if (!column) {
1537
1562
  this.kupManager.debug.logMessage(this, 'Column not found on row name (' + column + ')!', KupDebugCategory.WARNING);
1538
1563
  return;
@@ -1928,6 +1953,7 @@ export class KupDataTable {
1928
1953
  const numberOfPages = Math.ceil(numberOfRows / this.currentRowsPerPage);
1929
1954
  if (this.currentPage > numberOfPages) {
1930
1955
  // reset page
1956
+ this.currentPage = 1;
1931
1957
  this.resetCurrentPage();
1932
1958
  }
1933
1959
  }
@@ -2066,12 +2092,18 @@ export class KupDataTable {
2066
2092
  this.globalFilterValue = '';
2067
2093
  }
2068
2094
  }
2069
- handlePageChanged({ detail }) {
2070
- this.currentPage = detail.newPage;
2095
+ handlePageChange(pageNumber) {
2096
+ const newPage = pageChange(pageNumber, this.rowsLength, this.currentRowsPerPage);
2097
+ if (newPage) {
2098
+ this.currentPage = newPage;
2099
+ }
2071
2100
  }
2072
- handleRowsPerPageChanged({ detail }) {
2073
- this.currentRowsPerPage = detail.newRowsPerPage;
2074
- this.adjustPaginator();
2101
+ handleRowsPerPageChange(rowsNumber) {
2102
+ const newRows = rowsPerPageChange(rowsNumber, this.rowsLength);
2103
+ if (newRows) {
2104
+ this.currentRowsPerPage = newRows;
2105
+ this.adjustPaginator();
2106
+ }
2075
2107
  }
2076
2108
  onRowClick(row, td, emitEvent) {
2077
2109
  // selecting row
@@ -2100,7 +2132,9 @@ export class KupDataTable {
2100
2132
  // find clicked column
2101
2133
  const clickedColumn = td.dataset.column;
2102
2134
  // selecting clicked column
2103
- if (this.selection !== SelectionMode.NONE && clickedColumn) {
2135
+ if (!row.unselectable &&
2136
+ this.selection !== SelectionMode.NONE &&
2137
+ clickedColumn) {
2104
2138
  this.deselectColumn(this.selectedColumn);
2105
2139
  this.selectedColumn = clickedColumn;
2106
2140
  this.selectColumn(this.selectedColumn);
@@ -2339,6 +2373,12 @@ export class KupDataTable {
2339
2373
  col.title === sortedColumn.title);
2340
2374
  // Moves the sortedColumn into the correct position
2341
2375
  if (this.sortableColumnsMutateData) {
2376
+ this.kupColumnMove.emit({
2377
+ comp: this,
2378
+ id: this.rootElement.id,
2379
+ sourceColumn: this.data.columns[sortedColIndex],
2380
+ targetColumn: this.data.columns[receivingColIndex],
2381
+ });
2342
2382
  this.moveSortedColumns(this.data.columns, receivingColIndex, sortedColIndex);
2343
2383
  }
2344
2384
  }
@@ -2351,7 +2391,7 @@ export class KupDataTable {
2351
2391
  moveSortedColumns(columns, receivingColumnIndex, sortedColumnIndex) {
2352
2392
  const remove = columns.splice(sortedColumnIndex, 1);
2353
2393
  columns.splice(receivingColumnIndex, 0, remove[0]);
2354
- this.triggerColumnSortRerender = !this.triggerColumnSortRerender;
2394
+ this.refresh();
2355
2395
  }
2356
2396
  async defaultSortingFunction(columns, receivingColumnIndex, sortedColumnIndex, useNewObject = false) {
2357
2397
  const toSort = !useNewObject ? columns : [...columns];
@@ -2466,7 +2506,7 @@ export class KupDataTable {
2466
2506
  }
2467
2507
  }
2468
2508
  }
2469
- return (h("th", { ref: (el) => this.thRefs.push(el), "data-cell": column, "data-column": column.name, class: columnClass, style: thStyle },
2509
+ return (h("th", { ref: (el) => this.thRefs.push(el), "data-cell": column, "data-column": column.name, class: columnClass, style: thStyle, title: column.name },
2470
2510
  h("div", { class: "header-cell__content" },
2471
2511
  h("span", { class: "header-cell__title" }, this.applyLineBreaks(column.title)),
2472
2512
  h("span", { class: "header-cell__icons" },
@@ -3025,11 +3065,6 @@ export class KupDataTable {
3025
3065
  return h(FImage, Object.assign({}, props));
3026
3066
  });
3027
3067
  }
3028
- renderLoadMoreButton(isSlotted = true) {
3029
- 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": () => {
3030
- this.onLoadMoreClick();
3031
- } }));
3032
- }
3033
3068
  onCustomSettingsClick() {
3034
3069
  if (!this.openedCustomSettings) {
3035
3070
  this.openCustomSettings();
@@ -3064,10 +3099,14 @@ export class KupDataTable {
3064
3099
  }
3065
3100
  renderPaginator(top) {
3066
3101
  return (h("div", { class: "paginator-wrapper" },
3067
- h("div", { class: "paginator-tabs" },
3068
- !this.lazyLoadRows &&
3069
- this.rowsLength > this.rowsPerPage ? (h("kup-paginator", { id: top ? 'top-paginator' : 'bottom-paginator', max: this.rowsLength, perPage: this.rowsPerPage, selectedPerPage: this.currentRowsPerPage, currentPage: this.currentPage, "onkup-paginator-pagechanged": (e) => this.handlePageChanged(e), "onkup-paginator-rowsperpagechanged": (e) => this.handleRowsPerPageChanged(e) })) : null,
3070
- this.showLoadMore ? this.renderLoadMoreButton() : null)));
3102
+ h("div", { class: "paginator-tabs" }, !this.lazyLoadRows &&
3103
+ this.rowsLength > this.rowsPerPage ? (h(FPaginator, { id: top ? 'top-paginator' : 'bottom-paginator', currentPage: this.currentPage, max: this.rowsLength, perPage: this.currentRowsPerPage
3104
+ ? this.currentRowsPerPage
3105
+ : this.rowsPerPage, onLoadMore: this.showLoadMore
3106
+ ? () => {
3107
+ this.onLoadMoreClick();
3108
+ }
3109
+ : null, onNextPage: () => this.handlePageChange(this.currentPage + 1), onPrevPage: () => this.handlePageChange(this.currentPage - 1), onPageChange: (e) => this.handlePageChange(e.detail.value), onRowsChange: (e) => this.handleRowsPerPageChange(e.detail.value) })) : null)));
3071
3110
  }
3072
3111
  renderCustomizePanel() {
3073
3112
  let density = undefined;
@@ -3123,16 +3162,6 @@ export class KupDataTable {
3123
3162
  +this.kupManager.dynamicPosition.stop(this.dropareaRef);
3124
3163
  }
3125
3164
  }
3126
- handleColumnRemove(column2remove) {
3127
- // Get sorted column current position
3128
- this.getVisibleColumns();
3129
- const columnX = this.getVisibleColumns().find((col) => col.name === column2remove.name &&
3130
- col.title === column2remove.title);
3131
- if (columnX) {
3132
- columnX.visible = false;
3133
- this.triggerColumnSortRerender = !this.triggerColumnSortRerender;
3134
- }
3135
- }
3136
3165
  handleColumnGroup(column2group) {
3137
3166
  // Get sorted column current position
3138
3167
  this.getVisibleColumns();
@@ -3149,8 +3178,7 @@ export class KupDataTable {
3149
3178
  if (!found) {
3150
3179
  this.groups.push({ column: columnX.name, visible: true });
3151
3180
  this.groups = [...this.groups];
3152
- this.triggerColumnSortRerender =
3153
- !this.triggerColumnSortRerender;
3181
+ this.refresh();
3154
3182
  }
3155
3183
  }
3156
3184
  }
@@ -3373,8 +3401,8 @@ export class KupDataTable {
3373
3401
  const column = getColumnByName(this.getColumns(), group.column);
3374
3402
  if (column) {
3375
3403
  const a = {
3376
- label: column.title,
3377
- value: column.name,
3404
+ value: column.title,
3405
+ id: column.name,
3378
3406
  checked: true,
3379
3407
  };
3380
3408
  return a;
@@ -3588,12 +3616,12 @@ export class KupDataTable {
3588
3616
  },
3589
3617
  "data": {
3590
3618
  "type": "unknown",
3591
- "mutable": false,
3619
+ "mutable": true,
3592
3620
  "complexType": {
3593
- "original": "TableData",
3594
- "resolved": "TableData",
3621
+ "original": "KupDataTableDataset",
3622
+ "resolved": "KupDataTableDataset",
3595
3623
  "references": {
3596
- "TableData": {
3624
+ "KupDataTableDataset": {
3597
3625
  "location": "import",
3598
3626
  "path": "./kup-data-table-declarations"
3599
3627
  }
@@ -3631,7 +3659,7 @@ export class KupDataTable {
3631
3659
  },
3632
3660
  "dragEnabled": {
3633
3661
  "type": "boolean",
3634
- "mutable": false,
3662
+ "mutable": true,
3635
3663
  "complexType": {
3636
3664
  "original": "boolean",
3637
3665
  "resolved": "boolean",
@@ -3667,7 +3695,7 @@ export class KupDataTable {
3667
3695
  },
3668
3696
  "editableData": {
3669
3697
  "type": "boolean",
3670
- "mutable": false,
3698
+ "mutable": true,
3671
3699
  "complexType": {
3672
3700
  "original": "boolean",
3673
3701
  "resolved": "boolean",
@@ -3704,6 +3732,27 @@ export class KupDataTable {
3704
3732
  "reflect": false,
3705
3733
  "defaultValue": "null"
3706
3734
  },
3735
+ "enableColumnsFormula": {
3736
+ "type": "boolean",
3737
+ "mutable": false,
3738
+ "complexType": {
3739
+ "original": "boolean",
3740
+ "resolved": "boolean",
3741
+ "references": {}
3742
+ },
3743
+ "required": false,
3744
+ "optional": false,
3745
+ "docs": {
3746
+ "tags": [{
3747
+ "name": "default",
3748
+ "text": "true"
3749
+ }],
3750
+ "text": "Enables the choice to set formulas on columns by dragging them into different columns."
3751
+ },
3752
+ "attribute": "enable-columns-formula",
3753
+ "reflect": false,
3754
+ "defaultValue": "true"
3755
+ },
3707
3756
  "enableExtraColumns": {
3708
3757
  "type": "boolean",
3709
3758
  "mutable": false,
@@ -3722,6 +3771,27 @@ export class KupDataTable {
3722
3771
  "reflect": false,
3723
3772
  "defaultValue": "true"
3724
3773
  },
3774
+ "enableMergeColumns": {
3775
+ "type": "boolean",
3776
+ "mutable": false,
3777
+ "complexType": {
3778
+ "original": "boolean",
3779
+ "resolved": "boolean",
3780
+ "references": {}
3781
+ },
3782
+ "required": false,
3783
+ "optional": false,
3784
+ "docs": {
3785
+ "tags": [{
3786
+ "name": "default",
3787
+ "text": "true"
3788
+ }],
3789
+ "text": "Enables the merging of columns by dragging them into different columns."
3790
+ },
3791
+ "attribute": "enable-merge-columns",
3792
+ "reflect": false,
3793
+ "defaultValue": "true"
3794
+ },
3725
3795
  "enableSortableColumns": {
3726
3796
  "type": "boolean",
3727
3797
  "mutable": false,
@@ -4149,15 +4219,15 @@ export class KupDataTable {
4149
4219
  "type": "unknown",
4150
4220
  "mutable": false,
4151
4221
  "complexType": {
4152
- "original": "Array<RowAction>",
4153
- "resolved": "RowAction[]",
4222
+ "original": "Array<KupDataRowAction>",
4223
+ "resolved": "KupDataRowAction[]",
4154
4224
  "references": {
4155
4225
  "Array": {
4156
4226
  "location": "global"
4157
4227
  },
4158
- "RowAction": {
4228
+ "KupDataRowAction": {
4159
4229
  "location": "import",
4160
- "path": "./kup-data-table-declarations"
4230
+ "path": "../../managers/kup-data/kup-data-declarations"
4161
4231
  }
4162
4232
  }
4163
4233
  },
@@ -4583,7 +4653,7 @@ export class KupDataTable {
4583
4653
  },
4584
4654
  "transpose": {
4585
4655
  "type": "boolean",
4586
- "mutable": false,
4656
+ "mutable": true,
4587
4657
  "complexType": {
4588
4658
  "original": "boolean",
4589
4659
  "resolved": "boolean",
@@ -4610,8 +4680,7 @@ export class KupDataTable {
4610
4680
  "groupState": {},
4611
4681
  "openedTotalMenu": {},
4612
4682
  "openedCustomSettings": {},
4613
- "fontsize": {},
4614
- "triggerColumnSortRerender": {}
4683
+ "fontsize": {}
4615
4684
  }; }
4616
4685
  static get events() { return [{
4617
4686
  "method": "kupDidUnload",
@@ -4833,6 +4902,46 @@ export class KupDataTable {
4833
4902
  }
4834
4903
  }
4835
4904
  }
4905
+ }, {
4906
+ "method": "kupColumnMove",
4907
+ "name": "kup-datatable-columnmove",
4908
+ "bubbles": true,
4909
+ "cancelable": false,
4910
+ "composed": true,
4911
+ "docs": {
4912
+ "tags": [],
4913
+ "text": "Event fired when columns are moved (sorted)."
4914
+ },
4915
+ "complexType": {
4916
+ "original": "KupDatatableColumnMoveEventPayload",
4917
+ "resolved": "KupDatatableColumnMoveEventPayload",
4918
+ "references": {
4919
+ "KupDatatableColumnMoveEventPayload": {
4920
+ "location": "import",
4921
+ "path": "./kup-data-table-declarations"
4922
+ }
4923
+ }
4924
+ }
4925
+ }, {
4926
+ "method": "kupColumnRemove",
4927
+ "name": "kup-datatable-columnremove",
4928
+ "bubbles": true,
4929
+ "cancelable": false,
4930
+ "composed": true,
4931
+ "docs": {
4932
+ "tags": [],
4933
+ "text": "Event fired when columns are removed (set to hidden)."
4934
+ },
4935
+ "complexType": {
4936
+ "original": "KupDatatableColumnRemoveEventPayload",
4937
+ "resolved": "KupDatatableColumnRemoveEventPayload",
4938
+ "references": {
4939
+ "KupDatatableColumnRemoveEventPayload": {
4940
+ "location": "import",
4941
+ "path": "./kup-data-table-declarations"
4942
+ }
4943
+ }
4944
+ }
4836
4945
  }]; }
4837
4946
  static get methods() { return {
4838
4947
  "closeColumnMenu": {
@@ -4915,6 +5024,84 @@ export class KupDataTable {
4915
5024
  }]
4916
5025
  }
4917
5026
  },
5027
+ "hideColumn": {
5028
+ "complexType": {
5029
+ "signature": "(column: KupDataColumn) => Promise<void>",
5030
+ "parameters": [{
5031
+ "tags": [{
5032
+ "name": "param",
5033
+ "text": "column - Column to hide."
5034
+ }],
5035
+ "text": "- Column to hide."
5036
+ }],
5037
+ "references": {
5038
+ "Promise": {
5039
+ "location": "global"
5040
+ },
5041
+ "KupDataColumn": {
5042
+ "location": "import",
5043
+ "path": "../../managers/kup-data/kup-data-declarations"
5044
+ }
5045
+ },
5046
+ "return": "Promise<void>"
5047
+ },
5048
+ "docs": {
5049
+ "text": "Hides the given column.",
5050
+ "tags": [{
5051
+ "name": "param",
5052
+ "text": "column - Column to hide."
5053
+ }]
5054
+ }
5055
+ },
5056
+ "newColumn": {
5057
+ "complexType": {
5058
+ "signature": "(type: KupDataNewColumnTypes, options: KupDataNewColumnOptions) => Promise<string | KupDataColumn>",
5059
+ "parameters": [{
5060
+ "tags": [{
5061
+ "name": "param",
5062
+ "text": "type - Type of the column creation."
5063
+ }],
5064
+ "text": "- Type of the column creation."
5065
+ }, {
5066
+ "tags": [{
5067
+ "name": "param",
5068
+ "text": "options - Options of the creation."
5069
+ }],
5070
+ "text": "- Options of the creation."
5071
+ }],
5072
+ "references": {
5073
+ "Promise": {
5074
+ "location": "global"
5075
+ },
5076
+ "KupDataColumn": {
5077
+ "location": "import",
5078
+ "path": "../../managers/kup-data/kup-data-declarations"
5079
+ },
5080
+ "KupDataNewColumnTypes": {
5081
+ "location": "import",
5082
+ "path": "../../managers/kup-data/kup-data-declarations"
5083
+ },
5084
+ "KupDataNewColumnOptions": {
5085
+ "location": "import",
5086
+ "path": "../../managers/kup-data/kup-data-declarations"
5087
+ }
5088
+ },
5089
+ "return": "Promise<string | KupDataColumn>"
5090
+ },
5091
+ "docs": {
5092
+ "text": "Invokes the KupData API for column creation, then refreshes the component in case no errors were catched.",
5093
+ "tags": [{
5094
+ "name": "param",
5095
+ "text": "type - Type of the column creation."
5096
+ }, {
5097
+ "name": "param",
5098
+ "text": "options - Options of the creation."
5099
+ }, {
5100
+ "name": "returns",
5101
+ "text": "Returns the new column created or a string containing the error message if something went wrong."
5102
+ }]
5103
+ }
5104
+ },
4918
5105
  "openColumnMenu": {
4919
5106
  "complexType": {
4920
5107
  "signature": "(column: string) => Promise<void>",
@@ -5082,7 +5269,7 @@ export class KupDataTable {
5082
5269
  },
5083
5270
  "getInternalState": {
5084
5271
  "complexType": {
5085
- "signature": "() => Promise<{ groups: GroupObject[]; filters: GenericFilter; data: TableData; }>",
5272
+ "signature": "() => Promise<{ groups: GroupObject[]; filters: GenericFilter; data: KupDataTableDataset; }>",
5086
5273
  "parameters": [],
5087
5274
  "references": {
5088
5275
  "Promise": {
@@ -5096,12 +5283,12 @@ export class KupDataTable {
5096
5283
  "location": "import",
5097
5284
  "path": "../../utils/filters/filters-declarations"
5098
5285
  },
5099
- "TableData": {
5286
+ "KupDataTableDataset": {
5100
5287
  "location": "import",
5101
5288
  "path": "./kup-data-table-declarations"
5102
5289
  }
5103
5290
  },
5104
- "return": "Promise<{ groups: GroupObject[]; filters: GenericFilter; data: TableData; }>"
5291
+ "return": "Promise<{ groups: GroupObject[]; filters: GenericFilter; data: KupDataTableDataset; }>"
5105
5292
  },
5106
5293
  "docs": {
5107
5294
  "text": "",
@@ -5110,7 +5297,7 @@ export class KupDataTable {
5110
5297
  },
5111
5298
  "defaultSortingFunction": {
5112
5299
  "complexType": {
5113
- "signature": "(columns: Column[], receivingColumnIndex: number, sortedColumnIndex: number, useNewObject?: boolean) => Promise<Column[]>",
5300
+ "signature": "(columns: KupDataColumn[], receivingColumnIndex: number, sortedColumnIndex: number, useNewObject?: boolean) => Promise<KupDataColumn[]>",
5114
5301
  "parameters": [{
5115
5302
  "tags": [],
5116
5303
  "text": ""
@@ -5128,12 +5315,12 @@ export class KupDataTable {
5128
5315
  "Promise": {
5129
5316
  "location": "global"
5130
5317
  },
5131
- "Column": {
5318
+ "KupDataColumn": {
5132
5319
  "location": "import",
5133
- "path": "./kup-data-table-declarations"
5320
+ "path": "../../managers/kup-data/kup-data-declarations"
5134
5321
  }
5135
5322
  },
5136
- "return": "Promise<Column[]>"
5323
+ "return": "Promise<KupDataColumn[]>"
5137
5324
  },
5138
5325
  "docs": {
5139
5326
  "text": "",