@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,15 +1,16 @@
1
- import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-c161a33e.js';
2
- import { k as kupManagerInstance, A as identify, g as getProps, s as setProps, v as getColumnByName, m as KupLanguageGeneric, K as KupThemeIconValues, c as KupDebugCategory, Q as KupPointerEventTypes, V as KupDragEffect, W as kupDraggableCellAttr, X as KupDropEventTypes, I as KupLanguageSearch, a2 as SortMode } from './kup-manager-94b3d177.js';
3
- import { f as filterRows, p as paginateRows, s as sortRows, d as pageChange, r as rowsPerPageChange, h as FPaginatorMode, b as FPaginator } from './f-paginator-utils-743522fa.js';
4
- import { F as FImage } from './f-image-d2a9603c.js';
5
- import { a as FChip } from './f-chip-104c4a64.js';
1
+ import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, d as getElement } from './index-59f83f91.js';
2
+ import { k as kupManagerInstance, x as identify, g as getProps, s as setProps, u as getColumnByName, l as KupLanguageGeneric, a as KupThemeIconValues, d as KupDebugCategory, M as KupPointerEventTypes, Q as KupDragEffect, R as kupDraggableCellAttr, U as KupDropEventTypes, D as KupLanguageSearch, $ as SortMode } from './kup-manager-bfea4e6f.js';
3
+ import { f as filterRows, p as paginateRows, s as sortRows, d as pageChange, r as rowsPerPageChange, h as FPaginatorMode, b as FPaginator } from './f-paginator-utils-6903534b.js';
4
+ import { F as FImage } from './f-image-c5063342.js';
5
+ import { a as FChip } from './f-chip-465aa432.js';
6
6
  import { c as componentWrapperId } from './GenericVariables-d8d0541e.js';
7
- import { F as FCell } from './f-cell-ba94f1b3.js';
8
- import { F as FTextFieldMDC } from './f-text-field-mdc-1143cf21.js';
9
- import './f-button-f247ce10.js';
10
- import './f-button-declarations-8a009df1.js';
11
- import './f-checkbox-cbf7b3de.js';
12
- import './f-text-field-4d91ccfc.js';
7
+ import { F as FCell } from './f-cell-6f4290b2.js';
8
+ import { F as FTextFieldMDC } from './f-text-field-mdc-c88bf688.js';
9
+ import './kup-dates-15f89ea2.js';
10
+ import './f-button-5ccc2e50.js';
11
+ import './f-button-declarations-9bdc6f26.js';
12
+ import './f-checkbox-43481de2.js';
13
+ import './f-text-field-28b2b26d.js';
13
14
  import './component-879e99bf.js';
14
15
 
15
16
  /**
@@ -18,1289 +19,1289 @@ import './component-879e99bf.js';
18
19
  */
19
20
  var KupBoxProps;
20
21
  (function (KupBoxProps) {
21
- KupBoxProps["cardData"] = "Data of the card linked to the box when the latter's layout must be a premade template.";
22
- KupBoxProps["columns"] = "Number of columns.";
23
- KupBoxProps["customStyle"] = "Custom style of the component.";
24
- KupBoxProps["data"] = "Actual data of the box.";
25
- KupBoxProps["dragEnabled"] = "Enable dragging.";
26
- KupBoxProps["dropEnabled"] = "Enable dropping.";
27
- KupBoxProps["dropOnSection"] = "Drop can be done in section.";
28
- KupBoxProps["enableRowActions"] = "If enabled, a button to load / display the row actions will be displayed on the right of every box.";
29
- KupBoxProps["globalFilter"] = "When set to true it activates the global filter.";
30
- KupBoxProps["globalFilterValue"] = "The value of the global filter.";
31
- KupBoxProps["kanban"] = "Displays the boxlist as a Kanban.";
32
- KupBoxProps["layout"] = "How the field will be displayed. If not present, a default one will be created.";
33
- KupBoxProps["lazyLoadRows"] = "When set to true, extra rows will be automatically loaded once the last row enters the viewport.";
34
- KupBoxProps["multiSelection"] = "Enable multi selection.";
35
- KupBoxProps["pageSelected"] = "Current page number.";
36
- KupBoxProps["pagination"] = "Enables pagination.";
37
- KupBoxProps["rowsPerPage"] = "Number of current rows per page.";
38
- KupBoxProps["scrollOnHover"] = "Activates the scroll on hover function.";
39
- KupBoxProps["selectBox"] = "Automatically selects the box at the specified index.";
40
- KupBoxProps["selectedRowsState"] = "Multiple selection.";
41
- KupBoxProps["showSelection"] = "If enabled, highlights the selected box/boxes.";
42
- KupBoxProps["sortBy"] = "If sorting is enabled, specifies which column to sort.";
43
- KupBoxProps["sortEnabled"] = "Enable sorting.";
44
- KupBoxProps["stateId"] = "";
45
- KupBoxProps["store"] = "";
46
- KupBoxProps["swipeDisabled"] = "Disable swipe.";
22
+ KupBoxProps["cardData"] = "Data of the card linked to the box when the latter's layout must be a premade template.";
23
+ KupBoxProps["columns"] = "Number of columns.";
24
+ KupBoxProps["customStyle"] = "Custom style of the component.";
25
+ KupBoxProps["data"] = "Actual data of the box.";
26
+ KupBoxProps["dragEnabled"] = "Enable dragging.";
27
+ KupBoxProps["dropEnabled"] = "Enable dropping.";
28
+ KupBoxProps["dropOnSection"] = "Drop can be done in section.";
29
+ KupBoxProps["enableRowActions"] = "If enabled, a button to load / display the row actions will be displayed on the right of every box.";
30
+ KupBoxProps["globalFilter"] = "When set to true it activates the global filter.";
31
+ KupBoxProps["globalFilterValue"] = "The value of the global filter.";
32
+ KupBoxProps["kanban"] = "Displays the boxlist as a Kanban.";
33
+ KupBoxProps["layout"] = "How the field will be displayed. If not present, a default one will be created.";
34
+ KupBoxProps["lazyLoadRows"] = "When set to true, extra rows will be automatically loaded once the last row enters the viewport.";
35
+ KupBoxProps["multiSelection"] = "Enable multi selection.";
36
+ KupBoxProps["pageSelected"] = "Current page number.";
37
+ KupBoxProps["pagination"] = "Enables pagination.";
38
+ KupBoxProps["rowsPerPage"] = "Number of current rows per page.";
39
+ KupBoxProps["scrollOnHover"] = "Activates the scroll on hover function.";
40
+ KupBoxProps["selectBox"] = "Automatically selects the box at the specified index.";
41
+ KupBoxProps["selectedRowsState"] = "Multiple selection.";
42
+ KupBoxProps["showSelection"] = "If enabled, highlights the selected box/boxes.";
43
+ KupBoxProps["sortBy"] = "If sorting is enabled, specifies which column to sort.";
44
+ KupBoxProps["sortEnabled"] = "Enable sorting.";
45
+ KupBoxProps["stateId"] = "";
46
+ KupBoxProps["store"] = "";
47
+ KupBoxProps["swipeDisabled"] = "Disable swipe.";
47
48
  })(KupBoxProps || (KupBoxProps = {}));
48
49
 
49
50
  class KupBoxState {
50
- constructor() {
51
- this.globalFilterValue = '';
52
- this.sortBy = '';
53
- this.selectedRowsState = '';
54
- this.pageSelected = 1;
55
- this.rowsPerPage = 0;
56
- this.load = false;
57
- }
58
- /*Add attribute*/
59
- toDebugString() {
60
- // TODO
61
- return 'box state';
62
- }
51
+ constructor() {
52
+ this.globalFilterValue = '';
53
+ this.sortBy = '';
54
+ this.selectedRowsState = '';
55
+ this.pageSelected = 1;
56
+ this.rowsPerPage = 0;
57
+ this.load = false;
58
+ }
59
+ /*Add attribute*/
60
+ toDebugString() {
61
+ // TODO
62
+ return 'box state';
63
+ }
63
64
  }
64
65
 
65
66
  const kupBoxCss = ":host{--kup_box_background_color:var(\n --kup-box-background-color,\n var(--kup-background-color)\n );--kup_box_color:var(--kup-box-color, var(--kup-text-color));--kup_box_font_family:var(--kup-box-font-family, var(--kup-font-family));--kup_box_font_size:var(--kup-box-font-size, var(--kup-font-size));--kup_box_grid_gap:var(--kup-box-grid-gap, 1em);--kup_box_hover_box_shadow:var(\n --kup-box-hover-box-shadow,\n 0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)\n );--kup_box_primary_color_rgb:var(\n --kup-box-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_box_transition:var(--kup-box-transition, 0.25s);display:block;font-family:var(--kup_box_font_family);font-size:var(--kup_box_font_size)}.box-component{background:var(--kup_box_background_color);transition:border var(--kup_box_transition) ease}.box-component[kup-drag-over]{position:relative;border:3px dashed var(--kup-border-color)}#box-container{display:grid;grid-gap:var(--kup_box_grid_gap);color:var(--kup_box_color);overflow:auto}#box-container.is-kanban .kanban-section{overflow:auto}#box-container.is-kanban .box-wrapper{padding-top:1em}#box-container.is-kanban .box-wrapper .box{overflow:auto}#box-container *{box-sizing:border-box}#box-container .box-wrapper{display:flex;align-items:center}#box-container .box-wrapper .box{flex-grow:1;cursor:pointer;position:relative;display:flex;transition:background-color var(--kup_box_transition) ease, box-shadow var(--kup_box_transition) ease, border var(--kup_box_transition) ease}#box-container .box-wrapper .box.draggable{touch-action:none;user-select:none}#box-container .box-wrapper .box.column{flex-direction:column}#box-container .box-wrapper .box:hover{box-shadow:var(--kup_box_hover_box_shadow)}#box-container .box-wrapper .box.selected{background-color:rgba(var(--kup_box_primary_color_rgb), 0.175)}#box-container .box-wrapper .box.selected .box-section.titled>h3{background-color:transparent}#box-container .box-wrapper .box[kup-draggable]{opacity:0.5}#box-container .box-wrapper .box[kup-drag-over]{border:3px dashed var(--kup-border-color);position:relative;z-index:2}#box-container .box-wrapper .box .box-section{display:flex;flex-direction:row;flex:1 1 1%;flex-wrap:wrap}#box-container .box-wrapper .box .box-section.column{flex-direction:column;justify-content:center;flex-wrap:unset}#box-container .box-wrapper .box .box-section.column>.box-section{flex:0 0 auto}#box-container .box-wrapper .box .box-section.grid{display:grid}#box-container .box-wrapper .box .box-section .box-object{min-height:16px}#box-container .box-wrapper .box .box-section .box-object img{height:auto}#box-container .box-wrapper .box .box-section.collapse-section .header{border-top:1px solid var(--kup-border-color);color:rgba(var(--kup-text-color-rgb), 0.75);display:flex;justify-content:space-around;width:100%}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content{margin:0.5em;display:flex;align-items:center}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image{transition:transform 0.15s}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image.toggled{transform:rotate(-180deg)}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .kup-icon.kup-dropdown-icon{margin:0;-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}#box-container .box-wrapper .box .box-section.collapse-section .content{display:none;width:100%}#box-container .box-wrapper .box .box-section.collapse-section.open .content{display:block}#box-container .box-wrapper .box .box-section.titled{border:1px solid var(--kup-border-color);padding-top:5px;position:relative;margin:10px}#box-container .box-wrapper .box .box-section.titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}#box-container .box-wrapper .box .box-selection{position:absolute;top:0.5em;right:0.5em;z-index:1}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler{position:relative;width:24px;height:24px;margin-left:3px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler svg{cursor:pointer;opacity:0;fill:var(--kup-text-color);transition:opacity 500ms ease-out}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu{background:var(--kup-background-color);border:1px solid var(--kup-border-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);position:absolute;top:0;right:24px;display:none;z-index:10}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul{list-style-type:none;margin:0;padding:0}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li{cursor:pointer;white-space:nowrap;padding:0 12px;display:flex;align-items:center;line-height:30px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li:not(:last-child){border-bottom:1px solid var(--kup-border-color)}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu.open{display:block}#box-container .box-wrapper:hover .row-actions-wrapper .row-actions-toggler svg{opacity:1}#sort-panel,#global-filter{margin-bottom:1em}:host(.kup-center-aligned) #kup-component .box-section{text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell img{margin:auto}:host(.kup-right-aligned) #kup-component .box-section{text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell img{margin-left:auto;margin-right:0}:host(.kup-top-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-start}:host(.kup-bottom-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-end}:host(:not(.kup-borderless)) .box{border:1px solid var(--kup-border-color)}:host(.kup-flat-on-hover) #box-container .box-wrapper .box:hover{box-shadow:none}:host(.kup-shaped) .box{border-radius:10px}:host(.kup-round) .box{border-radius:25px}:host(.kup-dashed-sections) .box-section{border:2px dashed var(--kup-text-color)}:host(:not(.kup-paddingless)) #box-container .box{padding:3px}:host(:not(.kup-paddingless)) #box-container .box .box-section .box-object{padding:1px 4px}:host(:not(.kup-paddingless)) #box-container .box .box-section.last-child{margin:3px 4px}:host(.kup-danger){--kup-box-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-box-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-box-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-box-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-box-primary-color-rgb:var(--kup-warning-color-rgb)}";
