@sme.up/ketchup 9.6.4 → 9.6.5

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 (232) hide show
  1. package/dist/cjs/{bar.helpers-f46a5a83.js → bar.helpers-c481a535.js} +45 -13
  2. package/dist/cjs/{f-button-89de2403.js → f-button-23ec3db5.js} +1 -1
  3. package/dist/cjs/{f-cell-75dbd6eb.js → f-cell-bcc51c0f.js} +5 -5
  4. package/dist/cjs/{f-chip-08857345.js → f-chip-63363ecf.js} +2 -2
  5. package/dist/cjs/{f-image-a41d7f1e.js → f-image-f3944c01.js} +2 -5
  6. package/dist/cjs/{f-paginator-utils-ff07301e.js → f-paginator-utils-60e05759.js} +2 -2
  7. package/dist/cjs/{f-text-field-eb207a83.js → f-text-field-354b6c78.js} +1 -1
  8. package/dist/cjs/index.cjs.js +1 -1
  9. package/dist/cjs/ketchup.cjs.js +1 -1
  10. package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
  11. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +46 -46
  12. package/dist/cjs/kup-box.cjs.entry.js +7 -7
  13. package/dist/cjs/kup-calendar.cjs.entry.js +4 -4
  14. package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
  15. package/dist/cjs/kup-cell.cjs.entry.js +6 -6
  16. package/dist/cjs/kup-custom-task-list-header_4.cjs.entry.js +253 -37
  17. package/dist/cjs/kup-dashboard.cjs.entry.js +4 -4
  18. package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
  19. package/dist/cjs/kup-echart.cjs.entry.js +1 -1
  20. package/dist/cjs/kup-editor.cjs.entry.js +1 -1
  21. package/dist/cjs/kup-family-tree.cjs.entry.js +3 -3
  22. package/dist/cjs/kup-gantt_10.cjs.entry.js +104 -38
  23. package/dist/cjs/kup-grid.cjs.entry.js +1 -1
  24. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  25. package/dist/cjs/kup-image-list.cjs.entry.js +20 -13
  26. package/dist/cjs/kup-input-panel.cjs.entry.js +199 -53
  27. package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
  28. package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
  29. package/dist/cjs/{kup-manager-abfe4ddd.js → kup-manager-e1bfd4f8.js} +647 -120
  30. package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
  31. package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
  32. package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
  33. package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
  34. package/dist/cjs/{kup-planner-declarations-d3dec885.js → kup-planner-declarations-cb33663d.js} +3 -0
  35. package/dist/cjs/{kup-planner-renderer-helper-9f776d6e.js → kup-planner-renderer-helper-f001fad7.js} +55 -7
  36. package/dist/cjs/kup-planner-renderer.cjs.entry.js +43 -10
  37. package/dist/cjs/{kup-planner-time-formatter-a74e70f0.js → kup-planner-time-formatter-b7dca3ea.js} +3 -0
  38. package/dist/cjs/kup-planner.cjs.entry.js +80 -8
  39. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  40. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  41. package/dist/cjs/kup-snackbar.cjs.entry.js +4 -4
  42. package/dist/cjs/loader.cjs.js +1 -1
  43. package/dist/collection/assets/image-list.js +332 -2
  44. package/dist/collection/assets/input-panel.js +307 -76
  45. package/dist/collection/assets/planner-example-5.js +19 -7
  46. package/dist/collection/assets/planner-example-6.js +3 -0
  47. package/dist/collection/assets/planner.js +4 -3
  48. package/dist/collection/components/kup-badge/kup-badge.css +4 -4
  49. package/dist/collection/components/kup-image-list/kup-image-list.css +37 -4
  50. package/dist/collection/components/kup-image-list/kup-image-list.js +15 -8
  51. package/dist/collection/components/kup-input-panel/kup-input-panel-declarations.js +1 -1
  52. package/dist/collection/components/kup-input-panel/kup-input-panel.css +38 -1
  53. package/dist/collection/components/kup-input-panel/kup-input-panel.e2e.js +69 -28
  54. package/dist/collection/components/kup-input-panel/kup-input-panel.js +206 -59
  55. package/dist/collection/components/kup-planner/kup-planner-declarations.js +3 -0
  56. package/dist/collection/components/kup-planner/kup-planner-helper.js +42 -1
  57. package/dist/collection/components/kup-planner/kup-planner.js +191 -5
  58. package/dist/collection/components/kup-planner/utils/custom-task-list-table.js +103 -11
  59. package/dist/collection/components/kup-planner/utils/gantt-table.module.css +80 -2
  60. package/dist/collection/components/kup-planner/utils/helpers/bar.helpers.js +41 -13
  61. package/dist/collection/components/kup-planner/utils/helpers/other.helpers.js +3 -0
  62. package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.css +10 -0
  63. package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.js +61 -6
  64. package/dist/collection/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.js +32 -2
  65. package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.css +4 -0
  66. package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.js +208 -24
  67. package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.css +4 -0
  68. package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.js +131 -7
  69. package/dist/collection/components/kup-planner/utils/kup-planner-renderer-helper.js +55 -6
  70. package/dist/collection/components/kup-planner/utils/kup-planner-renderer.js +40 -7
  71. package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.css +22 -15
  72. package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.js +21 -5
  73. package/dist/collection/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.js +19 -3
  74. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-header.js +7 -7
  75. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-table.js +1 -1
  76. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list.js +76 -2
  77. package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-standard-tooltip.js +1 -1
  78. package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-tooltip.js +1 -1
  79. package/dist/collection/components/kup-planner/utils/kup-vertical-scroll/kup-vertical-scroll.js +2 -2
  80. package/dist/collection/components/kup-probe/kup-probe.js +1 -1
  81. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +1 -1
  82. package/dist/collection/components/kup-qlik/kup-qlik.js +1 -1
  83. package/dist/collection/components/kup-rating/kup-rating.js +1 -1
  84. package/dist/collection/components/kup-snackbar/kup-snackbar.js +1 -1
  85. package/dist/collection/components/kup-spinner/kup-spinner.js +34 -34
  86. package/dist/collection/components/kup-switch/kup-switch.js +1 -1
  87. package/dist/collection/components/kup-time-picker/kup-time-picker.js +1 -1
  88. package/dist/collection/f-components/f-image/f-image.js +2 -5
  89. package/dist/components/_commonjsHelpers.js +26 -0
  90. package/dist/components/custom-task-list-table.js +58 -13
  91. package/dist/components/kup-autocomplete2.js +43 -45
  92. package/dist/components/kup-calendar.js +1 -1
  93. package/dist/components/kup-dates.js +2 -25
  94. package/dist/components/kup-editor.js +1 -1
  95. package/dist/components/kup-gantt-calendar2.js +31 -1
  96. package/dist/components/kup-gantt2.js +26 -7
  97. package/dist/components/kup-grid-renderer2.js +219 -81
  98. package/dist/components/kup-horizontal-scroll2.js +48 -10
  99. package/dist/components/kup-image-list.js +14 -7
  100. package/dist/components/kup-input-panel.js +192 -46
  101. package/dist/components/kup-manager.js +649 -121
  102. package/dist/components/kup-pdf.js +1 -1
  103. package/dist/components/kup-planner-declarations.js +91 -0
  104. package/dist/components/kup-planner-renderer2.js +42 -9
  105. package/dist/components/kup-planner.js +86 -6
  106. package/dist/components/kup-probe.js +1 -1
  107. package/dist/components/kup-qlik.js +1 -1
  108. package/dist/components/kup-snackbar.js +1 -1
  109. package/dist/components/kup-standard-tooltip2.js +1 -1
  110. package/dist/components/kup-switcher2.js +19 -7
  111. package/dist/components/kup-task-gantt2.js +6 -4
  112. package/dist/components/kup-task-list-header2.js +7 -7
  113. package/dist/components/kup-task-list-table2.js +1 -1
  114. package/dist/components/kup-task-list2.js +434 -84
  115. package/dist/components/kup-tooltip2.js +1 -1
  116. package/dist/components/kup-vertical-scroll2.js +2 -2
  117. package/dist/components/other.helpers.js +47 -0
  118. package/dist/esm/{bar.helpers-0898efb9.js → bar.helpers-23a51579.js} +45 -14
  119. package/dist/esm/{f-button-1eebd42e.js → f-button-d6dbcfd6.js} +1 -1
  120. package/dist/esm/{f-cell-af19d5c7.js → f-cell-7b41415c.js} +5 -5
  121. package/dist/esm/{f-chip-9e5fdb25.js → f-chip-68d27d7a.js} +2 -2
  122. package/dist/esm/{f-image-1e1ed567.js → f-image-a67229e5.js} +2 -5
  123. package/dist/esm/{f-paginator-utils-dede029b.js → f-paginator-utils-8773e358.js} +2 -2
  124. package/dist/esm/{f-text-field-802b45fb.js → f-text-field-d364ffd2.js} +1 -1
  125. package/dist/esm/index.js +1 -1
  126. package/dist/esm/ketchup.js +1 -1
  127. package/dist/esm/kup-accordion.entry.js +2 -2
  128. package/dist/esm/kup-autocomplete_27.entry.js +46 -46
  129. package/dist/esm/kup-box.entry.js +7 -7
  130. package/dist/esm/kup-calendar.entry.js +4 -4
  131. package/dist/esm/kup-card-list.entry.js +1 -1
  132. package/dist/esm/kup-cell.entry.js +6 -6
  133. package/dist/esm/kup-custom-task-list-header_4.entry.js +253 -37
  134. package/dist/esm/kup-dashboard.entry.js +4 -4
  135. package/dist/esm/kup-drawer.entry.js +1 -1
  136. package/dist/esm/kup-echart.entry.js +1 -1
  137. package/dist/esm/kup-editor.entry.js +1 -1
  138. package/dist/esm/kup-family-tree.entry.js +3 -3
  139. package/dist/esm/kup-gantt_10.entry.js +105 -39
  140. package/dist/esm/kup-grid.entry.js +1 -1
  141. package/dist/esm/kup-iframe.entry.js +1 -1
  142. package/dist/esm/kup-image-list.entry.js +20 -13
  143. package/dist/esm/kup-input-panel.entry.js +199 -53
  144. package/dist/esm/kup-lazy.entry.js +1 -1
  145. package/dist/esm/kup-magic-box.entry.js +2 -2
  146. package/dist/esm/{kup-manager-dd24fb5a.js → kup-manager-a316a70e.js} +647 -120
  147. package/dist/esm/kup-nav-bar.entry.js +1 -1
  148. package/dist/esm/kup-numeric-picker.entry.js +2 -2
  149. package/dist/esm/kup-pdf.entry.js +1 -1
  150. package/dist/esm/kup-photo-frame.entry.js +1 -1
  151. package/dist/esm/{kup-planner-declarations-b9345758.js → kup-planner-declarations-398babf9.js} +3 -0
  152. package/dist/esm/{kup-planner-renderer-helper-b4727e44.js → kup-planner-renderer-helper-a2ec9a1c.js} +56 -7
  153. package/dist/esm/kup-planner-renderer.entry.js +43 -10
  154. package/dist/esm/{kup-planner-time-formatter-a68e05ba.js → kup-planner-time-formatter-ddf84f9b.js} +1 -1
  155. package/dist/esm/kup-planner.entry.js +80 -8
  156. package/dist/esm/kup-probe.entry.js +2 -2
  157. package/dist/esm/kup-qlik.entry.js +2 -2
  158. package/dist/esm/kup-snackbar.entry.js +4 -4
  159. package/dist/esm/loader.js +1 -1
  160. package/dist/ketchup/index.esm.js +1 -1
  161. package/dist/ketchup/ketchup.esm.js +1 -1
  162. package/dist/ketchup/p-008bdcdc.js +1 -0
  163. package/dist/ketchup/p-042e874a.entry.js +1 -0
  164. package/dist/ketchup/{p-b3b50bb5.entry.js → p-074ccd53.entry.js} +1 -1
  165. package/dist/ketchup/{p-26d42b88.entry.js → p-1088ab22.entry.js} +1 -1
  166. package/dist/ketchup/{p-201f8d7b.entry.js → p-1bcac01f.entry.js} +1 -1
  167. package/dist/ketchup/{p-3b544027.entry.js → p-1e028d95.entry.js} +1 -1
  168. package/dist/ketchup/p-25058baa.js +1 -0
  169. package/dist/ketchup/{p-dcf7e9b6.entry.js → p-2932e7e8.entry.js} +1 -1
  170. package/dist/ketchup/{p-b238cde7.entry.js → p-2b84db7b.entry.js} +1 -1
  171. package/dist/ketchup/{p-f998ff28.entry.js → p-2ef90f60.entry.js} +1 -1
  172. package/dist/ketchup/{p-8fcdf454.js → p-339bbeae.js} +1 -1
  173. package/dist/ketchup/{p-cd7fec02.entry.js → p-48e45ac0.entry.js} +1 -1
  174. package/dist/ketchup/p-53af4c87.js +1 -0
  175. package/dist/ketchup/{p-6972fa0c.entry.js → p-556f7ddc.entry.js} +1 -1
  176. package/dist/ketchup/{p-e7507dd6.entry.js → p-5f7d8c21.entry.js} +1 -1
  177. package/dist/ketchup/{p-e0e47ca9.entry.js → p-6362738c.entry.js} +1 -1
  178. package/dist/ketchup/{p-a2e14d8b.entry.js → p-65e363c6.entry.js} +1 -1
  179. package/dist/ketchup/p-6921bc81.entry.js +16 -0
  180. package/dist/ketchup/p-6961e0ce.entry.js +1 -0
  181. package/dist/ketchup/p-7123d2a4.entry.js +1 -0
  182. package/dist/ketchup/{p-6c888179.js → p-801776bc.js} +1 -1
  183. package/dist/ketchup/{p-4f69f6f9.entry.js → p-81645576.entry.js} +1 -1
  184. package/dist/ketchup/p-838dea62.js +1 -0
  185. package/dist/ketchup/{p-924b841b.js → p-84b511e1.js} +1 -1
  186. package/dist/ketchup/{p-8229b97a.js → p-8d4050ec.js} +4 -4
  187. package/dist/ketchup/{p-79f4dc5b.entry.js → p-9e2533e1.entry.js} +1 -1
  188. package/dist/ketchup/{p-158076de.entry.js → p-a06974a3.entry.js} +1 -1
  189. package/dist/ketchup/p-a6beb822.js +1 -0
  190. package/dist/ketchup/p-abe181d0.entry.js +1 -0
  191. package/dist/ketchup/{p-61e8d573.js → p-b3540f83.js} +1 -1
  192. package/dist/ketchup/{p-19a13672.entry.js → p-c702eb45.entry.js} +1 -1
  193. package/dist/ketchup/{p-2e04042b.entry.js → p-ccb6dbb0.entry.js} +1 -1
  194. package/dist/ketchup/{p-a2e691b8.entry.js → p-cf44485a.entry.js} +2 -2
  195. package/dist/ketchup/{p-8f3d400a.entry.js → p-d2001dec.entry.js} +1 -1
  196. package/dist/ketchup/{p-34d70475.entry.js → p-dbb6cd8d.entry.js} +1 -1
  197. package/dist/ketchup/{p-2d4a9235.js → p-f6c8f006.js} +1 -1
  198. package/dist/ketchup/{p-43ce397b.entry.js → p-f79ffe77.entry.js} +1 -1
  199. package/dist/ketchup/{p-489af77f.entry.js → p-fdcfaedd.entry.js} +1 -1
  200. package/dist/ketchup/p-fe75ede2.entry.js +1 -0
  201. package/dist/types/components/kup-image-list/kup-image-list.d.ts +1 -1
  202. package/dist/types/components/kup-input-panel/kup-input-panel-declarations.d.ts +9 -7
  203. package/dist/types/components/kup-input-panel/kup-input-panel.d.ts +4 -4
  204. package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +29 -2
  205. package/dist/types/components/kup-planner/kup-planner-helper.d.ts +2 -1
  206. package/dist/types/components/kup-planner/kup-planner.d.ts +38 -0
  207. package/dist/types/components/kup-planner/utils/custom-task-list-table.d.ts +7 -0
  208. package/dist/types/components/kup-planner/utils/helpers/bar.helpers.d.ts +1 -1
  209. package/dist/types/components/kup-planner/utils/helpers/other.helpers.d.ts +1 -0
  210. package/dist/types/components/kup-planner/utils/kup-gantt/kup-gantt.d.ts +6 -0
  211. package/dist/types/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.d.ts +1 -0
  212. package/dist/types/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.d.ts +13 -1
  213. package/dist/types/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.d.ts +7 -0
  214. package/dist/types/components/kup-planner/utils/kup-planner-renderer-helper.d.ts +6 -2
  215. package/dist/types/components/kup-planner/utils/kup-planner-renderer.d.ts +1 -0
  216. package/dist/types/components/kup-planner/utils/kup-switcher/kup-switcher.d.ts +3 -1
  217. package/dist/types/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.d.ts +1 -0
  218. package/dist/types/components/kup-planner/utils/kup-task-list/kup-task-list.d.ts +4 -0
  219. package/dist/types/components.d.ts +122 -16
  220. package/package.json +1 -1
  221. package/dist/components/kup-planner-renderer-helper.js +0 -379
  222. package/dist/ketchup/p-14943de9.entry.js +0 -1
  223. package/dist/ketchup/p-180cd7ab.entry.js +0 -1
  224. package/dist/ketchup/p-636be6f1.entry.js +0 -16
  225. package/dist/ketchup/p-63c141d9.entry.js +0 -1
  226. package/dist/ketchup/p-818e61d5.entry.js +0 -1
  227. package/dist/ketchup/p-8e3b6de8.js +0 -1
  228. package/dist/ketchup/p-a46f99d4.js +0 -1
  229. package/dist/ketchup/p-c0f660d6.js +0 -1
  230. package/dist/ketchup/p-e4c63684.js +0 -1
  231. package/dist/ketchup/p-e841c2ae.js +0 -1
  232. package/dist/ketchup/p-f9a7c21c.entry.js +0 -1
