@sme.up/ketchup 9.1.0 → 9.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (720) hide show
  1. package/dist/cjs/bar.helpers-f46a5a83.js +372 -0
  2. package/dist/cjs/f-button-4caf541a.js +105 -0
  3. package/dist/cjs/{f-button-declarations-3fd791a8.js → f-button-declarations-51ef6d9a.js} +5 -5
  4. package/dist/cjs/f-cell-979c26ea.js +670 -0
  5. package/dist/cjs/f-checkbox-41864e53.js +29 -0
  6. package/dist/cjs/f-chip-8957940b.js +133 -0
  7. package/dist/cjs/f-image-e16fe10d.js +115 -0
  8. package/dist/cjs/f-paginator-utils-f2dd0322.js +1577 -0
  9. package/dist/cjs/f-text-field-2fac8078.js +216 -0
  10. package/dist/cjs/{f-text-field-mdc-4fda9705.js → f-text-field-mdc-08a06162.js} +19 -19
  11. package/dist/cjs/{index-4b3a5567.js → index-8f2f4159.js} +134 -27
  12. package/dist/cjs/index.cjs.js +12 -0
  13. package/dist/cjs/ketchup.cjs.js +3 -3
  14. package/dist/cjs/kup-accordion.cjs.entry.js +182 -181
  15. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +14564 -14563
  16. package/dist/cjs/kup-box.cjs.entry.js +1231 -1230
  17. package/dist/cjs/kup-calendar.cjs.entry.js +5413 -5379
  18. package/dist/cjs/kup-card-list.cjs.entry.js +233 -212
  19. package/dist/cjs/kup-cell.cjs.entry.js +153 -152
  20. package/dist/cjs/kup-custom-task-list-header_4.cjs.entry.js +1317 -0
  21. package/dist/cjs/kup-dashboard.cjs.entry.js +369 -368
  22. package/dist/cjs/kup-dates-0e59b05d.js +782 -0
  23. package/dist/cjs/kup-drawer.cjs.entry.js +122 -121
  24. package/dist/cjs/kup-echart.cjs.entry.js +1192 -1191
  25. package/dist/cjs/kup-family-tree.cjs.entry.js +400 -399
  26. package/dist/cjs/kup-gantt_10.cjs.entry.js +1076 -0
  27. package/dist/cjs/kup-grid.cjs.entry.js +82 -81
  28. package/dist/cjs/kup-iframe.cjs.entry.js +80 -79
  29. package/dist/cjs/kup-image-list.cjs.entry.js +224 -223
  30. package/dist/cjs/kup-lazy.cjs.entry.js +162 -161
  31. package/dist/cjs/kup-magic-box.cjs.entry.js +270 -269
  32. package/dist/cjs/{kup-manager-cb73c128.js → kup-manager-c63f4fb9.js} +5772 -6517
  33. package/dist/cjs/kup-nav-bar.cjs.entry.js +110 -109
  34. package/dist/cjs/kup-numeric-picker.cjs.entry.js +352 -351
  35. package/dist/cjs/kup-photo-frame.cjs.entry.js +126 -125
  36. package/dist/cjs/kup-planner-declarations-d3dec885.js +93 -0
  37. package/dist/cjs/kup-planner-renderer-helper-c2394940.js +410 -0
  38. package/dist/cjs/kup-planner-renderer.cjs.entry.js +278 -0
  39. package/dist/cjs/kup-planner-time-formatter-a74e70f0.js +93 -0
  40. package/dist/cjs/kup-planner.cjs.entry.js +718 -13111
  41. package/dist/cjs/kup-probe.cjs.entry.js +228 -227
  42. package/dist/cjs/kup-qlik.cjs.entry.js +126 -125
  43. package/dist/cjs/kup-snackbar.cjs.entry.js +102 -101
  44. package/dist/cjs/loader.cjs.js +2 -2
  45. package/dist/collection/assets/card-list.js +12 -9
  46. package/dist/collection/assets/index.js +16 -0
  47. package/dist/collection/assets/planner-example-1.js +6337 -0
  48. package/dist/collection/assets/planner-example-2.js +5650 -0
  49. package/dist/collection/assets/planner-example-3.js +6548 -0
  50. package/dist/collection/assets/planner-example-4.js +28473 -0
  51. package/dist/collection/assets/planner.js +3255 -4900
  52. package/dist/collection/collection-manifest.json +17 -2
  53. package/dist/collection/components/kup-accordion/kup-accordion-declarations.js +3 -3
  54. package/dist/collection/components/kup-accordion/kup-accordion.js +423 -423
  55. package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +14 -14
  56. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +882 -882
  57. package/dist/collection/components/kup-badge/kup-badge-declarations.js +3 -3
  58. package/dist/collection/components/kup-badge/kup-badge.js +262 -262
  59. package/dist/collection/components/kup-box/kup-box-declarations.js +26 -26
  60. package/dist/collection/components/kup-box/kup-box-state.js +13 -13
  61. package/dist/collection/components/kup-box/kup-box.js +2068 -2068
  62. package/dist/collection/components/kup-button/kup-button-declarations.js +11 -11
  63. package/dist/collection/components/kup-button/kup-button.js +560 -560
  64. package/dist/collection/components/kup-button-list/kup-button-list-declarations.js +6 -6
  65. package/dist/collection/components/kup-button-list/kup-button-list.e2e.js +141 -141
  66. package/dist/collection/components/kup-button-list/kup-button-list.js +497 -497
  67. package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +17 -17
  68. package/dist/collection/components/kup-calendar/kup-calendar.js +681 -681
  69. package/dist/collection/components/kup-card/box/kup-card-box.js +161 -161
  70. package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +6 -6
  71. package/dist/collection/components/kup-card/built-in/kup-card-calendar.js +324 -324
  72. package/dist/collection/components/kup-card/built-in/kup-card-clock.js +250 -250
  73. package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +141 -141
  74. package/dist/collection/components/kup-card/built-in/kup-card-message-box.js +3 -3
  75. package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +98 -98
  76. package/dist/collection/components/kup-card/collapsible/kup-card-collapsible.js +44 -44
  77. package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +135 -135
  78. package/dist/collection/components/kup-card/free/kup-card-free.js +6 -6
  79. package/dist/collection/components/kup-card/kup-card-declarations.js +53 -53
  80. package/dist/collection/components/kup-card/kup-card-helper.js +155 -155
  81. package/dist/collection/components/kup-card/kup-card.js +767 -767
  82. package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +174 -174
  83. package/dist/collection/components/kup-card/standard/kup-card-standard.js +474 -474
  84. package/dist/collection/components/kup-card-list/kup-card-list-declarations.js +16 -6
  85. package/dist/collection/components/kup-card-list/kup-card-list.js +676 -456
  86. package/dist/collection/components/kup-cell/kup-cell-declarations.js +4 -4
  87. package/dist/collection/components/kup-cell/kup-cell.js +382 -382
  88. package/dist/collection/components/kup-chart/kup-chart-builder.js +80 -80
  89. package/dist/collection/components/kup-chart/kup-chart-declarations.js +36 -36
  90. package/dist/collection/components/kup-chart/kup-chart.js +1043 -1043
  91. package/dist/collection/components/kup-checkbox/kup-checkbox-declarations.js +6 -6
  92. package/dist/collection/components/kup-checkbox/kup-checkbox.js +417 -417
  93. package/dist/collection/components/kup-chip/kup-chip-declarations.js +5 -5
  94. package/dist/collection/components/kup-chip/kup-chip.js +538 -538
  95. package/dist/collection/components/kup-color-picker/kup-color-picker-declarations.js +5 -5
  96. package/dist/collection/components/kup-color-picker/kup-color-picker.js +511 -511
  97. package/dist/collection/components/kup-combobox/kup-combobox-declarations.js +8 -8
  98. package/dist/collection/components/kup-combobox/kup-combobox.js +796 -796
  99. package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +3 -3
  100. package/dist/collection/components/kup-dashboard/kup-dashboard.js +562 -562
  101. package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +95 -95
  102. package/dist/collection/components/kup-data-table/kup-data-table-helper.js +729 -729
  103. package/dist/collection/components/kup-data-table/kup-data-table-state.js +33 -33
  104. package/dist/collection/components/kup-data-table/kup-data-table.js +5398 -5398
  105. package/dist/collection/components/kup-date-picker/kup-date-picker-declarations.js +8 -8
  106. package/dist/collection/components/kup-date-picker/kup-date-picker.js +796 -796
  107. package/dist/collection/components/kup-dialog/kup-dialog-declarations.js +7 -7
  108. package/dist/collection/components/kup-dialog/kup-dialog.js +451 -451
  109. package/dist/collection/components/kup-drawer/kup-drawer-declarations.js +2 -2
  110. package/dist/collection/components/kup-drawer/kup-drawer.e2e.js +6 -6
  111. package/dist/collection/components/kup-drawer/kup-drawer.js +374 -374
  112. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button-declarations.js +11 -11
  113. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +776 -776
  114. package/dist/collection/components/kup-echart/kup-echart-declarations.js +40 -40
  115. package/dist/collection/components/kup-echart/kup-echart.js +1606 -1606
  116. package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +8 -8
  117. package/dist/collection/components/kup-family-tree/kup-family-tree.js +789 -789
  118. package/dist/collection/components/kup-form/kup-form-declarations.js +16 -16
  119. package/dist/collection/components/kup-form/kup-form.js +694 -694
  120. package/dist/collection/components/kup-gauge/kup-gauge-declarations.js +19 -19
  121. package/dist/collection/components/kup-gauge/kup-gauge.js +730 -730
  122. package/dist/collection/components/kup-grid/kup-grid-declarations.js +3 -3
  123. package/dist/collection/components/kup-grid/kup-grid.js +238 -238
  124. package/dist/collection/components/kup-iframe/kup-iframe-declarations.js +3 -3
  125. package/dist/collection/components/kup-iframe/kup-iframe.js +268 -268
  126. package/dist/collection/components/kup-image/canvas/kup-image-canvas-declarations.js +167 -167
  127. package/dist/collection/components/kup-image/canvas/kup-image-canvas-helper.js +16 -16
  128. package/dist/collection/components/kup-image/canvas/kup-image-canvas.js +221 -221
  129. package/dist/collection/components/kup-image/kup-image-declarations.js +9 -9
  130. package/dist/collection/components/kup-image/kup-image.js +471 -471
  131. package/dist/collection/components/kup-image-list/kup-image-list-declarations.js +3 -3
  132. package/dist/collection/components/kup-image-list/kup-image-list-state.js +7 -7
  133. package/dist/collection/components/kup-image-list/kup-image-list.js +502 -502
  134. package/dist/collection/components/kup-lazy/kup-lazy-declarations.js +7 -7
  135. package/dist/collection/components/kup-lazy/kup-lazy.js +417 -417
  136. package/dist/collection/components/kup-list/kup-list-declarations.js +18 -18
  137. package/dist/collection/components/kup-list/kup-list-helper.js +105 -105
  138. package/dist/collection/components/kup-list/kup-list.js +914 -914
  139. package/dist/collection/components/kup-magic-box/kup-magic-box-declarations.js +10 -10
  140. package/dist/collection/components/kup-magic-box/kup-magic-box.js +405 -405
  141. package/dist/collection/components/kup-nav-bar/kup-nav-bar-declarations.js +7 -7
  142. package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +304 -304
  143. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +9 -9
  144. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +847 -847
  145. package/dist/collection/components/kup-photo-frame/kup-photo-frame-declarations.js +3 -3
  146. package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +359 -359
  147. package/dist/collection/components/kup-planner/kup-planner-declarations.js +69 -66
  148. package/dist/collection/components/kup-planner/kup-planner-helper.js +39 -39
  149. package/dist/collection/components/kup-planner/kup-planner-state.js +14 -14
  150. package/dist/collection/components/kup-planner/kup-planner.css +4 -482
  151. package/dist/collection/components/kup-planner/kup-planner.js +1777 -1675
  152. package/dist/collection/components/kup-planner/utils/custom-task-list-header.js +117 -0
  153. package/dist/collection/components/kup-planner/utils/custom-task-list-header.module.css +79 -0
  154. package/dist/collection/components/kup-planner/utils/custom-task-list-table.js +280 -0
  155. package/dist/collection/components/kup-planner/utils/custom-tool-tip.js +5 -0
  156. package/dist/collection/components/kup-planner/utils/gantt-table.module.css +88 -0
  157. package/dist/collection/components/kup-planner/utils/helpers/bar.helpers.js +328 -0
  158. package/dist/collection/components/kup-planner/utils/helpers/other.helpers.js +48 -0
  159. package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.css +40 -0
  160. package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.js +2302 -0
  161. package/dist/collection/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.css +31 -0
  162. package/dist/collection/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.js +466 -0
  163. package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.css +60 -0
  164. package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.js +1186 -0
  165. package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.css +36 -0
  166. package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.js +177 -0
  167. package/dist/collection/components/kup-planner/utils/kup-planner-adapted-types.js +1 -0
  168. package/dist/collection/components/kup-planner/utils/kup-planner-renderer-helper.js +396 -0
  169. package/dist/collection/components/kup-planner/utils/kup-planner-renderer.js +321 -0
  170. package/dist/collection/components/kup-planner/utils/kup-planner-time-formatter.js +87 -0
  171. package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.css +30 -0
  172. package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.js +49 -0
  173. package/dist/collection/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.js +215 -0
  174. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-header.js +112 -0
  175. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-table.js +226 -0
  176. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list.css +67 -0
  177. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list.js +638 -0
  178. package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-standard-tooltip.js +82 -0
  179. package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-tooltip.css +30 -0
  180. package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-tooltip.js +362 -0
  181. package/dist/collection/components/kup-planner/utils/kup-vertical-scroll/kup-vertical-scroll.css +31 -0
  182. package/dist/collection/components/kup-planner/utils/kup-vertical-scroll/kup-vertical-scroll.js +170 -0
  183. package/dist/collection/components/kup-probe/kup-probe.js +335 -335
  184. package/dist/collection/components/kup-progress-bar/kup-progress-bar-declarations.js +7 -7
  185. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +346 -346
  186. package/dist/collection/components/kup-qlik/kup-qlik.js +311 -311
  187. package/dist/collection/components/kup-radio/kup-radio-declarations.js +5 -5
  188. package/dist/collection/components/kup-radio/kup-radio.js +392 -392
  189. package/dist/collection/components/kup-rating/kup-rating-declarations.js +4 -4
  190. package/dist/collection/components/kup-rating/kup-rating.js +296 -296
  191. package/dist/collection/components/kup-snackbar/kup-snackbar-declarations.js +5 -5
  192. package/dist/collection/components/kup-snackbar/kup-snackbar.js +380 -380
  193. package/dist/collection/components/kup-spinner/kup-spinner-declarations.js +8 -8
  194. package/dist/collection/components/kup-spinner/kup-spinner.js +449 -449
  195. package/dist/collection/components/kup-state/mock-store.js +10 -10
  196. package/dist/collection/components/kup-switch/kup-switch-declarations.js +5 -5
  197. package/dist/collection/components/kup-switch/kup-switch.js +387 -387
  198. package/dist/collection/components/kup-tab-bar/kup-tab-bar-declarations.js +3 -3
  199. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +423 -423
  200. package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +30 -30
  201. package/dist/collection/components/kup-text-field/kup-text-field.js +1220 -1220
  202. package/dist/collection/components/kup-time-picker/kup-time-picker-declarations.js +7 -7
  203. package/dist/collection/components/kup-time-picker/kup-time-picker.js +914 -914
  204. package/dist/collection/components/kup-tree/kup-tree-declarations.js +28 -28
  205. package/dist/collection/components/kup-tree/kup-tree-faker.js +233 -233
  206. package/dist/collection/components/kup-tree/kup-tree-state.js +13 -13
  207. package/dist/collection/components/kup-tree/kup-tree.js +2424 -2424
  208. package/dist/collection/f-components/f-button/f-button-declarations.js +5 -5
  209. package/dist/collection/f-components/f-button/f-button.js +76 -76
  210. package/dist/collection/f-components/f-cell/f-cell-declarations.js +125 -125
  211. package/dist/collection/f-components/f-cell/f-cell.js +407 -407
  212. package/dist/collection/f-components/f-checkbox/f-checkbox.js +10 -10
  213. package/dist/collection/f-components/f-chip/f-chip-declarations.js +4 -4
  214. package/dist/collection/f-components/f-chip/f-chip.js +82 -82
  215. package/dist/collection/f-components/f-image/f-image-declarations.js +1 -1
  216. package/dist/collection/f-components/f-image/f-image.js +79 -79
  217. package/dist/collection/f-components/f-paginator/f-paginator-declarations.js +2 -2
  218. package/dist/collection/f-components/f-paginator/f-paginator-utils.js +21 -21
  219. package/dist/collection/f-components/f-paginator/f-paginator.js +65 -65
  220. package/dist/collection/f-components/f-progress-bar/f-progress-bar.js +70 -70
  221. package/dist/collection/f-components/f-radio/f-radio.js +21 -21
  222. package/dist/collection/f-components/f-rating/f-rating.js +17 -17
  223. package/dist/collection/f-components/f-switch/f-switch.js +6 -6
  224. package/dist/collection/f-components/f-text-field/f-text-field-mdc.js +19 -19
  225. package/dist/collection/f-components/f-text-field/f-text-field.js +165 -165
  226. package/dist/collection/index.js +5 -0
  227. package/dist/collection/managers/kup-data/kup-data-cell-helper.js +47 -47
  228. package/dist/collection/managers/kup-data/kup-data-column-helper.js +220 -220
  229. package/dist/collection/managers/kup-data/kup-data-declarations.js +4 -4
  230. package/dist/collection/managers/kup-data/kup-data-node-helper.js +107 -107
  231. package/dist/collection/managers/kup-data/kup-data-row-helper.js +11 -11
  232. package/dist/collection/managers/kup-data/kup-data.js +468 -468
  233. package/dist/collection/managers/kup-dates/kup-dates-declarations.js +19 -19
  234. package/dist/collection/managers/kup-dates/kup-dates.js +637 -605
  235. package/dist/collection/managers/kup-debug/kup-debug-declarations.js +8 -8
  236. package/dist/collection/managers/kup-debug/kup-debug.js +626 -626
  237. package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position-declarations.js +9 -9
  238. package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +232 -232
  239. package/dist/collection/managers/kup-interact/kup-interact-declarations.js +11 -11
  240. package/dist/collection/managers/kup-interact/kup-interact.js +374 -374
  241. package/dist/collection/managers/kup-language/kup-language-declarations.js +127 -127
  242. package/dist/collection/managers/kup-language/kup-language.js +132 -132
  243. package/dist/collection/managers/kup-manager/kup-manager.js +257 -257
  244. package/dist/collection/managers/kup-math/kup-math-declarations.js +7 -7
  245. package/dist/collection/managers/kup-math/kup-math-helper.js +19 -19
  246. package/dist/collection/managers/kup-math/kup-math.js +374 -374
  247. package/dist/collection/managers/kup-objects/kup-objects.js +379 -379
  248. package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +4 -4
  249. package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover.js +301 -301
  250. package/dist/collection/managers/kup-search/kup-search.js +65 -65
  251. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +134 -134
  252. package/dist/collection/managers/kup-theme/kup-theme.js +696 -696
  253. package/dist/collection/managers/kup-toolbar/kup-toolbar-declarations.js +3 -3
  254. package/dist/collection/managers/kup-toolbar/kup-toolbar.js +93 -93
  255. package/dist/collection/managers/kup-tooltip/kup-tooltip.js +198 -198
  256. package/dist/collection/types/GenericTypes.js +47 -47
  257. package/dist/collection/utils/cell-utils.js +115 -115
  258. package/dist/collection/utils/filters/filters-column-menu.js +339 -339
  259. package/dist/collection/utils/filters/filters-declarations.js +4 -4
  260. package/dist/collection/utils/filters/filters-rows.js +215 -215
  261. package/dist/collection/utils/filters/filters-tree-items.js +96 -96
  262. package/dist/collection/utils/filters/filters.js +257 -257
  263. package/dist/collection/utils/kup-column-menu/kup-column-menu-declarations.js +14 -14
  264. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +710 -710
  265. package/dist/collection/utils/utils.js +37 -42
  266. package/dist/components/custom-task-list-header.js +44 -0
  267. package/dist/components/custom-task-list-table.js +121 -0
  268. package/dist/components/index.js +8 -0
  269. package/dist/components/kup-accordion.d.ts +2 -2
  270. package/dist/components/kup-accordion.js +333 -332
  271. package/dist/components/kup-autocomplete.d.ts +2 -2
  272. package/dist/components/kup-autocomplete.js +1 -1
  273. package/dist/components/kup-autocomplete2.js +26006 -44605
  274. package/dist/components/kup-badge.d.ts +2 -2
  275. package/dist/components/kup-badge.js +1 -1
  276. package/dist/components/kup-box.d.ts +2 -2
  277. package/dist/components/kup-box2.js +1417 -1416
  278. package/dist/components/kup-button-list.d.ts +2 -2
  279. package/dist/components/kup-button-list.js +1 -1
  280. package/dist/components/kup-button.d.ts +2 -2
  281. package/dist/components/kup-button.js +1 -1
  282. package/dist/components/kup-calendar.d.ts +2 -2
  283. package/dist/components/kup-calendar.js +5547 -5512
  284. package/dist/components/kup-card-list.d.ts +2 -2
  285. package/dist/components/kup-card-list.js +402 -371
  286. package/dist/components/kup-card.d.ts +2 -2
  287. package/dist/components/kup-card.js +1 -1
  288. package/dist/components/kup-cell.d.ts +2 -2
  289. package/dist/components/kup-cell.js +304 -303
  290. package/dist/components/kup-chart.d.ts +2 -2
  291. package/dist/components/kup-chart.js +1 -1
  292. package/dist/components/kup-checkbox.d.ts +2 -2
  293. package/dist/components/kup-checkbox.js +1 -1
  294. package/dist/components/kup-chip.d.ts +2 -2
  295. package/dist/components/kup-chip.js +1 -1
  296. package/dist/components/kup-color-picker.d.ts +2 -2
  297. package/dist/components/kup-color-picker.js +1 -1
  298. package/dist/components/kup-combobox.d.ts +2 -2
  299. package/dist/components/kup-combobox.js +1 -1
  300. package/dist/components/kup-custom-task-list-header.d.ts +11 -0
  301. package/dist/components/kup-custom-task-list-header.js +6 -0
  302. package/dist/components/kup-custom-task-list-table.d.ts +11 -0
  303. package/dist/components/kup-custom-task-list-table.js +6 -0
  304. package/dist/components/kup-dashboard.d.ts +2 -2
  305. package/dist/components/kup-dashboard.js +521 -520
  306. package/dist/components/kup-data-table.d.ts +2 -2
  307. package/dist/components/kup-data-table.js +1 -1
  308. package/dist/components/kup-date-picker.d.ts +2 -2
  309. package/dist/components/kup-date-picker.js +1 -1
  310. package/dist/components/kup-dates.js +777 -0
  311. package/dist/components/kup-dialog.d.ts +2 -2
  312. package/dist/components/kup-dialog.js +1 -1
  313. package/dist/components/kup-drawer.d.ts +2 -2
  314. package/dist/components/kup-drawer.js +280 -279
  315. package/dist/components/kup-dropdown-button.d.ts +2 -2
  316. package/dist/components/kup-dropdown-button.js +1 -1
  317. package/dist/components/kup-echart.d.ts +2 -2
  318. package/dist/components/kup-echart2.js +1359 -1358
  319. package/dist/components/kup-family-tree.d.ts +2 -2
  320. package/dist/components/kup-family-tree.js +565 -564
  321. package/dist/components/kup-form.d.ts +2 -2
  322. package/dist/components/kup-form.js +1 -1
  323. package/dist/components/kup-gantt-calendar.d.ts +11 -0
  324. package/dist/components/kup-gantt-calendar.js +6 -0
  325. package/dist/components/kup-gantt-calendar2.js +323 -0
  326. package/dist/components/kup-gantt.d.ts +11 -0
  327. package/dist/components/kup-gantt.js +6 -0
  328. package/dist/components/kup-gantt2.js +822 -0
  329. package/dist/components/kup-gauge.d.ts +2 -2
  330. package/dist/components/kup-gauge.js +1 -1
  331. package/dist/components/kup-grid-renderer.d.ts +11 -0
  332. package/dist/components/kup-grid-renderer.js +6 -0
  333. package/dist/components/kup-grid-renderer2.js +1416 -0
  334. package/dist/components/kup-grid.d.ts +2 -2
  335. package/dist/components/kup-grid2.js +237 -236
  336. package/dist/components/kup-horizontal-scroll.d.ts +11 -0
  337. package/dist/components/kup-horizontal-scroll.js +6 -0
  338. package/dist/components/kup-horizontal-scroll2.js +77 -0
  339. package/dist/components/kup-iframe.d.ts +2 -2
  340. package/dist/components/kup-iframe.js +235 -234
  341. package/dist/components/kup-image-list.d.ts +2 -2
  342. package/dist/components/kup-image-list.js +379 -378
  343. package/dist/components/kup-image.d.ts +2 -2
  344. package/dist/components/kup-image.js +1 -1
  345. package/dist/components/kup-lazy.d.ts +2 -2
  346. package/dist/components/kup-lazy.js +321 -320
  347. package/dist/components/kup-list.d.ts +2 -2
  348. package/dist/components/kup-list.js +1 -1
  349. package/dist/components/kup-magic-box.d.ts +2 -2
  350. package/dist/components/kup-magic-box.js +433 -432
  351. package/dist/components/kup-manager.js +17861 -0
  352. package/dist/components/kup-nav-bar.d.ts +2 -2
  353. package/dist/components/kup-nav-bar.js +265 -264
  354. package/dist/components/kup-numeric-picker.d.ts +2 -2
  355. package/dist/components/kup-numeric-picker.js +515 -514
  356. package/dist/components/kup-photo-frame.d.ts +2 -2
  357. package/dist/components/kup-photo-frame.js +283 -282
  358. package/dist/components/kup-planner-renderer-helper.js +399 -0
  359. package/dist/components/kup-planner-renderer.d.ts +11 -0
  360. package/dist/components/kup-planner-renderer.js +6 -0
  361. package/dist/components/kup-planner-renderer2.js +390 -0
  362. package/dist/components/kup-planner.d.ts +2 -2
  363. package/dist/components/kup-planner.js +1005 -13306
  364. package/dist/components/kup-probe.d.ts +2 -2
  365. package/dist/components/kup-probe.js +381 -380
  366. package/dist/components/kup-progress-bar.d.ts +2 -2
  367. package/dist/components/kup-progress-bar.js +1 -1
  368. package/dist/components/kup-qlik.d.ts +2 -2
  369. package/dist/components/kup-qlik.js +284 -283
  370. package/dist/components/kup-radio.d.ts +2 -2
  371. package/dist/components/kup-radio.js +1 -1
  372. package/dist/components/kup-rating.d.ts +2 -2
  373. package/dist/components/kup-rating.js +1 -1
  374. package/dist/components/kup-snackbar.d.ts +2 -2
  375. package/dist/components/kup-snackbar.js +259 -258
  376. package/dist/components/kup-spinner.d.ts +2 -2
  377. package/dist/components/kup-spinner.js +1 -1
  378. package/dist/components/kup-standard-tooltip.d.ts +11 -0
  379. package/dist/components/kup-standard-tooltip.js +6 -0
  380. package/dist/components/kup-standard-tooltip2.js +37 -0
  381. package/dist/components/kup-switch.d.ts +2 -2
  382. package/dist/components/kup-switch.js +1 -1
  383. package/dist/components/kup-switcher.d.ts +11 -0
  384. package/dist/components/kup-switcher.js +6 -0
  385. package/dist/components/kup-switcher2.js +36 -0
  386. package/dist/components/kup-tab-bar.d.ts +2 -2
  387. package/dist/components/kup-tab-bar.js +1 -1
  388. package/dist/components/kup-task-gantt.d.ts +11 -0
  389. package/dist/components/kup-task-gantt.js +6 -0
  390. package/dist/components/kup-task-gantt2.js +91 -0
  391. package/dist/components/kup-task-list-header.d.ts +11 -0
  392. package/dist/components/kup-task-list-header.js +6 -0
  393. package/dist/components/kup-task-list-header2.js +55 -0
  394. package/dist/components/kup-task-list-table.d.ts +11 -0
  395. package/dist/components/kup-task-list-table.js +6 -0
  396. package/dist/components/kup-task-list-table2.js +79 -0
  397. package/dist/components/kup-task-list.d.ts +11 -0
  398. package/dist/components/kup-task-list.js +6 -0
  399. package/dist/components/kup-task-list2.js +260 -0
  400. package/dist/components/kup-text-field.d.ts +2 -2
  401. package/dist/components/kup-text-field.js +1 -1
  402. package/dist/components/kup-time-picker.d.ts +2 -2
  403. package/dist/components/kup-time-picker.js +1 -1
  404. package/dist/components/kup-tooltip.d.ts +11 -0
  405. package/dist/components/kup-tooltip.js +6 -0
  406. package/dist/components/kup-tooltip2.js +127 -0
  407. package/dist/components/kup-tree.d.ts +2 -2
  408. package/dist/components/kup-tree.js +1 -1
  409. package/dist/components/kup-vertical-scroll.d.ts +11 -0
  410. package/dist/components/kup-vertical-scroll.js +6 -0
  411. package/dist/components/kup-vertical-scroll2.js +77 -0
  412. package/dist/esm/bar.helpers-0898efb9.js +363 -0
  413. package/dist/esm/f-button-5ccc2e50.js +103 -0
  414. package/dist/esm/{f-button-declarations-8a009df1.js → f-button-declarations-9bdc6f26.js} +5 -5
  415. package/dist/esm/f-cell-6f4290b2.js +664 -0
  416. package/dist/esm/f-checkbox-43481de2.js +27 -0
  417. package/dist/esm/f-chip-465aa432.js +131 -0
  418. package/dist/esm/f-image-c5063342.js +113 -0
  419. package/dist/esm/f-paginator-utils-6903534b.js +1564 -0
  420. package/dist/esm/f-text-field-28b2b26d.js +214 -0
  421. package/dist/esm/{f-text-field-mdc-1143cf21.js → f-text-field-mdc-c88bf688.js} +19 -19
  422. package/dist/esm/{index-c161a33e.js → index-59f83f91.js} +134 -28
  423. package/dist/esm/index.js +9 -0
  424. package/dist/esm/ketchup.js +4 -4
  425. package/dist/esm/kup-accordion.entry.js +182 -181
  426. package/dist/esm/kup-autocomplete_27.entry.js +14564 -14563
  427. package/dist/esm/kup-box.entry.js +1231 -1230
  428. package/dist/esm/kup-calendar.entry.js +5413 -5379
  429. package/dist/esm/kup-card-list.entry.js +233 -212
  430. package/dist/esm/kup-cell.entry.js +153 -152
  431. package/dist/esm/kup-custom-task-list-header_4.entry.js +1310 -0
  432. package/dist/esm/kup-dashboard.entry.js +369 -368
  433. package/dist/esm/kup-dates-15f89ea2.js +777 -0
  434. package/dist/esm/kup-drawer.entry.js +122 -121
  435. package/dist/esm/kup-echart.entry.js +1192 -1191
  436. package/dist/esm/kup-family-tree.entry.js +400 -399
  437. package/dist/esm/kup-gantt_10.entry.js +1063 -0
  438. package/dist/esm/kup-grid.entry.js +82 -81
  439. package/dist/esm/kup-iframe.entry.js +80 -79
  440. package/dist/esm/kup-image-list.entry.js +224 -223
  441. package/dist/esm/kup-lazy.entry.js +162 -161
  442. package/dist/esm/kup-magic-box.entry.js +270 -269
  443. package/dist/esm/{kup-manager-94b3d177.js → kup-manager-bfea4e6f.js} +5750 -6493
  444. package/dist/esm/kup-nav-bar.entry.js +110 -109
  445. package/dist/esm/kup-numeric-picker.entry.js +352 -351
  446. package/dist/esm/kup-photo-frame.entry.js +126 -125
  447. package/dist/esm/kup-planner-declarations-b9345758.js +88 -0
  448. package/dist/esm/kup-planner-renderer-helper-2143d119.js +399 -0
  449. package/dist/esm/kup-planner-renderer.entry.js +274 -0
  450. package/dist/esm/kup-planner-time-formatter-a68e05ba.js +89 -0
  451. package/dist/esm/kup-planner.entry.js +718 -13111
  452. package/dist/esm/kup-probe.entry.js +228 -227
  453. package/dist/esm/kup-qlik.entry.js +126 -125
  454. package/dist/esm/kup-snackbar.entry.js +102 -101
  455. package/dist/esm/loader.js +3 -3
  456. package/dist/ketchup/index.esm.js +1 -0
  457. package/dist/ketchup/ketchup.esm.js +1 -1
  458. package/dist/ketchup/p-01a0b54c.js +1 -0
  459. package/dist/ketchup/{p-679ccbf8.js → p-097500fe.js} +1 -1
  460. package/dist/ketchup/p-0cb5e9ae.entry.js +1 -0
  461. package/dist/ketchup/p-0f91d4de.entry.js +1 -0
  462. package/dist/ketchup/p-1872c92e.entry.js +1 -0
  463. package/dist/ketchup/p-20aa95ae.entry.js +1 -0
  464. package/dist/ketchup/{p-b0678a34.js → p-21c640a5.js} +1 -1
  465. package/dist/ketchup/p-4bc3b3a6.js +29 -0
  466. package/dist/ketchup/{p-4d7c02f4.js → p-4c1ec006.js} +1 -1
  467. package/dist/ketchup/p-51f9b230.entry.js +1 -0
  468. package/dist/ketchup/p-612b46da.entry.js +1 -0
  469. package/dist/ketchup/p-69287f4a.entry.js +1 -0
  470. package/dist/ketchup/p-71acfd3c.entry.js +1 -0
  471. package/dist/ketchup/p-7a72c4fa.entry.js +1 -0
  472. package/dist/ketchup/p-7c5a1357.entry.js +1 -0
  473. package/dist/ketchup/p-829d7060.entry.js +1 -0
  474. package/dist/ketchup/p-84be8f0b.js +1 -0
  475. package/dist/ketchup/p-85279516.entry.js +9 -0
  476. package/dist/ketchup/p-8591ac0b.entry.js +1 -0
  477. package/dist/ketchup/p-8c3ad5ef.entry.js +1 -0
  478. package/dist/ketchup/p-8e180c01.entry.js +1 -0
  479. package/dist/ketchup/p-8e3b6de8.js +1 -0
  480. package/dist/ketchup/p-8ecdd076.entry.js +1 -0
  481. package/dist/ketchup/p-903d1b10.entry.js +1 -0
  482. package/dist/ketchup/p-924b841b.js +1 -0
  483. package/dist/ketchup/p-95272714.entry.js +1 -0
  484. package/dist/ketchup/p-b07ffd18.entry.js +16 -0
  485. package/dist/ketchup/p-c23731ca.js +1 -0
  486. package/dist/ketchup/p-cd9a4274.js +2 -0
  487. package/dist/ketchup/{p-bb80719e.js → p-ce9ef2d5.js} +1 -1
  488. package/dist/ketchup/{p-a2b75445.entry.js → p-d7b8295a.entry.js} +1 -1
  489. package/dist/ketchup/p-db93bc06.entry.js +1 -0
  490. package/dist/ketchup/p-e46470a6.entry.js +1 -0
  491. package/dist/ketchup/p-e841c2ae.js +1 -0
  492. package/dist/ketchup/p-eae42bff.entry.js +1 -0
  493. package/dist/ketchup/p-ee6305f5.js +1 -0
  494. package/dist/ketchup/p-f1efab38.entry.js +1 -0
  495. package/dist/ketchup/p-f2df4ce9.entry.js +1 -0
  496. package/dist/ketchup/{p-ba003975.js → p-f51dbf68.js} +1 -1
  497. package/dist/types/components/kup-accordion/kup-accordion-declarations.d.ts +5 -5
  498. package/dist/types/components/kup-accordion/kup-accordion.d.ts +75 -75
  499. package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +18 -18
  500. package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +113 -113
  501. package/dist/types/components/kup-badge/kup-badge-declarations.d.ts +3 -3
  502. package/dist/types/components/kup-badge/kup-badge.d.ts +47 -47
  503. package/dist/types/components/kup-box/kup-box-declarations.d.ts +70 -70
  504. package/dist/types/components/kup-box/kup-box-state.d.ts +7 -7
  505. package/dist/types/components/kup-box/kup-box.d.ts +262 -262
  506. package/dist/types/components/kup-button/kup-button-declarations.d.ts +12 -12
  507. package/dist/types/components/kup-button/kup-button.d.ts +105 -105
  508. package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +11 -11
  509. package/dist/types/components/kup-button-list/kup-button-list.d.ts +75 -75
  510. package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +32 -32
  511. package/dist/types/components/kup-calendar/kup-calendar.d.ts +100 -100
  512. package/dist/types/components/kup-card/kup-card-declarations.d.ts +123 -123
  513. package/dist/types/components/kup-card/kup-card.d.ts +154 -154
  514. package/dist/types/components/kup-card-list/kup-card-list-declarations.d.ts +20 -20
  515. package/dist/types/components/kup-card-list/kup-card-list.d.ts +107 -57
  516. package/dist/types/components/kup-cell/kup-cell-declarations.d.ts +4 -4
  517. package/dist/types/components/kup-cell/kup-cell.d.ts +62 -62
  518. package/dist/types/components/kup-chart/kup-chart-builder.d.ts +2 -2
  519. package/dist/types/components/kup-chart/kup-chart-declarations.d.ts +99 -99
  520. package/dist/types/components/kup-chart/kup-chart.d.ts +164 -164
  521. package/dist/types/components/kup-checkbox/kup-checkbox-declarations.d.ts +8 -8
  522. package/dist/types/components/kup-checkbox/kup-checkbox.d.ts +80 -80
  523. package/dist/types/components/kup-chip/kup-chip-declarations.d.ts +8 -8
  524. package/dist/types/components/kup-chip/kup-chip.d.ts +82 -82
  525. package/dist/types/components/kup-color-picker/kup-color-picker-declarations.d.ts +6 -6
  526. package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +83 -83
  527. package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +12 -12
  528. package/dist/types/components/kup-combobox/kup-combobox.d.ts +89 -89
  529. package/dist/types/components/kup-dashboard/kup-dashboard-declarations.d.ts +28 -28
  530. package/dist/types/components/kup-dashboard/kup-dashboard.d.ts +74 -74
  531. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +156 -156
  532. package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +2 -2
  533. package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +31 -31
  534. package/dist/types/components/kup-data-table/kup-data-table.d.ts +441 -441
  535. package/dist/types/components/kup-date-picker/kup-date-picker-declarations.d.ts +9 -9
  536. package/dist/types/components/kup-date-picker/kup-date-picker.d.ts +105 -105
  537. package/dist/types/components/kup-dialog/kup-dialog-declarations.d.ts +12 -12
  538. package/dist/types/components/kup-dialog/kup-dialog.d.ts +72 -72
  539. package/dist/types/components/kup-drawer/kup-drawer-declarations.d.ts +2 -2
  540. package/dist/types/components/kup-drawer/kup-drawer.d.ts +70 -70
  541. package/dist/types/components/kup-dropdown-button/kup-dropdown-button-declarations.d.ts +12 -12
  542. package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +154 -154
  543. package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +48 -48
  544. package/dist/types/components/kup-echart/kup-echart.d.ts +103 -103
  545. package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +20 -20
  546. package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +82 -82
  547. package/dist/types/components/kup-form/kup-form-declarations.d.ts +40 -40
  548. package/dist/types/components/kup-form/kup-form.d.ts +78 -78
  549. package/dist/types/components/kup-gauge/kup-gauge-declarations.d.ts +19 -19
  550. package/dist/types/components/kup-gauge/kup-gauge.d.ts +144 -144
  551. package/dist/types/components/kup-grid/kup-grid-declarations.d.ts +3 -3
  552. package/dist/types/components/kup-grid/kup-grid.d.ts +45 -45
  553. package/dist/types/components/kup-iframe/kup-iframe-declarations.d.ts +3 -3
  554. package/dist/types/components/kup-iframe/kup-iframe.d.ts +45 -45
  555. package/dist/types/components/kup-image/canvas/kup-image-canvas-declarations.d.ts +19 -19
  556. package/dist/types/components/kup-image/canvas/kup-image-canvas.d.ts +25 -25
  557. package/dist/types/components/kup-image/kup-image-declarations.d.ts +10 -10
  558. package/dist/types/components/kup-image/kup-image.d.ts +96 -96
  559. package/dist/types/components/kup-image-list/kup-image-list-declarations.d.ts +4 -4
  560. package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +3 -3
  561. package/dist/types/components/kup-image-list/kup-image-list.d.ts +64 -64
  562. package/dist/types/components/kup-lazy/kup-lazy-declarations.d.ts +7 -7
  563. package/dist/types/components/kup-lazy/kup-lazy.d.ts +73 -73
  564. package/dist/types/components/kup-list/kup-list-declarations.d.ts +23 -23
  565. package/dist/types/components/kup-list/kup-list.d.ts +122 -122
  566. package/dist/types/components/kup-magic-box/kup-magic-box-declarations.d.ts +10 -10
  567. package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +60 -60
  568. package/dist/types/components/kup-nav-bar/kup-nav-bar-declarations.d.ts +7 -7
  569. package/dist/types/components/kup-nav-bar/kup-nav-bar.d.ts +60 -60
  570. package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +10 -10
  571. package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +116 -116
  572. package/dist/types/components/kup-photo-frame/kup-photo-frame-declarations.d.ts +3 -3
  573. package/dist/types/components/kup-photo-frame/kup-photo-frame.d.ts +57 -57
  574. package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +592 -96
  575. package/dist/types/components/kup-planner/kup-planner-state.d.ts +9 -9
  576. package/dist/types/components/kup-planner/kup-planner.d.ts +269 -259
  577. package/dist/types/components/kup-planner/utils/custom-task-list-header.d.ts +8 -0
  578. package/dist/types/components/kup-planner/utils/custom-task-list-table.d.ts +14 -0
  579. package/dist/types/components/kup-planner/utils/custom-tool-tip.d.ts +2 -0
  580. package/dist/types/components/kup-planner/utils/helpers/bar.helpers.d.ts +33 -0
  581. package/dist/types/components/kup-planner/utils/helpers/other.helpers.d.ts +6 -0
  582. package/dist/types/components/kup-planner/utils/kup-gantt/kup-gantt.d.ts +127 -0
  583. package/dist/types/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.d.ts +27 -0
  584. package/dist/types/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.d.ts +59 -0
  585. package/dist/types/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.d.ts +17 -0
  586. package/dist/types/components/kup-planner/utils/kup-planner-adapted-types.d.ts +28 -0
  587. package/dist/types/components/kup-planner/utils/kup-planner-renderer-helper.d.ts +36 -0
  588. package/dist/types/components/kup-planner/utils/kup-planner-renderer.d.ts +33 -0
  589. package/dist/types/components/kup-planner/utils/kup-planner-time-formatter.d.ts +20 -0
  590. package/dist/types/components/kup-planner/utils/kup-switcher/kup-switcher.d.ts +5 -0
  591. package/dist/types/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.d.ts +20 -0
  592. package/dist/types/components/kup-planner/utils/kup-task-list/kup-task-list-header.d.ts +7 -0
  593. package/dist/types/components/kup-planner/utils/kup-task-list/kup-task-list-table.d.ts +16 -0
  594. package/dist/types/components/kup-planner/utils/kup-task-list/kup-task-list.d.ts +40 -0
  595. package/dist/types/components/kup-planner/utils/kup-tooltip/kup-standard-tooltip.d.ts +7 -0
  596. package/dist/types/components/kup-planner/utils/kup-tooltip/kup-tooltip.d.ts +26 -0
  597. package/dist/types/components/kup-planner/utils/kup-vertical-scroll/kup-vertical-scroll.d.ts +16 -0
  598. package/dist/types/components/kup-probe/kup-probe.d.ts +70 -70
  599. package/dist/types/components/kup-progress-bar/kup-progress-bar-declarations.d.ts +7 -7
  600. package/dist/types/components/kup-progress-bar/kup-progress-bar.d.ts +65 -65
  601. package/dist/types/components/kup-qlik/kup-qlik-declarations.d.ts +13 -13
  602. package/dist/types/components/kup-qlik/kup-qlik.d.ts +96 -96
  603. package/dist/types/components/kup-radio/kup-radio-declarations.d.ts +6 -6
  604. package/dist/types/components/kup-radio/kup-radio.d.ts +75 -75
  605. package/dist/types/components/kup-rating/kup-rating-declarations.d.ts +5 -5
  606. package/dist/types/components/kup-rating/kup-rating.d.ts +52 -52
  607. package/dist/types/components/kup-snackbar/kup-snackbar-declarations.d.ts +5 -5
  608. package/dist/types/components/kup-snackbar/kup-snackbar.d.ts +78 -78
  609. package/dist/types/components/kup-spinner/kup-spinner-declarations.d.ts +8 -8
  610. package/dist/types/components/kup-spinner/kup-spinner.d.ts +75 -75
  611. package/dist/types/components/kup-state/kup-state.d.ts +1 -1
  612. package/dist/types/components/kup-state/kup-store.d.ts +2 -2
  613. package/dist/types/components/kup-state/mock-store.d.ts +5 -5
  614. package/dist/types/components/kup-switch/kup-switch-declarations.d.ts +6 -6
  615. package/dist/types/components/kup-switch/kup-switch.d.ts +75 -75
  616. package/dist/types/components/kup-tab-bar/kup-tab-bar-declarations.d.ts +6 -6
  617. package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +72 -72
  618. package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +31 -31
  619. package/dist/types/components/kup-text-field/kup-text-field.d.ts +258 -258
  620. package/dist/types/components/kup-time-picker/kup-time-picker-declarations.d.ts +8 -8
  621. package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +120 -120
  622. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +56 -56
  623. package/dist/types/components/kup-tree/kup-tree-faker.d.ts +15 -15
  624. package/dist/types/components/kup-tree/kup-tree-state.d.ts +9 -9
  625. package/dist/types/components/kup-tree/kup-tree.d.ts +351 -351
  626. package/dist/types/components.d.ts +1305 -4
  627. package/dist/types/f-components/f-button/f-button-declarations.d.ts +24 -24
  628. package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +117 -117
  629. package/dist/types/f-components/f-checkbox/f-checkbox-declarations.d.ts +9 -9
  630. package/dist/types/f-components/f-chip/f-chip-declarations.d.ts +12 -12
  631. package/dist/types/f-components/f-image/f-image-declarations.d.ts +14 -14
  632. package/dist/types/f-components/f-paginator/f-paginator-declarations.d.ts +12 -12
  633. package/dist/types/f-components/f-progress-bar/f-progress-bar-declarations.d.ts +10 -10
  634. package/dist/types/f-components/f-radio/f-radio-declarations.d.ts +11 -11
  635. package/dist/types/f-components/f-rating/f-rating-declarations.d.ts +4 -4
  636. package/dist/types/f-components/f-switch/f-switch-declarations.d.ts +8 -8
  637. package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +38 -38
  638. package/dist/types/index.d.ts +4 -0
  639. package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +3 -3
  640. package/dist/types/managers/kup-data/kup-data-declarations.d.ts +88 -88
  641. package/dist/types/managers/kup-data/kup-data.d.ts +76 -76
  642. package/dist/types/managers/kup-dates/kup-dates-declarations.d.ts +19 -19
  643. package/dist/types/managers/kup-dates/kup-dates.d.ts +217 -192
  644. package/dist/types/managers/kup-debug/kup-debug-declarations.d.ts +18 -18
  645. package/dist/types/managers/kup-debug/kup-debug.d.ts +87 -87
  646. package/dist/types/managers/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +19 -19
  647. package/dist/types/managers/kup-dynamic-position/kup-dynamic-position.d.ts +53 -53
  648. package/dist/types/managers/kup-interact/kup-interact-declarations.d.ts +37 -37
  649. package/dist/types/managers/kup-interact/kup-interact.d.ts +95 -95
  650. package/dist/types/managers/kup-language/kup-language-declarations.d.ts +133 -133
  651. package/dist/types/managers/kup-language/kup-language.d.ts +44 -44
  652. package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +63 -63
  653. package/dist/types/managers/kup-manager/kup-manager.d.ts +67 -67
  654. package/dist/types/managers/kup-math/kup-math-declarations.d.ts +16 -16
  655. package/dist/types/managers/kup-math/kup-math-helper.d.ts +1 -1
  656. package/dist/types/managers/kup-math/kup-math.d.ts +132 -132
  657. package/dist/types/managers/kup-objects/kup-objects-declarations.d.ts +4 -4
  658. package/dist/types/managers/kup-objects/kup-objects.d.ts +201 -201
  659. package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +16 -16
  660. package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +55 -55
  661. package/dist/types/managers/kup-search/kup-search-declarations.d.ts +1 -1
  662. package/dist/types/managers/kup-search/kup-search.d.ts +13 -13
  663. package/dist/types/managers/kup-theme/kup-theme-declarations.d.ts +99 -99
  664. package/dist/types/managers/kup-theme/kup-theme.d.ts +119 -119
  665. package/dist/types/managers/kup-toolbar/kup-toolbar-declarations.d.ts +3 -3
  666. package/dist/types/managers/kup-toolbar/kup-toolbar.d.ts +32 -32
  667. package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +4 -4
  668. package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +43 -43
  669. package/dist/types/stencil-public-runtime.d.ts +29 -0
  670. package/dist/types/types/GenericTypes.d.ts +74 -74
  671. package/dist/types/utils/filters/filters-column-menu.d.ts +86 -86
  672. package/dist/types/utils/filters/filters-declarations.d.ts +13 -13
  673. package/dist/types/utils/filters/filters-rows.d.ts +17 -17
  674. package/dist/types/utils/filters/filters-tree-items.d.ts +7 -7
  675. package/dist/types/utils/filters/filters.d.ts +62 -62
  676. package/dist/types/utils/kup-column-menu/kup-column-menu-declarations.d.ts +14 -14
  677. package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +126 -126
  678. package/dist/types/utils/utils.d.ts +0 -2
  679. package/package.json +12 -16
  680. package/dist/cjs/f-button-733664a5.js +0 -105
  681. package/dist/cjs/f-cell-f37757a6.js +0 -670
  682. package/dist/cjs/f-checkbox-556771e8.js +0 -29
  683. package/dist/cjs/f-chip-3349d130.js +0 -133
  684. package/dist/cjs/f-image-b7a5816b.js +0 -115
  685. package/dist/cjs/f-paginator-utils-1fe1df76.js +0 -1576
  686. package/dist/cjs/f-text-field-8557fc3f.js +0 -216
  687. package/dist/esm/f-button-f247ce10.js +0 -103
  688. package/dist/esm/f-cell-ba94f1b3.js +0 -664
  689. package/dist/esm/f-checkbox-cbf7b3de.js +0 -27
  690. package/dist/esm/f-chip-104c4a64.js +0 -131
  691. package/dist/esm/f-image-d2a9603c.js +0 -113
  692. package/dist/esm/f-paginator-utils-743522fa.js +0 -1563
  693. package/dist/esm/f-text-field-4d91ccfc.js +0 -214
  694. package/dist/ketchup/p-12e47371.js +0 -1
  695. package/dist/ketchup/p-15548f51.entry.js +0 -1
  696. package/dist/ketchup/p-20e8ab84.js +0 -2
  697. package/dist/ketchup/p-21f1b22a.entry.js +0 -1
  698. package/dist/ketchup/p-2c47b88f.js +0 -30
  699. package/dist/ketchup/p-304f296e.entry.js +0 -1
  700. package/dist/ketchup/p-48f8b0d5.entry.js +0 -9
  701. package/dist/ketchup/p-4ca502ce.entry.js +0 -1
  702. package/dist/ketchup/p-5abbf31b.entry.js +0 -1
  703. package/dist/ketchup/p-5c9b10a5.entry.js +0 -1
  704. package/dist/ketchup/p-5cb2dbf3.entry.js +0 -1
  705. package/dist/ketchup/p-6a0ac578.entry.js +0 -1
  706. package/dist/ketchup/p-87e13738.entry.js +0 -1
  707. package/dist/ketchup/p-8e5db599.entry.js +0 -1
  708. package/dist/ketchup/p-a14ede8c.entry.js +0 -1
  709. package/dist/ketchup/p-a2007880.js +0 -1
  710. package/dist/ketchup/p-bf41d71f.entry.js +0 -1
  711. package/dist/ketchup/p-c32e8755.entry.js +0 -1
  712. package/dist/ketchup/p-c4b1bde1.entry.js +0 -1
  713. package/dist/ketchup/p-c6b58be6.entry.js +0 -1
  714. package/dist/ketchup/p-d56763cf.entry.js +0 -1
  715. package/dist/ketchup/p-e7f57bee.entry.js +0 -1
  716. package/dist/ketchup/p-eb12225c.entry.js +0 -1
  717. package/dist/ketchup/p-f22abf4e.entry.js +0 -1
  718. package/dist/ketchup/p-f82db512.entry.js +0 -25
  719. /package/dist/ketchup/{p-cd2af1a6.js → p-b3577066.js} +0 -0
  720. /package/dist/ketchup/{p-b00f3575.js → p-c634eb82.js} +0 -0