66
67
 
67
68
  var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
68
- if (kind === "a" && !f)
69
- throw new TypeError("Private accessor was defined without a getter");
70
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
71
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
72
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
69
+ if (kind === "a" && !f)
70
+ throw new TypeError("Private accessor was defined without a getter");
71
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
72
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
73
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
73
74
  };
74
75
  var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
75
- if (kind === "m")
76
- throw new TypeError("Private method is not writable");
77
- if (kind === "a" && !f)
78
- throw new TypeError("Private accessor was defined without a setter");
79
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
80
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
81
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
76
+ if (kind === "m")
77
+ throw new TypeError("Private method is not writable");
78
+ if (kind === "a" && !f)
79
+ throw new TypeError("Private accessor was defined without a setter");
80
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
81
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
82
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
82
83
  };
83
84
  var _KupBox_instances, _KupBox_intObserver, _KupBox_rowsRefs, _KupBox_navBarHeight, _KupBox_didRenderObservers, _KupBox_setObserver;
84
85
  const KupBox = class {
85
- constructor(hostRef) {
86
- registerInstance(this, hostRef);
87
- this.kupBoxClick = createEvent(this, "kup-box-click", 6);
88
- this.kupBoxSelected = createEvent(this, "kup-box-selected", 6);
89
- this.kupAutoBoxSelect = createEvent(this, "kup-box-autoselect", 6);
90
- this.kupRowActionMenuClick = createEvent(this, "kup-box-rowactionmenuclick", 6);
91
- this.kupRowActionClick = createEvent(this, "kup-box-rowactionclick", 6);
92
- this.kupDidLoad = createEvent(this, "kup-box-didload", 6);
93
- this.kupDidUnload = createEvent(this, "kup-box-didunload", 6);
94
- this.kupBoxContextMenu = createEvent(this, "kup-box-contextmenu", 6);
95
- _KupBox_instances.add(this);
96
- this.state = new KupBoxState();
97
- /*-------------------------------------------------*/
98
- /* I n t e r n a l V a r i a b l e s */
99
- /*-------------------------------------------------*/
100
- /**
101
- * Instance of the KupManager class.
102
- */
103
- this.kupManager = kupManagerInstance();
104
- this.visibleColumns = [];
105
- this.rows = [];
106
- this.filteredRows = [];
107
- this.sectionRef = null;
108
- this.rowsRefs = [];
109
- this.hold = false;
110
- this.interactableDrag = [];
111
- this.interactableDrop = [];
112
- this.interactableTouch = [];
113
- _KupBox_intObserver.set(this, undefined);
114
- _KupBox_rowsRefs.set(this, []);
115
- _KupBox_navBarHeight.set(this, 0);
116
- this.collapsedSection = {};
117
- this.selectedRows = [];
118
- this.rowActionMenuOpened = undefined;
119
- this.currentPage = 1;
120
- this.currentRowsPerPage = 10;
121
- this.cardData = null;
122
- this.columns = 1;
123
- this.customStyle = '';
124
- this.data = null;
125
- this.dragEnabled = false;
126
- this.dropEnabled = false;
127
- this.dropOnSection = false;
128
- this.editableData = false;
129
- this.enableRowActions = false;
130
- this.globalFilter = false;
131
- this.globalFilterValue = '';
132
- this.kanban = null;
133
- this.layout = undefined;
134
- this.lazyLoadRows = false;
135
- this.multiSelection = false;
136
- this.pageSelected = 1;
137
- this.pagination = false;
138
- this.rowsPerPage = undefined;
139
- this.scrollOnHover = false;
140
- this.selectBox = undefined;
141
- this.selectedRowsState = undefined;
142
- this.showSelection = true;
143
- this.sortBy = undefined;
144
- this.sortEnabled = false;
145
- this.stateId = '';
146
- this.store = undefined;
147
- this.swipeDisabled = false;
148
- }
149
- initWithPersistedState() {
150
- if (this.store && this.stateId) {
151
- const state = this.store.getState(this.stateId);
152
- if (state != null) {
153
- this.kupManager.debug.logMessage(this, 'Initialize with state for stateId ' +
154
- this.stateId +
155
- ': ' +
156
- state);
157
- // *** PROPS ***
158
- this.sortBy = this.state.sortBy;
159
- this.globalFilterValue = this.state.globalFilterValue;
160
- this.selectedRowsState = this.state.selectedRowsState;
161
- this.pageSelected = this.state.pageSelected;
162
- this.rowsPerPage = this.state.rowsPerPage;
163
- }
164
- }
165
- }
166
- persistState() {
167
- if (this.store && this.stateId) {
168
- let somethingChanged = false;
169
- if (!this.kupManager.objects.deepEqual(this.state.sortBy, this.sortBy)) {
170
- this.state.sortBy = this.sortBy;
171
- somethingChanged = true;
172
- }
173
- if (!this.kupManager.objects.deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
174
- this.state.globalFilterValue = this.globalFilterValue;
175
- somethingChanged = true;
176
- }
177
- if (!this.kupManager.objects.deepEqual(this.state.pageSelected, this.currentPage)) {
178
- this.state.pageSelected = this.currentPage;
179
- somethingChanged = true;
180
- }
181
- if (!this.kupManager.objects.deepEqual(this.state.rowsPerPage, this.currentRowsPerPage)) {
182
- this.state.rowsPerPage = this.currentRowsPerPage;
183
- somethingChanged = true;
184
- }
185
- const selectedRowsState = this.selectedRows.reduce((accumulator, row, currentIndex) => {
186
- const prefix = currentIndex > 0 ? ';' : '';
187
- return accumulator + prefix + row.id;
188
- }, '');
189
- if (!this.kupManager.objects.deepEqual(this.state.selectedRowsState, selectedRowsState)) {
190
- this.state.selectedRowsState = selectedRowsState;
191
- somethingChanged = true;
192
- }
193
- if (!this.state.load) {
194
- this.state.load = true;
195
- return;
196
- }
197
- if (somethingChanged) {
198
- this.kupManager.debug.logMessage(this, 'Persisting state for stateId ' +
199
- this.stateId +
200
- ': ' +
201
- this.state);
202
- this.store.persistState(this.stateId, this.state);
203
- }
204
- }
205
- }
206
- /*-------------------------------------------------*/
207
- /* W a t c h e r s */
208
- /*-------------------------------------------------*/
209
- rowsPerPageHandler(newValue) {
210
- this.currentRowsPerPage = newValue;
211
- }
212
- recalculateRows() {
213
- this.initRows();
214
- }
215
- onDataChanged() {
216
- identify(this.getRows());
217
- this.initVisibleColumns();
218
- this.initRows();
219
- this.checkLayout();
220
- }
221
- onLayoutChanged() {
222
- this.checkLayout();
223
- }
224
- onSelectBoxChanged() {
225
- this.handleAutomaticBoxSelection();
226
- }
227
- /*-------------------------------------------------*/
228
- /* P u b l i c M e t h o d s */
229
- /*-------------------------------------------------*/
230
- /**
231
- * Used to retrieve component's props values.
232
- * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
233
- * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
234
- */
235
- async getProps(descriptions) {
236
- return getProps(this, KupBoxProps, descriptions);
237
- }
238
- async loadRowActions(row, actions) {
239
- row.actions = actions;
240
- // show menu
241
- this.rowActionMenuOpened = row;
242
- }
243
- /**
244
- * This method is used to trigger a new render of the component.
245
- */
246
- async refresh() {
247
- forceUpdate(this);
248
- }
249
- /**
250
- * Sets the props to the component.
251
- * @param {GenericObject} props - Object containing props that will be set to the component.
252
- */
253
- async setProps(props) {
254
- setProps(this, KupBoxProps, props);
255
- }
256
- /*-------------------------------------------------*/
257
- /* P r i v a t e M e t h o d s */
258
- /*-------------------------------------------------*/
259
- getColumns() {
260
- return this.data && this.data.columns
261
- ? this.data.columns
262
- : [{ title: '', name: '', size: undefined }];
263
- }
264
- initVisibleColumns() {
265
- this.visibleColumns = this.getColumns().filter((column) => {
266
- if (column.hasOwnProperty('visible')) {
267
- return column.visible;
268
- }
269
- return true;
270
- });
271
- }
272
- getRows() {
273
- return this.data && this.data.rows ? this.data.rows : [];
274
- }
275
- initRows() {
276
- this.filteredRows = this.getRows();
277
- if (this.globalFilter && this.globalFilterValue) {
278
- // filtering rows
279
- this.filteredRows = filterRows(this.filteredRows, null, this.globalFilterValue, this.visibleColumns);
280
- }
281
- this.rows = this.sortRows(this.filteredRows);
282
- if (this.pagination) {
283
- this.rows = paginateRows(this.rows, this.currentPage, this.currentRowsPerPage, false);
284
- }
285
- }
286
- sortRows(rows) {
287
- let sortedRows = rows;
288
- if (this.sortBy) {
289
- sortedRows = sortRows(sortedRows, this.toSortObjectList());
290
- }
291
- return sortedRows;
292
- }
293
- toSortObjectList() {
294
- const sortByArray = this.sortBy.split('|').map((col) => {
295
- const colNameAndSortMode = col.split(',');
296
- const sortObject = {
297
- column: colNameAndSortMode[0],
298
- sortMode: colNameAndSortMode.length > 1
299
- ? SortMode[colNameAndSortMode[1]]
300
- : SortMode.A,
301
- };
302
- return sortObject;
303
- });
304
- return sortByArray;
305
- }
306
- checkScrollOnHover() {
307
- if (!this.kupManager.scrollOnHover.isRegistered(this.boxContainer)) {
308
- if (this.scrollOnHover) {
309
- this.kupManager.scrollOnHover.register(this.boxContainer);
310
- }
311
- }
312
- else {
313
- if (!this.scrollOnHover) {
314
- this.kupManager.scrollOnHover.unregister(this.boxContainer);
315
- }
86
+ constructor(hostRef) {
87
+ registerInstance(this, hostRef);
88
+ this.kupBoxClick = createEvent(this, "kup-box-click", 6);
89
+ this.kupBoxSelected = createEvent(this, "kup-box-selected", 6);
90
+ this.kupAutoBoxSelect = createEvent(this, "kup-box-autoselect", 6);
91
+ this.kupRowActionMenuClick = createEvent(this, "kup-box-rowactionmenuclick", 6);
92
+ this.kupRowActionClick = createEvent(this, "kup-box-rowactionclick", 6);
93
+ this.kupDidLoad = createEvent(this, "kup-box-didload", 6);
94
+ this.kupDidUnload = createEvent(this, "kup-box-didunload", 6);
95
+ this.kupBoxContextMenu = createEvent(this, "kup-box-contextmenu", 6);
96
+ _KupBox_instances.add(this);
97
+ this.state = new KupBoxState();
98
+ /*-------------------------------------------------*/
99
+ /* I n t e r n a l V a r i a b l e s */
100
+ /*-------------------------------------------------*/
101
+ /**
102
+ * Instance of the KupManager class.
103
+ */
104
+ this.kupManager = kupManagerInstance();
105
+ this.visibleColumns = [];
106
+ this.rows = [];
107
+ this.filteredRows = [];
108
+ this.sectionRef = null;
109
+ this.rowsRefs = [];
110
+ this.hold = false;
111
+ this.interactableDrag = [];
112
+ this.interactableDrop = [];
113
+ this.interactableTouch = [];
114
+ _KupBox_intObserver.set(this, undefined);
115
+ _KupBox_rowsRefs.set(this, []);
116
+ _KupBox_navBarHeight.set(this, 0);
117
+ this.collapsedSection = {};
118
+ this.selectedRows = [];
119
+ this.rowActionMenuOpened = undefined;
120
+ this.currentPage = 1;
121
+ this.currentRowsPerPage = 10;
122
+ this.cardData = null;
123
+ this.columns = 1;
124
+ this.customStyle = '';
125
+ this.data = null;
126
+ this.dragEnabled = false;
127
+ this.dropEnabled = false;
128
+ this.dropOnSection = false;
129
+ this.editableData = false;
130
+ this.enableRowActions = false;
131
+ this.globalFilter = false;
132
+ this.globalFilterValue = '';
133
+ this.kanban = null;
134
+ this.layout = undefined;
135
+ this.lazyLoadRows = false;
136
+ this.multiSelection = false;
137
+ this.pageSelected = 1;
138
+ this.pagination = false;
139
+ this.rowsPerPage = undefined;
140
+ this.scrollOnHover = false;
141
+ this.selectBox = undefined;
142
+ this.selectedRowsState = undefined;
143
+ this.showSelection = true;
144
+ this.sortBy = undefined;
145
+ this.sortEnabled = false;
146
+ this.stateId = '';
147
+ this.store = undefined;
148
+ this.swipeDisabled = false;
149
+ }
150
+ initWithPersistedState() {
151
+ if (this.store && this.stateId) {
152
+ const state = this.store.getState(this.stateId);
153
+ if (state != null) {
154
+ this.kupManager.debug.logMessage(this, 'Initialize with state for stateId ' +
155
+ this.stateId +
156
+ ': ' +
157
+ state);
158
+ // *** PROPS ***
159
+ this.sortBy = this.state.sortBy;
160
+ this.globalFilterValue = this.state.globalFilterValue;
161
+ this.selectedRowsState = this.state.selectedRowsState;
162
+ this.pageSelected = this.state.pageSelected;
163
+ this.rowsPerPage = this.state.rowsPerPage;
164
+ }
165
+ }
316
166
  }
317
- }
318
- checkLayout() {
319
- // check if there is a layout.
320
- // if not, create a default layout
321
- if (this.layout) {
322
- this.boxLayout = this.layout;
323
- return;
167
+ persistState() {
168
+ if (this.store && this.stateId) {
169
+ let somethingChanged = false;
170
+ if (!this.kupManager.objects.deepEqual(this.state.sortBy, this.sortBy)) {
171
+ this.state.sortBy = this.sortBy;
172
+ somethingChanged = true;
173
+ }
174
+ if (!this.kupManager.objects.deepEqual(this.state.globalFilterValue, this.globalFilterValue)) {
175
+ this.state.globalFilterValue = this.globalFilterValue;
176
+ somethingChanged = true;
177
+ }
178
+ if (!this.kupManager.objects.deepEqual(this.state.pageSelected, this.currentPage)) {
179
+ this.state.pageSelected = this.currentPage;
180
+ somethingChanged = true;
181
+ }
182
+ if (!this.kupManager.objects.deepEqual(this.state.rowsPerPage, this.currentRowsPerPage)) {
183
+ this.state.rowsPerPage = this.currentRowsPerPage;
184
+ somethingChanged = true;
185
+ }
186
+ const selectedRowsState = this.selectedRows.reduce((accumulator, row, currentIndex) => {
187
+ const prefix = currentIndex > 0 ? ';' : '';
188
+ return accumulator + prefix + row.id;
189
+ }, '');
190
+ if (!this.kupManager.objects.deepEqual(this.state.selectedRowsState, selectedRowsState)) {
191
+ this.state.selectedRowsState = selectedRowsState;
192
+ somethingChanged = true;
193
+ }
194
+ if (!this.state.load) {
195
+ this.state.load = true;
196
+ return;
197
+ }
198
+ if (somethingChanged) {
199
+ this.kupManager.debug.logMessage(this, 'Persisting state for stateId ' +
200
+ this.stateId +
201
+ ': ' +
202
+ this.state);
203
+ this.store.persistState(this.stateId, this.state);
204
+ }
205
+ }
324
206
  }
325
- // only one section, containing all visible fields
326
- const section = {
327
- horizontal: false,
328
- sections: [],
329
- };
330
- // adding box objects to section
331
- const visibleColumns = this.visibleColumns;
332
- let size = visibleColumns.length;
333
- let content = [];
334
- let cnt = 0;
335
- while (size-- > 0) {
336
- content.push({
337
- column: visibleColumns[cnt++].name,
338
- });
207
+ /*-------------------------------------------------*/
208
+ /* W a t c h e r s */
209
+ /*-------------------------------------------------*/
210
+ rowsPerPageHandler(newValue) {
211
+ this.currentRowsPerPage = newValue;
339
212
  }
340
- section.content = content;
341
- // creating a new layout
342
- this.boxLayout = {
343
- sections: [section],
344
- };
345
- }
346
- onSortChange(e) {
347
- let column = getColumnByName(this.visibleColumns, e.detail.value);
348
- this.sortBy = column.name;
349
- }
350
- onGlobalFilterChange({ detail }) {
351
- let value = '';
352
- if (detail && detail.value) {
353
- value = detail.value;
213
+ recalculateRows() {
214
+ this.initRows();
354
215
  }
355
- this.globalFilterValue = value;
356
- }
357
- isSectionExpanded(row, section) {
358
- if (!row.id || !section.id) {
359
- return false;
216
+ onDataChanged() {
217
+ identify(this.getRows());
218
+ this.initVisibleColumns();
219
+ this.initRows();
220
+ this.checkLayout();
360
221
  }
361
- return (this.collapsedSection[section.id] &&
362
- this.collapsedSection[section.id][row.id]);
363
- }
364
- handleAutomaticBoxSelection() {
365
- if (this.selectBox &&
366
- this.selectBox > 0 &&
367
- this.selectBox <= this.data.rows.length) {
368
- this.selectedRows = [];
369
- for (let boxRow of this.data.rows) {
370
- if (boxRow.id === (this.selectBox - 1).toString()) {
371
- this.selectedRows.push(boxRow);
372
- break;
373
- }
374
- }
375
- this.kupAutoBoxSelect.emit({
376
- comp: this,
377
- id: this.rootElement.id,
378
- row: this.selectedRows[0],
379
- });
222
+ onLayoutChanged() {
223
+ this.checkLayout();
380
224
  }
381
- }
382
- getEventDetails(el, e) {
383
- let boxObject = null;
384
- let cell = null;
385
- let row = null;
386
- let column = null;
387
- if (el) {
388
- boxObject =
389
- el.closest('.box-object') ||
390
- el.querySelector('.box-object') ||
391
- el.closest('.f-cell');
225
+ onSelectBoxChanged() {
226
+ this.handleAutomaticBoxSelection();
392
227
  }
393
- if (boxObject) {
394
- if (boxObject.classList.contains('f-cell')) {
395
- const props = boxObject['kup-get-cell-props']();
396
- cell = props.cell;
397
- column = props.column;
398
- row = props.row;
399
- }
400
- else {
401
- cell = boxObject['data-cell'];
402
- row = boxObject['data-row'];
403
- column = getColumnByName(this.visibleColumns, boxObject.dataset.column);
404
- }
228
+ /*-------------------------------------------------*/
229
+ /* P u b l i c M e t h o d s */
230
+ /*-------------------------------------------------*/
231
+ /**
232
+ * Used to retrieve component's props values.
233
+ * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
234
+ * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
235
+ */
236
+ async getProps(descriptions) {
237
+ return getProps(this, KupBoxProps, descriptions);
405
238
  }
406
- return {
407
- boxObject: boxObject ? boxObject : null,
408
- column: column ? column : null,
409
- cell: cell ? cell : null,
410
- originalEvent: e,
411
- row: row ? row : null,
412
- };
413
- }
414
- contextMenuHandler(e) {
415
- const details = this.getEventDetails(e.target, e);
416
- return details;
417
- }
418
- /**
419
- * Checks if the element is the svg that opens the "row actions menu"
420
- * @param element the element to check
421
- */
422
- checkIfElementIsActionMenuIcon(element) {
423
- if (element.tagName && element.parentElement) {
424
- return (element.tagName === 'svg' &&
425
- element.parentElement.classList.contains('row-actions-toggler'));
239
+ async loadRowActions(row, actions) {
240
+ row.actions = actions;
241
+ // show menu
242
+ this.rowActionMenuOpened = row;
426
243
  }
427
- return false;
428
- }
429
- // event listeners
430
- onBoxClick({ target }, row) {
431
- if (!(target instanceof HTMLElement)) {
432
- return;
244
+ /**
245
+ * This method is used to trigger a new render of the component.
246
+ */
247
+ async refresh() {
248
+ forceUpdate(this);
433
249
  }
434
- // searching parent
435
- let element = target;
436
- let classList = element.classList;
437
- while (!classList.contains('box-object') &&
438
- !classList.contains('box-section') &&
439
- !classList.contains('box')) {
440
- element = element.parentElement;
441
- if (element === null) {
442
- break;
443
- }
444
- classList = element.classList;
250
+ /**
251
+ * Sets the props to the component.
252
+ * @param {GenericObject} props - Object containing props that will be set to the component.
253
+ */
254
+ async setProps(props) {
255
+ setProps(this, KupBoxProps, props);
445
256
  }
446
- // evaluating column
447
- let column = null;
448
- if (classList.contains('box-object')) {
449
- column = element.dataset.column;
257
+ /*-------------------------------------------------*/
258
+ /* P r i v a t e M e t h o d s */
259
+ /*-------------------------------------------------*/
260
+ getColumns() {
261
+ return this.data && this.data.columns
262
+ ? this.data.columns
263
+ : [{ title: '', name: '', size: undefined }];
264
+ }
265
+ initVisibleColumns() {
266
+ this.visibleColumns = this.getColumns().filter((column) => {
267
+ if (column.hasOwnProperty('visible')) {
268
+ return column.visible;
269
+ }
270
+ return true;
271
+ });
450
272
  }
451
- this.kupBoxClick.emit({
452
- comp: this,
453
- id: this.rootElement.id,
454
- row,
455
- column,
456
- });
457
- // selecting box
458
- if (this.multiSelection) {
459
- // triggering multi selection
460
- this.onSelectionCheckChange(row);
273
+ getRows() {
274
+ return this.data && this.data.rows ? this.data.rows : [];
461
275
  }
462
- else {
463
- this.selectedRows = [row];
276
+ initRows() {
277
+ this.filteredRows = this.getRows();
278
+ if (this.globalFilter && this.globalFilterValue) {
279
+ // filtering rows
280
+ this.filteredRows = filterRows(this.filteredRows, null, this.globalFilterValue, this.visibleColumns);
281
+ }
282
+ this.rows = this.sortRows(this.filteredRows);
283
+ if (this.pagination) {
284
+ this.rows = paginateRows(this.rows, this.currentPage, this.currentRowsPerPage, false);
285
+ }
464
286
  }
465
- }
466
- onSelectionCheckChange(row) {
467
- var index = -1;
468
- for (let i = 0; i < this.selectedRows.length; i++) {
469
- const select = this.selectedRows[i];
470
- if (select.id === row.id) {
471
- index = i;
472
- break;
473
- }
287
+ sortRows(rows) {
288
+ let sortedRows = rows;
289
+ if (this.sortBy) {
290
+ sortedRows = sortRows(sortedRows, this.toSortObjectList());
291
+ }
292
+ return sortedRows;
293
+ }
294
+ toSortObjectList() {
295
+ const sortByArray = this.sortBy.split('|').map((col) => {
296
+ const colNameAndSortMode = col.split(',');
297
+ const sortObject = {
298
+ column: colNameAndSortMode[0],
299
+ sortMode: colNameAndSortMode.length > 1
300
+ ? SortMode[colNameAndSortMode[1]]
301
+ : SortMode.A,
302
+ };
303
+ return sortObject;
304
+ });
305
+ return sortByArray;
474
306
  }
475
- if (index >= 0) {
476
- // remove row
477
- this.selectedRows.splice(index, 1);
478
- this.selectedRows = [...this.selectedRows];
307
+ checkScrollOnHover() {
308
+ if (!this.kupManager.scrollOnHover.isRegistered(this.boxContainer)) {
309
+ if (this.scrollOnHover) {
310
+ this.kupManager.scrollOnHover.register(this.boxContainer);
311
+ }
312
+ }
313
+ else {
314
+ if (!this.scrollOnHover) {
315
+ this.kupManager.scrollOnHover.unregister(this.boxContainer);
316
+ }
317
+ }
479
318
  }
480
- else {
481
- // add row
482
- this.selectedRows = [...this.selectedRows, row];
319
+ checkLayout() {
320
+ // check if there is a layout.
321
+ // if not, create a default layout
322
+ if (this.layout) {
323
+ this.boxLayout = this.layout;
324
+ return;
325
+ }
326
+ // only one section, containing all visible fields
327
+ const section = {
328
+ horizontal: false,
329
+ sections: [],
330
+ };
331
+ // adding box objects to section
332
+ const visibleColumns = this.visibleColumns;
333
+ let size = visibleColumns.length;
334
+ let content = [];
335
+ let cnt = 0;
336
+ while (size-- > 0) {
337
+ content.push({
338
+ column: visibleColumns[cnt++].name,
339
+ });
340
+ }
341
+ section.content = content;
342
+ // creating a new layout
343
+ this.boxLayout = {
344
+ sections: [section],
345
+ };
483
346
  }
484
- this.kupBoxSelected.emit({
485
- comp: this,
486
- id: this.rootElement.id,
487
- rows: this.selectedRows,
488
- });
489
- }
490
- toggleSectionExpand(row, section) {
491
- // check if section / row has id
492
- if (!section.id) {
493
- // error
494
- console.error('cannot expand / collapse a section withoun an ID');
495
- return;
347
+ onSortChange(e) {
348
+ let column = getColumnByName(this.visibleColumns, e.detail.value);
349
+ this.sortBy = column.name;
496
350
  }
497
- if (!row.id) {
498
- // error
499
- console.error('cannot expand / collapse a section of a row without ad id');
500
- return;
351
+ onGlobalFilterChange({ detail }) {
352
+ let value = '';
353
+ if (detail && detail.value) {
354
+ value = detail.value;
355
+ }
356
+ this.globalFilterValue = value;
501
357
  }
502
- // check if section already in collapsedSection
503
- if (!this.collapsedSection[section.id]) {
504
- // adding element and row, setting it to expanded
505
- this.collapsedSection[section.id] = {};
506
- this.collapsedSection[section.id][row.id] = true;
358
+ isSectionExpanded(row, section) {
359
+ if (!row.id || !section.id) {
360
+ return false;
361
+ }
362
+ return (this.collapsedSection[section.id] &&
363
+ this.collapsedSection[section.id][row.id]);
364
+ }
365
+ handleAutomaticBoxSelection() {
366
+ if (this.selectBox &&
367
+ this.selectBox > 0 &&
368
+ this.selectBox <= this.data.rows.length) {
369
+ this.selectedRows = [];
370
+ for (let boxRow of this.data.rows) {
371
+ if (boxRow.id === (this.selectBox - 1).toString()) {
372
+ this.selectedRows.push(boxRow);
373
+ break;
374
+ }
375
+ }
376
+ this.kupAutoBoxSelect.emit({
377
+ comp: this,
378
+ id: this.rootElement.id,
379
+ row: this.selectedRows[0],
380
+ });
381
+ }
507
382
  }
508
- else {
509
- const s = this.collapsedSection[section.id];
510
- if (!s[row.id]) {
511
- s[row.id] = true;
512
- }
513
- else {
514
- s[row.id] = !s[row.id];
515
- }
383
+ getEventDetails(el, e) {
384
+ let boxObject = null;
385
+ let cell = null;
386
+ let row = null;
387
+ let column = null;
388
+ if (el) {
389
+ boxObject =
390
+ el.closest('.box-object') ||
391
+ el.querySelector('.box-object') ||
392
+ el.closest('.f-cell');
393
+ }
394
+ if (boxObject) {
395
+ if (boxObject.classList.contains('f-cell')) {
396
+ const props = boxObject['kup-get-cell-props']();
397
+ cell = props.cell;
398
+ column = props.column;
399
+ row = props.row;
400
+ }
401
+ else {
402
+ cell = boxObject['data-cell'];
403
+ row = boxObject['data-row'];
404
+ column = getColumnByName(this.visibleColumns, boxObject.dataset.column);
405
+ }
406
+ }
407
+ return {
408
+ boxObject: boxObject ? boxObject : null,
409
+ column: column ? column : null,
410
+ cell: cell ? cell : null,
411
+ originalEvent: e,
412
+ row: row ? row : null,
413
+ };
516
414
  }
517
- // triggering rendering
518
- this.collapsedSection = Object.assign({}, this.collapsedSection);
519
- }
520
- onRowAction(row) {
521
- if (!row) {
522
- return;
415
+ contextMenuHandler(e) {
416
+ const details = this.getEventDetails(e.target, e);
417
+ return details;
523
418
  }
524
- if (row === this.rowActionMenuOpened) {
525
- // closing menu
526
- this.rowActionMenuOpened = null;
527
- return;
419
+ /**
420
+ * Checks if the element is the svg that opens the "row actions menu"
421
+ * @param element the element to check
422
+ */
423
+ checkIfElementIsActionMenuIcon(element) {
424
+ if (element.tagName && element.parentElement) {
425
+ return (element.tagName === 'svg' &&
426
+ element.parentElement.classList.contains('row-actions-toggler'));
427
+ }
428
+ return false;
528
429
  }
529
- if (row.actions) {
530
- // actions already loaded -> show menu
531
- this.rowActionMenuOpened = row;
430
+ // event listeners
431
+ onBoxClick({ target }, row) {
432
+ if (!(target instanceof HTMLElement)) {
433
+ return;
434
+ }
435
+ // searching parent
436
+ let element = target;
437
+ let classList = element.classList;
438
+ while (!classList.contains('box-object') &&
439
+ !classList.contains('box-section') &&
440
+ !classList.contains('box')) {
441
+ element = element.parentElement;
442
+ if (element === null) {
443
+ break;
444
+ }
445
+ classList = element.classList;
446
+ }
447
+ // evaluating column
448
+ let column = null;
449
+ if (classList.contains('box-object')) {
450
+ column = element.dataset.column;
451
+ }
452
+ this.kupBoxClick.emit({
453
+ comp: this,
454
+ id: this.rootElement.id,
455
+ row,
456
+ column,
457
+ });
458
+ // selecting box
459
+ if (this.multiSelection) {
460
+ // triggering multi selection
461
+ this.onSelectionCheckChange(row);
462
+ }
463
+ else {
464
+ this.selectedRows = [row];
465
+ }
532
466
  }
533
- else {
534
- // no actions -> triggering event
535
- this.kupRowActionMenuClick.emit({
536
- comp: this,
537
- id: this.rootElement.id,
538
- row,
539
- });
467
+ onSelectionCheckChange(row) {
468
+ var index = -1;
469
+ for (let i = 0; i < this.selectedRows.length; i++) {
470
+ const select = this.selectedRows[i];
471
+ if (select.id === row.id) {
472
+ index = i;
473
+ break;
474
+ }
475
+ }
476
+ if (index >= 0) {
477
+ // remove row
478
+ this.selectedRows.splice(index, 1);
479
+ this.selectedRows = [...this.selectedRows];
480
+ }
481
+ else {
482
+ // add row
483
+ this.selectedRows = [...this.selectedRows, row];
484
+ }
485
+ this.kupBoxSelected.emit({
486
+ comp: this,
487
+ id: this.rootElement.id,
488
+ rows: this.selectedRows,
489
+ });
540
490
  }
541
- }
542
- onRowActionClick(row, action, index) {
543
- this.kupRowActionClick.emit({
544
- comp: this,
545
- id: this.rootElement.id,
546
- row,
547
- action,
548
- index,
549
- });
550
- }
551
- /**
552
- * see onDocumentClick in kup-combo
553
- */
554
- clickFunction(event) {
555
- try {
556
- const targets = event.composedPath();
557
- for (let target of targets) {
558
- if (this.checkIfElementIsActionMenuIcon(target)) {
559
- return;
560
- }
561
- }
491
+ toggleSectionExpand(row, section) {
492
+ // check if section / row has id
493
+ if (!section.id) {
494
+ // error
495
+ console.error('cannot expand / collapse a section withoun an ID');
496
+ return;
497
+ }
498
+ if (!row.id) {
499
+ // error
500
+ console.error('cannot expand / collapse a section of a row without ad id');
501
+ return;
502
+ }
503
+ // check if section already in collapsedSection
504
+ if (!this.collapsedSection[section.id]) {
505
+ // adding element and row, setting it to expanded
506
+ this.collapsedSection[section.id] = {};
507
+ this.collapsedSection[section.id][row.id] = true;
508
+ }
509
+ else {
510
+ const s = this.collapsedSection[section.id];
511
+ if (!s[row.id]) {
512
+ s[row.id] = true;
513
+ }
514
+ else {
515
+ s[row.id] = !s[row.id];
516
+ }
517
+ }
518
+ // triggering rendering
519
+ this.collapsedSection = Object.assign({}, this.collapsedSection);
562
520
  }
563
- catch (err) {
564
- if (this.checkIfElementIsActionMenuIcon(event.target)) {
565
- return;
566
- }
521
+ onRowAction(row) {
522
+ if (!row) {
523
+ return;
524
+ }
525
+ if (row === this.rowActionMenuOpened) {
526
+ // closing menu
527
+ this.rowActionMenuOpened = null;
528
+ return;
529
+ }
530
+ if (row.actions) {
531
+ // actions already loaded -> show menu
532
+ this.rowActionMenuOpened = row;
533
+ }
534
+ else {
535
+ // no actions -> triggering event
536
+ this.kupRowActionMenuClick.emit({
537
+ comp: this,
538
+ id: this.rootElement.id,
539
+ row,
540
+ });
541
+ }
567
542
  }
568
- this.rowActionMenuOpened = null;
569
- }
570
- handlePageChange(pageNumber) {
571
- const newPage = pageChange(pageNumber, this.filteredRows.length, this.currentRowsPerPage);
572
- if (newPage) {
573
- this.currentPage = newPage;
543
+ onRowActionClick(row, action, index) {
544
+ this.kupRowActionClick.emit({
545
+ comp: this,
546
+ id: this.rootElement.id,
547
+ row,
548
+ action,
549
+ index,
550
+ });
574
551
  }
575
- }
576
- handleRowsPerPageChange(rowsNumber) {
577
- const newRows = rowsPerPageChange(rowsNumber, this.filteredRows.length);
578
- if (newRows) {
579
- this.currentRowsPerPage = newRows;
580
- this.adjustPaginator();
552
+ /**
553
+ * see onDocumentClick in kup-combo
554
+ */
555
+ clickFunction(event) {
556
+ try {
557
+ const targets = event.composedPath();
558
+ for (let target of targets) {
559
+ if (this.checkIfElementIsActionMenuIcon(target)) {
560
+ return;
561
+ }
562
+ }
563
+ }
564
+ catch (err) {
565
+ if (this.checkIfElementIsActionMenuIcon(event.target)) {
566
+ return;
567
+ }
568
+ }
569
+ this.rowActionMenuOpened = null;
581
570
  }
582
- }
583
- adjustPaginator() {
584
- const numberOfRows = this.rows.length;
585
- // check if current page is valid
586
- const numberOfPages = Math.ceil(numberOfRows / this.currentRowsPerPage);
587
- if (this.currentPage > numberOfPages) {
588
- // reset page
589
- this.currentPage = 1;
571
+ handlePageChange(pageNumber) {
572
+ const newPage = pageChange(pageNumber, this.filteredRows.length, this.currentRowsPerPage);
573
+ if (newPage) {
574
+ this.currentPage = newPage;
575
+ }
590
576
  }
591
- }
592
- // render methods
593
- renderSectionAsCard(row) {
594
- let skipPush = false;
595
- const cardData = {
596
- button: [],
597
- cell: [],
598
- columns: [],
599
- image: [],
600
- progressbar: [],
601
- text: [],
602
- };
603
- for (let index = 0; index < this.data.columns.length; index++) {
604
- const column = this.data.columns[index];
605
- if (column.visible !== false) {
606
- cardData.cell.push(row.cells[column.name]);
607
- cardData.columns.push(column);
608
- }
577
+ handleRowsPerPageChange(rowsNumber) {
578
+ const newRows = rowsPerPageChange(rowsNumber, this.filteredRows.length);
579
+ if (newRows) {
580
+ this.currentRowsPerPage = newRows;
581
+ this.adjustPaginator();
582
+ }
609
583
  }
610
- //First cycle sets specific binds between cardIDs and cells
611
- for (const key in row.cells) {
612
- if (row.cells.hasOwnProperty(key)) {
613
- const cell = row.cells[key];
614
- if (cell.cardID !== undefined && cell.obj) {
615
- switch (cell.obj.p) {
616
- case 'BTN':
617
- do {
618
- cardData.button.push({});
619
- } while (cardData.button.length < cell.cardID);
620
- cardData.button[cell.cardID] = {
621
- label: cell.value,
622
- };
623
- break;
624
- case 'IMG':
625
- do {
626
- cardData.image.push({});
627
- } while (cardData.image.length < cell.cardID);
628
- cardData.image[cell.cardID] = {
629
- resource: cell.value,
630
- };
631
- break;
632
- case 'PGB':
633
- do {
634
- cardData.progressbar.push({});
635
- } while (cardData.progressbar.length < cell.cardID);
636
- cardData.progressbar[cell.cardID] = {
637
- value: cell.value,
638
- };
639
- break;
640
- default:
641
- do {
642
- cardData.text.push('');
643
- } while (cardData.text.length < cell.cardID);
644
- cardData.text[cell.cardID] = cell.value;
645
- break;
646
- }
647
- }
648
- }
584
+ adjustPaginator() {
585
+ const numberOfRows = this.rows.length;
586
+ // check if current page is valid
587
+ const numberOfPages = Math.ceil(numberOfRows / this.currentRowsPerPage);
588
+ if (this.currentPage > numberOfPages) {
589
+ // reset page
590
+ this.currentPage = 1;
591
+ }
649
592
  }
650
- //Second cycle sets leftover binds automatically
651
- for (const key in row.cells) {
652
- if (row.cells.hasOwnProperty(key)) {
653
- const cell = row.cells[key];
654
- if (cell.cardID === undefined && cell.obj) {
655
- skipPush = false;
656
- switch (cell.obj.p) {
657
- case 'BTN':
658
- for (let index = 0; index < cardData.button.length; index++) {
659
- //If there are empty elements, the first one will be used
660
- if (!Object.keys(cardData.button[index]).length) {
661
- cardData.button[index] = {
662
- label: cell.value,
663
- };
664
- skipPush = true;
665
- break;
593
+ // render methods
594
+ renderSectionAsCard(row) {
595
+ let skipPush = false;
596
+ const cardData = {
597
+ button: [],
598
+ cell: [],
599
+ columns: [],
600
+ image: [],
601
+ progressbar: [],
602
+ text: [],
603
+ };
604
+ for (let index = 0; index < this.data.columns.length; index++) {
605
+ const column = this.data.columns[index];
606
+ if (column.visible !== false) {
607
+ cardData.cell.push(row.cells[column.name]);
608
+ cardData.columns.push(column);
609
+ }
610
+ }
611
+ //First cycle sets specific binds between cardIDs and cells
612
+ for (const key in row.cells) {
613
+ if (row.cells.hasOwnProperty(key)) {
614
+ const cell = row.cells[key];
615
+ if (cell.cardID !== undefined && cell.obj) {
616
+ switch (cell.obj.p) {
617
+ case 'BTN':
618
+ do {
619
+ cardData.button.push({});
620
+ } while (cardData.button.length < cell.cardID);
621
+ cardData.button[cell.cardID] = {
622
+ label: cell.value,
623
+ };
624
+ break;
625
+ case 'IMG':
626
+ do {
627
+ cardData.image.push({});
628
+ } while (cardData.image.length < cell.cardID);
629
+ cardData.image[cell.cardID] = {
630
+ resource: cell.value,
631
+ };
632
+ break;
633
+ case 'PGB':
634
+ do {
635
+ cardData.progressbar.push({});
636
+ } while (cardData.progressbar.length < cell.cardID);
637
+ cardData.progressbar[cell.cardID] = {
638
+ value: cell.value,
639
+ };
640
+ break;
641
+ default:
642
+ do {
643
+ cardData.text.push('');
644
+ } while (cardData.text.length < cell.cardID);
645
+ cardData.text[cell.cardID] = cell.value;
646
+ break;
647
+ }
666
648
  }
667
- }
668
- //Otherwise a new element will be pushed
669
- if (!skipPush) {
670
- cardData.button.push({
671
- label: cell.value,
672
- });
673
- }
674
- break;
675
- case 'IMG':
676
- for (let index = 0; index < cardData.image.length; index++) {
677
- //If there are empty elements, the first one will be used
678
- if (!Object.keys(cardData.image[index]).length) {
679
- cardData.image[index] = {
680
- resource: cell.value,
681
- };
682
- skipPush = true;
683
- break;
649
+ }
650
+ }
651
+ //Second cycle sets leftover binds automatically
652
+ for (const key in row.cells) {
653
+ if (row.cells.hasOwnProperty(key)) {
654
+ const cell = row.cells[key];
655
+ if (cell.cardID === undefined && cell.obj) {
656
+ skipPush = false;
657
+ switch (cell.obj.p) {
658
+ case 'BTN':
659
+ for (let index = 0; index < cardData.button.length; index++) {
660
+ //If there are empty elements, the first one will be used
661
+ if (!Object.keys(cardData.button[index]).length) {
662
+ cardData.button[index] = {
663
+ label: cell.value,
664
+ };
665
+ skipPush = true;
666
+ break;
667
+ }
668
+ }
669
+ //Otherwise a new element will be pushed
670
+ if (!skipPush) {
671
+ cardData.button.push({
672
+ label: cell.value,
673
+ });
674
+ }
675
+ break;
676
+ case 'IMG':
677
+ for (let index = 0; index < cardData.image.length; index++) {
678
+ //If there are empty elements, the first one will be used
679
+ if (!Object.keys(cardData.image[index]).length) {
680
+ cardData.image[index] = {
681
+ resource: cell.value,
682
+ };
683
+ skipPush = true;
684
+ break;
685
+ }
686
+ }
687
+ //Otherwise a new element will be pushed
688
+ if (!skipPush) {
689
+ cardData.image.push({
690
+ resource: cell.value,
691
+ });
692
+ }
693
+ break;
694
+ case 'PGB':
695
+ for (let index = 0; index < cardData.progressbar.length; index++) {
696
+ //If there are empty elements, the first one will be used
697
+ if (!Object.keys(cardData.progressbar[index])
698
+ .length) {
699
+ cardData.progressbar[index] = {
700
+ value: cell.value,
701
+ };
702
+ skipPush = true;
703
+ break;
704
+ }
705
+ }
706
+ //Otherwise a new element will be pushed
707
+ if (!skipPush) {
708
+ cardData.progressbar.push({
709
+ value: cell.value,
710
+ });
711
+ }
712
+ break;
713
+ default:
714
+ for (let index = 0; index < cardData.text.length; index++) {
715
+ //If there are empty elements, the first one will be used
716
+ if (cardData.text[index] === '') {
717
+ cardData.text[index] = cell.value;
718
+ skipPush = true;
719
+ break;
720
+ }
721
+ }
722
+ //Otherwise a new element will be pushed
723
+ if (!skipPush) {
724
+ cardData.text.push(cell.value);
725
+ }
726
+ break;
727
+ }
684
728
  }
685
- }
686
- //Otherwise a new element will be pushed
687
- if (!skipPush) {
688
- cardData.image.push({
689
- resource: cell.value,
690
- });
691
- }
692
- break;
693
- case 'PGB':
694
- for (let index = 0; index < cardData.progressbar.length; index++) {
695
- //If there are empty elements, the first one will be used
696
- if (!Object.keys(cardData.progressbar[index])
697
- .length) {
698
- cardData.progressbar[index] = {
699
- value: cell.value,
700
- };
701
- skipPush = true;
702
- break;
729
+ }
730
+ }
731
+ return h("kup-card", Object.assign({ data: cardData }, this.cardData));
732
+ }
733
+ renderRow(row) {
734
+ const visibleColumns = [...this.visibleColumns];
735
+ let boxContent = null;
736
+ // if layout in row, use that one
737
+ let rowLayout = row.layout;
738
+ if (!rowLayout) {
739
+ // otherwise, use 'default' layout
740
+ rowLayout = this.boxLayout;
741
+ }
742
+ let horizontal = false;
743
+ if (rowLayout) {
744
+ if (rowLayout.horizontal) {
745
+ horizontal = true;
746
+ }
747
+ const sections = rowLayout.sections;
748
+ let size = sections.length;
749
+ let cnt = 0;
750
+ if (size > 0) {
751
+ boxContent = [];
752
+ }
753
+ // create fake parent section
754
+ const parent = {
755
+ horizontal: horizontal,
756
+ };
757
+ while (size-- > 0) {
758
+ if (this.cardData !== null &&
759
+ this.cardData !== undefined &&
760
+ typeof this.cardData === 'object') {
761
+ boxContent.push(this.renderSectionAsCard(row));
703
762
  }
704
- }
705
- //Otherwise a new element will be pushed
706
- if (!skipPush) {
707
- cardData.progressbar.push({
708
- value: cell.value,
709
- });
710
- }
711
- break;
712
- default:
713
- for (let index = 0; index < cardData.text.length; index++) {
714
- //If there are empty elements, the first one will be used
715
- if (cardData.text[index] === '') {
716
- cardData.text[index] = cell.value;
717
- skipPush = true;
718
- break;
763
+ else {
764
+ boxContent.push(this.renderSection(sections[cnt++], parent, row, visibleColumns));
719
765
  }
720
- }
721
- //Otherwise a new element will be pushed
722
- if (!skipPush) {
723
- cardData.text.push(cell.value);
724
- }
725
- break;
726
- }
727
- }
728
- }
729
- }
730
- return h("kup-card", Object.assign({ data: cardData }, this.cardData));
731
- }
732
- renderRow(row) {
733
- const visibleColumns = [...this.visibleColumns];
734
- let boxContent = null;
735
- // if layout in row, use that one
736
- let rowLayout = row.layout;
737
- if (!rowLayout) {
738
- // otherwise, use 'default' layout
739
- rowLayout = this.boxLayout;
740
- }
741
- let horizontal = false;
742
- if (rowLayout) {
743
- if (rowLayout.horizontal) {
744
- horizontal = true;
745
- }
746
- const sections = rowLayout.sections;
747
- let size = sections.length;
748
- let cnt = 0;
749
- if (size > 0) {
750
- boxContent = [];
751
- }
752
- // create fake parent section
753
- const parent = {
754
- horizontal: horizontal,
755
- };
756
- while (size-- > 0) {
757
- if (this.cardData !== null &&
758
- this.cardData !== undefined &&
759
- typeof this.cardData === 'object') {
760
- boxContent.push(this.renderSectionAsCard(row));
766
+ }
767
+ }
768
+ var isSelected = false;
769
+ for (let select of this.selectedRows) {
770
+ if (select.id === row.id) {
771
+ isSelected = true;
772
+ }
773
+ }
774
+ let multiSel = null;
775
+ if (this.multiSelection) {
776
+ multiSel = (h("div", { class: "box-selection" }, h("kup-checkbox", { checked: isSelected })));
777
+ }
778
+ let rowObject = null;
779
+ if (this.enableRowActions && !this.swipeDisabled) {
780
+ const menuClass = {
781
+ 'row-action-menu': true,
782
+ open: row === this.rowActionMenuOpened,
783
+ };
784
+ let rowActionMenuContent = null;
785
+ if (row.actions) {
786
+ const actionItems = row.actions.map((item, index) => {
787
+ const iconClass = `icon ${item.icon}`;
788
+ return (h("li", { tabindex: "0", onClick: () => this.onRowActionClick(row, item, index) }, h("div", { class: iconClass }), h("div", { class: "text" }, item.text)));
789
+ });
790
+ rowActionMenuContent = h("ul", null, actionItems);
791
+ }
792
+ 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))));
793
+ }
794
+ let badges = null;
795
+ if (row.badgeData && row.badgeData.length > 0) {
796
+ badges = row.badgeData.map((badge) => (h("kup-badge", { text: badge.text, class: badge['className']
797
+ ? `centered ${badge['className']}`
798
+ : 'centered', imageData: badge.imageData })));
799
+ }
800
+ const boxClass = {
801
+ box: true,
802
+ draggable: this.dragEnabled,
803
+ selected: this.showSelection && isSelected,
804
+ column: !horizontal,
805
+ };
806
+ const rowStyle = row.style || {};
807
+ 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));
808
+ }
809
+ renderSection(section, parent, row, visibleColumns) {
810
+ let sectionContent = null;
811
+ if (section.sections && section.sections.length > 0) {
812
+ // rendering child
813
+ const sections = section.sections;
814
+ let size = sections.length;
815
+ let cnt = 0;
816
+ if (size > 0) {
817
+ sectionContent = [];
818
+ }
819
+ while (size-- > 0) {
820
+ sectionContent.push(this.renderSection(sections[cnt++], section, row, visibleColumns));
821
+ }
822
+ }
823
+ else if (section.content) {
824
+ // rendering box objects
825
+ const content = section.content;
826
+ let size = content.length;
827
+ let cnt = 0;
828
+ if (size > 0) {
829
+ sectionContent = [];
830
+ }
831
+ while (size-- > 0) {
832
+ sectionContent.push(this.renderBoxObject({
833
+ boxObject: content[cnt++],
834
+ row,
835
+ visibleColumns,
836
+ }, true));
837
+ }
838
+ }
839
+ else if (visibleColumns.length > 0) {
840
+ const column = visibleColumns[0];
841
+ sectionContent = this.renderBoxObject({
842
+ boxObject: { column: column.name },
843
+ row,
844
+ visibleColumns,
845
+ });
846
+ }
847
+ const sectionExpanded = this.isSectionExpanded(row, section);
848
+ const isGrid = !!section.columns;
849
+ const sectionClass = {
850
+ 'box-section': true,
851
+ open: sectionExpanded,
852
+ column: !isGrid && !section.horizontal,
853
+ grid: isGrid,
854
+ titled: !!section.title,
855
+ 'last-child': !section.sections || section.sections.length === 0,
856
+ };
857
+ const sectionStyle = section.style || {};
858
+ if (section.dim && parent) {
859
+ sectionStyle.flex = `0 0 ${section.dim}`;
860
+ sectionStyle.overflow = 'hidden';
861
+ if (parent.horizontal) {
862
+ sectionStyle.maxWidth = section.dim;
863
+ }
864
+ else {
865
+ sectionStyle.maxHeight = section.dim;
866
+ }
867
+ }
868
+ if (isGrid) {
869
+ sectionStyle['grid-template-columns'] = `repeat(${section.columns}, 1fr)`;
870
+ }
871
+ let sectionContainer = null;
872
+ if (section.collapsible) {
873
+ sectionClass['collapse-section'] = true;
874
+ const contentClass = {
875
+ content: true,
876
+ };
877
+ // TODO I18N
878
+ let headerTitle = '';
879
+ if (section.title) {
880
+ headerTitle = section.title;
881
+ }
882
+ else if (sectionExpanded) {
883
+ headerTitle = this.kupManager.language.translate(KupLanguageGeneric.COLLAPSE);
884
+ }
885
+ else {
886
+ headerTitle = this.kupManager.language.translate(KupLanguageGeneric.EXPAND);
887
+ }
888
+ sectionContainer = (h("div", { class: sectionClass, style: sectionStyle }, h("div", { class: contentClass }, sectionContent), h("div", { class: "header", role: "button", onClick: (e) => {
889
+ e.stopPropagation();
890
+ this.toggleSectionExpand(row, section);
891
+ } }, h("div", { class: "header-content" }, h("span", null, headerTitle), h(FImage, { resource: `${KupThemeIconValues.DROPDOWN}`, sizeX: "1.25em", sizeY: "1.25em", wrapperClass: sectionExpanded ? 'toggled' : '' })))));
761
892
  }
762
893
  else {
763
- boxContent.push(this.renderSection(sections[cnt++], parent, row, visibleColumns));
894
+ const title = section.title ? h("h3", null, section.title) : null;
895
+ sectionContainer = (h("div", { class: sectionClass, style: sectionStyle }, title, sectionContent));
764
896
  }
765
- }
766
- }
767
- var isSelected = false;
768
- for (let select of this.selectedRows) {
769
- if (select.id === row.id) {
770
- isSelected = true;
771
- }
772
- }
773
- let multiSel = null;
774
- if (this.multiSelection) {
775
- multiSel = (h("div", { class: "box-selection" }, h("kup-checkbox", { checked: isSelected })));
776
- }
777
- let rowObject = null;
778
- if (this.enableRowActions && !this.swipeDisabled) {
779
- const menuClass = {
780
- 'row-action-menu': true,
781
- open: row === this.rowActionMenuOpened,
782
- };
783
- let rowActionMenuContent = null;
784
- if (row.actions) {
785
- const actionItems = row.actions.map((item, index) => {
786
- const iconClass = `icon ${item.icon}`;
787
- return (h("li", { tabindex: "0", onClick: () => this.onRowActionClick(row, item, index) }, h("div", { class: iconClass }), h("div", { class: "text" }, item.text)));
788
- });
789
- rowActionMenuContent = h("ul", null, actionItems);
790
- }
791
- 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))));
792
- }
793
- let badges = null;
794
- if (row.badgeData && row.badgeData.length > 0) {
795
- badges = row.badgeData.map((badge) => (h("kup-badge", { text: badge.text, class: badge['className']
796
- ? `centered ${badge['className']}`
797
- : 'centered', imageData: badge.imageData })));
798
- }
799
- const boxClass = {
800
- box: true,
801
- draggable: this.dragEnabled,
802
- selected: this.showSelection && isSelected,
803
- column: !horizontal,
804
- };
805
- const rowStyle = row.style || {};
806
- 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));
807
- }
808
- renderSection(section, parent, row, visibleColumns) {
809
- let sectionContent = null;
810
- if (section.sections && section.sections.length > 0) {
811
- // rendering child
812
- const sections = section.sections;
813
- let size = sections.length;
814
- let cnt = 0;
815
- if (size > 0) {
816
- sectionContent = [];
817
- }
818
- while (size-- > 0) {
819
- sectionContent.push(this.renderSection(sections[cnt++], section, row, visibleColumns));
820
- }
821
- }
822
- else if (section.content) {
823
- // rendering box objects
824
- const content = section.content;
825
- let size = content.length;
826
- let cnt = 0;
827
- if (size > 0) {
828
- sectionContent = [];
829
- }
830
- while (size-- > 0) {
831
- sectionContent.push(this.renderBoxObject({
832
- boxObject: content[cnt++],
833
- row,
834
- visibleColumns,
835
- }, true));
836
- }
837
- }
838
- else if (visibleColumns.length > 0) {
839
- const column = visibleColumns[0];
840
- sectionContent = this.renderBoxObject({
841
- boxObject: { column: column.name },
842
- row,
843
- visibleColumns,
844
- });
845
- }
846
- const sectionExpanded = this.isSectionExpanded(row, section);
847
- const isGrid = !!section.columns;
848
- const sectionClass = {
849
- 'box-section': true,
850
- open: sectionExpanded,
851
- column: !isGrid && !section.horizontal,
852
- grid: isGrid,
853
- titled: !!section.title,
854
- 'last-child': !section.sections || section.sections.length === 0,
855
- };
856
- const sectionStyle = section.style || {};
857
- if (section.dim && parent) {
858
- sectionStyle.flex = `0 0 ${section.dim}`;
859
- sectionStyle.overflow = 'hidden';
860
- if (parent.horizontal) {
861
- sectionStyle.maxWidth = section.dim;
862
- }
863
- else {
864
- sectionStyle.maxHeight = section.dim;
865
- }
866
- }
867
- if (isGrid) {
868
- sectionStyle['grid-template-columns'] = `repeat(${section.columns}, 1fr)`;
869
- }
870
- let sectionContainer = null;
871
- if (section.collapsible) {
872
- sectionClass['collapse-section'] = true;
873
- const contentClass = {
874
- content: true,
875
- };
876
- // TODO I18N
877
- let headerTitle = '';
878
- if (section.title) {
879
- headerTitle = section.title;
880
- }
881
- else if (sectionExpanded) {
882
- headerTitle = this.kupManager.language.translate(KupLanguageGeneric.COLLAPSE);
883
- }
884
- else {
885
- headerTitle = this.kupManager.language.translate(KupLanguageGeneric.EXPAND);
886
- }
887
- sectionContainer = (h("div", { class: sectionClass, style: sectionStyle }, h("div", { class: contentClass }, sectionContent), h("div", { class: "header", role: "button", onClick: (e) => {
888
- e.stopPropagation();
889
- this.toggleSectionExpand(row, section);
890
- } }, h("div", { class: "header-content" }, h("span", null, headerTitle), h(FImage, { resource: `${KupThemeIconValues.DROPDOWN}`, sizeX: "1.25em", sizeY: "1.25em", wrapperClass: sectionExpanded ? 'toggled' : '' })))));
891
- }
892
- else {
893
- const title = section.title ? h("h3", null, section.title) : null;
894
- sectionContainer = (h("div", { class: sectionClass, style: sectionStyle }, title, sectionContent));
895
- }
896
- return sectionContainer;
897
- }
898
- renderBoxObject({ boxObject, row, visibleColumns, }, fromSection) {
899
- const classObj = {
900
- 'box-object': true,
901
- };
902
- const boStyle = {};
903
- let column = null;
904
- let index = -1;
905
- for (let i = 0; i < visibleColumns.length; i++) {
906
- const c = visibleColumns[i];
907
- if (c.name === boxObject.column) {
908
- index = i;
909
- break;
910
- }
911
- }
912
- if (index >= 0) {
913
- column = visibleColumns[index];
914
- visibleColumns.splice(index, 1);
915
- }
916
- else if (fromSection) {
917
- column = this.data.columns.find((x) => x.name === boxObject.column);
918
- }
919
- const cell = row.cells[boxObject.column];
920
- let title = undefined;
921
- if (cell && !this.kupManager.objects.isEmptyKupObj(cell.obj)) {
922
- classObj['is-obj'] = true;
923
- if (this.kupManager.debug.isDebug()) {
924
- title =
925
- cell.obj.t + '; ' + cell.obj.p + '; ' + cell.obj.k + ';';
926
- }
927
- }
928
- const cellProps = {
929
- cell: cell,
930
- column: column,
931
- component: this,
932
- editable: this.editableData,
933
- renderKup: true,
934
- row: row,
935
- setSizes: true,
936
- shape: boxObject.shape,
937
- };
938
- 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))));
939
- }
940
- /**
941
- * Prepares the kanban sections by sorting the boxlist's data.
942
- * @returns {{jsx: VNode[], style: { [index: string]: string }}} jsx contains the virtual nodes of the Kanban sections, style contains the grid CSS settings.
943
- */
944
- kanbanMode() {
945
- // Testing whether there are columns to group by
946
- if (!this.kanban.columns || this.kanban.columns.length === 0) {
947
- this.kupManager.debug.logMessage(this, 'No columns to group by detected.', KupDebugCategory.ERROR);
948
- return {
949
- 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))),
950
- style: { 'grid-template-columns': `repeat(1, 1fr)` },
951
- };
952
- }
953
- const kanbanSections = [];
954
- // Creating empty sections from prop-defined labels
955
- if (this.kanban.labels) {
956
- for (let index = 0; index < this.kanban.labels.length; index++) {
957
- const key = this.kanban.labels[index];
958
- kanbanSections.push({ labels: key, nodes: [] });
959
- }
960
- }
961
- // Browsing all rows
962
- for (let index = 0; index < this.rows.length; index++) {
963
- let key = [];
964
- // Creating the key for the current row
965
- for (let j = 0; j < this.kanban.columns.length; j++) {
966
- try {
967
- key.push(this.rows[index].cells[this.kanban.columns[j]].value);
968
- }
969
- catch (error) {
970
- this.kupManager.debug.logMessage(this, error, KupDebugCategory.WARNING);
971
- }
972
- }
973
- const check = {
974
- found: false,
975
- index: null,
976
- };
977
- // Browsing key array to search whether the current key exists or not
978
- for (let j = 0; j < kanbanSections.length; j++) {
979
- let sortingKey = kanbanSections[j].labels;
980
- let found = true;
981
- for (let i = 0; i < sortingKey.length; i++) {
982
- if (key[i] !== sortingKey[i]) {
983
- found = false;
984
- break;
985
- }
986
- }
987
- if (found) {
988
- check.found = true;
989
- check.index = j;
990
- break;
991
- }
992
- }
993
- // If current key exists, box will be pushed into the existing array of virtual nodes
994
- if (check.found) {
995
- kanbanSections[check.index].nodes.push(this.renderRow(this.rows[index]));
996
- }
997
- else {
998
- // Otherwise, a new section will be defined starting with just the current virtal node
999
- kanbanSections.push({
1000
- labels: key,
1001
- nodes: [this.renderRow(this.rows[index])],
1002
- });
1003
- }
1004
- }
1005
- // Once the arrays are set, they need to be emptied into columns
1006
- const kanbanJSX = [];
1007
- for (let index = 0; index < kanbanSections.length; index++) {
1008
- const sortingKey = kanbanSections[index].labels;
1009
- const props = {
1010
- data: [],
1011
- };
1012
- for (let index = 0; index < sortingKey.length; index++) {
1013
- props.data.push({
1014
- value: sortingKey[index],
1015
- id: sortingKey[index],
1016
- });
1017
- }
1018
- kanbanJSX.push(h("div", { class: "kanban-section" }, h(FChip, Object.assign({}, props)), kanbanSections[index].nodes));
897
+ return sectionContainer;
1019
898
  }
1020
- return {
1021
- jsx: kanbanJSX,
1022
- style: {
1023
- 'grid-template-columns': this.kanban.isStacked
1024
- ? 'repeat(1fr)'
1025
- : this.kanban.size
1026
- ? `repeat(${Object.keys(kanbanSections).length}, ${this.kanban.size})`
1027
- : `repeat(${Object.keys(kanbanSections).length}, 1fr)`,
1028
- },
1029
- };
1030
- }
1031
- didLoadInteractables() {
1032
- this.interactableTouch.push(this.boxContainer);
1033
- const tapCb = (e) => {
1034
- if (this.hold) {
1035
- this.hold = false;
1036
- return;
1037
- }
1038
- switch (e.button) {
1039
- case 2:
1040
- this.kupBoxContextMenu.emit({
1041
- comp: this,
1042
- id: this.rootElement.id,
1043
- details: this.contextMenuHandler(e),
1044
- });
1045
- break;
1046
- }
1047
- };
1048
- const holdCb = (e) => {
1049
- if (e.pointerType === 'pen' || e.pointerType === 'touch') {
1050
- this.hold = true;
1051
- this.kupBoxContextMenu.emit({
1052
- comp: this,
1053
- id: this.rootElement.id,
1054
- details: this.contextMenuHandler(e),
1055
- });
1056
- }
1057
- };
1058
- this.kupManager.interact.on(this.boxContainer, KupPointerEventTypes.TAP, tapCb);
1059
- this.kupManager.interact.on(this.boxContainer, KupPointerEventTypes.HOLD, holdCb);
1060
- }
1061
- didRenderInteractables() {
1062
- if (this.dragEnabled) {
1063
- for (let index = 0; index < this.rowsRefs.length; index++) {
1064
- const row = this.rowsRefs[index];
1065
- const dataCb = () => {
1066
- const cellEl = this.rootElement.shadowRoot.querySelector('.box-object:hover');
1067
- return {
1068
- cell: cellEl['data-cell'],
1069
- column: getColumnByName(this.visibleColumns, cellEl.dataset.column),
1070
- id: this.rootElement.id,
1071
- multiple: this.multiSelection,
1072
- row: cellEl['data-row'],
1073
- selectedRows: this.selectedRows,
1074
- };
899
+ renderBoxObject({ boxObject, row, visibleColumns, }, fromSection) {
900
+ const classObj = {
901
+ 'box-object': true,
1075
902
  };
1076
- if (row && !this.interactableDrag.includes(row)) {
1077
- this.interactableDrag.push(row);
1078
- this.kupManager.interact.draggable(row, {
1079
- allowFrom: '.box-object',
1080
- cursorChecker() {
1081
- return null;
1082
- },
1083
- }, {
1084
- callback: dataCb,
1085
- }, KupDragEffect.BADGE);
903
+ const boStyle = {};
904
+ let column = null;
905
+ let index = -1;
906
+ for (let i = 0; i < visibleColumns.length; i++) {
907
+ const c = visibleColumns[i];
908
+ if (c.name === boxObject.column) {
909
+ index = i;
910
+ break;
911
+ }
912
+ }
913
+ if (index >= 0) {
914
+ column = visibleColumns[index];
915
+ visibleColumns.splice(index, 1);
916
+ }
917
+ else if (fromSection) {
918
+ column = this.data.columns.find((x) => x.name === boxObject.column);
1086
919
  }
1087
- }
920
+ const cell = row.cells[boxObject.column];
921
+ let title = undefined;
922
+ if (cell && !this.kupManager.objects.isEmptyKupObj(cell.obj)) {
923
+ classObj['is-obj'] = true;
924
+ if (this.kupManager.debug.isDebug()) {
925
+ title =
926
+ cell.obj.t + '; ' + cell.obj.p + '; ' + cell.obj.k + ';';
927
+ }
928
+ }
929
+ const cellProps = {
930
+ cell: cell,
931
+ column: column,
932
+ component: this,
933
+ editable: this.editableData,
934
+ renderKup: true,
935
+ row: row,
936
+ setSizes: true,
937
+ shape: boxObject.shape,
938
+ };
939
+ 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))));
1088
940
  }
1089
- if (this.dropEnabled) {
1090
- const dataCb = () => {
1091
- const receivingDetails = this.getEventDetails(this.rootElement.shadowRoot.querySelector('.box:hover'));
941
+ /**
942
+ * Prepares the kanban sections by sorting the boxlist's data.
943
+ * @returns {{jsx: VNode[], style: { [index: string]: string }}} jsx contains the virtual nodes of the Kanban sections, style contains the grid CSS settings.
944
+ */
945
+ kanbanMode() {
946
+ // Testing whether there are columns to group by
947
+ if (!this.kanban.columns || this.kanban.columns.length === 0) {
948
+ this.kupManager.debug.logMessage(this, 'No columns to group by detected.', KupDebugCategory.ERROR);
949
+ return {
950
+ 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))),
951
+ style: { 'grid-template-columns': `repeat(1, 1fr)` },
952
+ };
953
+ }
954
+ const kanbanSections = [];
955
+ // Creating empty sections from prop-defined labels
956
+ if (this.kanban.labels) {
957
+ for (let index = 0; index < this.kanban.labels.length; index++) {
958
+ const key = this.kanban.labels[index];
959
+ kanbanSections.push({ labels: key, nodes: [] });
960
+ }
961
+ }
962
+ // Browsing all rows
963
+ for (let index = 0; index < this.rows.length; index++) {
964
+ let key = [];
965
+ // Creating the key for the current row
966
+ for (let j = 0; j < this.kanban.columns.length; j++) {
967
+ try {
968
+ key.push(this.rows[index].cells[this.kanban.columns[j]].value);
969
+ }
970
+ catch (error) {
971
+ this.kupManager.debug.logMessage(this, error, KupDebugCategory.WARNING);
972
+ }
973
+ }
974
+ const check = {
975
+ found: false,
976
+ index: null,
977
+ };
978
+ // Browsing key array to search whether the current key exists or not
979
+ for (let j = 0; j < kanbanSections.length; j++) {
980
+ let sortingKey = kanbanSections[j].labels;
981
+ let found = true;
982
+ for (let i = 0; i < sortingKey.length; i++) {
983
+ if (key[i] !== sortingKey[i]) {
984
+ found = false;
985
+ break;
986
+ }
987
+ }
988
+ if (found) {
989
+ check.found = true;
990
+ check.index = j;
991
+ break;
992
+ }
993
+ }
994
+ // If current key exists, box will be pushed into the existing array of virtual nodes
995
+ if (check.found) {
996
+ kanbanSections[check.index].nodes.push(this.renderRow(this.rows[index]));
997
+ }
998
+ else {
999
+ // Otherwise, a new section will be defined starting with just the current virtal node
1000
+ kanbanSections.push({
1001
+ labels: key,
1002
+ nodes: [this.renderRow(this.rows[index])],
1003
+ });
1004
+ }
1005
+ }
1006
+ // Once the arrays are set, they need to be emptied into columns
1007
+ const kanbanJSX = [];
1008
+ for (let index = 0; index < kanbanSections.length; index++) {
1009
+ const sortingKey = kanbanSections[index].labels;
1010
+ const props = {
1011
+ data: [],
1012
+ };
1013
+ for (let index = 0; index < sortingKey.length; index++) {
1014
+ props.data.push({
1015
+ value: sortingKey[index],
1016
+ id: sortingKey[index],
1017
+ });
1018
+ }
1019
+ kanbanJSX.push(h("div", { class: "kanban-section" }, h(FChip, Object.assign({}, props)), kanbanSections[index].nodes));
1020
+ }
1092
1021
  return {
1093
- cell: receivingDetails.cell,
1094
- column: receivingDetails.column,
1095
- id: this.rootElement.id,
1096
- row: receivingDetails.row,
1022
+ jsx: kanbanJSX,
1023
+ style: {
1024
+ 'grid-template-columns': this.kanban.isStacked
1025
+ ? 'repeat(1fr)'
1026
+ : this.kanban.size
1027
+ ? `repeat(${Object.keys(kanbanSections).length}, ${this.kanban.size})`
1028
+ : `repeat(${Object.keys(kanbanSections).length}, 1fr)`,
1029
+ },
1097
1030
  };
1098
- };
1099
- if (!this.interactableDrop.includes(this.sectionRef)) {
1100
- this.interactableDrop.push(this.sectionRef);
1101
- this.kupManager.interact.dropzone(this.sectionRef, {
1102
- accept: `[${kupDraggableCellAttr}]`,
1103
- }, {
1104
- dispatcher: this.rootElement,
1105
- type: KupDropEventTypes.BOX,
1106
- });
1107
- }
1108
- for (let index = 0; index < this.rowsRefs.length; index++) {
1109
- const row = this.rowsRefs[index];
1110
- if (row && !this.interactableDrop.includes(row)) {
1111
- this.interactableDrop.push(row);
1112
- this.kupManager.interact.dropzone(row, {
1113
- accept: `[${kupDraggableCellAttr}]`,
1114
- }, {
1115
- callback: dataCb,
1116
- dispatcher: this.rootElement,
1117
- type: KupDropEventTypes.BOX,
1118
- });
1119
- }
1120
- }
1121
- }
1122
- }
1123
- /*-------------------------------------------------*/
1124
- /* L i f e c y c l e H o o k s */
1125
- /*-------------------------------------------------*/
1126
- componentWillLoad() {
1127
- this.kupManager.debug.logLoad(this, false);
1128
- if (this.rowsPerPage) {
1129
- this.currentRowsPerPage = this.rowsPerPage;
1130
- }
1131
- if (this.data &&
1132
- this.data.rows &&
1133
- this.currentRowsPerPage > this.data.rows.length) {
1134
- this.currentRowsPerPage = this.data.rows.length;
1135
- }
1136
- this.kupManager.language.register(this);
1137
- this.kupManager.theme.register(this);
1138
- this.onDataChanged();
1139
- this.adjustPaginator();
1140
- if (document.querySelector('.header')) {
1141
- __classPrivateFieldSet(this, _KupBox_navBarHeight, document.querySelector('.header').clientHeight, "f");
1142
- }
1143
- else {
1144
- __classPrivateFieldSet(this, _KupBox_navBarHeight, 0, "f");
1145
- }
1146
- if (document.querySelector('.topbar')) {
1147
- __classPrivateFieldSet(this, _KupBox_navBarHeight, __classPrivateFieldGet(this, _KupBox_navBarHeight, "f") + document.querySelector('.topbar').clientHeight, "f");
1148
- }
1149
- __classPrivateFieldGet(this, _KupBox_instances, "m", _KupBox_setObserver).call(this);
1150
- }
1151
- componentDidLoad() {
1152
- this.handleAutomaticBoxSelection();
1153
- // When component is created, then the listener is set. @See clickFunction for more details
1154
- document.addEventListener('click', this.clickFunction.bind(this));
1155
- this.currentPage = this.pageSelected;
1156
- if (this.multiSelection && this.selectedRowsState) {
1157
- this.selectedRows = [];
1158
- let selectedIds = this.selectedRowsState.split(';');
1159
- this.selectedRows = this.data.rows.filter((r) => {
1160
- return selectedIds.indexOf(r.id) >= 0;
1161
- });
1162
- }
1163
- this.didLoadInteractables();
1164
- this.kupDidLoad.emit({ comp: this, id: this.rootElement.id });
1165
- this.kupManager.debug.logLoad(this, true);
1166
- }
1167
- componentWillRender() {
1168
- this.kupManager.debug.logRender(this, false);
1169
- }
1170
- componentDidRender() {
1171
- const root = this.rootElement.shadowRoot;
1172
- if (root) {
1173
- const fs = root.querySelectorAll('.f-text-field');
1174
- for (let index = 0; index < fs.length; index++) {
1175
- FTextFieldMDC(fs[index]);
1176
- }
1177
1031
  }
1178
- this.checkScrollOnHover();
1179
- this.persistState();
1180
- this.didRenderInteractables();
1181
- __classPrivateFieldGet(this, _KupBox_instances, "m", _KupBox_didRenderObservers).call(this);
1182
- this.kupManager.debug.logRender(this, true);
1183
- }
1184
- render() {
1185
- const isKanban = !!(typeof this.kanban === 'object' && this.kanban !== null);
1186
- let sortPanel = null;
1187
- if (this.sortEnabled) {
1188
- // creating items
1189
- const visibleColumnsItems = this.visibleColumns.map((column) => {
1190
- const item = {
1191
- value: column.title,
1192
- id: column.name,
1193
- selected: column.name === this.sortBy,
1032
+ didLoadInteractables() {
1033
+ this.interactableTouch.push(this.boxContainer);
1034
+ const tapCb = (e) => {
1035
+ if (this.hold) {
1036
+ this.hold = false;
1037
+ return;
1038
+ }
1039
+ switch (e.button) {
1040
+ case 2:
1041
+ this.kupBoxContextMenu.emit({
1042
+ comp: this,
1043
+ id: this.rootElement.id,
1044
+ details: this.contextMenuHandler(e),
1045
+ });
1046
+ break;
1047
+ }
1194
1048
  };
1195
- return item;
1196
- });
1197
- const items = [{ value: '', id: '' }, ...visibleColumnsItems];
1198
- let textfieldData = {
1199
- label: this.kupManager.language.translate(KupLanguageGeneric.SORT_BY),
1200
- trailingIcon: true,
1201
- };
1202
- let listData = {
1203
- data: items,
1204
- selectable: true,
1205
- };
1206
- let data = {
1207
- 'kup-text-field': textfieldData,
1208
- 'kup-list': listData,
1209
- };
1210
- sortPanel = (h("div", { id: "sort-panel" }, h("kup-combobox", { data: data, initialValue: this.sortBy, "onkup-combobox-itemclick": (e) => this.onSortChange(e) })));
1211
- }
1212
- let filterPanel = null;
1213
- if (this.globalFilter) {
1214
- 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) => {
1215
- window.clearTimeout(this.globalFilterTimeout);
1216
- this.globalFilterTimeout = window.setTimeout(() => this.onGlobalFilterChange(event), 600);
1217
- } })));
1218
- }
1219
- let paginator = null;
1220
- if (!this.lazyLoadRows && this.pagination) {
1221
- paginator = (h(FPaginator, { id: top ? 'top-paginator' : 'bottom-paginator', currentPage: this.currentPage, max: this.filteredRows.length, mode: FPaginatorMode.SIMPLE, perPage: this.currentRowsPerPage
1222
- ? this.currentRowsPerPage
1223
- : this.rowsPerPage, onPageChange: (e) => this.handlePageChange(e.detail.value), onRowsChange: (e) => this.handleRowsPerPageChange(e.detail.value) }));
1224
- }
1225
- let boxContent = null;
1226
- let containerStyle = {};
1227
- if (this.rows.length === 0) {
1228
- 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))));
1229
- containerStyle = { 'grid-template-columns': `repeat(1, 1fr)` };
1230
- }
1231
- else if (isKanban) {
1232
- const kanban = this.kanbanMode();
1233
- boxContent = kanban.jsx;
1234
- containerStyle = kanban.style;
1235
- }
1236
- else {
1237
- containerStyle = {
1238
- 'grid-template-columns': `repeat(${this.columns}, 1fr)`,
1239
- };
1240
- const rows = this.rows;
1241
- let size = rows.length;
1242
- let cnt = 0;
1243
- boxContent = [];
1244
- while (size-- > 0) {
1245
- boxContent.push(this.renderRow(rows[cnt++]));
1246
- }
1247
- }
1248
- 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) => {
1249
- e.preventDefault();
1250
- }, ref: (el) => (this.boxContainer =
1251
- el) }, boxContent)))));
1252
- }
1253
- disconnectedCallback() {
1254
- this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop));
1255
- this.kupManager.language.unregister(this);
1256
- this.kupManager.theme.unregister(this);
1257
- if (this.scrollOnHover) {
1258
- this.kupManager.scrollOnHover.unregister(this.boxContainer);
1049
+ const holdCb = (e) => {
1050
+ if (e.pointerType === 'pen' || e.pointerType === 'touch') {
1051
+ this.hold = true;
1052
+ this.kupBoxContextMenu.emit({
1053
+ comp: this,
1054
+ id: this.rootElement.id,
1055
+ details: this.contextMenuHandler(e),
1056
+ });
1057
+ }
1058
+ };
1059
+ this.kupManager.interact.on(this.boxContainer, KupPointerEventTypes.TAP, tapCb);
1060
+ this.kupManager.interact.on(this.boxContainer, KupPointerEventTypes.HOLD, holdCb);
1061
+ }
1062
+ didRenderInteractables() {
1063
+ if (this.dragEnabled) {
1064
+ for (let index = 0; index < this.rowsRefs.length; index++) {
1065
+ const row = this.rowsRefs[index];
1066
+ const dataCb = () => {
1067
+ const cellEl = this.rootElement.shadowRoot.querySelector('.box-object:hover');
1068
+ return {
1069
+ cell: cellEl['data-cell'],
1070
+ column: getColumnByName(this.visibleColumns, cellEl.dataset.column),
1071
+ id: this.rootElement.id,
1072
+ multiple: this.multiSelection,
1073
+ row: cellEl['data-row'],
1074
+ selectedRows: this.selectedRows,
1075
+ };
1076
+ };
1077
+ if (row && !this.interactableDrag.includes(row)) {
1078
+ this.interactableDrag.push(row);
1079
+ this.kupManager.interact.draggable(row, {
1080
+ allowFrom: '.box-object',
1081
+ cursorChecker() {
1082
+ return null;
1083
+ },
1084
+ }, {
1085
+ callback: dataCb,
1086
+ }, KupDragEffect.BADGE);
1087
+ }
1088
+ }
1089
+ }
1090
+ if (this.dropEnabled) {
1091
+ const dataCb = () => {
1092
+ const receivingDetails = this.getEventDetails(this.rootElement.shadowRoot.querySelector('.box:hover'));
1093
+ return {
1094
+ cell: receivingDetails.cell,
1095
+ column: receivingDetails.column,
1096
+ id: this.rootElement.id,
1097
+ row: receivingDetails.row,
1098
+ };
1099
+ };
1100
+ if (!this.interactableDrop.includes(this.sectionRef)) {
1101
+ this.interactableDrop.push(this.sectionRef);
1102
+ this.kupManager.interact.dropzone(this.sectionRef, {
1103
+ accept: `[${kupDraggableCellAttr}]`,
1104
+ }, {
1105
+ dispatcher: this.rootElement,
1106
+ type: KupDropEventTypes.BOX,
1107
+ });
1108
+ }
1109
+ for (let index = 0; index < this.rowsRefs.length; index++) {
1110
+ const row = this.rowsRefs[index];
1111
+ if (row && !this.interactableDrop.includes(row)) {
1112
+ this.interactableDrop.push(row);
1113
+ this.kupManager.interact.dropzone(row, {
1114
+ accept: `[${kupDraggableCellAttr}]`,
1115
+ }, {
1116
+ callback: dataCb,
1117
+ dispatcher: this.rootElement,
1118
+ type: KupDropEventTypes.BOX,
1119
+ });
1120
+ }
1121
+ }
1122
+ }
1259
1123
  }
1260
- // When component is destroyed, then the listener is removed. @See clickFunction for more details
1261
- document.removeEventListener('click', this.clickFunction.bind(this));
1262
- this.kupDidUnload.emit({ comp: this, id: this.rootElement.id });
1263
- }
1264
- get rootElement() { return getElement(this); }
1265
- static get watchers() { return {
1266
- "rowsPerPage": ["rowsPerPageHandler", "recalculateRows"],
1267
- "globalFilterValue": ["recalculateRows"],
1268
- "sortBy": ["recalculateRows"],
1269
- "pagination": ["recalculateRows"],
1270
- "currentPage": ["recalculateRows"],
1271
- "currentRowsPerPage": ["recalculateRows"],
1272
- "data": ["onDataChanged"],
1273
- "layout": ["onLayoutChanged"],
1274
- "selectBox": ["onSelectBoxChanged"]
1275
- }; }
1124
+ /*-------------------------------------------------*/
1125
+ /* L i f e c y c l e H o o k s */
1126
+ /*-------------------------------------------------*/
1127
+ componentWillLoad() {
1128
+ this.kupManager.debug.logLoad(this, false);
1129
+ if (this.rowsPerPage) {
1130
+ this.currentRowsPerPage = this.rowsPerPage;
1131
+ }
1132
+ if (this.data &&
1133
+ this.data.rows &&
1134
+ this.currentRowsPerPage > this.data.rows.length) {
1135
+ this.currentRowsPerPage = this.data.rows.length;
1136
+ }
1137
+ this.kupManager.language.register(this);
1138
+ this.kupManager.theme.register(this);
1139
+ this.onDataChanged();
1140
+ this.adjustPaginator();
1141
+ if (document.querySelector('.header')) {
1142
+ __classPrivateFieldSet(this, _KupBox_navBarHeight, document.querySelector('.header').clientHeight, "f");
1143
+ }
1144
+ else {
1145
+ __classPrivateFieldSet(this, _KupBox_navBarHeight, 0, "f");
1146
+ }
1147
+ if (document.querySelector('.topbar')) {
1148
+ __classPrivateFieldSet(this, _KupBox_navBarHeight, __classPrivateFieldGet(this, _KupBox_navBarHeight, "f") + document.querySelector('.topbar').clientHeight, "f");
1149
+ }
1150
+ __classPrivateFieldGet(this, _KupBox_instances, "m", _KupBox_setObserver).call(this);
1151
+ }
1152
+ componentDidLoad() {
1153
+ this.handleAutomaticBoxSelection();
1154
+ // When component is created, then the listener is set. @See clickFunction for more details
1155
+ document.addEventListener('click', this.clickFunction.bind(this));
1156
+ this.currentPage = this.pageSelected;
1157
+ if (this.multiSelection && this.selectedRowsState) {
1158
+ this.selectedRows = [];
1159
+ let selectedIds = this.selectedRowsState.split(';');
1160
+ this.selectedRows = this.data.rows.filter((r) => {
1161
+ return selectedIds.indexOf(r.id) >= 0;
1162
+ });
1163
+ }
1164
+ this.didLoadInteractables();
1165
+ this.kupDidLoad.emit({ comp: this, id: this.rootElement.id });
1166
+ this.kupManager.debug.logLoad(this, true);
1167
+ }
1168
+ componentWillRender() {
1169
+ this.kupManager.debug.logRender(this, false);
1170
+ }
1171
+ componentDidRender() {
1172
+ const root = this.rootElement.shadowRoot;
1173
+ if (root) {
1174
+ const fs = root.querySelectorAll('.f-text-field');
1175
+ for (let index = 0; index < fs.length; index++) {
1176
+ FTextFieldMDC(fs[index]);
1177
+ }
1178
+ }
1179
+ this.checkScrollOnHover();
1180
+ this.persistState();
1181
+ this.didRenderInteractables();
1182
+ __classPrivateFieldGet(this, _KupBox_instances, "m", _KupBox_didRenderObservers).call(this);
1183
+ this.kupManager.debug.logRender(this, true);
1184
+ }
1185
+ render() {
1186
+ const isKanban = !!(typeof this.kanban === 'object' && this.kanban !== null);
1187
+ let sortPanel = null;
1188
+ if (this.sortEnabled) {
1189
+ // creating items
1190
+ const visibleColumnsItems = this.visibleColumns.map((column) => {
1191
+ const item = {
1192
+ value: column.title,
1193
+ id: column.name,
1194
+ selected: column.name === this.sortBy,
1195
+ };
1196
+ return item;
1197
+ });
1198
+ const items = [{ value: '', id: '' }, ...visibleColumnsItems];
1199
+ let textfieldData = {
1200
+ label: this.kupManager.language.translate(KupLanguageGeneric.SORT_BY),
1201
+ trailingIcon: true,
1202
+ };
1203
+ let listData = {
1204
+ data: items,
1205
+ selectable: true,
1206
+ };
1207
+ let data = {
1208
+ 'kup-text-field': textfieldData,
1209
+ 'kup-list': listData,
1210
+ };
1211
+ sortPanel = (h("div", { id: "sort-panel" }, h("kup-combobox", { data: data, initialValue: this.sortBy, "onkup-combobox-itemclick": (e) => this.onSortChange(e) })));
1212
+ }
1213
+ let filterPanel = null;
1214
+ if (this.globalFilter) {
1215
+ 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) => {
1216
+ window.clearTimeout(this.globalFilterTimeout);
1217
+ this.globalFilterTimeout = window.setTimeout(() => this.onGlobalFilterChange(event), 600);
1218
+ } })));
1219
+ }
1220
+ let paginator = null;
1221
+ if (!this.lazyLoadRows && this.pagination) {
1222
+ paginator = (h(FPaginator, { id: top ? 'top-paginator' : 'bottom-paginator', currentPage: this.currentPage, max: this.filteredRows.length, mode: FPaginatorMode.SIMPLE, perPage: this.currentRowsPerPage
1223
+ ? this.currentRowsPerPage
1224
+ : this.rowsPerPage, onPageChange: (e) => this.handlePageChange(e.detail.value), onRowsChange: (e) => this.handleRowsPerPageChange(e.detail.value) }));
1225
+ }
1226
+ let boxContent = null;
1227
+ let containerStyle = {};
1228
+ if (this.rows.length === 0) {
1229
+ 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))));
1230
+ containerStyle = { 'grid-template-columns': `repeat(1, 1fr)` };
1231
+ }
1232
+ else if (isKanban) {
1233
+ const kanban = this.kanbanMode();
1234
+ boxContent = kanban.jsx;
1235
+ containerStyle = kanban.style;
1236
+ }
1237
+ else {
1238
+ containerStyle = {
1239
+ 'grid-template-columns': `repeat(${this.columns}, 1fr)`,
1240
+ };
1241
+ const rows = this.rows;
1242
+ let size = rows.length;
1243
+ let cnt = 0;
1244
+ boxContent = [];
1245
+ while (size-- > 0) {
1246
+ boxContent.push(this.renderRow(rows[cnt++]));
1247
+ }
1248
+ }
1249
+ 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) => {
1250
+ e.preventDefault();
1251
+ }, ref: (el) => (this.boxContainer =
1252
+ el) }, boxContent)))));
1253
+ }
1254
+ disconnectedCallback() {
1255
+ this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop));
1256
+ this.kupManager.language.unregister(this);
1257
+ this.kupManager.theme.unregister(this);
1258
+ if (this.scrollOnHover) {
1259
+ this.kupManager.scrollOnHover.unregister(this.boxContainer);
1260
+ }
1261
+ // When component is destroyed, then the listener is removed. @See clickFunction for more details
1262
+ document.removeEventListener('click', this.clickFunction.bind(this));
1263
+ this.kupDidUnload.emit({ comp: this, id: this.rootElement.id });
1264
+ }
1265
+ get rootElement() { return getElement(this); }
1266
+ static get watchers() { return {
1267
+ "rowsPerPage": ["rowsPerPageHandler", "recalculateRows"],
1268
+ "globalFilterValue": ["recalculateRows"],
1269
+ "sortBy": ["recalculateRows"],
1270
+ "pagination": ["recalculateRows"],
1271
+ "currentPage": ["recalculateRows"],
1272
+ "currentRowsPerPage": ["recalculateRows"],
1273
+ "data": ["onDataChanged"],
1274
+ "layout": ["onLayoutChanged"],
1275
+ "selectBox": ["onSelectBoxChanged"]
1276
+ }; }
1276
1277
  };