@@ -29,16 +29,16 @@ const convertToBarTask = (task, index, dates, columnWidth, rowHeight, taskHeight
29
29
  }
30
30
  return barTask;
31
31
  };
32
- function computeTypeAndXs(start, end, type, dates, columnWidth, handleWidth, rtl) {
32
+ function computeTypeAndXs(start, end, type, dates, columnWidth, handleWidth, rtl, startHour, endHour) {
33
33
  let x1;
34
34
  let x2;
35
35
  if (rtl) {
36
- x2 = taskXCoordinateRTL(start, dates, columnWidth);
37
- x1 = taskXCoordinateRTL(end, dates, columnWidth);
36
+ x2 = taskXCoordinateRTL(start, dates, columnWidth, startHour);
37
+ x1 = taskXCoordinateRTL(end, dates, columnWidth, endHour);
38
38
  }
39
39
  else {
40
- x1 = taskXCoordinate(start, dates, columnWidth);
41
- x2 = taskXCoordinate(end, dates, columnWidth);
40
+ x1 = taskXCoordinate(start, dates, columnWidth, startHour);
41
+ x2 = taskXCoordinate(end, dates, columnWidth, endHour);
42
42
  }
43
43
  let typeInternal = type;
44
44
  if (typeInternal === 'task' && x2 - x1 < handleWidth * 2) {
@@ -48,9 +48,9 @@ function computeTypeAndXs(start, end, type, dates, columnWidth, handleWidth, rtl
48
48
  return { x1, x2, typeInternal };
49
49
  }
50
50
  const convertToBar = (task, index, dates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, showSecondaryDates) => {
51
- const { x1, x2, typeInternal } = computeTypeAndXs(task.start, task.end, task.type, dates, columnWidth, handleWidth, rtl);
51
+ const { x1, x2, typeInternal } = computeTypeAndXs(task.start, task.end, task.type, dates, columnWidth, handleWidth, rtl, task.startHour, task.endHour);
52
52
  const { x1: x1secondary, x2: x2secondary } = showSecondaryDates && task.secondaryStart && task.secondaryEnd
53
- ? computeTypeAndXs(task.secondaryStart, task.secondaryEnd, task.type, dates, columnWidth, handleWidth, rtl)
53
+ ? computeTypeAndXs(task.secondaryStart, task.secondaryEnd, task.type, dates, columnWidth, handleWidth, rtl, task.secondaryStartHour, task.secondaryEndHour)
54
54
  : { x1: undefined, x2: undefined };
55
55
  const [progressWidth, progressX] = progressWithByParams(x1, x2, task.progress, rtl);
56
56
  const y = taskYCoordinate(index, rowHeight, taskHeight);
@@ -67,7 +67,7 @@ const convertToBar = (task, index, dates, columnWidth, rowHeight, taskHeight, ba
67
67
  progressWidth,
68
68
  barCornerRadius,
69
69
  handleWidth,
70
- hideChildren, height: taskHeight, barChildren: [], styles });
70
+ hideChildren, height: taskHeight, barChildren: [], styles, ySecondary: y });
71
71
  };