@@ -1,18 +1,18 @@
1
1
  var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f)
3
- throw new TypeError("Private accessor was defined without a getter");
4
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
5
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
6
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
2
+ if (kind === "a" && !f)
3
+ throw new TypeError("Private accessor was defined without a getter");
4
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
5
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
6
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
7
7
  };
8
8
  var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9
- if (kind === "m")
10
- throw new TypeError("Private method is not writable");
11
- if (kind === "a" && !f)
12
- throw new TypeError("Private accessor was defined without a setter");
13
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
14
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
15
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
9
+ if (kind === "m")
10
+ throw new TypeError("Private method is not writable");
11
+ if (kind === "a" && !f)
12
+ throw new TypeError("Private accessor was defined without a setter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
14
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
15
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16
16
  };
17
17
  var _KupBox_instances, _KupBox_intObserver, _KupBox_rowsRefs, _KupBox_navBarHeight, _KupBox_didRenderObservers, _KupBox_setObserver;
18
18
  import { forceUpdate, h, Host, } from "@stencil/core";
@@ -36,2128 +36,2128 @@ import { FPaginatorMode } from "../../f-components/f-paginator/f-paginator-decla
36
36
  import { pageChange, rowsPerPageChange, } from "../../f-components/f-paginator/f-paginator-utils";