1277
1278
  _KupBox_intObserver = new WeakMap(), _KupBox_rowsRefs = new WeakMap(), _KupBox_navBarHeight = new WeakMap(), _KupBox_instances = new WeakSet(), _KupBox_didRenderObservers = function _KupBox_didRenderObservers() {
1278
- if (this.lazyLoadRows &&
1279
- this.currentRowsPerPage < this.data.rows.length) {
1280
- __classPrivateFieldGet(this, _KupBox_intObserver, "f").observe(__classPrivateFieldGet(this, _KupBox_rowsRefs, "f")[__classPrivateFieldGet(this, _KupBox_rowsRefs, "f").length - 1]);
1281
- }
1279
+ if (this.lazyLoadRows &&
1280
+ this.currentRowsPerPage < this.data.rows.length) {
1281
+ __classPrivateFieldGet(this, _KupBox_intObserver, "f").observe(__classPrivateFieldGet(this, _KupBox_rowsRefs, "f")[__classPrivateFieldGet(this, _KupBox_rowsRefs, "f").length - 1]);
1282
+ }
1282
1283
  }, _KupBox_setObserver = function _KupBox_setObserver() {
1283
- const callback = (entries) => {
1284
- entries.forEach((entry) => {
1285
- if (entry.isIntersecting) {
1286
- this.kupManager.debug.logMessage(this, 'Last row entering the viewport, loading more elements.');
1287
- const delta = this.data.rows.length - this.currentRowsPerPage;
1288
- if (delta < 10) {
1289
- this.currentRowsPerPage += delta;
1290
- }
1291
- else {
1292
- this.currentRowsPerPage += 10;
1293
- }
1294
- entry.target.classList.remove('last-row');
1295
- __classPrivateFieldGet(this, _KupBox_intObserver, "f").unobserve(entry.target);
1296
- }
1297
- });
1298
- };
1299
- const options = {
1300
- threshold: 0,
1301
- rootMargin: '-' + __classPrivateFieldGet(this, _KupBox_navBarHeight, "f") + 'px 0px 0px 0px',
1302
- };
1303
- __classPrivateFieldSet(this, _KupBox_intObserver, new IntersectionObserver(callback, options), "f");
1284
+ const callback = (entries) => {
1285
+ entries.forEach((entry) => {
1286
+ if (entry.isIntersecting) {
1287
+ this.kupManager.debug.logMessage(this, 'Last row entering the viewport, loading more elements.');
1288
+ const delta = this.data.rows.length - this.currentRowsPerPage;
1289
+ if (delta < 10) {
1290
+ this.currentRowsPerPage += delta;
1291
+ }
1292
+ else {
1293
+ this.currentRowsPerPage += 10;
1294
+ }
1295
+ entry.target.classList.remove('last-row');
1296
+ __classPrivateFieldGet(this, _KupBox_intObserver, "f").unobserve(entry.target);
1297
+ }
1298
+ });
1299
+ };
1300
+ const options = {
1301
+ threshold: 0,
1302
+ rootMargin: '-' + __classPrivateFieldGet(this, _KupBox_navBarHeight, "f") + 'px 0px 0px 0px',
1303
+ };
1304
+ __classPrivateFieldSet(this, _KupBox_intObserver, new IntersectionObserver(callback, options), "f");
1304
1305
  };
1305
1306
  KupBox.style = kupBoxCss;
1306
1307