72
72
  const defaultStyles = (styles) => {
73
73
  var _a, _b, _c, _d;
@@ -124,7 +124,13 @@ const convertToTimeline = (task, index, dates, columnWidth, rowHeight, taskHeigh
124
124
  index, progressX: 0, progressWidth: 0, barCornerRadius,
125
125
  handleWidth, typeInternal: task.type, progress: 0, height: taskHeight, hideChildren: undefined, barChildren: children !== null && children !== void 0 ? children : [], styles: defaultStyles(task.styles) });
126
126
  };
127
- const taskXCoordinate = (xDate, dates, columnWidth) => {
127
+ const taskXCoordinate = (xDate, dates, columnWidth, hourString) => {
128
+ if (hourString) {
129
+ const [hours, minutes, seconds] = hourString.split(':').map(Number);
130
+ xDate.setHours(hours !== null && hours !== void 0 ? hours : 0);
131
+ xDate.setMinutes(minutes !== null && minutes !== void 0 ? minutes : 0);
132
+ xDate.setSeconds(seconds !== null && seconds !== void 0 ? seconds : 0);
133
+ }
128
134
  const index = dates.findIndex((d) => d.getTime() >= xDate.getTime()) - 1;
129
135
  if (index < 0) {
130
136
  return 0;
@@ -134,8 +140,8 @@ const taskXCoordinate = (xDate, dates, columnWidth) => {
134
140
  const x = index * columnWidth + percentOfInterval * columnWidth;
135
141
  return x;
136
142
  };
137
- const taskXCoordinateRTL = (xDate, dates, columnWidth) => {
138
- let x = taskXCoordinate(xDate, dates, columnWidth);
143
+ const taskXCoordinateRTL = (xDate, dates, columnWidth, hourString) => {
144
+ let x = taskXCoordinate(xDate, dates, columnWidth, hourString);
139
145
  x += columnWidth;
140
146
  return x;
141
147
  };
@@ -228,11 +234,24 @@ const dateByX = (x, taskX, taskDate, xStep, timeStep) => {
228
234
  (newDate.getTimezoneOffset() - taskDate.getTimezoneOffset()) * 60000);
229
235
  return newDate;
230
236
  };
237
+ const hourStringFromDate = (date, withSeconds) => {
238
+ const hours = date.getHours();
239
+ const minutes = date.getMinutes();
240
+ const seconds = date.getSeconds();
241
+ const formattedHours = hours < 10 ? '0' + hours : hours;
242
+ const formattedMinutes = minutes < 10 ? '0' + minutes : minutes;
243
+ const formattedSeconds = seconds < 10 ? '0' + seconds : seconds;
244
+ const hourString = withSeconds ? `${formattedHours}:${formattedMinutes}:${formattedSeconds}` : `${formattedHours}:${formattedMinutes}`;
245
+ return hourString;
246
+ };
247
+ const hasSeconds = (hourString) => {
248
+ return hourString.split(":").length === 3;
249
+ };
231
250
  /**
232
251
  * Method handles event in real time(mousemove) and on finish(mouseup)
233
252
  */
234
- export const handleTaskBySVGMouseEvent = (svgX, action, selectedTask, xStep, timeStep, initEventX1Delta, rtl) => handleTaskBySVGMouseEventForBar(svgX, action, selectedTask, xStep, timeStep, initEventX1Delta, rtl);
235
- const handleTaskBySVGMouseEventForBar = (svgX, action, selectedTask, xStep, timeStep, initEventX1Delta, rtl) => {
253
+ export const handleTaskBySVGMouseEvent = (svgX, action, selectedTask, xStep, timeStep, initEventX1Delta, rtl, svgY) => handleTaskBySVGMouseEventForBar(svgX, action, selectedTask, xStep, timeStep, initEventX1Delta, rtl, svgY);
254
+ const handleTaskBySVGMouseEventForBar = (svgX, action, selectedTask, xStep, timeStep, initEventX1Delta, rtl, svgY) => {
236
255
  const changedTask = Object.assign({}, selectedTask);
237
256
  let isChanged = false;
238
257
  switch (action) {
@@ -257,9 +276,11 @@ const handleTaskBySVGMouseEventForBar = (svgX, action, selectedTask, xStep, time
257
276
  if (isChanged) {
258
277
  if (rtl) {
259
278
  changedTask.end = dateByX(newX1, selectedTask.x1, selectedTask.end, xStep, timeStep);
279
+ changedTask.endHour && (changedTask.endHour = hourStringFromDate(changedTask.end, hasSeconds(changedTask.endHour)));
260
280
  }
261
281
  else {
262
282
  changedTask.start = dateByX(newX1, selectedTask.x1, selectedTask.start, xStep, timeStep);
283
+ changedTask.startHour && (changedTask.startHour = hourStringFromDate(changedTask.start, hasSeconds(changedTask.startHour)));
263
284
  }
264
285
  const [progressWidth, progressX] = progressWithByParams(changedTask.x1, changedTask.x2, changedTask.progress, rtl);
265
286
  changedTask.progressWidth = progressWidth;
@@ -274,9 +295,11 @@ const handleTaskBySVGMouseEventForBar = (svgX, action, selectedTask, xStep, time
274
295
  if (isChanged) {
275
296
  if (rtl) {
276
297
  changedTask.start = dateByX(newX2, selectedTask.x2, selectedTask.start, xStep, timeStep);
298
+ changedTask.startHour && (changedTask.startHour = hourStringFromDate(changedTask.start, hasSeconds(changedTask.startHour)));
277
299
  }
278
300
  else {
279
301
  changedTask.end = dateByX(newX2, selectedTask.x2, selectedTask.end, xStep, timeStep);
302
+ changedTask.endHour && (changedTask.endHour = hourStringFromDate(changedTask.end, hasSeconds(changedTask.endHour)));
280
303
  }
281
304
  const [progressWidth, progressX] = progressWithByParams(changedTask.x1, changedTask.x2, changedTask.progress, rtl);
282
305
  changedTask.progressWidth = progressWidth;
@@ -290,11 +313,16 @@ const handleTaskBySVGMouseEventForBar = (svgX, action, selectedTask, xStep, time
290
313
  if (isChanged) {
291
314
  changedTask.start = dateByX(newMoveX1, selectedTask.x1, selectedTask.start, xStep, timeStep);
292
315
  changedTask.end = dateByX(newMoveX2, selectedTask.x2, selectedTask.end, xStep, timeStep);
316
+ changedTask.startHour && (changedTask.startHour = hourStringFromDate(changedTask.start, hasSeconds(changedTask.startHour)));
317
+ changedTask.endHour && (changedTask.endHour = hourStringFromDate(changedTask.end, hasSeconds(changedTask.endHour)));
293
318
  changedTask.x1 = newMoveX1;
294
319
  changedTask.x2 = newMoveX2;
295
320
  const [progressWidth, progressX] = progressWithByParams(changedTask.x1, changedTask.x2, changedTask.progress, rtl);
296
321
  changedTask.progressWidth = progressWidth;
297
322
  changedTask.progressX = progressX;
323
+ if (changedTask.type === 'task') {
324
+ changedTask.y = svgY;
325
+ }
298
326
  }
299
327
  break;
300
328
  }
@@ -46,3 +46,6 @@ export const sortTasks = (taskA, taskB) => {
46
46
  return 0;
47
47
  }
48
48
  };
49
+ export const createArrayFromNum = (number) => {
50
+ return Array.from({ length: number }, (_, index) => index);
51
+ };
@@ -156,6 +156,16 @@
156
156
  overflow: hidden;
157
157
  }
158
158
 
159
+ .horizontalContainerScrollable {
160
+ overflow: auto !important;
161
+ scrollbar-width: 0;
162
+ }
163
+
164
+ .horizontalContainerScrollable::-webkit-scrollbar {
165
+ width: 0;
166
+ height: 0;
167
+ }
168
+
159
169
  .task-gantt {
160
170
  overflow: hidden;
161
171
  }
@@ -9,7 +9,7 @@ export class KupGantt {
9
9
  this.tasks = undefined;
10
10
  this.headerHeight = 114;
11
11
  this.columnWidth = 60;
12
- this.listCellWidth = '297px';
12
+ this.listCellWidth = '300px';
13
13
  this.rowHeight = 50;
14
14
  this.filter = undefined;
15
15
  this.ganttHeight = 0;
@@ -54,6 +54,7 @@ export class KupGantt {
54
54
  this.currentTasks = [];
55
55
  this.label = undefined;
56
56
  this.doubleView = undefined;
57
+ this.scrollableTaskList = undefined;
57
58
  this.setDoubleView = undefined;
58
59
  this.barContextMenu = undefined;
59
60
  this.scrollXChange = undefined;
@@ -72,6 +73,7 @@ export class KupGantt {
72
73
  this.doubleClick = undefined;
73
74
  this.delete = undefined;
74
75
  this.expanderClick = undefined;
76
+ this.phaseDrop = undefined;
75
77
  this.wrapperRef = undefined;
76
78
  this.taskGanttRef = null;
77
79
  this.taskListRef = undefined;
@@ -93,6 +95,8 @@ export class KupGantt {
93
95
  this.ignoreScrollEvent = false;
94
96
  this.currentDateIndicatorContent = undefined;
95
97
  this.projectionContent = undefined;
98
+ this.taskListScrollWidth = undefined;
99
+ this.taskListScrollX = 0;
96
100
  }
97
101
  //---- Lifecycle hooks ----
98
102
  componentWillLoad() {
@@ -271,6 +275,7 @@ export class KupGantt {
271
275
  newScrollX = this.svgWidth;
272
276
  }
273
277
  this.scrollX = newScrollX;
278
+ // this.taskListScrollX = newScrollX;
274
279
  window.dispatchEvent(new CustomEvent('gantt-sync-scroll-event', {
275
280
  detail: {
276
281
  componentId: this.ganttId,
@@ -469,6 +474,13 @@ export class KupGantt {
469
474
  this.expanderClick(Object.assign(Object.assign({}, task), { hideChildren: !task.hideChildren }));
470
475
  }
471
476
  }
477
+ handleTaskListScrollX(event) {
478
+ const currentTarget = event.currentTarget;
479
+ this.taskListScrollX = currentTarget.scrollLeft;
480
+ }
481
+ handlePhaseDragScroll(scrollY) {
482
+ this.scrollY = scrollY;
483
+ }
472
484
  setFailedTask(task) {
473
485
  this.failedTask = task;
474
486
  }
@@ -530,6 +542,7 @@ export class KupGantt {
530
542
  barDblClick: this.barDblClick,
531
543
  barContextMenu: this.barContextMenu,
532
544
  delete: this.delete,
545
+ phaseDrop: this.phaseDrop
533
546
  };
534
547
  const tableProps = {
535
548
  rowHeight: this.rowHeight,
@@ -548,9 +561,11 @@ export class KupGantt {
548
561
  setSelectedTask: this.handleSelectedTask.bind(this),
549
562
  expanderClick: this.handleExpanderClick.bind(this),
550
563
  TaskListHeader: this.TaskListHeader,
551
- TaskListTable: this.TaskListTable,
564
+ TaskListTable: this.TaskListTable
552
565
  };
553
- return (h("div", { key: '6cfa74263599c97bcae3f8f473f94c69bcaf8258', class: "gannt-wrapper-main" }, h("div", { key: 'ebc15fab0f8675bb5f21230175b7b50842e0974e', class: "wrapper", onKeyDown: this.handleKeyDown.bind(this), tabIndex: 0, ref: (el) => (this.wrapperRef = el) }, this.listCellWidth && (h("kup-task-list", Object.assign({ currentTasks: this.currentTasks, handleClick: this.handleClick, handleDblClick: this.handleDblClick, handleContextMenu: this.handleContextMenu, ganttOnClick: this.ganttOnClick, ganttOnDblClick: this.ganttOnDblClick, ganttonOnContextMenu: this.ganttonOnContextMenu, label: this.label, doubleView: this.doubleView, setDoubleView: this.setDoubleView }, tableProps, { class: "tasks", ref: (el) => (this.taskListTrueRef = el) }))), h("kup-task-gantt", { key: '6c9bdf420f5660fbae4f9c9d40f772e9fa93671b', gridProps: gridProps, calendarProps: calendarProps, barProps: barProps, ganttHeight: this.ganttHeight, taskGanttRef: this.taskGanttRef, scrollY: this.scrollY, scrollX: this.scrollX, class: "ganttContainer" }), this.ganttEvent.changedTask && (h("kup-tooltip", { arrowIndent: this.arrowIndent, rowHeight: this.rowHeight, svgContainerHeight: this.svgContainerHeight, svgContainerWidth: this.svgContainerWidth, fontFamily: this.fontFamily, fontSize: this.fontSize, scrollX: this.scrollX, scrollY: this.scrollY, task: this.ganttEvent.changedTask, headerHeight: this.headerHeight, taskListWidth: this.taskListWidth, TooltipContent: this.TooltipContent, rtl: this.rtl, svgWidth: this.svgWidth })), h("kup-vertical-scroll", { key: '09d624d5a440649b8b2a032d4257cd64356f2421', ganttFullHeight: this.ganttFullHeight, ganttHeight: this.ganttHeight, headerHeight: this.headerHeight, scrollNumber: this.scrollY, verticalScroll: this.handleScrollY.bind(this), rtl: this.rtl })), this.taskGanttRef && (h("kup-horizontal-scroll", { svgWidth: this.svgWidth, taskListTrueRef: this.taskListTrueRef, taskListWidth: this.taskListWidth, scrollNumber: this.scrollX, rtl: this.rtl, horizontalScroll: this.handleScrollX.bind(this) }))));
566
+ return (h("div", { key: 'd2628cb4c523eadcbfa97d83cad48ca0aa817fcb', class: "gannt-wrapper-main" }, h("div", { key: '3b336bd6595402bbb1b3ff87524d74286f63b1bc', class: "wrapper", onKeyDown: this.handleKeyDown.bind(this), tabIndex: 0, ref: (el) => (this.wrapperRef = el) }, this.listCellWidth && (h("kup-task-list", Object.assign({ currentTasks: this.currentTasks, handleClick: this.handleClick, handleDblClick: this.handleDblClick, handleContextMenu: this.handleContextMenu, ganttOnClick: this.ganttOnClick, ganttOnDblClick: this.ganttOnDblClick, ganttonOnContextMenu: this.ganttonOnContextMenu, label: this.label, doubleView: this.doubleView, setDoubleView: this.setDoubleView }, tableProps, { class: "tasks", scrollableTaskList: this.scrollableTaskList, updateTaskListScrollX: this.ignoreScrollEvent, ontaskListScrollWidth: (width) => {
567
+ this.taskListScrollWidth = width;
568
+ }, taskListScrollX: this.taskListScrollX, ref: (el) => (this.taskListTrueRef = el) }))), h("kup-task-gantt", { key: 'b887edfe9460338576ccc2868f39eef9f8c41e2a', gridProps: gridProps, calendarProps: calendarProps, barProps: barProps, ganttHeight: this.ganttHeight, taskGanttRef: this.taskGanttRef, scrollY: this.scrollY, scrollX: this.scrollX, phaseDragScroll: this.handlePhaseDragScroll.bind(this), class: "ganttContainer" }), this.ganttEvent.changedTask && (h("kup-tooltip", { arrowIndent: this.arrowIndent, rowHeight: this.rowHeight, svgContainerHeight: this.svgContainerHeight, svgContainerWidth: this.svgContainerWidth, fontFamily: this.fontFamily, fontSize: this.fontSize, scrollX: this.scrollX, scrollY: this.scrollY, task: this.ganttEvent.changedTask, headerHeight: this.headerHeight, taskListWidth: this.taskListWidth, TooltipContent: this.TooltipContent, rtl: this.rtl, svgWidth: this.svgWidth })), h("kup-vertical-scroll", { key: 'ab50bf33585da01c741255df86328c9fd3c10a4a', ganttFullHeight: this.ganttFullHeight, ganttHeight: this.ganttHeight, headerHeight: this.headerHeight, scrollNumber: this.scrollY, verticalScroll: this.handleScrollY.bind(this), rtl: this.rtl })), this.taskGanttRef && (h("kup-horizontal-scroll", { svgWidth: this.svgWidth, taskListTrueRef: this.taskListTrueRef, taskListWidth: this.taskListWidth, scrollNumber: this.scrollX, rtl: this.rtl, horizontalScroll: this.handleScrollX.bind(this), horizontalTaskListScroll: this.handleTaskListScrollX.bind(this), listCellWidth: this.listCellWidth, scrollableTaskList: this.scrollableTaskList, taskListScrollWidth: this.taskListScrollWidth, taskListScrollNumber: this.taskListScrollX }))));
554
569
  }
555
570
  static get is() { return "kup-gantt"; }
556
571
  static get originalStyleUrls() {
@@ -679,7 +694,7 @@ export class KupGantt {
679
694
  },
680
695
  "attribute": "list-cell-width",
681
696
  "reflect": false,
682
- "defaultValue": "'297px'"
697
+ "defaultValue": "'300px'"
683
698
  },
684
699
  "rowHeight": {
685
700
  "type": "number",
@@ -755,7 +770,7 @@ export class KupGantt {
755
770
  "mutable": false,
756
771
  "complexType": {
757
772
  "original": "KupPlannerGanttProps['viewMode']",
758
- "resolved": "\"day\" | \"month\" | \"week\" | \"year\"",
773
+ "resolved": "\"day\" | \"hour\" | \"month\" | \"week\" | \"year\"",
759
774
  "references": {
760
775
  "KupPlannerGanttProps": {
761
776
  "location": "import",
@@ -1701,6 +1716,23 @@ export class KupGantt {
1701
1716
  "attribute": "double-view",
1702
1717
  "reflect": false
1703
1718
  },
1719
+ "scrollableTaskList": {
1720
+ "type": "boolean",
1721
+ "mutable": false,
1722
+ "complexType": {
1723
+ "original": "boolean",
1724
+ "resolved": "boolean",
1725
+ "references": {}
1726
+ },
1727
+ "required": false,
1728
+ "optional": true,
1729
+ "docs": {
1730
+ "tags": [],
1731
+ "text": ""
1732
+ },
1733
+ "attribute": "scrollable-task-list",
1734
+ "reflect": false
1735
+ },
1704
1736
  "setDoubleView": {
1705
1737
  "type": "unknown",
1706
1738
  "mutable": false,
@@ -2076,6 +2108,27 @@ export class KupGantt {
2076
2108
  "tags": [],
2077
2109
  "text": ""
2078
2110
  }
2111
+ },
2112
+ "phaseDrop": {
2113
+ "type": "unknown",
2114
+ "mutable": false,
2115
+ "complexType": {
2116
+ "original": "KupPlannerGanttProps['phaseDrop']",
2117
+ "resolved": "(originalPhaseData: KupPlannerTask, originalTaskData: KupPlannerTask, finalPhaseData: KupPlannerTask, destinationData: KupPlannerTask) => boolean | void | Promise<boolean> | Promise<void>",
2118
+ "references": {
2119
+ "KupPlannerGanttProps": {
2120
+ "location": "import",
2121
+ "path": "../../kup-planner-declarations",
2122
+ "id": "src/components/kup-planner/kup-planner-declarations.ts::KupPlannerGanttProps"
2123
+ }
2124
+ }
2125
+ },
2126
+ "required": false,
2127
+ "optional": false,
2128
+ "docs": {
2129
+ "tags": [],
2130
+ "text": ""
2131
+ }
2079
2132
  }
2080
2133
  };
2081
2134
  }
@@ -2101,7 +2154,9 @@ export class KupGantt {
2101
2154
  "scrollY": {},
2102
2155
  "ignoreScrollEvent": {},
2103
2156
  "currentDateIndicatorContent": {},
2104
- "projectionContent": {}
2157
+ "projectionContent": {},
2158
+ "taskListScrollWidth": {},
2159
+ "taskListScrollX": {}
2105
2160
  };
2106
2161
  }
2107
2162
  static get methods() {
@@ -1,5 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
- import { getDaysInMonth, defaultDateTimeFormatters, } from "../kup-planner-time-formatter";
2
+ import { getDaysInMonth, defaultDateTimeFormatters, getCachedDateTimeFormat, getLocalDayOfWeek, getLocaleMonth, } from "../kup-planner-time-formatter";
3
3
  export class KupGanttCalendar {
4
4
  constructor() {
5
5
  this.dateSetup = undefined;
@@ -177,8 +177,38 @@ export class KupGanttCalendar {
177
177
  }
178
178
  return [topValues, bottomValues];
179
179
  }
180
+ getCalendarValuesForHour() {
181
+ const topValues = [];
182
+ const bottomValues = [];
183
+ const topDefaultHeight = this.headerHeight * 0.5;
184
+ const dates = this.dateSetup.dates;
185
+ for (let i = 0; i < dates.length; i++) {
186
+ const date = dates[i];
187
+ const bottomValue = getCachedDateTimeFormat(this.locale, {
188
+ hour: 'numeric',
189
+ }).format(date);
190
+ bottomValues.push(h("text", { key: date.getTime(), y: this.headerHeight * 0.8, x: this.columnWidth * (i + +this.rtl), class: "calendarBottomText" }, bottomValue));
191
+ if (i !== 0 && date.getDate() !== dates[i - 1].getDate()) {
192
+ const displayDate = dates[i - 1];
193
+ const topValue = `${getLocalDayOfWeek(displayDate, this.locale, 'long')}, ${displayDate.getDate()} ${getLocaleMonth(displayDate, this.locale)}`;
194
+ const topPosition = (date.getHours() - 24) / 2;
195
+ topValues.push({
196
+ key: topValue + date.getFullYear(),
197
+ value: topValue,
198
+ x1Line: this.columnWidth * i,
199
+ y1Line: 0,
200
+ y2Line: topDefaultHeight,
201
+ xText: this.columnWidth * (i + topPosition),
202
+ yText: topDefaultHeight * 0.9,
203
+ });
204
+ }
205
+ }
206
+ return [topValues, bottomValues];
207
+ }
180
208
  getTopAndBottomValues() {
181
209
  switch (this.dateSetup.viewMode) {
210
+ case 'hour':
211
+ return this.getCalendarValuesForHour();
182
212
  case 'day':
183
213
  return this.getCalendarValuesForDay();
184
214
  case 'week':
@@ -195,7 +225,7 @@ export class KupGanttCalendar {
195
225
  this.simplifiedHeader =
196
226
  this.singleLineHeader && this.dateSetup.viewMode !== 'year';
197
227
  const [topValues, bottomValues] = this.getTopAndBottomValues();
198
- return (h("svg", { key: 'afbc0f59b413dd491ba4eec43ae3ad275b083617', xmlns: "http://www.w3.org/2000/svg", width: this.svgWidth, height: this.headerHeight }, h("g", { key: '52d441353903b6f5b5310c0e1b8b494c6294084a', class: "calendar", "font-size": this.fontSize, "font-family": this.fontFamily }, h("rect", { key: '4f5880bcc29c37d1e5f71b65cc752d510a690917', x: 0, y: 0, width: this.columnWidth * this.dateSetup.dates.length, height: this.headerHeight, class: "calendarHeader" }), this.simplifiedHeader ? null : bottomValues, this.simplifiedHeader
228
+ return (h("svg", { key: '7a19cec75e555a4fd92acca667c464df43370468', xmlns: "http://www.w3.org/2000/svg", width: this.svgWidth, height: this.headerHeight }, h("g", { key: 'a7e72bfedfefae5813d339b99d78bf7138354ff5', class: "calendar", "font-size": this.fontSize, "font-family": this.fontFamily }, h("rect", { key: '34f50e350bd20b69fe0a7bfc4744b27dfeb27a12', x: 0, y: 0, width: this.columnWidth * this.dateSetup.dates.length, height: this.headerHeight, class: "calendarHeader" }), this.simplifiedHeader ? null : bottomValues, this.simplifiedHeader
199
229
  ? topValues.map((topValue) => (h("g", { class: "calendarTop" }, h("line", { x1: topValue.x1Line, y1: topValue.y2Line * 2, x2: topValue.x1Line, y2: topValue.y2Line, class: "calendarTopTick", key: topValue.value + 'line' }), h("text", { key: topValue.value + 'text', y: topValue.yText, x: topValue.xText, class: "calendarTopText" }, topValue.value))))
200
230
  : topValues.map((topValue) => (h("g", { class: "calendarTop" }, h("line", { x1: topValue.x1Line, y1: topValue.y1Line, x2: topValue.x1Line, y2: topValue.y2Line, class: "calendarTopTick", key: topValue.value + 'line' }), h("text", { key: topValue.value + 'text', y: topValue.yText, x: topValue.xText, class: "calendarTopText" }, topValue.value)))), this.currentDateIndicator && (
201
231
  // current date indicator
@@ -185,4 +185,8 @@
185
185
  -ms-user-select: none;
186
186
  user-select: none;
187
187
  pointer-events: none;
188
+ }
189
+
190
+ .ghost-preview {
191
+ opacity: 0.5;
188
192
  }