37
37
  import { FTextFieldMDC } from "../../f-components/f-text-field/f-text-field-mdc";
38
38
  export class KupBox {
39
- constructor() {
40
- _KupBox_instances.add(this);
41
- this.state = new KupBoxState();
42
- /*-------------------------------------------------*/
43
- /* I n t e r n a l V a r i a b l e s */
44
- /*-------------------------------------------------*/
45
- /**
46
- * Instance of the KupManager class.
47
- */
48
- this.kupManager = kupManagerInstance();
49
- this.visibleColumns = [];
50
- this.rows = [];
51
- this.filteredRows = [];
52
- this.sectionRef = null;
53
- this.rowsRefs = [];
54
- this.hold = false;
55
- this.interactableDrag = [];
56
- this.interactableDrop = [];
57
- this.interactableTouch = [];
58
- _KupBox_intObserver.set(this, undefined);
59
- _KupBox_rowsRefs.set(this, []);
60
- _KupBox_navBarHeight.set(this, 0);
61
- this.collapsedSection = {};
62
- this.selectedRows = [];
63
- this.rowActionMenuOpened = undefined;
64
- this.currentPage = 1;
65
- this.currentRowsPerPage = 10;
66
- this.cardData = null;
67
- this.columns = 1;
68
- this.customStyle = '';
69
- this.data = null;
70
- this.dragEnabled = false;
71
- this.dropEnabled = false;
72
- this.dropOnSection = false;
73
- this.editableData = false;
74
- this.enableRowActions = false;
75
- this.globalFilter = false;
76
- this.globalFilterValue = '';
77
- this.kanban = null;
78
- this.layout = undefined;
79
- this.lazyLoadRows = false;
80
- this.multiSelection = false;
81
- this.pageSelected = 1;
82
- this.pagination = false;
83
- this.rowsPerPage = undefined;
84
- this.scrollOnHover = false;
85
- this.selectBox = undefined;
86
- this.selectedRowsState = undefined;
87
- this.showSelection = true;
88
- this.sortBy = undefined;
89
- this.sortEnabled = false;
90
- this.stateId = '';
91
- this.store = undefined;
92
- this.swipeDisabled = false;
93
- }
94
- initWithPersistedState() {
95
- if (this.store && this.stateId) {
96
- const state = this.store.getState(this.stateId);
97
- if (state != null) {
98
- this.kupManager.debug.logMessage(this, 'Initialize with state for stateId ' +
99
- this.stateId +
100
- ': ' +
101
- state);
102
- // *** PROPS ***
103
- this.sortBy = this.state.sortBy;
104
- this.globalFilterValue = this.state.globalFilterValue;
105
- this.selectedRowsState = this.state.selectedRowsState;
106
- this.pageSelected = this.state.pageSelected;
107
- this.rowsPerPage = this.state.rowsPerPage;
108
- }
109
- }
110
- }
111
- persistState() {
112
- if (this.store && this.stateId) {
113
- let somethingChanged = false;
114
- if (!this.kupManager.objects.deepEqual(this.state.sortBy, this.sortBy)) {
115
- this.state.sortBy = this.sortBy;
116
- somethingChanged = true;
117
- }
118
- if (!this.kupManager.objects.deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
119
- this.state.globalFilterValue = this.globalFilterValue;
120
- somethingChanged = true;
121
- }
122
- if (!this.kupManager.objects.deepEqual(this.state.pageSelected, this.currentPage)) {
123
- this.state.pageSelected = this.currentPage;
124
- somethingChanged = true;
125
- }
126
- if (!this.kupManager.objects.deepEqual(this.state.rowsPerPage, this.currentRowsPerPage)) {
127
- this.state.rowsPerPage = this.currentRowsPerPage;
128
- somethingChanged = true;
129
- }
130
- const selectedRowsState = this.selectedRows.reduce((accumulator, row, currentIndex) => {
131
- const prefix = currentIndex > 0 ? ';' : '';
132
- return accumulator + prefix + row.id;
133
- }, '');
134
- if (!this.kupManager.objects.deepEqual(this.state.selectedRowsState, selectedRowsState)) {
135
- this.state.selectedRowsState = selectedRowsState;
136
- somethingChanged = true;
137
- }
138
- if (!this.state.load) {
139
- this.state.load = true;
140
- return;
141
- }
142
- if (somethingChanged) {
143
- this.kupManager.debug.logMessage(this, 'Persisting state for stateId ' +
144
- this.stateId +
145
- ': ' +
146
- this.state);
147
- this.store.persistState(this.stateId, this.state);
148
- }
149
- }
150
- }
151
- /*-------------------------------------------------*/
152
- /* W a t c h e r s */
153
- /*-------------------------------------------------*/
154
- rowsPerPageHandler(newValue) {
155
- this.currentRowsPerPage = newValue;
156
- }
157
- recalculateRows() {
158
- this.initRows();
159
- }
160
- onDataChanged() {
161
- identify(this.getRows());
162
- this.initVisibleColumns();
163
- this.initRows();
164
- this.checkLayout();
165
- }
166
- onLayoutChanged() {
167
- this.checkLayout();
168
- }
169
- onSelectBoxChanged() {
170
- this.handleAutomaticBoxSelection();
171
- }
172
- /*-------------------------------------------------*/
173
- /* P u b l i c M e t h o d s */
174
- /*-------------------------------------------------*/
175
- /**
176
- * Used to retrieve component's props values.
177
- * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
178
- * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
179
- */
180
- async getProps(descriptions) {
181
- return getProps(this, KupBoxProps, descriptions);
182
- }
183
- async loadRowActions(row, actions) {
184
- row.actions = actions;
185
- // show menu
186
- this.rowActionMenuOpened = row;
187
- }
188
- /**
189
- * This method is used to trigger a new render of the component.
190
- */
191
- async refresh() {
192
- forceUpdate(this);
193
- }
194
- /**
195
- * Sets the props to the component.
196
- * @param {GenericObject} props - Object containing props that will be set to the component.
197
- */
198
- async setProps(props) {
199
- setProps(this, KupBoxProps, props);
200
- }
201
- /*-------------------------------------------------*/
202
- /* P r i v a t e M e t h o d s */
203
- /*-------------------------------------------------*/
204
- getColumns() {
205
- return this.data && this.data.columns
206
- ? this.data.columns
207
- : [{ title: '', name: '', size: undefined }];
208
- }
209
- initVisibleColumns() {
210
- this.visibleColumns = this.getColumns().filter((column) => {
211
- if (column.hasOwnProperty('visible')) {
212
- return column.visible;
213
- }
214
- return true;
215
- });
216
- }
217
- getRows() {
218
- return this.data && this.data.rows ? this.data.rows : [];
219
- }
220
- initRows() {
221
- this.filteredRows = this.getRows();
222
- if (this.globalFilter && this.globalFilterValue) {
223
- // filtering rows
224
- this.filteredRows = filterRows(this.filteredRows, null, this.globalFilterValue, this.visibleColumns);
225
- }
226
- this.rows = this.sortRows(this.filteredRows);
227
- if (this.pagination) {
228
- this.rows = paginateRows(this.rows, this.currentPage, this.currentRowsPerPage, false);
229
- }
230
- }
231
- sortRows(rows) {
232
- let sortedRows = rows;
233
- if (this.sortBy) {
234
- sortedRows = sortRows(sortedRows, this.toSortObjectList());
235
- }
236
- return sortedRows;
237
- }
238
- toSortObjectList() {
239
- const sortByArray = this.sortBy.split('|').map((col) => {
240
- const colNameAndSortMode = col.split(',');
241
- const sortObject = {
242
- column: colNameAndSortMode[0],
243
- sortMode: colNameAndSortMode.length > 1
244
- ? SortMode[colNameAndSortMode[1]]
245
- : SortMode.A,
246
- };
247
- return sortObject;
248
- });
249
- return sortByArray;
250
- }
251
- checkScrollOnHover() {
252
- if (!this.kupManager.scrollOnHover.isRegistered(this.boxContainer)) {
253
- if (this.scrollOnHover) {
254
- this.kupManager.scrollOnHover.register(this.boxContainer);
255
- }
256
- }
257
- else {
258
- if (!this.scrollOnHover) {
259
- this.kupManager.scrollOnHover.unregister(this.boxContainer);
260
- }
261
- }
262
- }
263
- checkLayout() {
264
- // check if there is a layout.
265
- // if not, create a default layout
266
- if (this.layout) {
267
- this.boxLayout = this.layout;
268
- return;
269
- }
270
- // only one section, containing all visible fields
271
- const section = {
272
- horizontal: false,
273
- sections: [],
274
- };
275
- // adding box objects to section
276
- const visibleColumns = this.visibleColumns;
277
- let size = visibleColumns.length;
278
- let content = [];
279
- let cnt = 0;
280
- while (size-- > 0) {
281
- content.push({
282
- column: visibleColumns[cnt++].name,
283
- });
284
- }
285
- section.content = content;
286
- // creating a new layout
287
- this.boxLayout = {
288
- sections: [section],
289
- };
290
- }
291
- onSortChange(e) {
292
- let column = getColumnByName(this.visibleColumns, e.detail.value);
293
- this.sortBy = column.name;
294
- }
295
- onGlobalFilterChange({ detail }) {
296
- let value = '';
297
- if (detail && detail.value) {
298
- value = detail.value;
299
- }
300
- this.globalFilterValue = value;
301
- }
302
- isSectionExpanded(row, section) {
303
- if (!row.id || !section.id) {
304
- return false;
305
- }
306
- return (this.collapsedSection[section.id] &&
307
- this.collapsedSection[section.id][row.id]);
308
- }
309
- handleAutomaticBoxSelection() {
310
- if (this.selectBox &&
311
- this.selectBox > 0 &&
312
- this.selectBox <= this.data.rows.length) {
313
- this.selectedRows = [];
314
- for (let boxRow of this.data.rows) {
315
- if (boxRow.id === (this.selectBox - 1).toString()) {
316
- this.selectedRows.push(boxRow);
317
- break;
318
- }
319
- }
320
- this.kupAutoBoxSelect.emit({
321
- comp: this,
322
- id: this.rootElement.id,
323
- row: this.selectedRows[0],
324
- });
325
- }
326
- }
327
- getEventDetails(el, e) {
328
- let boxObject = null;
329
- let cell = null;
330
- let row = null;
331
- let column = null;
332
- if (el) {
333
- boxObject =
334
- el.closest('.box-object') ||
335
- el.querySelector('.box-object') ||
336
- el.closest('.f-cell');
337
- }
338
- if (boxObject) {
339
- if (boxObject.classList.contains('f-cell')) {
340
- const props = boxObject['kup-get-cell-props']();
341
- cell = props.cell;
342
- column = props.column;
343
- row = props.row;
344
- }
345
- else {
346
- cell = boxObject['data-cell'];
347
- row = boxObject['data-row'];
348
- column = getColumnByName(this.visibleColumns, boxObject.dataset.column);
349
- }
350
- }
351
- else {
352
- }
353
- return {
354
- boxObject: boxObject ? boxObject : null,
355
- column: column ? column : null,
356
- cell: cell ? cell : null,
357
- originalEvent: e,
358
- row: row ? row : null,
359
- };
360
- }
361
- contextMenuHandler(e) {
362
- const details = this.getEventDetails(e.target, e);
363
- return details;
364
- }
365
- /**
366
- * Checks if the element is the svg that opens the "row actions menu"
367
- * @param element the element to check
368
- */
369
- checkIfElementIsActionMenuIcon(element) {
370
- if (element.tagName && element.parentElement) {
371
- return (element.tagName === 'svg' &&
372
- element.parentElement.classList.contains('row-actions-toggler'));
373
- }
374
- return false;
375
- }
376
- // event listeners
377
- onBoxClick({ target }, row) {
378
- if (!(target instanceof HTMLElement)) {
379
- return;
380
- }
381
- // searching parent
382
- let element = target;
383
- let classList = element.classList;
384
- while (!classList.contains('box-object') &&
385
- !classList.contains('box-section') &&
386
- !classList.contains('box')) {
387
- element = element.parentElement;
388
- if (element === null) {
389
- break;
390
- }
391
- classList = element.classList;
392
- }
393
- // evaluating column
394
- let column = null;
395
- if (classList.contains('box-object')) {
396
- column = element.dataset.column;
397
- }
398
- this.kupBoxClick.emit({
399
- comp: this,
400
- id: this.rootElement.id,
401
- row,
402
- column,
403
- });
404
- // selecting box
405
- if (this.multiSelection) {
406
- // triggering multi selection
407
- this.onSelectionCheckChange(row);
408
- }
409
- else {
410
- this.selectedRows = [row];
39
+ constructor() {
40
+ _KupBox_instances.add(this);
41
+ this.state = new KupBoxState();
42
+ /*-------------------------------------------------*/
43
+ /* I n t e r n a l V a r i a b l e s */
44
+ /*-------------------------------------------------*/
45
+ /**
46
+ * Instance of the KupManager class.
47
+ */
48
+ this.kupManager = kupManagerInstance();
49
+ this.visibleColumns = [];
50
+ this.rows = [];
51
+ this.filteredRows = [];
52
+ this.sectionRef = null;
53
+ this.rowsRefs = [];
54
+ this.hold = false;
55
+ this.interactableDrag = [];
56
+ this.interactableDrop = [];
57
+ this.interactableTouch = [];
58
+ _KupBox_intObserver.set(this, undefined);
59
+ _KupBox_rowsRefs.set(this, []);
60
+ _KupBox_navBarHeight.set(this, 0);
61
+ this.collapsedSection = {};
62
+ this.selectedRows = [];
63
+ this.rowActionMenuOpened = undefined;
64
+ this.currentPage = 1;
65
+ this.currentRowsPerPage = 10;
66
+ this.cardData = null;
67
+ this.columns = 1;
68
+ this.customStyle = '';
69
+ this.data = null;
70
+ this.dragEnabled = false;
71
+ this.dropEnabled = false;
72
+ this.dropOnSection = false;
73
+ this.editableData = false;
74
+ this.enableRowActions = false;
75
+ this.globalFilter = false;
76
+ this.globalFilterValue = '';
77
+ this.kanban = null;
78
+ this.layout = undefined;
79
+ this.lazyLoadRows = false;
80
+ this.multiSelection = false;
81
+ this.pageSelected = 1;
82
+ this.pagination = false;
83
+ this.rowsPerPage = undefined;
84
+ this.scrollOnHover = false;
85
+ this.selectBox = undefined;
86
+ this.selectedRowsState = undefined;
87
+ this.showSelection = true;
88
+ this.sortBy = undefined;
89
+ this.sortEnabled = false;
90
+ this.stateId = '';
91
+ this.store = undefined;
92
+ this.swipeDisabled = false;
93
+ }
94
+ initWithPersistedState() {
95
+ if (this.store && this.stateId) {
96
+ const state = this.store.getState(this.stateId);
97
+ if (state != null) {
98
+ this.kupManager.debug.logMessage(this, 'Initialize with state for stateId ' +
99
+ this.stateId +
100
+ ': ' +
101
+ state);
102
+ // *** PROPS ***
103
+ this.sortBy = this.state.sortBy;
104
+ this.globalFilterValue = this.state.globalFilterValue;
105
+ this.selectedRowsState = this.state.selectedRowsState;
106
+ this.pageSelected = this.state.pageSelected;
107
+ this.rowsPerPage = this.state.rowsPerPage;
108
+ }
109
+ }
411
110
  }
412
- }
413
- onSelectionCheckChange(row) {
414
- var index = -1;
415
- for (let i = 0; i < this.selectedRows.length; i++) {
416
- const select = this.selectedRows[i];
417
- if (select.id === row.id) {
418
- index = i;
419
- break;
420
- }
111
+ persistState() {
112
+ if (this.store && this.stateId) {
113
+ let somethingChanged = false;
114
+ if (!this.kupManager.objects.deepEqual(this.state.sortBy, this.sortBy)) {
115
+ this.state.sortBy = this.sortBy;
116
+ somethingChanged = true;
117
+ }
118
+ if (!this.kupManager.objects.deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
119
+ this.state.globalFilterValue = this.globalFilterValue;
120
+ somethingChanged = true;
121
+ }
122
+ if (!this.kupManager.objects.deepEqual(this.state.pageSelected, this.currentPage)) {
123
+ this.state.pageSelected = this.currentPage;
124
+ somethingChanged = true;
125
+ }
126
+ if (!this.kupManager.objects.deepEqual(this.state.rowsPerPage, this.currentRowsPerPage)) {
127
+ this.state.rowsPerPage = this.currentRowsPerPage;
128
+ somethingChanged = true;
129
+ }
130
+ const selectedRowsState = this.selectedRows.reduce((accumulator, row, currentIndex) => {
131
+ const prefix = currentIndex > 0 ? ';' : '';
132
+ return accumulator + prefix + row.id;
133
+ }, '');
134
+ if (!this.kupManager.objects.deepEqual(this.state.selectedRowsState, selectedRowsState)) {
135
+ this.state.selectedRowsState = selectedRowsState;
136
+ somethingChanged = true;
137
+ }
138
+ if (!this.state.load) {
139
+ this.state.load = true;
140
+ return;
141
+ }
142
+ if (somethingChanged) {
143
+ this.kupManager.debug.logMessage(this, 'Persisting state for stateId ' +
144
+ this.stateId +
145
+ ': ' +
146
+ this.state);
147
+ this.store.persistState(this.stateId, this.state);
148
+ }
149
+ }
421
150
  }
422
- if (index >= 0) {
423
- // remove row
424
- this.selectedRows.splice(index, 1);
425
- this.selectedRows = [...this.selectedRows];
151
+ /*-------------------------------------------------*/
152
+ /* W a t c h e r s */
153
+ /*-------------------------------------------------*/
154
+ rowsPerPageHandler(newValue) {
155
+ this.currentRowsPerPage = newValue;
426
156
  }
427
- else {
428
- // add row
429
- this.selectedRows = [...this.selectedRows, row];
157
+ recalculateRows() {
158
+ this.initRows();
430
159
  }
431
- this.kupBoxSelected.emit({
432
- comp: this,
433
- id: this.rootElement.id,
434
- rows: this.selectedRows,
435
- });
436
- }
437
- toggleSectionExpand(row, section) {
438
- // check if section / row has id
439
- if (!section.id) {
440
- // error
441
- console.error('cannot expand / collapse a section withoun an ID');
442
- return;
160
+ onDataChanged() {
161
+ identify(this.getRows());
162
+ this.initVisibleColumns();
163
+ this.initRows();
164
+ this.checkLayout();
443
165
  }
444
- if (!row.id) {
445
- // error
446
- console.error('cannot expand / collapse a section of a row without ad id');
447
- return;
166
+ onLayoutChanged() {
167
+ this.checkLayout();
448
168
  }
449
- // check if section already in collapsedSection
450
- if (!this.collapsedSection[section.id]) {
451
- // adding element and row, setting it to expanded
452
- this.collapsedSection[section.id] = {};
453
- this.collapsedSection[section.id][row.id] = true;
169
+ onSelectBoxChanged() {
170
+ this.handleAutomaticBoxSelection();
454
171
  }
455
- else {
456
- const s = this.collapsedSection[section.id];
457
- if (!s[row.id]) {
458
- s[row.id] = true;
459
- }
460
- else {
461
- s[row.id] = !s[row.id];
462
- }
172
+ /*-------------------------------------------------*/
173
+ /* P u b l i c M e t h o d s */
174
+ /*-------------------------------------------------*/
175
+ /**
176
+ * Used to retrieve component's props values.
177
+ * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
178
+ * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
179
+ */
180
+ async getProps(descriptions) {
181
+ return getProps(this, KupBoxProps, descriptions);
463
182
  }
464
- // triggering rendering
465
- this.collapsedSection = Object.assign({}, this.collapsedSection);
466
- }
467
- onRowAction(row) {
468
- if (!row) {
469
- return;
183
+ async loadRowActions(row, actions) {
184
+ row.actions = actions;
185
+ // show menu
186
+ this.rowActionMenuOpened = row;
470
187
  }
471
- if (row === this.rowActionMenuOpened) {
472
- // closing menu
473
- this.rowActionMenuOpened = null;
474
- return;
188
+ /**
189
+ * This method is used to trigger a new render of the component.
190
+ */
191
+ async refresh() {
192
+ forceUpdate(this);
475
193
  }
476
- if (row.actions) {
477
- // actions already loaded -> show menu
478
- this.rowActionMenuOpened = row;
194
+ /**
195
+ * Sets the props to the component.
196
+ * @param {GenericObject} props - Object containing props that will be set to the component.
197
+ */
198
+ async setProps(props) {
199
+ setProps(this, KupBoxProps, props);
479
200
  }
480
- else {
481
- // no actions -> triggering event
482
- this.kupRowActionMenuClick.emit({
483
- comp: this,
484
- id: this.rootElement.id,
485
- row,
486
- });
201
+ /*-------------------------------------------------*/
202
+ /* P r i v a t e M e t h o d s */
203
+ /*-------------------------------------------------*/
204
+ getColumns() {
205
+ return this.data && this.data.columns
206
+ ? this.data.columns
207
+ : [{ title: '', name: '', size: undefined }];
208
+ }
209
+ initVisibleColumns() {
210
+ this.visibleColumns = this.getColumns().filter((column) => {
211
+ if (column.hasOwnProperty('visible')) {
212
+ return column.visible;
213
+ }
214
+ return true;
215
+ });
487
216
  }
488
- }
489
- onRowActionClick(row, action, index) {
490
- this.kupRowActionClick.emit({
491
- comp: this,
492
- id: this.rootElement.id,
493
- row,
494
- action,
495
- index,
496
- });
497
- }
498
- /**
499
- * see onDocumentClick in kup-combo
500
- */
501
- clickFunction(event) {
502
- try {
503
- const targets = event.composedPath();
504
- for (let target of targets) {
505
- if (this.checkIfElementIsActionMenuIcon(target)) {
506
- return;
507
- }
508
- }
217
+ getRows() {
218
+ return this.data && this.data.rows ? this.data.rows : [];
509
219
  }
510
- catch (err) {
511
- if (this.checkIfElementIsActionMenuIcon(event.target)) {
512
- return;
513
- }
220
+ initRows() {
221
+ this.filteredRows = this.getRows();
222
+ if (this.globalFilter && this.globalFilterValue) {
223
+ // filtering rows
224
+ this.filteredRows = filterRows(this.filteredRows, null, this.globalFilterValue, this.visibleColumns);
225
+ }
226
+ this.rows = this.sortRows(this.filteredRows);
227
+ if (this.pagination) {
228
+ this.rows = paginateRows(this.rows, this.currentPage, this.currentRowsPerPage, false);
229
+ }
514
230
  }
515
- this.rowActionMenuOpened = null;
516
- }
517
- handlePageChange(pageNumber) {
518
- const newPage = pageChange(pageNumber, this.filteredRows.length, this.currentRowsPerPage);
519
- if (newPage) {
520
- this.currentPage = newPage;
231
+ sortRows(rows) {
232
+ let sortedRows = rows;
233
+ if (this.sortBy) {
234
+ sortedRows = sortRows(sortedRows, this.toSortObjectList());
235
+ }
236
+ return sortedRows;
237
+ }
238
+ toSortObjectList() {
239
+ const sortByArray = this.sortBy.split('|').map((col) => {
240
+ const colNameAndSortMode = col.split(',');
241
+ const sortObject = {
242
+ column: colNameAndSortMode[0],
243
+ sortMode: colNameAndSortMode.length > 1
244
+ ? SortMode[colNameAndSortMode[1]]
245
+ : SortMode.A,
246
+ };
247
+ return sortObject;
248
+ });
249
+ return sortByArray;
521
250
  }
522
- }
523
- handleRowsPerPageChange(rowsNumber) {
524
- const newRows = rowsPerPageChange(rowsNumber, this.filteredRows.length);
525
- if (newRows) {
526
- this.currentRowsPerPage = newRows;
527
- this.adjustPaginator();
251
+ checkScrollOnHover() {
252
+ if (!this.kupManager.scrollOnHover.isRegistered(this.boxContainer)) {
253
+ if (this.scrollOnHover) {
254
+ this.kupManager.scrollOnHover.register(this.boxContainer);
255
+ }
256
+ }
257
+ else {
258
+ if (!this.scrollOnHover) {
259
+ this.kupManager.scrollOnHover.unregister(this.boxContainer);
260
+ }
261
+ }
528
262
  }
529
- }
530
- adjustPaginator() {
531
- const numberOfRows = this.rows.length;
532
- // check if current page is valid
533
- const numberOfPages = Math.ceil(numberOfRows / this.currentRowsPerPage);
534
- if (this.currentPage > numberOfPages) {
535
- // reset page
536
- this.currentPage = 1;
263
+ checkLayout() {
264
+ // check if there is a layout.
265
+ // if not, create a default layout
266
+ if (this.layout) {
267
+ this.boxLayout = this.layout;
268
+ return;
269
+ }
270
+ // only one section, containing all visible fields
271
+ const section = {
272
+ horizontal: false,
273
+ sections: [],
274
+ };
275
+ // adding box objects to section
276
+ const visibleColumns = this.visibleColumns;
277
+ let size = visibleColumns.length;
278
+ let content = [];
279
+ let cnt = 0;
280
+ while (size-- > 0) {
281
+ content.push({
282
+ column: visibleColumns[cnt++].name,
283
+ });
284
+ }
285
+ section.content = content;
286
+ // creating a new layout
287
+ this.boxLayout = {
288
+ sections: [section],
289
+ };
537
290
  }
538
- }
539
- // render methods
540
- renderSectionAsCard(row) {
541
- let skipPush = false;
542
- const cardData = {
543
- button: [],
544
- cell: [],
545
- columns: [],
546
- image: [],
547
- progressbar: [],
548
- text: [],
549
- };
550
- for (let index = 0; index < this.data.columns.length; index++) {
551
- const column = this.data.columns[index];
552
- if (column.visible !== false) {
553
- cardData.cell.push(row.cells[column.name]);
554
- cardData.columns.push(column);
555
- }
291
+ onSortChange(e) {
292
+ let column = getColumnByName(this.visibleColumns, e.detail.value);
293
+ this.sortBy = column.name;
556
294
  }
557
- //First cycle sets specific binds between cardIDs and cells
558
- for (const key in row.cells) {
559
- if (row.cells.hasOwnProperty(key)) {
560
- const cell = row.cells[key];
561
- if (cell.cardID !== undefined && cell.obj) {
562
- switch (cell.obj.p) {
563
- case 'BTN':
564
- do {
565
- cardData.button.push({});
566
- } while (cardData.button.length < cell.cardID);
567
- cardData.button[cell.cardID] = {
568
- label: cell.value,
569
- };
570
- break;
571
- case 'IMG':
572
- do {
573
- cardData.image.push({});
574
- } while (cardData.image.length < cell.cardID);
575
- cardData.image[cell.cardID] = {
576
- resource: cell.value,
577
- };
578
- break;
579
- case 'PGB':
580
- do {
581
- cardData.progressbar.push({});
582
- } while (cardData.progressbar.length < cell.cardID);
583
- cardData.progressbar[cell.cardID] = {
584
- value: cell.value,
585
- };
586
- break;
587
- default:
588
- do {
589
- cardData.text.push('');
590
- } while (cardData.text.length < cell.cardID);
591
- cardData.text[cell.cardID] = cell.value;
592
- break;
593
- }
594
- }
595
- }
295
+ onGlobalFilterChange({ detail }) {
296
+ let value = '';
297
+ if (detail && detail.value) {
298
+ value = detail.value;
299
+ }
300
+ this.globalFilterValue = value;
596
301
  }
597
- //Second cycle sets leftover binds automatically
598
- for (const key in row.cells) {
599
- if (row.cells.hasOwnProperty(key)) {
600
- const cell = row.cells[key];
601
- if (cell.cardID === undefined && cell.obj) {
602
- skipPush = false;
603
- switch (cell.obj.p) {
604
- case 'BTN':
605
- for (let index = 0; index < cardData.button.length; index++) {
606
- //If there are empty elements, the first one will be used
607
- if (!Object.keys(cardData.button[index]).length) {
608
- cardData.button[index] = {
609
- label: cell.value,
610
- };
611
- skipPush = true;
612
- break;
613
- }
614
- }
615
- //Otherwise a new element will be pushed
616
- if (!skipPush) {
617
- cardData.button.push({
618
- label: cell.value,
619
- });
620
- }
621
- break;
622
- case 'IMG':
623
- for (let index = 0; index < cardData.image.length; index++) {
624
- //If there are empty elements, the first one will be used
625
- if (!Object.keys(cardData.image[index]).length) {
626
- cardData.image[index] = {
627
- resource: cell.value,
628
- };
629
- skipPush = true;
630
- break;
631
- }
632
- }
633
- //Otherwise a new element will be pushed
634
- if (!skipPush) {
635
- cardData.image.push({
636
- resource: cell.value,
637
- });
638
- }
639
- break;
640
- case 'PGB':
641
- for (let index = 0; index < cardData.progressbar.length; index++) {
642
- //If there are empty elements, the first one will be used
643
- if (!Object.keys(cardData.progressbar[index])
644
- .length) {
645
- cardData.progressbar[index] = {
646
- value: cell.value,
647
- };
648
- skipPush = true;
649
- break;
650
- }
651
- }
652
- //Otherwise a new element will be pushed
653
- if (!skipPush) {
654
- cardData.progressbar.push({
655
- value: cell.value,
656
- });
657
- }
658
- break;
659
- default:
660
- for (let index = 0; index < cardData.text.length; index++) {
661
- //If there are empty elements, the first one will be used
662
- if (cardData.text[index] === '') {
663
- cardData.text[index] = cell.value;
664
- skipPush = true;
665
- break;
302
+ isSectionExpanded(row, section) {
303
+ if (!row.id || !section.id) {
304
+ return false;
305
+ }
306
+ return (this.collapsedSection[section.id] &&
307
+ this.collapsedSection[section.id][row.id]);
308
+ }
309
+ handleAutomaticBoxSelection() {
310
+ if (this.selectBox &&
311
+ this.selectBox > 0 &&
312
+ this.selectBox <= this.data.rows.length) {
313
+ this.selectedRows = [];
314
+ for (let boxRow of this.data.rows) {
315
+ if (boxRow.id === (this.selectBox - 1).toString()) {
316
+ this.selectedRows.push(boxRow);
317
+ break;
666
318
  }
667
- }
668
- //Otherwise a new element will be pushed
669
- if (!skipPush) {
670
- cardData.text.push(cell.value);
671
- }
672
- break;
673
- }
674
- }
675
- }
676
- }
677
- return h("kup-card", Object.assign({ data: cardData }, this.cardData));
678
- }
679
- renderRow(row) {
680
- const visibleColumns = [...this.visibleColumns];
681
- let boxContent = null;
682
- // if layout in row, use that one
683
- let rowLayout = row.layout;
684
- if (!rowLayout) {
685
- // otherwise, use 'default' layout
686
- rowLayout = this.boxLayout;
319
+ }
320
+ this.kupAutoBoxSelect.emit({
321
+ comp: this,
322
+ id: this.rootElement.id,
323
+ row: this.selectedRows[0],
324
+ });
325
+ }
687
326
  }
688
- let horizontal = false;
689
- if (rowLayout) {
690
- if (rowLayout.horizontal) {
691
- horizontal = true;
692
- }
693
- const sections = rowLayout.sections;
694
- let size = sections.length;
695
- let cnt = 0;
696
- if (size > 0) {
697
- boxContent = [];
698
- }
699
- // create fake parent section
700
- const parent = {
701
- horizontal: horizontal,
702
- };
703
- while (size-- > 0) {
704
- if (this.cardData !== null &&
705
- this.cardData !== undefined &&
706
- typeof this.cardData === 'object') {
707
- boxContent.push(this.renderSectionAsCard(row));
327
+ getEventDetails(el, e) {
328
+ let boxObject = null;
329
+ let cell = null;
330
+ let row = null;
331
+ let column = null;
332
+ if (el) {
333
+ boxObject =
334
+ el.closest('.box-object') ||
335
+ el.querySelector('.box-object') ||
336
+ el.closest('.f-cell');
337
+ }
338
+ if (boxObject) {
339
+ if (boxObject.classList.contains('f-cell')) {
340
+ const props = boxObject['kup-get-cell-props']();
341
+ cell = props.cell;
342
+ column = props.column;
343
+ row = props.row;
344
+ }
345
+ else {
346
+ cell = boxObject['data-cell'];
347
+ row = boxObject['data-row'];
348
+ column = getColumnByName(this.visibleColumns, boxObject.dataset.column);
349
+ }
708
350
  }
709
351
  else {
710
- boxContent.push(this.renderSection(sections[cnt++], parent, row, visibleColumns));
711
352
  }
712
- }
713
- }
714
- var isSelected = false;
715
- for (let select of this.selectedRows) {
716
- if (select.id === row.id) {
717
- isSelected = true;
718
- }
719
- }
720
- let multiSel = null;
721
- if (this.multiSelection) {
722
- multiSel = (h("div", { class: "box-selection" }, h("kup-checkbox", { checked: isSelected })));
723
- }
724
- let rowObject = null;
725
- if (this.enableRowActions && !this.swipeDisabled) {
726
- const menuClass = {
727
- 'row-action-menu': true,
728
- open: row === this.rowActionMenuOpened,
729
- };
730
- let rowActionMenuContent = null;
731
- if (row.actions) {
732
- const actionItems = row.actions.map((item, index) => {
733
- const iconClass = `icon ${item.icon}`;
734
- return (h("li", { tabindex: "0", onClick: () => this.onRowActionClick(row, item, index) }, h("div", { class: iconClass }), h("div", { class: "text" }, item.text)));
735
- });
736
- rowActionMenuContent = h("ul", null, actionItems);
737
- }
738
- rowObject = (h("div", { class: "row-actions-wrapper" }, h("div", { class: "row-actions-toggler" }, h("svg", { version: "1.1", width: "24", height: "24", viewBox: "0 0 24 24", onClick: () => this.onRowAction(row) }, h("path", { d: "M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z" })), h("div", { class: menuClass }, rowActionMenuContent))));
739
- }
740
- let badges = null;
741
- if (row.badgeData && row.badgeData.length > 0) {
742
- badges = row.badgeData.map((badge) => (h("kup-badge", { text: badge.text, class: badge['className']
743
- ? `centered ${badge['className']}`
744
- : 'centered', imageData: badge.imageData })));
745
- }
746
- const boxClass = {
747
- box: true,
748
- draggable: this.dragEnabled,
749
- selected: this.showSelection && isSelected,
750
- column: !horizontal,
751
- };
752
- const rowStyle = row.style || {};
753
- return (h("div", { class: "box-wrapper", style: rowStyle, ref: (el) => __classPrivateFieldGet(this, _KupBox_rowsRefs, "f").push(el) }, h("div", { class: boxClass, onClick: (e) => this.onBoxClick(e, row), ref: (el) => this.rowsRefs.push(el) }, multiSel, boxContent, badges), rowObject));
754
- }
755
- renderSection(section, parent, row, visibleColumns) {
756
- let sectionContent = null;
757
- if (section.sections && section.sections.length > 0) {
758
- // rendering child
759
- const sections = section.sections;
760
- let size = sections.length;
761
- let cnt = 0;
762
- if (size > 0) {
763
- sectionContent = [];
764
- }
765
- while (size-- > 0) {
766
- sectionContent.push(this.renderSection(sections[cnt++], section, row, visibleColumns));
767
- }
768
- }
769
- else if (section.content) {
770
- // rendering box objects
771
- const content = section.content;
772
- let size = content.length;
773
- let cnt = 0;
774
- if (size > 0) {
775
- sectionContent = [];
776
- }
777
- while (size-- > 0) {
778
- sectionContent.push(this.renderBoxObject({
779
- boxObject: content[cnt++],
780
- row,
781
- visibleColumns,
782
- }, true));
783
- }
784
- }
785
- else if (visibleColumns.length > 0) {
786
- const column = visibleColumns[0];
787
- sectionContent = this.renderBoxObject({
788
- boxObject: { column: column.name },
789
- row,
790
- visibleColumns,
791
- });
792
- }
793
- const sectionExpanded = this.isSectionExpanded(row, section);
794
- const isGrid = !!section.columns;
795
- const sectionClass = {
796
- 'box-section': true,
797
- open: sectionExpanded,
798
- column: !isGrid && !section.horizontal,
799
- grid: isGrid,
800
- titled: !!section.title,
801
- 'last-child': !section.sections || section.sections.length === 0,
802
- };
803
- const sectionStyle = section.style || {};
804
- if (section.dim && parent) {
805
- sectionStyle.flex = `0 0 ${section.dim}`;
806
- sectionStyle.overflow = 'hidden';
807
- if (parent.horizontal) {
808
- sectionStyle.maxWidth = section.dim;
809
- }
810
- else {
811
- sectionStyle.maxHeight = section.dim;
812
- }
813
- }
814
- if (isGrid) {
815
- sectionStyle['grid-template-columns'] = `repeat(${section.columns}, 1fr)`;
816
- }
817
- let sectionContainer = null;
818
- if (section.collapsible) {
819
- sectionClass['collapse-section'] = true;
820
- const contentClass = {
821
- content: true,
822
- };
823
- // TODO I18N
824
- let headerTitle = '';
825
- if (section.title) {
826
- headerTitle = section.title;
827
- }
828
- else if (sectionExpanded) {
829
- headerTitle = this.kupManager.language.translate(KupLanguageGeneric.COLLAPSE);
830
- }
831
- else {
832
- headerTitle = this.kupManager.language.translate(KupLanguageGeneric.EXPAND);
833
- }
834
- sectionContainer = (h("div", { class: sectionClass, style: sectionStyle }, h("div", { class: contentClass }, sectionContent), h("div", { class: "header", role: "button", onClick: (e) => {
835
- e.stopPropagation();
836
- this.toggleSectionExpand(row, section);
837
- } }, h("div", { class: "header-content" }, h("span", null, headerTitle), h(FImage, { resource: `${KupThemeIconValues.DROPDOWN}`, sizeX: "1.25em", sizeY: "1.25em", wrapperClass: sectionExpanded ? 'toggled' : '' })))));
838
- }
839
- else {
840
- const title = section.title ? h("h3", null, section.title) : null;
841
- sectionContainer = (h("div", { class: sectionClass, style: sectionStyle }, title, sectionContent));
842
- }
843
- return sectionContainer;
844
- }
845
- renderBoxObject({ boxObject, row, visibleColumns, }, fromSection) {
846
- const classObj = {
847
- 'box-object': true,
848
- };
849
- const boStyle = {};
850
- let column = null;
851
- let index = -1;
852
- for (let i = 0; i < visibleColumns.length; i++) {
853
- const c = visibleColumns[i];
854
- if (c.name === boxObject.column) {
855
- index = i;
856
- break;
857
- }
858
- }
859
- if (index >= 0) {
860
- column = visibleColumns[index];
861
- visibleColumns.splice(index, 1);
862
- }
863
- else if (fromSection) {
864
- column = this.data.columns.find((x) => x.name === boxObject.column);
865
- }
866
- const cell = row.cells[boxObject.column];
867
- let title = undefined;
868
- if (cell && !this.kupManager.objects.isEmptyKupObj(cell.obj)) {
869
- classObj['is-obj'] = true;
870
- if (this.kupManager.debug.isDebug()) {
871
- title =
872
- cell.obj.t + '; ' + cell.obj.p + '; ' + cell.obj.k + ';';
873
- }
874
- }
875
- const cellProps = {
876
- cell: cell,
877
- column: column,
878
- component: this,
879
- editable: this.editableData,
880
- renderKup: true,
881
- row: row,
882
- setSizes: true,
883
- shape: boxObject.shape,
884
- };
885
- return (h("div", { "data-cell": cell, "data-row": row, "data-column": boxObject.column, class: classObj, style: boStyle, title: title }, cell && column ? (h(FCell, Object.assign({}, cellProps))) : (h("span", null, boxObject.value))));
886
- }
887
- /**
888
- * Prepares the kanban sections by sorting the boxlist's data.
889
- * @returns {{jsx: VNode[], style: { [index: string]: string }}} jsx contains the virtual nodes of the Kanban sections, style contains the grid CSS settings.
890
- */
891
- kanbanMode() {
892
- // Testing whether there are columns to group by
893
- if (!this.kanban.columns || this.kanban.columns.length === 0) {
894
- this.kupManager.debug.logMessage(this, 'No columns to group by detected.', KupDebugCategory.ERROR);
895
- return {
896
- jsx: (h("div", { id: "empty-data-message", class: "box-wrapper" }, h("div", { ref: (el) => this.rowsRefs.push(el) }), this.kupManager.language.translate(KupLanguageGeneric.EMPTY_DATA))),
897
- style: { 'grid-template-columns': `repeat(1, 1fr)` },
898
- };
899
- }
900
- const kanbanSections = [];
901
- // Creating empty sections from prop-defined labels
902
- if (this.kanban.labels) {
903
- for (let index = 0; index < this.kanban.labels.length; index++) {
904
- const key = this.kanban.labels[index];
905
- kanbanSections.push({ labels: key, nodes: [] });
906
- }
353
+ return {
354
+ boxObject: boxObject ? boxObject : null,
355
+ column: column ? column : null,
356
+ cell: cell ? cell : null,
357
+ originalEvent: e,
358
+ row: row ? row : null,
359
+ };
907
360
  }
908
- // Browsing all rows
909
- for (let index = 0; index < this.rows.length; index++) {
910
- let key = [];
911
- // Creating the key for the current row
912
- for (let j = 0; j < this.kanban.columns.length; j++) {
913
- try {
914
- key.push(this.rows[index].cells[this.kanban.columns[j]].value);
915
- }
916
- catch (error) {
917
- this.kupManager.debug.logMessage(this, error, KupDebugCategory.WARNING);
918
- }
919
- }
920
- const check = {
921
- found: false,
922
- index: null,
923
- };
924
- // Browsing key array to search whether the current key exists or not
925
- for (let j = 0; j < kanbanSections.length; j++) {
926
- let sortingKey = kanbanSections[j].labels;
927
- let found = true;
928
- for (let i = 0; i < sortingKey.length; i++) {
929
- if (key[i] !== sortingKey[i]) {
930
- found = false;
931
- break;
932
- }
933
- }
934
- if (found) {
935
- check.found = true;
936
- check.index = j;
937
- break;
938
- }
939
- }
940
- // If current key exists, box will be pushed into the existing array of virtual nodes
941
- if (check.found) {
942
- kanbanSections[check.index].nodes.push(this.renderRow(this.rows[index]));
943
- }
944
- else {
945
- // Otherwise, a new section will be defined starting with just the current virtal node
946
- kanbanSections.push({
947
- labels: key,
948
- nodes: [this.renderRow(this.rows[index])],
949
- });
950
- }
361
+ contextMenuHandler(e) {
362
+ const details = this.getEventDetails(e.target, e);
363
+ return details;
951
364
  }
952
- // Once the arrays are set, they need to be emptied into columns
953
- const kanbanJSX = [];
954
- for (let index = 0; index < kanbanSections.length; index++) {
955
- const sortingKey = kanbanSections[index].labels;
956
- const props = {
957
- data: [],
958
- };
959
- for (let index = 0; index < sortingKey.length; index++) {
960
- props.data.push({
961
- value: sortingKey[index],
962
- id: sortingKey[index],
963
- });
964
- }
965
- kanbanJSX.push(h("div", { class: "kanban-section" }, h(FChip, Object.assign({}, props)), kanbanSections[index].nodes));
365
+ /**
366
+ * Checks if the element is the svg that opens the "row actions menu"
367
+ * @param element the element to check
368
+ */
369
+ checkIfElementIsActionMenuIcon(element) {
370
+ if (element.tagName && element.parentElement) {
371
+ return (element.tagName === 'svg' &&
372
+ element.parentElement.classList.contains('row-actions-toggler'));
373
+ }
374
+ return false;
966
375
  }
967
- return {
968
- jsx: kanbanJSX,
969
- style: {
970
- 'grid-template-columns': this.kanban.isStacked
971
- ? 'repeat(1fr)'
972
- : this.kanban.size
973
- ? `repeat(${Object.keys(kanbanSections).length}, ${this.kanban.size})`
974
- : `repeat(${Object.keys(kanbanSections).length}, 1fr)`,
975
- },
976
- };
977
- }
978
- didLoadInteractables() {
979
- this.interactableTouch.push(this.boxContainer);
980
- const tapCb = (e) => {
981
- if (this.hold) {
982
- this.hold = false;
983
- return;
984
- }
985
- switch (e.button) {
986
- case 2:
987
- this.kupBoxContextMenu.emit({
376
+ // event listeners
377
+ onBoxClick({ target }, row) {
378
+ if (!(target instanceof HTMLElement)) {
379
+ return;
380
+ }
381
+ // searching parent
382
+ let element = target;
383
+ let classList = element.classList;
384
+ while (!classList.contains('box-object') &&
385
+ !classList.contains('box-section') &&
386
+ !classList.contains('box')) {
387
+ element = element.parentElement;
388
+ if (element === null) {
389
+ break;
390
+ }
391
+ classList = element.classList;
392
+ }
393
+ // evaluating column
394
+ let column = null;
395
+ if (classList.contains('box-object')) {
396
+ column = element.dataset.column;
397
+ }
398
+ this.kupBoxClick.emit({
988
399
  comp: this,
989
400
  id: this.rootElement.id,
990
- details: this.contextMenuHandler(e),
991
- });
992
- break;
993
- }
994
- };
995
- const holdCb = (e) => {
996
- if (e.pointerType === 'pen' || e.pointerType === 'touch') {
997
- this.hold = true;
998
- this.kupBoxContextMenu.emit({
999
- comp: this,
1000
- id: this.rootElement.id,
1001
- details: this.contextMenuHandler(e),
401
+ row,
402
+ column,
1002
403
  });
1003
- }
1004
- };
1005
- this.kupManager.interact.on(this.boxContainer, KupPointerEventTypes.TAP, tapCb);
1006
- this.kupManager.interact.on(this.boxContainer, KupPointerEventTypes.HOLD, holdCb);
1007
- }
1008
- didRenderInteractables() {
1009
- if (this.dragEnabled) {
1010
- for (let index = 0; index < this.rowsRefs.length; index++) {
1011
- const row = this.rowsRefs[index];
1012
- const dataCb = () => {
1013
- const cellEl = this.rootElement.shadowRoot.querySelector('.box-object:hover');
1014
- return {
1015
- cell: cellEl['data-cell'],
1016
- column: getColumnByName(this.visibleColumns, cellEl.dataset.column),
1017
- id: this.rootElement.id,
1018
- multiple: this.multiSelection,
1019
- row: cellEl['data-row'],
1020
- selectedRows: this.selectedRows,
1021
- };
1022
- };
1023
- if (row && !this.interactableDrag.includes(row)) {
1024
- this.interactableDrag.push(row);
1025
- this.kupManager.interact.draggable(row, {
1026
- allowFrom: '.box-object',
1027
- cursorChecker() {
1028
- return null;
1029
- },
1030
- }, {
1031
- callback: dataCb,
1032
- }, KupDragEffect.BADGE);
404
+ // selecting box
405
+ if (this.multiSelection) {
406
+ // triggering multi selection
407
+ this.onSelectionCheckChange(row);
408
+ }
409
+ else {
410
+ this.selectedRows = [row];
1033
411
  }
1034
- }
1035
412
  }
1036
- if (this.dropEnabled) {
1037
- const dataCb = () => {
1038
- const receivingDetails = this.getEventDetails(this.rootElement.shadowRoot.querySelector('.box:hover'));
1039
- return {
1040
- cell: receivingDetails.cell,
1041
- column: receivingDetails.column,
1042
- id: this.rootElement.id,
1043
- row: receivingDetails.row,
1044
- };
1045
- };
1046
- if (!this.interactableDrop.includes(this.sectionRef)) {
1047
- this.interactableDrop.push(this.sectionRef);
1048
- this.kupManager.interact.dropzone(this.sectionRef, {
1049
- accept: `[${kupDraggableCellAttr}]`,
1050
- }, {
1051
- dispatcher: this.rootElement,
1052
- type: KupDropEventTypes.BOX,
413
+ onSelectionCheckChange(row) {
414
+ var index = -1;
415
+ for (let i = 0; i < this.selectedRows.length; i++) {
416
+ const select = this.selectedRows[i];
417
+ if (select.id === row.id) {
418
+ index = i;
419
+ break;
420
+ }
421
+ }
422
+ if (index >= 0) {
423
+ // remove row
424
+ this.selectedRows.splice(index, 1);
425
+ this.selectedRows = [...this.selectedRows];
426
+ }
427
+ else {
428
+ // add row
429
+ this.selectedRows = [...this.selectedRows, row];
430
+ }
431
+ this.kupBoxSelected.emit({
432
+ comp: this,
433
+ id: this.rootElement.id,
434
+ rows: this.selectedRows,
1053
435
  });
1054
- }
1055
- for (let index = 0; index < this.rowsRefs.length; index++) {
1056
- const row = this.rowsRefs[index];
1057
- if (row && !this.interactableDrop.includes(row)) {
1058
- this.interactableDrop.push(row);
1059
- this.kupManager.interact.dropzone(row, {
1060
- accept: `[${kupDraggableCellAttr}]`,
1061
- }, {
1062
- callback: dataCb,
1063
- dispatcher: this.rootElement,
1064
- type: KupDropEventTypes.BOX,
1065
- });
1066
- }
1067
- }
1068
436
  }
1069
- }
1070
- /*-------------------------------------------------*/
1071
- /* L i f e c y c l e H o o k s */
1072
- /*-------------------------------------------------*/
1073
- componentWillLoad() {
1074
- this.kupManager.debug.logLoad(this, false);
1075
- if (this.rowsPerPage) {
1076
- this.currentRowsPerPage = this.rowsPerPage;
437
+ toggleSectionExpand(row, section) {
438
+ // check if section / row has id
439
+ if (!section.id) {
440
+ // error
441
+ console.error('cannot expand / collapse a section withoun an ID');
442
+ return;
443
+ }
444
+ if (!row.id) {
445
+ // error
446
+ console.error('cannot expand / collapse a section of a row without ad id');
447
+ return;
448
+ }
449
+ // check if section already in collapsedSection
450
+ if (!this.collapsedSection[section.id]) {
451
+ // adding element and row, setting it to expanded
452
+ this.collapsedSection[section.id] = {};
453
+ this.collapsedSection[section.id][row.id] = true;
454
+ }
455
+ else {
456
+ const s = this.collapsedSection[section.id];
457
+ if (!s[row.id]) {
458
+ s[row.id] = true;
459
+ }
460
+ else {
461
+ s[row.id] = !s[row.id];
462
+ }
463
+ }
464
+ // triggering rendering
465
+ this.collapsedSection = Object.assign({}, this.collapsedSection);
1077
466
  }
1078
- if (this.data &&
1079
- this.data.rows &&
1080
- this.currentRowsPerPage > this.data.rows.length) {
1081
- this.currentRowsPerPage = this.data.rows.length;
467
+ onRowAction(row) {
468
+ if (!row) {
469
+ return;
470
+ }
471
+ if (row === this.rowActionMenuOpened) {
472
+ // closing menu
473
+ this.rowActionMenuOpened = null;
474
+ return;
475
+ }
476
+ if (row.actions) {
477
+ // actions already loaded -> show menu
478
+ this.rowActionMenuOpened = row;
479
+ }
480
+ else {
481
+ // no actions -> triggering event
482
+ this.kupRowActionMenuClick.emit({
483
+ comp: this,
484
+ id: this.rootElement.id,
485
+ row,
486
+ });
487
+ }
1082
488
  }
1083
- this.kupManager.language.register(this);
1084
- this.kupManager.theme.register(this);
1085
- this.onDataChanged();
1086
- this.adjustPaginator();
1087
- if (document.querySelector('.header')) {
1088
- __classPrivateFieldSet(this, _KupBox_navBarHeight, document.querySelector('.header').clientHeight, "f");
489
+ onRowActionClick(row, action, index) {
490
+ this.kupRowActionClick.emit({
491
+ comp: this,
492
+ id: this.rootElement.id,
493
+ row,
494
+ action,
495
+ index,
496
+ });
1089
497
  }
1090
- else {
1091
- __classPrivateFieldSet(this, _KupBox_navBarHeight, 0, "f");
498
+ /**
499
+ * see onDocumentClick in kup-combo
500
+ */
501
+ clickFunction(event) {
502
+ try {
503
+ const targets = event.composedPath();
504
+ for (let target of targets) {
505
+ if (this.checkIfElementIsActionMenuIcon(target)) {
506
+ return;
507
+ }
508
+ }
509
+ }
510
+ catch (err) {
511
+ if (this.checkIfElementIsActionMenuIcon(event.target)) {
512
+ return;
513
+ }
514
+ }
515
+ this.rowActionMenuOpened = null;
1092
516
  }
1093
- if (document.querySelector('.topbar')) {
1094
- __classPrivateFieldSet(this, _KupBox_navBarHeight, __classPrivateFieldGet(this, _KupBox_navBarHeight, "f") + document.querySelector('.topbar').clientHeight, "f");
517
+ handlePageChange(pageNumber) {
518
+ const newPage = pageChange(pageNumber, this.filteredRows.length, this.currentRowsPerPage);
519
+ if (newPage) {
520
+ this.currentPage = newPage;
521
+ }
1095
522
  }
1096
- __classPrivateFieldGet(this, _KupBox_instances, "m", _KupBox_setObserver).call(this);
1097
- }
1098
- componentDidLoad() {
1099
- this.handleAutomaticBoxSelection();
1100
- // When component is created, then the listener is set. @See clickFunction for more details
1101
- document.addEventListener('click', this.clickFunction.bind(this));
1102
- this.currentPage = this.pageSelected;
1103
- if (this.multiSelection && this.selectedRowsState) {
1104
- this.selectedRows = [];
1105
- let selectedIds = this.selectedRowsState.split(';');
1106
- this.selectedRows = this.data.rows.filter((r) => {
1107
- return selectedIds.indexOf(r.id) >= 0;
1108
- });
523
+ handleRowsPerPageChange(rowsNumber) {
524
+ const newRows = rowsPerPageChange(rowsNumber, this.filteredRows.length);
525
+ if (newRows) {
526
+ this.currentRowsPerPage = newRows;
527
+ this.adjustPaginator();
528
+ }
1109
529
  }
1110
- this.didLoadInteractables();
1111
- this.kupDidLoad.emit({ comp: this, id: this.rootElement.id });
1112
- this.kupManager.debug.logLoad(this, true);
1113
- }
1114
- componentWillRender() {
1115
- this.kupManager.debug.logRender(this, false);
1116
- }
1117
- componentDidRender() {
1118
- const root = this.rootElement.shadowRoot;
1119
- if (root) {
1120
- const fs = root.querySelectorAll('.f-text-field');
1121
- for (let index = 0; index < fs.length; index++) {
1122
- FTextFieldMDC(fs[index]);
1123
- }
530
+ adjustPaginator() {
531
+ const numberOfRows = this.rows.length;
532
+ // check if current page is valid
533
+ const numberOfPages = Math.ceil(numberOfRows / this.currentRowsPerPage);
534
+ if (this.currentPage > numberOfPages) {
535
+ // reset page
536
+ this.currentPage = 1;
537
+ }
1124
538
  }
1125
- this.checkScrollOnHover();
1126
- this.persistState();
1127
- this.didRenderInteractables();
1128
- __classPrivateFieldGet(this, _KupBox_instances, "m", _KupBox_didRenderObservers).call(this);
1129
- this.kupManager.debug.logRender(this, true);
1130
- }
1131
- render() {
1132
- const isKanban = !!(typeof this.kanban === 'object' && this.kanban !== null);
1133
- let sortPanel = null;
1134
- if (this.sortEnabled) {
1135
- // creating items
1136
- const visibleColumnsItems = this.visibleColumns.map((column) => {
1137
- const item = {
1138
- value: column.title,
1139
- id: column.name,
1140
- selected: column.name === this.sortBy,
539
+ // render methods
540
+ renderSectionAsCard(row) {
541
+ let skipPush = false;
542
+ const cardData = {
543
+ button: [],
544
+ cell: [],
545
+ columns: [],
546
+ image: [],
547
+ progressbar: [],
548
+ text: [],
1141
549
  };
1142
- return item;
1143
- });
1144
- const items = [{ value: '', id: '' }, ...visibleColumnsItems];
1145
- let textfieldData = {
1146
- label: this.kupManager.language.translate(KupLanguageGeneric.SORT_BY),
1147
- trailingIcon: true,
1148
- };
1149
- let listData = {
1150
- data: items,
1151
- selectable: true,
1152
- };
1153
- let data = {
1154
- 'kup-text-field': textfieldData,
1155
- 'kup-list': listData,
1156
- };
1157
- sortPanel = (h("div", { id: "sort-panel" }, h("kup-combobox", { data: data, initialValue: this.sortBy, "onkup-combobox-itemclick": (e) => this.onSortChange(e) })));
1158
- }
1159
- let filterPanel = null;
1160
- if (this.globalFilter) {
1161
- filterPanel = (h("div", { id: "global-filter" }, h("kup-text-field", { fullWidth: true, label: this.kupManager.language.translate(KupLanguageSearch.SEARCH), icon: KupThemeIconValues.SEARCH, initialValue: this.globalFilterValue, "onkup-textfield-input": (event) => {
1162
- window.clearTimeout(this.globalFilterTimeout);
1163
- this.globalFilterTimeout = window.setTimeout(() => this.onGlobalFilterChange(event), 600);
1164
- } })));
1165
- }
1166
- let paginator = null;
1167
- if (!this.lazyLoadRows && this.pagination) {
1168
- paginator = (h(FPaginator, { id: top ? 'top-paginator' : 'bottom-paginator', currentPage: this.currentPage, max: this.filteredRows.length, mode: FPaginatorMode.SIMPLE, perPage: this.currentRowsPerPage
1169
- ? this.currentRowsPerPage
1170
- : this.rowsPerPage, onPageChange: (e) => this.handlePageChange(e.detail.value), onRowsChange: (e) => this.handleRowsPerPageChange(e.detail.value) }));
1171
- }
1172
- let boxContent = null;
1173
- let containerStyle = {};
1174
- if (this.rows.length === 0) {
1175
- boxContent = (h("div", { id: "empty-data-message", class: "box-wrapper" }, h("div", { class: "box", ref: (el) => this.rowsRefs.push(el) }, this.kupManager.language.translate(KupLanguageGeneric.EMPTY_DATA))));
1176
- containerStyle = { 'grid-template-columns': `repeat(1, 1fr)` };
1177
- }
1178
- else if (isKanban) {
1179
- const kanban = this.kanbanMode();
1180
- boxContent = kanban.jsx;
1181
- containerStyle = kanban.style;
1182
- }
1183
- else {
1184
- containerStyle = {
1185
- 'grid-template-columns': `repeat(${this.columns}, 1fr)`,
1186
- };
1187
- const rows = this.rows;
1188
- let size = rows.length;
1189
- let cnt = 0;
1190
- boxContent = [];
1191
- while (size-- > 0) {
1192
- boxContent.push(this.renderRow(rows[cnt++]));
1193
- }
550
+ for (let index = 0; index < this.data.columns.length; index++) {
551
+ const column = this.data.columns[index];
552
+ if (column.visible !== false) {
553
+ cardData.cell.push(row.cells[column.name]);
554
+ cardData.columns.push(column);
555
+ }
556
+ }
557
+ //First cycle sets specific binds between cardIDs and cells
558
+ for (const key in row.cells) {
559
+ if (row.cells.hasOwnProperty(key)) {
560
+ const cell = row.cells[key];
561
+ if (cell.cardID !== undefined && cell.obj) {
562
+ switch (cell.obj.p) {
563
+ case 'BTN':
564
+ do {
565
+ cardData.button.push({});
566
+ } while (cardData.button.length < cell.cardID);
567
+ cardData.button[cell.cardID] = {
568
+ label: cell.value,
569
+ };
570
+ break;
571
+ case 'IMG':
572
+ do {
573
+ cardData.image.push({});
574
+ } while (cardData.image.length < cell.cardID);
575
+ cardData.image[cell.cardID] = {
576
+ resource: cell.value,
577
+ };
578
+ break;
579
+ case 'PGB':
580
+ do {
581
+ cardData.progressbar.push({});
582
+ } while (cardData.progressbar.length < cell.cardID);
583
+ cardData.progressbar[cell.cardID] = {
584
+ value: cell.value,
585
+ };
586
+ break;
587
+ default:
588
+ do {
589
+ cardData.text.push('');
590
+ } while (cardData.text.length < cell.cardID);
591
+ cardData.text[cell.cardID] = cell.value;
592
+ break;
593
+ }
594
+ }
595
+ }
596
+ }
597
+ //Second cycle sets leftover binds automatically
598
+ for (const key in row.cells) {
599
+ if (row.cells.hasOwnProperty(key)) {
600
+ const cell = row.cells[key];
601
+ if (cell.cardID === undefined && cell.obj) {
602
+ skipPush = false;
603
+ switch (cell.obj.p) {
604
+ case 'BTN':
605
+ for (let index = 0; index < cardData.button.length; index++) {
606
+ //If there are empty elements, the first one will be used
607
+ if (!Object.keys(cardData.button[index]).length) {
608
+ cardData.button[index] = {
609
+ label: cell.value,
610
+ };
611
+ skipPush = true;
612
+ break;
613
+ }
614
+ }
615
+ //Otherwise a new element will be pushed
616
+ if (!skipPush) {
617
+ cardData.button.push({
618
+ label: cell.value,
619
+ });
620
+ }
621
+ break;
622
+ case 'IMG':
623
+ for (let index = 0; index < cardData.image.length; index++) {
624
+ //If there are empty elements, the first one will be used
625
+ if (!Object.keys(cardData.image[index]).length) {
626
+ cardData.image[index] = {
627
+ resource: cell.value,
628
+ };
629
+ skipPush = true;
630
+ break;
631
+ }
632
+ }
633
+ //Otherwise a new element will be pushed
634
+ if (!skipPush) {
635
+ cardData.image.push({
636
+ resource: cell.value,
637
+ });
638
+ }
639
+ break;
640
+ case 'PGB':
641
+ for (let index = 0; index < cardData.progressbar.length; index++) {
642
+ //If there are empty elements, the first one will be used
643
+ if (!Object.keys(cardData.progressbar[index])
644
+ .length) {
645
+ cardData.progressbar[index] = {
646
+ value: cell.value,
647
+ };
648
+ skipPush = true;
649
+ break;
650
+ }
651
+ }
652
+ //Otherwise a new element will be pushed
653
+ if (!skipPush) {
654
+ cardData.progressbar.push({
655
+ value: cell.value,
656
+ });
657
+ }
658
+ break;
659
+ default:
660
+ for (let index = 0; index < cardData.text.length; index++) {
661
+ //If there are empty elements, the first one will be used
662
+ if (cardData.text[index] === '') {
663
+ cardData.text[index] = cell.value;
664
+ skipPush = true;
665
+ break;
666
+ }
667
+ }
668
+ //Otherwise a new element will be pushed
669
+ if (!skipPush) {
670
+ cardData.text.push(cell.value);
671
+ }
672
+ break;
673
+ }
674
+ }
675
+ }
676
+ }
677
+ return h("kup-card", Object.assign({ data: cardData }, this.cardData));
678
+ }
679
+ renderRow(row) {
680
+ const visibleColumns = [...this.visibleColumns];
681
+ let boxContent = null;
682
+ // if layout in row, use that one
683
+ let rowLayout = row.layout;
684
+ if (!rowLayout) {
685
+ // otherwise, use 'default' layout
686
+ rowLayout = this.boxLayout;
687
+ }
688
+ let horizontal = false;
689
+ if (rowLayout) {
690
+ if (rowLayout.horizontal) {
691
+ horizontal = true;
692
+ }
693
+ const sections = rowLayout.sections;
694
+ let size = sections.length;
695
+ let cnt = 0;
696
+ if (size > 0) {
697
+ boxContent = [];
698
+ }
699
+ // create fake parent section
700
+ const parent = {
701
+ horizontal: horizontal,
702
+ };
703
+ while (size-- > 0) {
704
+ if (this.cardData !== null &&
705
+ this.cardData !== undefined &&
706
+ typeof this.cardData === 'object') {
707
+ boxContent.push(this.renderSectionAsCard(row));
708
+ }
709
+ else {
710
+ boxContent.push(this.renderSection(sections[cnt++], parent, row, visibleColumns));
711
+ }
712
+ }
713
+ }
714
+ var isSelected = false;
715
+ for (let select of this.selectedRows) {
716
+ if (select.id === row.id) {
717
+ isSelected = true;
718
+ }
719
+ }
720
+ let multiSel = null;
721
+ if (this.multiSelection) {
722
+ multiSel = (h("div", { class: "box-selection" }, h("kup-checkbox", { checked: isSelected })));
723
+ }
724
+ let rowObject = null;
725
+ if (this.enableRowActions && !this.swipeDisabled) {
726
+ const menuClass = {
727
+ 'row-action-menu': true,
728
+ open: row === this.rowActionMenuOpened,
729
+ };
730
+ let rowActionMenuContent = null;
731
+ if (row.actions) {
732
+ const actionItems = row.actions.map((item, index) => {
733
+ const iconClass = `icon ${item.icon}`;
734
+ return (h("li", { tabindex: "0", onClick: () => this.onRowActionClick(row, item, index) }, h("div", { class: iconClass }), h("div", { class: "text" }, item.text)));
735
+ });
736
+ rowActionMenuContent = h("ul", null, actionItems);
737
+ }
738
+ rowObject = (h("div", { class: "row-actions-wrapper" }, h("div", { class: "row-actions-toggler" }, h("svg", { version: "1.1", width: "24", height: "24", viewBox: "0 0 24 24", onClick: () => this.onRowAction(row) }, h("path", { d: "M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z" })), h("div", { class: menuClass }, rowActionMenuContent))));
739
+ }
740
+ let badges = null;
741
+ if (row.badgeData && row.badgeData.length > 0) {
742
+ badges = row.badgeData.map((badge) => (h("kup-badge", { text: badge.text, class: badge['className']
743
+ ? `centered ${badge['className']}`
744
+ : 'centered', imageData: badge.imageData })));
745
+ }
746
+ const boxClass = {
747
+ box: true,
748
+ draggable: this.dragEnabled,
749
+ selected: this.showSelection && isSelected,
750
+ column: !horizontal,
751
+ };
752
+ const rowStyle = row.style || {};
753
+ return (h("div", { class: "box-wrapper", style: rowStyle, ref: (el) => __classPrivateFieldGet(this, _KupBox_rowsRefs, "f").push(el) }, h("div", { class: boxClass, onClick: (e) => this.onBoxClick(e, row), ref: (el) => this.rowsRefs.push(el) }, multiSel, boxContent, badges), rowObject));
754
+ }
755
+ renderSection(section, parent, row, visibleColumns) {
756
+ let sectionContent = null;
757
+ if (section.sections && section.sections.length > 0) {
758
+ // rendering child
759
+ const sections = section.sections;
760
+ let size = sections.length;
761
+ let cnt = 0;
762
+ if (size > 0) {
763
+ sectionContent = [];
764
+ }
765
+ while (size-- > 0) {
766
+ sectionContent.push(this.renderSection(sections[cnt++], section, row, visibleColumns));
767
+ }
768
+ }
769
+ else if (section.content) {
770
+ // rendering box objects
771
+ const content = section.content;
772
+ let size = content.length;
773
+ let cnt = 0;
774
+ if (size > 0) {
775
+ sectionContent = [];
776
+ }
777
+ while (size-- > 0) {
778
+ sectionContent.push(this.renderBoxObject({
779
+ boxObject: content[cnt++],
780
+ row,
781
+ visibleColumns,
782
+ }, true));
783
+ }
784
+ }
785
+ else if (visibleColumns.length > 0) {
786
+ const column = visibleColumns[0];
787
+ sectionContent = this.renderBoxObject({
788
+ boxObject: { column: column.name },
789
+ row,
790
+ visibleColumns,
791
+ });
792
+ }
793
+ const sectionExpanded = this.isSectionExpanded(row, section);
794
+ const isGrid = !!section.columns;
795
+ const sectionClass = {
796
+ 'box-section': true,
797
+ open: sectionExpanded,
798
+ column: !isGrid && !section.horizontal,
799
+ grid: isGrid,
800
+ titled: !!section.title,
801
+ 'last-child': !section.sections || section.sections.length === 0,
802
+ };
803
+ const sectionStyle = section.style || {};
804
+ if (section.dim && parent) {
805
+ sectionStyle.flex = `0 0 ${section.dim}`;
806
+ sectionStyle.overflow = 'hidden';
807
+ if (parent.horizontal) {
808
+ sectionStyle.maxWidth = section.dim;
809
+ }
810
+ else {
811
+ sectionStyle.maxHeight = section.dim;
812
+ }
813
+ }
814
+ if (isGrid) {
815
+ sectionStyle['grid-template-columns'] = `repeat(${section.columns}, 1fr)`;
816
+ }
817
+ let sectionContainer = null;
818
+ if (section.collapsible) {
819
+ sectionClass['collapse-section'] = true;
820
+ const contentClass = {
821
+ content: true,
822
+ };
823
+ // TODO I18N
824
+ let headerTitle = '';
825
+ if (section.title) {
826
+ headerTitle = section.title;
827
+ }
828
+ else if (sectionExpanded) {
829
+ headerTitle = this.kupManager.language.translate(KupLanguageGeneric.COLLAPSE);
830
+ }
831
+ else {
832
+ headerTitle = this.kupManager.language.translate(KupLanguageGeneric.EXPAND);
833
+ }
834
+ sectionContainer = (h("div", { class: sectionClass, style: sectionStyle }, h("div", { class: contentClass }, sectionContent), h("div", { class: "header", role: "button", onClick: (e) => {
835
+ e.stopPropagation();
836
+ this.toggleSectionExpand(row, section);
837
+ } }, h("div", { class: "header-content" }, h("span", null, headerTitle), h(FImage, { resource: `${KupThemeIconValues.DROPDOWN}`, sizeX: "1.25em", sizeY: "1.25em", wrapperClass: sectionExpanded ? 'toggled' : '' })))));
838
+ }
839
+ else {
840
+ const title = section.title ? h("h3", null, section.title) : null;
841
+ sectionContainer = (h("div", { class: sectionClass, style: sectionStyle }, title, sectionContent));
842
+ }
843
+ return sectionContainer;
1194
844
  }
1195
- return (h(Host, null, h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, h("div", { class: 'box-component', ref: (el) => (this.sectionRef = el) }, sortPanel, filterPanel, paginator, h("div", { class: isKanban ? 'is-kanban' : '', id: 'box-container', style: containerStyle, onContextMenu: (e) => {
1196
- e.preventDefault();
1197
- }, ref: (el) => (this.boxContainer =
1198
- el) }, boxContent)))));
1199
- }
1200
- disconnectedCallback() {
1201
- this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop));
1202
- this.kupManager.language.unregister(this);
1203
- this.kupManager.theme.unregister(this);
1204
- if (this.scrollOnHover) {
1205
- this.kupManager.scrollOnHover.unregister(this.boxContainer);
845
+ renderBoxObject({ boxObject, row, visibleColumns, }, fromSection) {
846
+ const classObj = {
847
+ 'box-object': true,
848
+ };
849
+ const boStyle = {};
850
+ let column = null;
851
+ let index = -1;
852
+ for (let i = 0; i < visibleColumns.length; i++) {
853
+ const c = visibleColumns[i];
854
+ if (c.name === boxObject.column) {
855
+ index = i;
856
+ break;
857
+ }
858
+ }
859
+ if (index >= 0) {
860
+ column = visibleColumns[index];
861
+ visibleColumns.splice(index, 1);
862
+ }
863
+ else if (fromSection) {
864
+ column = this.data.columns.find((x) => x.name === boxObject.column);
865
+ }
866
+ const cell = row.cells[boxObject.column];
867
+ let title = undefined;
868
+ if (cell && !this.kupManager.objects.isEmptyKupObj(cell.obj)) {
869
+ classObj['is-obj'] = true;
870
+ if (this.kupManager.debug.isDebug()) {
871
+ title =
872
+ cell.obj.t + '; ' + cell.obj.p + '; ' + cell.obj.k + ';';
873
+ }
874
+ }
875
+ const cellProps = {
876
+ cell: cell,
877
+ column: column,
878
+ component: this,
879
+ editable: this.editableData,
880
+ renderKup: true,
881
+ row: row,
882
+ setSizes: true,
883
+ shape: boxObject.shape,
884
+ };
885
+ return (h("div", { "data-cell": cell, "data-row": row, "data-column": boxObject.column, class: classObj, style: boStyle, title: title }, cell && column ? (h(FCell, Object.assign({}, cellProps))) : (h("span", null, boxObject.value))));
1206
886
  }
1207
- // When component is destroyed, then the listener is removed. @See clickFunction for more details
1208
- document.removeEventListener('click', this.clickFunction.bind(this));
1209
- this.kupDidUnload.emit({ comp: this, id: this.rootElement.id });
1210
- }
1211
- static get is() { return "kup-box"; }
1212
- static get encapsulation() { return "shadow"; }
1213
- static get originalStyleUrls() {
1214
- return {
1215
- "$": ["kup-box.scss"]
1216
- };
1217
- }
1218
- static get styleUrls() {
1219
- return {
1220
- "$": ["kup-box.css"]
1221
- };
1222
- }
1223
- static get properties() {
1224
- return {
1225
- "cardData": {
1226
- "type": "unknown",
1227
- "mutable": false,
1228
- "complexType": {
1229
- "original": "GenericObject",
1230
- "resolved": "GenericObject",
1231
- "references": {
1232
- "GenericObject": {
1233
- "location": "import",
1234
- "path": "../../types/GenericTypes",
1235
- "id": "src/types/GenericTypes.ts::GenericObject"
887
+ /**
888
+ * Prepares the kanban sections by sorting the boxlist's data.
889
+ * @returns {{jsx: VNode[], style: { [index: string]: string }}} jsx contains the virtual nodes of the Kanban sections, style contains the grid CSS settings.
890
+ */
891
+ kanbanMode() {
892
+ // Testing whether there are columns to group by
893
+ if (!this.kanban.columns || this.kanban.columns.length === 0) {
894
+ this.kupManager.debug.logMessage(this, 'No columns to group by detected.', KupDebugCategory.ERROR);
895
+ return {
896
+ jsx: (h("div", { id: "empty-data-message", class: "box-wrapper" }, h("div", { ref: (el) => this.rowsRefs.push(el) }), this.kupManager.language.translate(KupLanguageGeneric.EMPTY_DATA))),
897
+ style: { 'grid-template-columns': `repeat(1, 1fr)` },
898
+ };
899
+ }
900
+ const kanbanSections = [];
901
+ // Creating empty sections from prop-defined labels
902
+ if (this.kanban.labels) {
903
+ for (let index = 0; index < this.kanban.labels.length; index++) {
904
+ const key = this.kanban.labels[index];
905
+ kanbanSections.push({ labels: key, nodes: [] });
1236
906
  }
1237
- }
1238
- },
1239
- "required": false,
1240
- "optional": false,
1241
- "docs": {
1242
- "tags": [{
1243
- "name": "default",
1244
- "text": "null"
1245
- }],
1246
- "text": "Data of the card linked to the box when the latter's layout must be a premade template."
1247
- },
1248
- "defaultValue": "null"
1249
- },
1250
- "columns": {
1251
- "type": "number",
1252
- "mutable": false,
1253
- "complexType": {
1254
- "original": "number",
1255
- "resolved": "number",
1256
- "references": {}
1257
- },
1258
- "required": false,
1259
- "optional": false,
1260
- "docs": {
1261
- "tags": [{
1262
- "name": "default",
1263
- "text": "1"
1264
- }],
1265
- "text": "Number of columns"
1266
- },
1267
- "attribute": "columns",
1268
- "reflect": false,
1269
- "defaultValue": "1"
1270
- },
1271
- "customStyle": {
1272
- "type": "string",
1273
- "mutable": false,
1274
- "complexType": {
1275
- "original": "string",
1276
- "resolved": "string",
1277
- "references": {}
1278
- },
1279
- "required": false,
1280
- "optional": false,
1281
- "docs": {
1282
- "tags": [{
1283
- "name": "default",
1284
- "text": "\"\""
1285
- }, {
1286
- "name": "see",
1287
- "text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
1288
- }],
1289
- "text": "Custom style of the component."
1290
- },
1291
- "attribute": "custom-style",
1292
- "reflect": false,
1293
- "defaultValue": "''"
1294
- },
1295
- "data": {
1296
- "type": "unknown",
1297
- "mutable": false,
1298
- "complexType": {
1299
- "original": "KupBoxData",
1300
- "resolved": "KupBoxData",
1301
- "references": {
1302
- "KupBoxData": {
1303
- "location": "import",
1304
- "path": "./kup-box-declarations",
1305
- "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxData"
907
+ }
908
+ // Browsing all rows
909
+ for (let index = 0; index < this.rows.length; index++) {
910
+ let key = [];
911
+ // Creating the key for the current row
912
+ for (let j = 0; j < this.kanban.columns.length; j++) {
913
+ try {
914
+ key.push(this.rows[index].cells[this.kanban.columns[j]].value);
915
+ }
916
+ catch (error) {
917
+ this.kupManager.debug.logMessage(this, error, KupDebugCategory.WARNING);
918
+ }
1306
919
  }
1307
- }
1308
- },
1309
- "required": false,
1310
- "optional": false,
1311
- "docs": {
1312
- "tags": [{
1313
- "name": "default",
1314
- "text": "null"
1315
- }],
1316
- "text": "Actual data of the box."
1317
- },
1318
- "defaultValue": "null"
1319
- },
1320
- "dragEnabled": {
1321
- "type": "boolean",
1322
- "mutable": false,
1323
- "complexType": {
1324
- "original": "boolean",
1325
- "resolved": "boolean",
1326
- "references": {}
1327
- },
1328
- "required": false,
1329
- "optional": false,
1330
- "docs": {
1331
- "tags": [{
1332
- "name": "default",
1333
- "text": "false"
1334
- }],
1335
- "text": "Enable dragging"
1336
- },
1337
- "attribute": "drag-enabled",
1338
- "reflect": false,
1339
- "defaultValue": "false"
1340
- },
1341
- "dropEnabled": {
1342
- "type": "boolean",
1343
- "mutable": false,
1344
- "complexType": {
1345
- "original": "boolean",
1346
- "resolved": "boolean",
1347
- "references": {}
1348
- },
1349
- "required": false,
1350
- "optional": false,
1351
- "docs": {
1352
- "tags": [{
1353
- "name": "default",
1354
- "text": "false"
1355
- }],
1356
- "text": "Enable dropping"
1357
- },
1358
- "attribute": "drop-enabled",
1359
- "reflect": false,
1360
- "defaultValue": "false"
1361
- },
1362
- "dropOnSection": {
1363
- "type": "boolean",
1364
- "mutable": false,
1365
- "complexType": {
1366
- "original": "boolean",
1367
- "resolved": "boolean",
1368
- "references": {}
1369
- },
1370
- "required": false,
1371
- "optional": false,
1372
- "docs": {
1373
- "tags": [{
1374
- "name": "default",
1375
- "text": "false"
1376
- }],
1377
- "text": "Drop can be done in section"
1378
- },
1379
- "attribute": "drop-on-section",
1380
- "reflect": false,
1381
- "defaultValue": "false"
1382
- },
1383
- "editableData": {
1384
- "type": "boolean",
1385
- "mutable": false,
1386
- "complexType": {
1387
- "original": "boolean",
1388
- "resolved": "boolean",
1389
- "references": {}
1390
- },
1391
- "required": false,
1392
- "optional": false,
1393
- "docs": {
1394
- "tags": [{
1395
- "name": "default",
1396
- "text": "false"
1397
- }],
1398
- "text": "When set to true, editable cells will be rendered using input components."
1399
- },
1400
- "attribute": "editable-data",
1401
- "reflect": false,
1402
- "defaultValue": "false"
1403
- },
1404
- "enableRowActions": {
1405
- "type": "boolean",
1406
- "mutable": false,
1407
- "complexType": {
1408
- "original": "boolean",
1409
- "resolved": "boolean",
1410
- "references": {}
1411
- },
1412
- "required": false,
1413
- "optional": false,
1414
- "docs": {
1415
- "tags": [{
1416
- "name": "default",
1417
- "text": "false"
1418
- }],
1419
- "text": "If enabled, a button to load / display the row actions\r\nwill be displayed on the right of every box"
1420
- },
1421
- "attribute": "enable-row-actions",
1422
- "reflect": false,
1423
- "defaultValue": "false"
1424
- },
1425
- "globalFilter": {
1426
- "type": "boolean",
1427
- "mutable": false,
1428
- "complexType": {
1429
- "original": "boolean",
1430
- "resolved": "boolean",
1431
- "references": {}
1432
- },
1433
- "required": false,
1434
- "optional": false,
1435
- "docs": {
1436
- "tags": [{
1437
- "name": "default",
1438
- "text": "false"
1439
- }],
1440
- "text": "When set to true it activates the global filter."
1441
- },
1442
- "attribute": "global-filter",
1443
- "reflect": false,
1444
- "defaultValue": "false"
1445
- },
1446
- "globalFilterValue": {
1447
- "type": "string",
1448
- "mutable": true,
1449
- "complexType": {
1450
- "original": "string",
1451
- "resolved": "string",
1452
- "references": {}
1453
- },
1454
- "required": false,
1455
- "optional": false,
1456
- "docs": {
1457
- "tags": [{
1458
- "name": "default",
1459
- "text": "\"\""
1460
- }],
1461
- "text": "The value of the global filter."
1462
- },
1463
- "attribute": "global-filter-value",
1464
- "reflect": true,
1465
- "defaultValue": "''"
1466
- },
1467
- "kanban": {
1468
- "type": "unknown",
1469
- "mutable": false,
1470
- "complexType": {
1471
- "original": "KupBoxKanban",
1472
- "resolved": "KupBoxKanban",
1473
- "references": {
1474
- "KupBoxKanban": {
1475
- "location": "import",
1476
- "path": "./kup-box-declarations",
1477
- "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxKanban"
920
+ const check = {
921
+ found: false,
922
+ index: null,
923
+ };
924
+ // Browsing key array to search whether the current key exists or not
925
+ for (let j = 0; j < kanbanSections.length; j++) {
926
+ let sortingKey = kanbanSections[j].labels;
927
+ let found = true;
928
+ for (let i = 0; i < sortingKey.length; i++) {
929
+ if (key[i] !== sortingKey[i]) {
930
+ found = false;
931
+ break;
932
+ }
933
+ }
934
+ if (found) {
935
+ check.found = true;
936
+ check.index = j;
937
+ break;
938
+ }
1478
939
  }
1479
- }
1480
- },
1481
- "required": false,
1482
- "optional": false,
1483
- "docs": {
1484
- "tags": [{
1485
- "name": "default",
1486
- "text": "null"
1487
- }],
1488
- "text": "Displays the boxlist as a Kanban."
1489
- },
1490
- "defaultValue": "null"
1491
- },
1492
- "layout": {
1493
- "type": "unknown",
1494
- "mutable": false,
1495
- "complexType": {
1496
- "original": "KupBoxLayout",
1497
- "resolved": "KupBoxLayout",
1498
- "references": {
1499
- "KupBoxLayout": {
1500
- "location": "import",
1501
- "path": "./kup-box-declarations",
1502
- "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxLayout"
940
+ // If current key exists, box will be pushed into the existing array of virtual nodes
941
+ if (check.found) {
942
+ kanbanSections[check.index].nodes.push(this.renderRow(this.rows[index]));
1503
943
  }
1504
- }
1505
- },
1506
- "required": false,
1507
- "optional": false,
1508
- "docs": {
1509
- "tags": [{
1510
- "name": "default",
1511
- "text": "undefined"
1512
- }],
1513
- "text": "How the field will be displayed. If not present, a default one will be created."
1514
- }
1515
- },
1516
- "lazyLoadRows": {
1517
- "type": "boolean",
1518
- "mutable": false,
1519
- "complexType": {
1520
- "original": "boolean",
1521
- "resolved": "boolean",
1522
- "references": {}
1523
- },
1524
- "required": false,
1525
- "optional": false,
1526
- "docs": {
1527
- "tags": [],
1528
- "text": "When set to true, extra rows will be automatically loaded once the last row enters the viewport."
1529
- },
1530
- "attribute": "lazy-load-rows",
1531
- "reflect": false,
1532
- "defaultValue": "false"
1533
- },
1534
- "multiSelection": {
1535
- "type": "boolean",
1536
- "mutable": false,
1537
- "complexType": {
1538
- "original": "boolean",
1539
- "resolved": "boolean",
1540
- "references": {}
1541
- },
1542
- "required": false,
1543
- "optional": false,
1544
- "docs": {
1545
- "tags": [{
1546
- "name": "default",
1547
- "text": "false"
1548
- }],
1549
- "text": "Enable multi selection"
1550
- },
1551
- "attribute": "multi-selection",
1552
- "reflect": false,
1553
- "defaultValue": "false"
1554
- },
1555
- "pageSelected": {
1556
- "type": "number",
1557
- "mutable": false,
1558
- "complexType": {
1559
- "original": "number",
1560
- "resolved": "number",
1561
- "references": {}
1562
- },
1563
- "required": false,
1564
- "optional": false,
1565
- "docs": {
1566
- "tags": [{
1567
- "name": "default",
1568
- "text": "1"
1569
- }],
1570
- "text": "Current page number"
1571
- },
1572
- "attribute": "page-selected",
1573
- "reflect": false,
1574
- "defaultValue": "1"
1575
- },
1576
- "pagination": {
1577
- "type": "boolean",
1578
- "mutable": false,
1579
- "complexType": {
1580
- "original": "boolean",
1581
- "resolved": "boolean",
1582
- "references": {}
1583
- },
1584
- "required": false,
1585
- "optional": false,
1586
- "docs": {
1587
- "tags": [{
1588
- "name": "default",
1589
- "text": "false"
1590
- }],
1591
- "text": "Enables pagination"
1592
- },
1593
- "attribute": "pagination",
1594
- "reflect": false,
1595
- "defaultValue": "false"
1596
- },
1597
- "rowsPerPage": {
1598
- "type": "number",
1599
- "mutable": false,
1600
- "complexType": {
1601
- "original": "number",
1602
- "resolved": "number",
1603
- "references": {}
1604
- },
1605
- "required": false,
1606
- "optional": false,
1607
- "docs": {
1608
- "tags": [{
1609
- "name": "default",
1610
- "text": "undefined"
1611
- }],
1612
- "text": "Number of current rows per page"
1613
- },
1614
- "attribute": "rows-per-page",
1615
- "reflect": false
1616
- },
1617
- "scrollOnHover": {
1618
- "type": "boolean",
1619
- "mutable": false,
1620
- "complexType": {
1621
- "original": "boolean",
1622
- "resolved": "boolean",
1623
- "references": {}
1624
- },
1625
- "required": false,
1626
- "optional": false,
1627
- "docs": {
1628
- "tags": [{
1629
- "name": "default",
1630
- "text": "false"
1631
- }],
1632
- "text": "Activates the scroll on hover function."
1633
- },
1634
- "attribute": "scroll-on-hover",
1635
- "reflect": false,
1636
- "defaultValue": "false"
1637
- },
1638
- "selectBox": {
1639
- "type": "number",
1640
- "mutable": false,
1641
- "complexType": {
1642
- "original": "number",
1643
- "resolved": "number",
1644
- "references": {}
1645
- },
1646
- "required": false,
1647
- "optional": false,
1648
- "docs": {
1649
- "tags": [{
1650
- "name": "default",
1651
- "text": "undefined"
1652
- }],
1653
- "text": "Automatically selects the box at the specified index"
1654
- },
1655
- "attribute": "select-box",
1656
- "reflect": false
1657
- },
1658
- "selectedRowsState": {
1659
- "type": "string",
1660
- "mutable": true,
1661
- "complexType": {
1662
- "original": "string",
1663
- "resolved": "string",
1664
- "references": {}
1665
- },
1666
- "required": false,
1667
- "optional": false,
1668
- "docs": {
1669
- "tags": [{
1670
- "name": "default",
1671
- "text": "undefined"
1672
- }],
1673
- "text": "Multiple selection"
1674
- },
1675
- "attribute": "selected-rows-state",
1676
- "reflect": false
1677
- },
1678
- "showSelection": {
1679
- "type": "boolean",
1680
- "mutable": false,
1681
- "complexType": {
1682
- "original": "boolean",
1683
- "resolved": "boolean",
1684
- "references": {}
1685
- },
1686
- "required": false,
1687
- "optional": false,
1688
- "docs": {
1689
- "tags": [{
1690
- "name": "default",
1691
- "text": "true"
1692
- }],
1693
- "text": "If enabled, highlights the selected box/boxes"
1694
- },
1695
- "attribute": "show-selection",
1696
- "reflect": false,
1697
- "defaultValue": "true"
1698
- },
1699
- "sortBy": {
1700
- "type": "string",
1701
- "mutable": true,
1702
- "complexType": {
1703
- "original": "string",
1704
- "resolved": "string",
1705
- "references": {}
1706
- },
1707
- "required": false,
1708
- "optional": false,
1709
- "docs": {
1710
- "tags": [{
1711
- "name": "default",
1712
- "text": "undefined"
1713
- }],
1714
- "text": "If sorting is enabled, specifies which column to sort"
1715
- },
1716
- "attribute": "sort-by",
1717
- "reflect": false
1718
- },
1719
- "sortEnabled": {
1720
- "type": "boolean",
1721
- "mutable": false,
1722
- "complexType": {
1723
- "original": "boolean",
1724
- "resolved": "boolean",
1725
- "references": {}
1726
- },
1727
- "required": false,
1728
- "optional": false,
1729
- "docs": {
1730
- "tags": [{
1731
- "name": "default",
1732
- "text": "false"
1733
- }],
1734
- "text": "Enable sorting"
1735
- },
1736
- "attribute": "sort-enabled",
1737
- "reflect": false,
1738
- "defaultValue": "false"
1739
- },
1740
- "stateId": {
1741
- "type": "string",
1742
- "mutable": false,
1743
- "complexType": {
1744
- "original": "string",
1745
- "resolved": "string",
1746
- "references": {}
1747
- },
1748
- "required": false,
1749
- "optional": false,
1750
- "docs": {
1751
- "tags": [],
1752
- "text": ""
1753
- },
1754
- "attribute": "state-id",
1755
- "reflect": false,
1756
- "defaultValue": "''"
1757
- },
1758
- "store": {
1759
- "type": "unknown",
1760
- "mutable": false,
1761
- "complexType": {
1762
- "original": "KupStore",
1763
- "resolved": "KupStore",
1764
- "references": {
1765
- "KupStore": {
1766
- "location": "import",
1767
- "path": "../kup-state/kup-store",
1768
- "id": "src/components/kup-state/kup-store.ts::KupStore"
944
+ else {
945
+ // Otherwise, a new section will be defined starting with just the current virtal node
946
+ kanbanSections.push({
947
+ labels: key,
948
+ nodes: [this.renderRow(this.rows[index])],
949
+ });
1769
950
  }
1770
- }
1771
- },
1772
- "required": false,
1773
- "optional": false,
1774
- "docs": {
1775
- "tags": [],
1776
- "text": ""
1777
- }
1778
- },
1779
- "swipeDisabled": {
1780
- "type": "boolean",
1781
- "mutable": false,
1782
- "complexType": {
1783
- "original": "boolean",
1784
- "resolved": "boolean",
1785
- "references": {}
1786
- },
1787
- "required": false,
1788
- "optional": false,
1789
- "docs": {
1790
- "tags": [{
1791
- "name": "default",
1792
- "text": "false"
1793
- }],
1794
- "text": "Disable swipe"
1795
- },
1796
- "attribute": "swipe-disabled",
1797
- "reflect": false,
1798
- "defaultValue": "false"
1799
- }
1800
- };
1801
- }
1802
- static get states() {
1803
- return {
1804
- "collapsedSection": {},
1805
- "selectedRows": {},
1806
- "rowActionMenuOpened": {},
1807
- "currentPage": {},
1808
- "currentRowsPerPage": {}
1809
- };
1810
- }
1811
- static get events() {
1812
- return [{
1813
- "method": "kupBoxClick",
1814
- "name": "kup-box-click",
1815
- "bubbles": true,
1816
- "cancelable": false,
1817
- "composed": true,
1818
- "docs": {
1819
- "tags": [],
1820
- "text": "Triggered when a box is clicked"
1821
- },
1822
- "complexType": {
1823
- "original": "KupBoxClickEventPayload",
1824
- "resolved": "KupBoxClickEventPayload",
1825
- "references": {
1826
- "KupBoxClickEventPayload": {
1827
- "location": "import",
1828
- "path": "./kup-box-declarations",
1829
- "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxClickEventPayload"
951
+ }
952
+ // Once the arrays are set, they need to be emptied into columns
953
+ const kanbanJSX = [];
954
+ for (let index = 0; index < kanbanSections.length; index++) {
955
+ const sortingKey = kanbanSections[index].labels;
956
+ const props = {
957
+ data: [],
958
+ };
959
+ for (let index = 0; index < sortingKey.length; index++) {
960
+ props.data.push({
961
+ value: sortingKey[index],
962
+ id: sortingKey[index],
963
+ });
1830
964
  }
1831
- }
1832
- }
1833
- }, {
1834
- "method": "kupBoxSelected",
1835
- "name": "kup-box-selected",
1836
- "bubbles": true,
1837
- "cancelable": false,
1838
- "composed": true,
1839
- "docs": {
1840
- "tags": [],
1841
- "text": "Triggered when the multi selection checkbox changes value"
1842
- },
1843
- "complexType": {
1844
- "original": "KupBoxSelectedEventPayload",
1845
- "resolved": "KupBoxSelectedEventPayload",
1846
- "references": {
1847
- "KupBoxSelectedEventPayload": {
1848
- "location": "import",
1849
- "path": "./kup-box-declarations",
1850
- "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxSelectedEventPayload"
965
+ kanbanJSX.push(h("div", { class: "kanban-section" }, h(FChip, Object.assign({}, props)), kanbanSections[index].nodes));
966
+ }
967
+ return {
968
+ jsx: kanbanJSX,
969
+ style: {
970
+ 'grid-template-columns': this.kanban.isStacked
971
+ ? 'repeat(1fr)'
972
+ : this.kanban.size
973
+ ? `repeat(${Object.keys(kanbanSections).length}, ${this.kanban.size})`
974
+ : `repeat(${Object.keys(kanbanSections).length}, 1fr)`,
975
+ },
976
+ };
977
+ }
978
+ didLoadInteractables() {
979
+ this.interactableTouch.push(this.boxContainer);
980
+ const tapCb = (e) => {
981
+ if (this.hold) {
982
+ this.hold = false;
983
+ return;
1851
984
  }
1852
- }
1853
- }
1854
- }, {
1855
- "method": "kupAutoBoxSelect",
1856
- "name": "kup-box-autoselect",
1857
- "bubbles": true,
1858
- "cancelable": false,
1859
- "composed": true,
1860
- "docs": {
1861
- "tags": [],
1862
- "text": "Triggered when a box is auto selected via selectBox prop"
1863
- },
1864
- "complexType": {
1865
- "original": "KupBoxAutoSelectEventPayload",
1866
- "resolved": "KupBoxAutoSelectEventPayload",
1867
- "references": {
1868
- "KupBoxAutoSelectEventPayload": {
1869
- "location": "import",
1870
- "path": "./kup-box-declarations",
1871
- "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxAutoSelectEventPayload"
985
+ switch (e.button) {
986
+ case 2:
987
+ this.kupBoxContextMenu.emit({
988
+ comp: this,
989
+ id: this.rootElement.id,
990
+ details: this.contextMenuHandler(e),
991
+ });
992
+ break;
1872
993
  }
1873
- }
1874
- }
1875
- }, {
1876
- "method": "kupRowActionMenuClick",
1877
- "name": "kup-box-rowactionmenuclick",
1878
- "bubbles": true,
1879
- "cancelable": false,
1880
- "composed": true,
1881
- "docs": {
1882
- "tags": [],
1883
- "text": "When the row menu action icon is click"
1884
- },
1885
- "complexType": {
1886
- "original": "KupBoxAutoSelectEventPayload",
1887
- "resolved": "KupBoxAutoSelectEventPayload",
1888
- "references": {
1889
- "KupBoxAutoSelectEventPayload": {
1890
- "location": "import",
1891
- "path": "./kup-box-declarations",
1892
- "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxAutoSelectEventPayload"
994
+ };
995
+ const holdCb = (e) => {
996
+ if (e.pointerType === 'pen' || e.pointerType === 'touch') {
997
+ this.hold = true;
998
+ this.kupBoxContextMenu.emit({
999
+ comp: this,
1000
+ id: this.rootElement.id,
1001
+ details: this.contextMenuHandler(e),
1002
+ });
1893
1003
  }
1894
- }
1895
- }
1896
- }, {
1897
- "method": "kupRowActionClick",
1898
- "name": "kup-box-rowactionclick",
1899
- "bubbles": true,
1900
- "cancelable": false,
1901
- "composed": true,
1902
- "docs": {
1903
- "tags": [],
1904
- "text": "When the row menu action icon is click"
1905
- },
1906
- "complexType": {
1907
- "original": "KupBoxRowActionClickEventPayload",
1908
- "resolved": "KupBoxRowActionClickEventPayload",
1909
- "references": {
1910
- "KupBoxRowActionClickEventPayload": {
1911
- "location": "import",
1912
- "path": "./kup-box-declarations",
1913
- "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxRowActionClickEventPayload"
1004
+ };
1005
+ this.kupManager.interact.on(this.boxContainer, KupPointerEventTypes.TAP, tapCb);
1006
+ this.kupManager.interact.on(this.boxContainer, KupPointerEventTypes.HOLD, holdCb);
1007
+ }
1008
+ didRenderInteractables() {
1009
+ if (this.dragEnabled) {
1010
+ for (let index = 0; index < this.rowsRefs.length; index++) {
1011
+ const row = this.rowsRefs[index];
1012
+ const dataCb = () => {
1013
+ const cellEl = this.rootElement.shadowRoot.querySelector('.box-object:hover');
1014
+ return {
1015
+ cell: cellEl['data-cell'],
1016
+ column: getColumnByName(this.visibleColumns, cellEl.dataset.column),
1017
+ id: this.rootElement.id,
1018
+ multiple: this.multiSelection,
1019
+ row: cellEl['data-row'],
1020
+ selectedRows: this.selectedRows,
1021
+ };
1022
+ };
1023
+ if (row && !this.interactableDrag.includes(row)) {
1024
+ this.interactableDrag.push(row);
1025
+ this.kupManager.interact.draggable(row, {
1026
+ allowFrom: '.box-object',
1027
+ cursorChecker() {
1028
+ return null;
1029
+ },
1030
+ }, {
1031
+ callback: dataCb,
1032
+ }, KupDragEffect.BADGE);
1033
+ }
1914
1034
  }
1915
- }
1916
- }
1917
- }, {
1918
- "method": "kupDidLoad",
1919
- "name": "kup-box-didload",
1920
- "bubbles": true,
1921
- "cancelable": false,
1922
- "composed": true,
1923
- "docs": {
1924
- "tags": [],
1925
- "text": ""
1926
- },
1927
- "complexType": {
1928
- "original": "KupEventPayload",
1929
- "resolved": "KupEventPayload",
1930
- "references": {
1931
- "KupEventPayload": {
1932
- "location": "import",
1933
- "path": "../../types/GenericTypes",
1934
- "id": "src/types/GenericTypes.ts::KupEventPayload"
1035
+ }
1036
+ if (this.dropEnabled) {
1037
+ const dataCb = () => {
1038
+ const receivingDetails = this.getEventDetails(this.rootElement.shadowRoot.querySelector('.box:hover'));
1039
+ return {
1040
+ cell: receivingDetails.cell,
1041
+ column: receivingDetails.column,
1042
+ id: this.rootElement.id,
1043
+ row: receivingDetails.row,
1044
+ };
1045
+ };
1046
+ if (!this.interactableDrop.includes(this.sectionRef)) {
1047
+ this.interactableDrop.push(this.sectionRef);
1048
+ this.kupManager.interact.dropzone(this.sectionRef, {
1049
+ accept: `[${kupDraggableCellAttr}]`,
1050
+ }, {
1051
+ dispatcher: this.rootElement,
1052
+ type: KupDropEventTypes.BOX,
1053
+ });
1935
1054
  }
1936
- }
1937
- }
1938
- }, {
1939
- "method": "kupDidUnload",
1940
- "name": "kup-box-didunload",
1941
- "bubbles": true,
1942
- "cancelable": false,
1943
- "composed": true,
1944
- "docs": {
1945
- "tags": [],
1946
- "text": "Triggered when stop propagation event"
1947
- },
1948
- "complexType": {
1949
- "original": "KupEventPayload",
1950
- "resolved": "KupEventPayload",
1951
- "references": {
1952
- "KupEventPayload": {
1953
- "location": "import",
1954
- "path": "../../types/GenericTypes",
1955
- "id": "src/types/GenericTypes.ts::KupEventPayload"
1055
+ for (let index = 0; index < this.rowsRefs.length; index++) {
1056
+ const row = this.rowsRefs[index];
1057
+ if (row && !this.interactableDrop.includes(row)) {
1058
+ this.interactableDrop.push(row);
1059
+ this.kupManager.interact.dropzone(row, {
1060
+ accept: `[${kupDraggableCellAttr}]`,
1061
+ }, {
1062
+ callback: dataCb,
1063
+ dispatcher: this.rootElement,
1064
+ type: KupDropEventTypes.BOX,
1065
+ });
1066
+ }
1956
1067
  }
1957
- }
1958
- }
1959
- }, {
1960
- "method": "kupBoxContextMenu",
1961
- "name": "kup-box-contextmenu",
1962
- "bubbles": true,
1963
- "cancelable": false,
1964
- "composed": true,
1965
- "docs": {
1966
- "tags": [],
1967
- "text": "Generic right click event on box."
1968
- },
1969
- "complexType": {
1970
- "original": "KupBoxContextMenuEventPayload",
1971
- "resolved": "KupBoxContextMenuEventPayload",
1972
- "references": {
1973
- "KupBoxContextMenuEventPayload": {
1974
- "location": "import",
1975
- "path": "./kup-box-declarations",
1976
- "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxContextMenuEventPayload"
1068
+ }
1069
+ }
1070
+ /*-------------------------------------------------*/
1071
+ /* L i f e c y c l e H o o k s */
1072
+ /*-------------------------------------------------*/
1073
+ componentWillLoad() {
1074
+ this.kupManager.debug.logLoad(this, false);
1075
+ if (this.rowsPerPage) {
1076
+ this.currentRowsPerPage = this.rowsPerPage;
1077
+ }
1078
+ if (this.data &&
1079
+ this.data.rows &&
1080
+ this.currentRowsPerPage > this.data.rows.length) {
1081
+ this.currentRowsPerPage = this.data.rows.length;
1082
+ }
1083
+ this.kupManager.language.register(this);
1084
+ this.kupManager.theme.register(this);
1085
+ this.onDataChanged();
1086
+ this.adjustPaginator();
1087
+ if (document.querySelector('.header')) {
1088
+ __classPrivateFieldSet(this, _KupBox_navBarHeight, document.querySelector('.header').clientHeight, "f");
1089
+ }
1090
+ else {
1091
+ __classPrivateFieldSet(this, _KupBox_navBarHeight, 0, "f");
1092
+ }
1093
+ if (document.querySelector('.topbar')) {
1094
+ __classPrivateFieldSet(this, _KupBox_navBarHeight, __classPrivateFieldGet(this, _KupBox_navBarHeight, "f") + document.querySelector('.topbar').clientHeight, "f");
1095
+ }
1096
+ __classPrivateFieldGet(this, _KupBox_instances, "m", _KupBox_setObserver).call(this);
1097
+ }
1098
+ componentDidLoad() {
1099
+ this.handleAutomaticBoxSelection();
1100
+ // When component is created, then the listener is set. @See clickFunction for more details
1101
+ document.addEventListener('click', this.clickFunction.bind(this));
1102
+ this.currentPage = this.pageSelected;
1103
+ if (this.multiSelection && this.selectedRowsState) {
1104
+ this.selectedRows = [];
1105
+ let selectedIds = this.selectedRowsState.split(';');
1106
+ this.selectedRows = this.data.rows.filter((r) => {
1107
+ return selectedIds.indexOf(r.id) >= 0;
1108
+ });
1109
+ }
1110
+ this.didLoadInteractables();
1111
+ this.kupDidLoad.emit({ comp: this, id: this.rootElement.id });
1112
+ this.kupManager.debug.logLoad(this, true);
1113
+ }
1114
+ componentWillRender() {
1115
+ this.kupManager.debug.logRender(this, false);
1116
+ }
1117
+ componentDidRender() {
1118
+ const root = this.rootElement.shadowRoot;
1119
+ if (root) {
1120
+ const fs = root.querySelectorAll('.f-text-field');
1121
+ for (let index = 0; index < fs.length; index++) {
1122
+ FTextFieldMDC(fs[index]);
1123
+ }
1124
+ }
1125
+ this.checkScrollOnHover();
1126
+ this.persistState();
1127
+ this.didRenderInteractables();
1128
+ __classPrivateFieldGet(this, _KupBox_instances, "m", _KupBox_didRenderObservers).call(this);
1129
+ this.kupManager.debug.logRender(this, true);
1130
+ }
1131
+ render() {
1132
+ const isKanban = !!(typeof this.kanban === 'object' && this.kanban !== null);
1133
+ let sortPanel = null;
1134
+ if (this.sortEnabled) {
1135
+ // creating items
1136
+ const visibleColumnsItems = this.visibleColumns.map((column) => {
1137
+ const item = {
1138
+ value: column.title,
1139
+ id: column.name,
1140
+ selected: column.name === this.sortBy,
1141
+ };
1142
+ return item;
1143
+ });
1144
+ const items = [{ value: '', id: '' }, ...visibleColumnsItems];
1145
+ let textfieldData = {
1146
+ label: this.kupManager.language.translate(KupLanguageGeneric.SORT_BY),
1147
+ trailingIcon: true,
1148
+ };
1149
+ let listData = {
1150
+ data: items,
1151
+ selectable: true,
1152
+ };
1153
+ let data = {
1154
+ 'kup-text-field': textfieldData,
1155
+ 'kup-list': listData,
1156
+ };
1157
+ sortPanel = (h("div", { id: "sort-panel" }, h("kup-combobox", { data: data, initialValue: this.sortBy, "onkup-combobox-itemclick": (e) => this.onSortChange(e) })));
1158
+ }
1159
+ let filterPanel = null;
1160
+ if (this.globalFilter) {
1161
+ filterPanel = (h("div", { id: "global-filter" }, h("kup-text-field", { fullWidth: true, label: this.kupManager.language.translate(KupLanguageSearch.SEARCH), icon: KupThemeIconValues.SEARCH, initialValue: this.globalFilterValue, "onkup-textfield-input": (event) => {
1162
+ window.clearTimeout(this.globalFilterTimeout);
1163
+ this.globalFilterTimeout = window.setTimeout(() => this.onGlobalFilterChange(event), 600);
1164
+ } })));
1165
+ }
1166
+ let paginator = null;
1167
+ if (!this.lazyLoadRows && this.pagination) {
1168
+ paginator = (h(FPaginator, { id: top ? 'top-paginator' : 'bottom-paginator', currentPage: this.currentPage, max: this.filteredRows.length, mode: FPaginatorMode.SIMPLE, perPage: this.currentRowsPerPage
1169
+ ? this.currentRowsPerPage
1170
+ : this.rowsPerPage, onPageChange: (e) => this.handlePageChange(e.detail.value), onRowsChange: (e) => this.handleRowsPerPageChange(e.detail.value) }));
1171
+ }
1172
+ let boxContent = null;
1173
+ let containerStyle = {};
1174
+ if (this.rows.length === 0) {
1175
+ boxContent = (h("div", { id: "empty-data-message", class: "box-wrapper" }, h("div", { class: "box", ref: (el) => this.rowsRefs.push(el) }, this.kupManager.language.translate(KupLanguageGeneric.EMPTY_DATA))));
1176
+ containerStyle = { 'grid-template-columns': `repeat(1, 1fr)` };
1177
+ }
1178
+ else if (isKanban) {
1179
+ const kanban = this.kanbanMode();
1180
+ boxContent = kanban.jsx;
1181
+ containerStyle = kanban.style;
1182
+ }
1183
+ else {
1184
+ containerStyle = {
1185
+ 'grid-template-columns': `repeat(${this.columns}, 1fr)`,
1186
+ };
1187
+ const rows = this.rows;
1188
+ let size = rows.length;
1189
+ let cnt = 0;
1190
+ boxContent = [];
1191
+ while (size-- > 0) {
1192
+ boxContent.push(this.renderRow(rows[cnt++]));
1977
1193
  }
1978
- }
1979
- }
1980
- }];
1981
- }
1982
- static get methods() {
1983
- return {
1984
- "getProps": {
1985
- "complexType": {
1986
- "signature": "(descriptions?: boolean) => Promise<GenericObject>",
1987
- "parameters": [{
1988
- "tags": [{
1989
- "name": "param",
1990
- "text": "descriptions - When provided and true, the result will be the list of props with their description."
1991
- }],
1992
- "text": "- When provided and true, the result will be the list of props with their description."
1993
- }],
1994
- "references": {
1995
- "Promise": {
1996
- "location": "global",
1997
- "id": "global::Promise"
1194
+ }
1195
+ return (h(Host, null, h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, h("div", { class: 'box-component', ref: (el) => (this.sectionRef = el) }, sortPanel, filterPanel, paginator, h("div", { class: isKanban ? 'is-kanban' : '', id: 'box-container', style: containerStyle, onContextMenu: (e) => {
1196
+ e.preventDefault();
1197
+ }, ref: (el) => (this.boxContainer =
1198
+ el) }, boxContent)))));
1199
+ }
1200
+ disconnectedCallback() {
1201
+ this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop));
1202
+ this.kupManager.language.unregister(this);
1203
+ this.kupManager.theme.unregister(this);
1204
+ if (this.scrollOnHover) {
1205
+ this.kupManager.scrollOnHover.unregister(this.boxContainer);
1206
+ }
1207
+ // When component is destroyed, then the listener is removed. @See clickFunction for more details
1208
+ document.removeEventListener('click', this.clickFunction.bind(this));
1209
+ this.kupDidUnload.emit({ comp: this, id: this.rootElement.id });
1210
+ }
1211
+ static get is() { return "kup-box"; }
1212
+ static get encapsulation() { return "shadow"; }
1213
+ static get originalStyleUrls() {
1214
+ return {
1215
+ "$": ["kup-box.scss"]
1216
+ };
1217
+ }
1218
+ static get styleUrls() {
1219
+ return {
1220
+ "$": ["kup-box.css"]
1221
+ };
1222
+ }
1223
+ static get properties() {
1224
+ return {
1225
+ "cardData": {
1226
+ "type": "unknown",
1227
+ "mutable": false,
1228
+ "complexType": {
1229
+ "original": "GenericObject",
1230
+ "resolved": "GenericObject",
1231
+ "references": {
1232
+ "GenericObject": {
1233
+ "location": "import",
1234
+ "path": "../../types/GenericTypes",
1235
+ "id": "src/types/GenericTypes.ts::GenericObject"
1236
+ }
1237
+ }
1238
+ },
1239
+ "required": false,
1240
+ "optional": false,
1241
+ "docs": {
1242
+ "tags": [{
1243
+ "name": "default",
1244
+ "text": "null"
1245
+ }],
1246
+ "text": "Data of the card linked to the box when the latter's layout must be a premade template."
1247
+ },
1248
+ "defaultValue": "null"
1249
+ },
1250
+ "columns": {
1251
+ "type": "number",
1252
+ "mutable": false,
1253
+ "complexType": {
1254
+ "original": "number",
1255
+ "resolved": "number",
1256
+ "references": {}
1257
+ },
1258
+ "required": false,
1259
+ "optional": false,
1260
+ "docs": {
1261
+ "tags": [{
1262
+ "name": "default",
1263
+ "text": "1"
1264
+ }],
1265
+ "text": "Number of columns"
1266
+ },
1267
+ "attribute": "columns",
1268
+ "reflect": false,
1269
+ "defaultValue": "1"
1270
+ },
1271
+ "customStyle": {
1272
+ "type": "string",
1273
+ "mutable": false,
1274
+ "complexType": {
1275
+ "original": "string",
1276
+ "resolved": "string",
1277
+ "references": {}
1278
+ },
1279
+ "required": false,
1280
+ "optional": false,
1281
+ "docs": {
1282
+ "tags": [{
1283
+ "name": "default",
1284
+ "text": "\"\""
1285
+ }, {
1286
+ "name": "see",
1287
+ "text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
1288
+ }],
1289
+ "text": "Custom style of the component."
1290
+ },
1291
+ "attribute": "custom-style",
1292
+ "reflect": false,
1293
+ "defaultValue": "''"
1294
+ },
1295
+ "data": {
1296
+ "type": "unknown",
1297
+ "mutable": false,
1298
+ "complexType": {
1299
+ "original": "KupBoxData",
1300
+ "resolved": "KupBoxData",
1301
+ "references": {
1302
+ "KupBoxData": {
1303
+ "location": "import",
1304
+ "path": "./kup-box-declarations",
1305
+ "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxData"
1306
+ }
1307
+ }
1308
+ },
1309
+ "required": false,
1310
+ "optional": false,
1311
+ "docs": {
1312
+ "tags": [{
1313
+ "name": "default",
1314
+ "text": "null"
1315
+ }],
1316
+ "text": "Actual data of the box."
1317
+ },
1318
+ "defaultValue": "null"
1319
+ },
1320
+ "dragEnabled": {
1321
+ "type": "boolean",
1322
+ "mutable": false,
1323
+ "complexType": {
1324
+ "original": "boolean",
1325
+ "resolved": "boolean",
1326
+ "references": {}
1327
+ },
1328
+ "required": false,
1329
+ "optional": false,
1330
+ "docs": {
1331
+ "tags": [{
1332
+ "name": "default",
1333
+ "text": "false"
1334
+ }],
1335
+ "text": "Enable dragging"
1336
+ },
1337
+ "attribute": "drag-enabled",
1338
+ "reflect": false,
1339
+ "defaultValue": "false"
1340
+ },
1341
+ "dropEnabled": {
1342
+ "type": "boolean",
1343
+ "mutable": false,
1344
+ "complexType": {
1345
+ "original": "boolean",
1346
+ "resolved": "boolean",
1347
+ "references": {}
1348
+ },
1349
+ "required": false,
1350
+ "optional": false,
1351
+ "docs": {
1352
+ "tags": [{
1353
+ "name": "default",
1354
+ "text": "false"
1355
+ }],
1356
+ "text": "Enable dropping"
1357
+ },
1358
+ "attribute": "drop-enabled",
1359
+ "reflect": false,
1360
+ "defaultValue": "false"
1361
+ },
1362
+ "dropOnSection": {
1363
+ "type": "boolean",
1364
+ "mutable": false,
1365
+ "complexType": {
1366
+ "original": "boolean",
1367
+ "resolved": "boolean",
1368
+ "references": {}
1369
+ },
1370
+ "required": false,
1371
+ "optional": false,
1372
+ "docs": {
1373
+ "tags": [{
1374
+ "name": "default",
1375
+ "text": "false"
1376
+ }],
1377
+ "text": "Drop can be done in section"
1378
+ },
1379
+ "attribute": "drop-on-section",
1380
+ "reflect": false,
1381
+ "defaultValue": "false"
1382
+ },
1383
+ "editableData": {
1384
+ "type": "boolean",
1385
+ "mutable": false,
1386
+ "complexType": {
1387
+ "original": "boolean",
1388
+ "resolved": "boolean",
1389
+ "references": {}
1390
+ },
1391
+ "required": false,
1392
+ "optional": false,
1393
+ "docs": {
1394
+ "tags": [{
1395
+ "name": "default",
1396
+ "text": "false"
1397
+ }],
1398
+ "text": "When set to true, editable cells will be rendered using input components."
1399
+ },
1400
+ "attribute": "editable-data",
1401
+ "reflect": false,
1402
+ "defaultValue": "false"
1403
+ },
1404
+ "enableRowActions": {
1405
+ "type": "boolean",
1406
+ "mutable": false,
1407
+ "complexType": {
1408
+ "original": "boolean",
1409
+ "resolved": "boolean",
1410
+ "references": {}
1411
+ },
1412
+ "required": false,
1413
+ "optional": false,
1414
+ "docs": {
1415
+ "tags": [{
1416
+ "name": "default",
1417
+ "text": "false"
1418
+ }],
1419
+ "text": "If enabled, a button to load / display the row actions\r\nwill be displayed on the right of every box"
1420
+ },
1421
+ "attribute": "enable-row-actions",
1422
+ "reflect": false,
1423
+ "defaultValue": "false"
1424
+ },
1425
+ "globalFilter": {
1426
+ "type": "boolean",
1427
+ "mutable": false,
1428
+ "complexType": {
1429
+ "original": "boolean",
1430
+ "resolved": "boolean",
1431
+ "references": {}
1432
+ },
1433
+ "required": false,
1434
+ "optional": false,
1435
+ "docs": {
1436
+ "tags": [{
1437
+ "name": "default",
1438
+ "text": "false"
1439
+ }],
1440
+ "text": "When set to true it activates the global filter."
1441
+ },
1442
+ "attribute": "global-filter",
1443
+ "reflect": false,
1444
+ "defaultValue": "false"
1445
+ },
1446
+ "globalFilterValue": {
1447
+ "type": "string",
1448
+ "mutable": true,
1449
+ "complexType": {
1450
+ "original": "string",
1451
+ "resolved": "string",
1452
+ "references": {}
1453
+ },
1454
+ "required": false,
1455
+ "optional": false,
1456
+ "docs": {
1457
+ "tags": [{
1458
+ "name": "default",
1459
+ "text": "\"\""
1460
+ }],
1461
+ "text": "The value of the global filter."
1462
+ },
1463
+ "attribute": "global-filter-value",
1464
+ "reflect": true,
1465
+ "defaultValue": "''"
1466
+ },
1467
+ "kanban": {
1468
+ "type": "unknown",
1469
+ "mutable": false,
1470
+ "complexType": {
1471
+ "original": "KupBoxKanban",
1472
+ "resolved": "KupBoxKanban",
1473
+ "references": {
1474
+ "KupBoxKanban": {
1475
+ "location": "import",
1476
+ "path": "./kup-box-declarations",
1477
+ "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxKanban"
1478
+ }
1479
+ }
1480
+ },
1481
+ "required": false,
1482
+ "optional": false,
1483
+ "docs": {
1484
+ "tags": [{
1485
+ "name": "default",
1486
+ "text": "null"
1487
+ }],
1488
+ "text": "Displays the boxlist as a Kanban."
1489
+ },
1490
+ "defaultValue": "null"
1998
1491
  },
1999
- "GenericObject": {
2000
- "location": "import",
2001
- "path": "../../types/GenericTypes",
2002
- "id": "src/types/GenericTypes.ts::GenericObject"
1492
+ "layout": {
1493
+ "type": "unknown",
1494
+ "mutable": false,
1495
+ "complexType": {
1496
+ "original": "KupBoxLayout",
1497
+ "resolved": "KupBoxLayout",
1498
+ "references": {
1499
+ "KupBoxLayout": {
1500
+ "location": "import",
1501
+ "path": "./kup-box-declarations",
1502
+ "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxLayout"
1503
+ }
1504
+ }
1505
+ },
1506
+ "required": false,
1507
+ "optional": false,
1508
+ "docs": {
1509
+ "tags": [{
1510
+ "name": "default",
1511
+ "text": "undefined"
1512
+ }],
1513
+ "text": "How the field will be displayed. If not present, a default one will be created."
1514
+ }
1515
+ },
1516
+ "lazyLoadRows": {
1517
+ "type": "boolean",
1518
+ "mutable": false,
1519
+ "complexType": {
1520
+ "original": "boolean",
1521
+ "resolved": "boolean",
1522
+ "references": {}
1523
+ },
1524
+ "required": false,
1525
+ "optional": false,
1526
+ "docs": {
1527
+ "tags": [],
1528
+ "text": "When set to true, extra rows will be automatically loaded once the last row enters the viewport."
1529
+ },
1530
+ "attribute": "lazy-load-rows",
1531
+ "reflect": false,
1532
+ "defaultValue": "false"
1533
+ },
1534
+ "multiSelection": {
1535
+ "type": "boolean",
1536
+ "mutable": false,
1537
+ "complexType": {
1538
+ "original": "boolean",
1539
+ "resolved": "boolean",
1540
+ "references": {}
1541
+ },
1542
+ "required": false,
1543
+ "optional": false,
1544
+ "docs": {
1545
+ "tags": [{
1546
+ "name": "default",
1547
+ "text": "false"
1548
+ }],
1549
+ "text": "Enable multi selection"
1550
+ },
1551
+ "attribute": "multi-selection",
1552
+ "reflect": false,
1553
+ "defaultValue": "false"
1554
+ },
1555
+ "pageSelected": {
1556
+ "type": "number",
1557
+ "mutable": false,
1558
+ "complexType": {
1559
+ "original": "number",
1560
+ "resolved": "number",
1561
+ "references": {}
1562
+ },
1563
+ "required": false,
1564
+ "optional": false,
1565
+ "docs": {
1566
+ "tags": [{
1567
+ "name": "default",
1568
+ "text": "1"
1569
+ }],
1570
+ "text": "Current page number"
1571
+ },
1572
+ "attribute": "page-selected",
1573
+ "reflect": false,
1574
+ "defaultValue": "1"
1575
+ },
1576
+ "pagination": {
1577
+ "type": "boolean",
1578
+ "mutable": false,
1579
+ "complexType": {
1580
+ "original": "boolean",
1581
+ "resolved": "boolean",
1582
+ "references": {}
1583
+ },
1584
+ "required": false,
1585
+ "optional": false,
1586
+ "docs": {
1587
+ "tags": [{
1588
+ "name": "default",
1589
+ "text": "false"
1590
+ }],
1591
+ "text": "Enables pagination"
1592
+ },
1593
+ "attribute": "pagination",
1594
+ "reflect": false,
1595
+ "defaultValue": "false"
1596
+ },
1597
+ "rowsPerPage": {
1598
+ "type": "number",
1599
+ "mutable": false,
1600
+ "complexType": {
1601
+ "original": "number",
1602
+ "resolved": "number",
1603
+ "references": {}
1604
+ },
1605
+ "required": false,
1606
+ "optional": false,
1607
+ "docs": {
1608
+ "tags": [{
1609
+ "name": "default",
1610
+ "text": "undefined"
1611
+ }],
1612
+ "text": "Number of current rows per page"
1613
+ },
1614
+ "attribute": "rows-per-page",
1615
+ "reflect": false
1616
+ },
1617
+ "scrollOnHover": {
1618
+ "type": "boolean",
1619
+ "mutable": false,
1620
+ "complexType": {
1621
+ "original": "boolean",
1622
+ "resolved": "boolean",
1623
+ "references": {}
1624
+ },
1625
+ "required": false,
1626
+ "optional": false,
1627
+ "docs": {
1628
+ "tags": [{
1629
+ "name": "default",
1630
+ "text": "false"
1631
+ }],
1632
+ "text": "Activates the scroll on hover function."
1633
+ },
1634
+ "attribute": "scroll-on-hover",
1635
+ "reflect": false,
1636
+ "defaultValue": "false"
1637
+ },
1638
+ "selectBox": {
1639
+ "type": "number",
1640
+ "mutable": false,
1641
+ "complexType": {
1642
+ "original": "number",
1643
+ "resolved": "number",
1644
+ "references": {}
1645
+ },
1646
+ "required": false,
1647
+ "optional": false,
1648
+ "docs": {
1649
+ "tags": [{
1650
+ "name": "default",
1651
+ "text": "undefined"
1652
+ }],
1653
+ "text": "Automatically selects the box at the specified index"
1654
+ },
1655
+ "attribute": "select-box",
1656
+ "reflect": false
1657
+ },
1658
+ "selectedRowsState": {
1659
+ "type": "string",
1660
+ "mutable": true,
1661
+ "complexType": {
1662
+ "original": "string",
1663
+ "resolved": "string",
1664
+ "references": {}
1665
+ },
1666
+ "required": false,
1667
+ "optional": false,
1668
+ "docs": {
1669
+ "tags": [{
1670
+ "name": "default",
1671
+ "text": "undefined"
1672
+ }],
1673
+ "text": "Multiple selection"
1674
+ },
1675
+ "attribute": "selected-rows-state",
1676
+ "reflect": false
1677
+ },
1678
+ "showSelection": {
1679
+ "type": "boolean",
1680
+ "mutable": false,
1681
+ "complexType": {
1682
+ "original": "boolean",
1683
+ "resolved": "boolean",
1684
+ "references": {}
1685
+ },
1686
+ "required": false,
1687
+ "optional": false,
1688
+ "docs": {
1689
+ "tags": [{
1690
+ "name": "default",
1691
+ "text": "true"
1692
+ }],
1693
+ "text": "If enabled, highlights the selected box/boxes"
1694
+ },
1695
+ "attribute": "show-selection",
1696
+ "reflect": false,
1697
+ "defaultValue": "true"
1698
+ },
1699
+ "sortBy": {
1700
+ "type": "string",
1701
+ "mutable": true,
1702
+ "complexType": {
1703
+ "original": "string",
1704
+ "resolved": "string",
1705
+ "references": {}
1706
+ },
1707
+ "required": false,
1708
+ "optional": false,
1709
+ "docs": {
1710
+ "tags": [{
1711
+ "name": "default",
1712
+ "text": "undefined"
1713
+ }],
1714
+ "text": "If sorting is enabled, specifies which column to sort"
1715
+ },
1716
+ "attribute": "sort-by",
1717
+ "reflect": false
1718
+ },
1719
+ "sortEnabled": {
1720
+ "type": "boolean",
1721
+ "mutable": false,
1722
+ "complexType": {
1723
+ "original": "boolean",
1724
+ "resolved": "boolean",
1725
+ "references": {}
1726
+ },
1727
+ "required": false,
1728
+ "optional": false,
1729
+ "docs": {
1730
+ "tags": [{
1731
+ "name": "default",
1732
+ "text": "false"
1733
+ }],
1734
+ "text": "Enable sorting"
1735
+ },
1736
+ "attribute": "sort-enabled",
1737
+ "reflect": false,
1738
+ "defaultValue": "false"
1739
+ },
1740
+ "stateId": {
1741
+ "type": "string",
1742
+ "mutable": false,
1743
+ "complexType": {
1744
+ "original": "string",
1745
+ "resolved": "string",
1746
+ "references": {}
1747
+ },
1748
+ "required": false,
1749
+ "optional": false,
1750
+ "docs": {
1751
+ "tags": [],
1752
+ "text": ""
1753
+ },
1754
+ "attribute": "state-id",
1755
+ "reflect": false,
1756
+ "defaultValue": "''"
1757
+ },
1758
+ "store": {
1759
+ "type": "unknown",
1760
+ "mutable": false,
1761
+ "complexType": {
1762
+ "original": "KupStore",
1763
+ "resolved": "KupStore",
1764
+ "references": {
1765
+ "KupStore": {
1766
+ "location": "import",
1767
+ "path": "../kup-state/kup-store",
1768
+ "id": "src/components/kup-state/kup-store.ts::KupStore"
1769
+ }
1770
+ }
1771
+ },
1772
+ "required": false,
1773
+ "optional": false,
1774
+ "docs": {
1775
+ "tags": [],
1776
+ "text": ""
1777
+ }
1778
+ },
1779
+ "swipeDisabled": {
1780
+ "type": "boolean",
1781
+ "mutable": false,
1782
+ "complexType": {
1783
+ "original": "boolean",
1784
+ "resolved": "boolean",
1785
+ "references": {}
1786
+ },
1787
+ "required": false,
1788
+ "optional": false,
1789
+ "docs": {
1790
+ "tags": [{
1791
+ "name": "default",
1792
+ "text": "false"
1793
+ }],
1794
+ "text": "Disable swipe"
1795
+ },
1796
+ "attribute": "swipe-disabled",
1797
+ "reflect": false,
1798
+ "defaultValue": "false"
2003
1799
  }
2004
- },
2005
- "return": "Promise<GenericObject>"
2006
- },
2007
- "docs": {
2008
- "text": "Used to retrieve component's props values.",
2009
- "tags": [{
2010
- "name": "param",
2011
- "text": "descriptions - When provided and true, the result will be the list of props with their description."
1800
+ };
1801
+ }
1802
+ static get states() {
1803
+ return {
1804
+ "collapsedSection": {},
1805
+ "selectedRows": {},
1806
+ "rowActionMenuOpened": {},
1807
+ "currentPage": {},
1808
+ "currentRowsPerPage": {}
1809
+ };
1810
+ }
1811
+ static get events() {
1812
+ return [{
1813
+ "method": "kupBoxClick",
1814
+ "name": "kup-box-click",
1815
+ "bubbles": true,
1816
+ "cancelable": false,
1817
+ "composed": true,
1818
+ "docs": {
1819
+ "tags": [],
1820
+ "text": "Triggered when a box is clicked"
1821
+ },
1822
+ "complexType": {
1823
+ "original": "KupBoxClickEventPayload",
1824
+ "resolved": "KupBoxClickEventPayload",
1825
+ "references": {
1826
+ "KupBoxClickEventPayload": {
1827
+ "location": "import",
1828
+ "path": "./kup-box-declarations",
1829
+ "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxClickEventPayload"
1830
+ }
1831
+ }
1832
+ }
1833
+ }, {
1834
+ "method": "kupBoxSelected",
1835
+ "name": "kup-box-selected",
1836
+ "bubbles": true,
1837
+ "cancelable": false,
1838
+ "composed": true,
1839
+ "docs": {
1840
+ "tags": [],
1841
+ "text": "Triggered when the multi selection checkbox changes value"
1842
+ },
1843
+ "complexType": {
1844
+ "original": "KupBoxSelectedEventPayload",
1845
+ "resolved": "KupBoxSelectedEventPayload",
1846
+ "references": {
1847
+ "KupBoxSelectedEventPayload": {
1848
+ "location": "import",
1849
+ "path": "./kup-box-declarations",
1850
+ "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxSelectedEventPayload"
1851
+ }
1852
+ }
1853
+ }
1854
+ }, {
1855
+ "method": "kupAutoBoxSelect",
1856
+ "name": "kup-box-autoselect",
1857
+ "bubbles": true,
1858
+ "cancelable": false,
1859
+ "composed": true,
1860
+ "docs": {
1861
+ "tags": [],
1862
+ "text": "Triggered when a box is auto selected via selectBox prop"
1863
+ },
1864
+ "complexType": {
1865
+ "original": "KupBoxAutoSelectEventPayload",
1866
+ "resolved": "KupBoxAutoSelectEventPayload",
1867
+ "references": {
1868
+ "KupBoxAutoSelectEventPayload": {
1869
+ "location": "import",
1870
+ "path": "./kup-box-declarations",
1871
+ "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxAutoSelectEventPayload"
1872
+ }
1873
+ }
1874
+ }
1875
+ }, {
1876
+ "method": "kupRowActionMenuClick",
1877
+ "name": "kup-box-rowactionmenuclick",
1878
+ "bubbles": true,
1879
+ "cancelable": false,
1880
+ "composed": true,
1881
+ "docs": {
1882
+ "tags": [],
1883
+ "text": "When the row menu action icon is click"
1884
+ },
1885
+ "complexType": {
1886
+ "original": "KupBoxAutoSelectEventPayload",
1887
+ "resolved": "KupBoxAutoSelectEventPayload",
1888
+ "references": {
1889
+ "KupBoxAutoSelectEventPayload": {
1890
+ "location": "import",
1891
+ "path": "./kup-box-declarations",
1892
+ "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxAutoSelectEventPayload"
1893
+ }
1894
+ }
1895
+ }
1896
+ }, {
1897
+ "method": "kupRowActionClick",
1898
+ "name": "kup-box-rowactionclick",
1899
+ "bubbles": true,
1900
+ "cancelable": false,
1901
+ "composed": true,
1902
+ "docs": {
1903
+ "tags": [],
1904
+ "text": "When the row menu action icon is click"
1905
+ },
1906
+ "complexType": {
1907
+ "original": "KupBoxRowActionClickEventPayload",
1908
+ "resolved": "KupBoxRowActionClickEventPayload",
1909
+ "references": {
1910
+ "KupBoxRowActionClickEventPayload": {
1911
+ "location": "import",
1912
+ "path": "./kup-box-declarations",
1913
+ "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxRowActionClickEventPayload"
1914
+ }
1915
+ }
1916
+ }
1917
+ }, {
1918
+ "method": "kupDidLoad",
1919
+ "name": "kup-box-didload",
1920
+ "bubbles": true,
1921
+ "cancelable": false,
1922
+ "composed": true,
1923
+ "docs": {
1924
+ "tags": [],
1925
+ "text": ""
1926
+ },
1927
+ "complexType": {
1928
+ "original": "KupEventPayload",
1929
+ "resolved": "KupEventPayload",
1930
+ "references": {
1931
+ "KupEventPayload": {
1932
+ "location": "import",
1933
+ "path": "../../types/GenericTypes",
1934
+ "id": "src/types/GenericTypes.ts::KupEventPayload"
1935
+ }
1936
+ }
1937
+ }
2012
1938
  }, {
2013
- "name": "returns",
2014
- "text": "List of props as object, each key will be a prop."
2015
- }]
2016
- }
2017
- },
2018
- "loadRowActions": {
2019
- "complexType": {
2020
- "signature": "(row: KupBoxRow, actions: KupDataRowAction[]) => Promise<void>",
2021
- "parameters": [{
2022
- "tags": [],
2023
- "text": ""
1939
+ "method": "kupDidUnload",
1940
+ "name": "kup-box-didunload",
1941
+ "bubbles": true,
1942
+ "cancelable": false,
1943
+ "composed": true,
1944
+ "docs": {
1945
+ "tags": [],
1946
+ "text": "Triggered when stop propagation event"
1947
+ },
1948
+ "complexType": {
1949
+ "original": "KupEventPayload",
1950
+ "resolved": "KupEventPayload",
1951
+ "references": {
1952
+ "KupEventPayload": {
1953
+ "location": "import",
1954
+ "path": "../../types/GenericTypes",
1955
+ "id": "src/types/GenericTypes.ts::KupEventPayload"
1956
+ }
1957
+ }
1958
+ }
2024
1959
  }, {
2025
- "tags": [],
2026
- "text": ""
2027
- }],
2028
- "references": {
2029
- "Promise": {
2030
- "location": "global",
2031
- "id": "global::Promise"
1960
+ "method": "kupBoxContextMenu",
1961
+ "name": "kup-box-contextmenu",
1962
+ "bubbles": true,
1963
+ "cancelable": false,
1964
+ "composed": true,
1965
+ "docs": {
1966
+ "tags": [],
1967
+ "text": "Generic right click event on box."
1968
+ },
1969
+ "complexType": {
1970
+ "original": "KupBoxContextMenuEventPayload",
1971
+ "resolved": "KupBoxContextMenuEventPayload",
1972
+ "references": {
1973
+ "KupBoxContextMenuEventPayload": {
1974
+ "location": "import",
1975
+ "path": "./kup-box-declarations",
1976
+ "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxContextMenuEventPayload"
1977
+ }
1978
+ }
1979
+ }
1980
+ }];
1981
+ }
1982
+ static get methods() {
1983
+ return {
1984
+ "getProps": {
1985
+ "complexType": {
1986
+ "signature": "(descriptions?: boolean) => Promise<GenericObject>",
1987
+ "parameters": [{
1988
+ "tags": [{
1989
+ "name": "param",
1990
+ "text": "descriptions - When provided and true, the result will be the list of props with their description."
1991
+ }],
1992
+ "text": "- When provided and true, the result will be the list of props with their description."
1993
+ }],
1994
+ "references": {
1995
+ "Promise": {
1996
+ "location": "global",
1997
+ "id": "global::Promise"
1998
+ },
1999
+ "GenericObject": {
2000
+ "location": "import",
2001
+ "path": "../../types/GenericTypes",
2002
+ "id": "src/types/GenericTypes.ts::GenericObject"
2003
+ }
2004
+ },
2005
+ "return": "Promise<GenericObject>"
2006
+ },
2007
+ "docs": {
2008
+ "text": "Used to retrieve component's props values.",
2009
+ "tags": [{
2010
+ "name": "param",
2011
+ "text": "descriptions - When provided and true, the result will be the list of props with their description."
2012
+ }, {
2013
+ "name": "returns",
2014
+ "text": "List of props as object, each key will be a prop."
2015
+ }]
2016
+ }
2032
2017
  },
2033
- "KupBoxRow": {
2034
- "location": "import",
2035
- "path": "./kup-box-declarations",
2036
- "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxRow"
2018
+ "loadRowActions": {
2019
+ "complexType": {
2020
+ "signature": "(row: KupBoxRow, actions: KupDataRowAction[]) => Promise<void>",
2021
+ "parameters": [{
2022
+ "tags": [],
2023
+ "text": ""
2024
+ }, {
2025
+ "tags": [],
2026
+ "text": ""
2027
+ }],
2028
+ "references": {
2029
+ "Promise": {
2030
+ "location": "global",
2031
+ "id": "global::Promise"
2032
+ },
2033
+ "KupBoxRow": {
2034
+ "location": "import",
2035
+ "path": "./kup-box-declarations",
2036
+ "id": "src/components/kup-box/kup-box-declarations.ts::KupBoxRow"
2037
+ },
2038
+ "KupDataRowAction": {
2039
+ "location": "import",
2040
+ "path": "../../managers/kup-data/kup-data-declarations",
2041
+ "id": "src/managers/kup-data/kup-data-declarations.ts::KupDataRowAction"
2042
+ }
2043
+ },
2044
+ "return": "Promise<void>"
2045
+ },
2046
+ "docs": {
2047
+ "text": "",
2048
+ "tags": []
2049
+ }
2037
2050
  },
2038
- "KupDataRowAction": {
2039
- "location": "import",
2040
- "path": "../../managers/kup-data/kup-data-declarations",
2041
- "id": "src/managers/kup-data/kup-data-declarations.ts::KupDataRowAction"
2042
- }
2043
- },
2044
- "return": "Promise<void>"
2045
- },
2046
- "docs": {
2047
- "text": "",
2048
- "tags": []
2049
- }
2050
- },
2051
- "refresh": {
2052
- "complexType": {
2053
- "signature": "() => Promise<void>",
2054
- "parameters": [],
2055
- "references": {
2056
- "Promise": {
2057
- "location": "global",
2058
- "id": "global::Promise"
2059
- }
2060
- },
2061
- "return": "Promise<void>"
2062
- },
2063
- "docs": {
2064
- "text": "This method is used to trigger a new render of the component.",
2065
- "tags": []
2066
- }
2067
- },
2068
- "setProps": {
2069
- "complexType": {
2070
- "signature": "(props: GenericObject) => Promise<void>",
2071
- "parameters": [{
2072
- "tags": [{
2073
- "name": "param",
2074
- "text": "props - Object containing props that will be set to the component."
2075
- }],
2076
- "text": "- Object containing props that will be set to the component."
2077
- }],
2078
- "references": {
2079
- "Promise": {
2080
- "location": "global",
2081
- "id": "global::Promise"
2051
+ "refresh": {
2052
+ "complexType": {
2053
+ "signature": "() => Promise<void>",
2054
+ "parameters": [],
2055
+ "references": {
2056
+ "Promise": {
2057
+ "location": "global",
2058
+ "id": "global::Promise"
2059
+ }
2060
+ },
2061
+ "return": "Promise<void>"
2062
+ },
2063
+ "docs": {
2064
+ "text": "This method is used to trigger a new render of the component.",
2065
+ "tags": []
2066
+ }
2082
2067
  },
2083
- "GenericObject": {
2084
- "location": "import",
2085
- "path": "../../types/GenericTypes",
2086
- "id": "src/types/GenericTypes.ts::GenericObject"
2068
+ "setProps": {
2069
+ "complexType": {
2070
+ "signature": "(props: GenericObject) => Promise<void>",
2071
+ "parameters": [{
2072
+ "tags": [{
2073
+ "name": "param",
2074
+ "text": "props - Object containing props that will be set to the component."
2075
+ }],
2076
+ "text": "- Object containing props that will be set to the component."
2077
+ }],
2078
+ "references": {
2079
+ "Promise": {
2080
+ "location": "global",
2081
+ "id": "global::Promise"
2082
+ },
2083
+ "GenericObject": {
2084
+ "location": "import",
2085
+ "path": "../../types/GenericTypes",
2086
+ "id": "src/types/GenericTypes.ts::GenericObject"
2087
+ }
2088
+ },
2089
+ "return": "Promise<void>"
2090
+ },
2091
+ "docs": {
2092
+ "text": "Sets the props to the component.",
2093
+ "tags": [{
2094
+ "name": "param",
2095
+ "text": "props - Object containing props that will be set to the component."
2096
+ }]
2097
+ }
2087
2098
  }
2088
- },
2089
- "return": "Promise<void>"
2090
- },
2091
- "docs": {
2092
- "text": "Sets the props to the component.",
2093
- "tags": [{
2094
- "name": "param",
2095
- "text": "props - Object containing props that will be set to the component."
2096
- }]
2097
- }
2098
- }
2099
- };
2100
- }
2101
- static get elementRef() { return "rootElement"; }
2102
- static get watchers() {
2103
- return [{
2104
- "propName": "rowsPerPage",
2105
- "methodName": "rowsPerPageHandler"
2106
- }, {
2107
- "propName": "globalFilterValue",
2108
- "methodName": "recalculateRows"
2109
- }, {
2110
- "propName": "sortBy",
2111
- "methodName": "recalculateRows"
2112
- }, {
2113
- "propName": "pagination",
2114
- "methodName": "recalculateRows"
2115
- }, {
2116
- "propName": "rowsPerPage",
2117
- "methodName": "recalculateRows"
2118
- }, {
2119
- "propName": "currentPage",
2120
- "methodName": "recalculateRows"
2121
- }, {
2122
- "propName": "currentRowsPerPage",
2123
- "methodName": "recalculateRows"
2124
- }, {
2125
- "propName": "data",
2126
- "methodName": "onDataChanged"
2127
- }, {
2128
- "propName": "layout",
2129
- "methodName": "onLayoutChanged"
2130
- }, {
2131
- "propName": "selectBox",
2132
- "methodName": "onSelectBoxChanged"
2133
- }];
2134
- }
2099
+ };
2100
+ }
2101
+ static get elementRef() { return "rootElement"; }
2102
+ static get watchers() {
2103
+ return [{
2104
+ "propName": "rowsPerPage",
2105
+ "methodName": "rowsPerPageHandler"
2106
+ }, {
2107
+ "propName": "globalFilterValue",
2108
+ "methodName": "recalculateRows"
2109
+ }, {
2110
+ "propName": "sortBy",
2111
+ "methodName": "recalculateRows"
2112
+ }, {
2113
+ "propName": "pagination",
2114
+ "methodName": "recalculateRows"
2115
+ }, {
2116
+ "propName": "rowsPerPage",
2117
+ "methodName": "recalculateRows"
2118
+ }, {
2119
+ "propName": "currentPage",
2120
+ "methodName": "recalculateRows"
2121
+ }, {
2122
+ "propName": "currentRowsPerPage",
2123
+ "methodName": "recalculateRows"
2124
+ }, {
2125
+ "propName": "data",
2126
+ "methodName": "onDataChanged"
2127
+ }, {
2128
+ "propName": "layout",
2129
+ "methodName": "onLayoutChanged"
2130
+ }, {
2131
+ "propName": "selectBox",
2132
+ "methodName": "onSelectBoxChanged"
2133
+ }];
2134
+ }
2135
2135
  }
2136
2136
  _KupBox_intObserver = new WeakMap(), _KupBox_rowsRefs = new WeakMap(), _KupBox_navBarHeight = new WeakMap(), _KupBox_instances = new WeakSet(), _KupBox_didRenderObservers = function _KupBox_didRenderObservers() {
2137
- if (this.lazyLoadRows &&
2138
- this.currentRowsPerPage < this.data.rows.length) {
2139
- __classPrivateFieldGet(this, _KupBox_intObserver, "f").observe(__classPrivateFieldGet(this, _KupBox_rowsRefs, "f")[__classPrivateFieldGet(this, _KupBox_rowsRefs, "f").length - 1]);
2140
- }
2137
+ if (this.lazyLoadRows &&
2138
+ this.currentRowsPerPage < this.data.rows.length) {
2139
+ __classPrivateFieldGet(this, _KupBox_intObserver, "f").observe(__classPrivateFieldGet(this, _KupBox_rowsRefs, "f")[__classPrivateFieldGet(this, _KupBox_rowsRefs, "f").length - 1]);
2140
+ }
2141
2141
  }, _KupBox_setObserver = function _KupBox_setObserver() {
2142
- const callback = (entries) => {
2143
- entries.forEach((entry) => {
2144
- if (entry.isIntersecting) {
2145
- this.kupManager.debug.logMessage(this, 'Last row entering the viewport, loading more elements.');
2146
- const delta = this.data.rows.length - this.currentRowsPerPage;
2147
- if (delta < 10) {
2148
- this.currentRowsPerPage += delta;
2149
- }
2150
- else {
2151
- this.currentRowsPerPage += 10;
2152
- }
2153
- entry.target.classList.remove('last-row');
2154
- __classPrivateFieldGet(this, _KupBox_intObserver, "f").unobserve(entry.target);
2155
- }
2156
- });
2157
- };
2158
- const options = {
2159
- threshold: 0,
2160
- rootMargin: '-' + __classPrivateFieldGet(this, _KupBox_navBarHeight, "f") + 'px 0px 0px 0px',
2161
- };
2162
- __classPrivateFieldSet(this, _KupBox_intObserver, new IntersectionObserver(callback, options), "f");
2142
+ const callback = (entries) => {
2143
+ entries.forEach((entry) => {
2144
+ if (entry.isIntersecting) {
2145
+ this.kupManager.debug.logMessage(this, 'Last row entering the viewport, loading more elements.');
2146
+ const delta = this.data.rows.length - this.currentRowsPerPage;
2147
+ if (delta < 10) {
2148
+ this.currentRowsPerPage += delta;
2149
+ }
2150
+ else {
2151
+ this.currentRowsPerPage += 10;
2152
+ }
2153
+ entry.target.classList.remove('last-row');
2154
+ __classPrivateFieldGet(this, _KupBox_intObserver, "f").unobserve(entry.target);
2155
+ }
2156
+ });
2157
+ };
2158
+ const options = {
2159
+ threshold: 0,
2160
+ rootMargin: '-' + __classPrivateFieldGet(this, _KupBox_navBarHeight, "f") + 'px 0px 0px 0px',
2161
+ };
2162
+ __classPrivateFieldSet(this, _KupBox_intObserver, new IntersectionObserver(callback, options), "f");
2163
2163
  };