@sme.up/ketchup 8.0.1 → 8.1.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 (558) hide show
  1. package/dist/cjs/{GenericVariables-a9ed17ee.js → GenericVariables-9cd88034.js} +3 -3
  2. package/dist/cjs/{component-85c2bd4d.js → component-2c7ddef7.js} +91 -10
  3. package/dist/cjs/{f-button-c0ede055.js → f-button-a5f661f2.js} +99 -99
  4. package/dist/cjs/{f-button-declarations-b611587f.js → f-button-declarations-76b4fb4c.js} +16 -16
  5. package/dist/cjs/{f-cell-1c17dbac.js → f-cell-ca9e4352.js} +472 -470
  6. package/dist/cjs/{f-checkbox-1148e791.js → f-checkbox-e2c6ecef.js} +23 -23
  7. package/dist/cjs/{f-chip-bace36bb.js → f-chip-e941fa19.js} +125 -125
  8. package/dist/cjs/{f-image-22174590.js → f-image-466b724f.js} +107 -107
  9. package/dist/cjs/{f-paginator-utils-e21e1f06.js → f-paginator-utils-f775ce67.js} +1548 -1547
  10. package/dist/cjs/{f-text-field-503f2bb0.js → f-text-field-ddb47dda.js} +172 -172
  11. package/dist/cjs/{f-text-field-mdc-0e22f3e3.js → f-text-field-mdc-d38d80b5.js} +59 -60
  12. package/dist/cjs/{index-1f177abc.js → index-26fb8571.js} +78 -24
  13. package/dist/cjs/ketchup.cjs.js +3 -3
  14. package/dist/cjs/kup-accordion.cjs.entry.js +199 -200
  15. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +17546 -17563
  16. package/dist/cjs/kup-box.cjs.entry.js +1294 -1232
  17. package/dist/cjs/kup-calendar.cjs.entry.js +9542 -10035
  18. package/dist/cjs/kup-cell.cjs.entry.js +172 -172
  19. package/dist/cjs/kup-dash-list.cjs.entry.js +106 -106
  20. package/dist/cjs/kup-dash_2.cjs.entry.js +162 -162
  21. package/dist/cjs/kup-dashboard.cjs.entry.js +400 -401
  22. package/dist/cjs/kup-drawer.cjs.entry.js +138 -138
  23. package/dist/cjs/kup-echart.cjs.entry.js +7145 -6598
  24. package/dist/cjs/kup-family-tree.cjs.entry.js +439 -439
  25. package/dist/cjs/kup-iframe.cjs.entry.js +94 -94
  26. package/dist/cjs/kup-image-list.cjs.entry.js +255 -256
  27. package/dist/cjs/kup-lazy.cjs.entry.js +186 -186
  28. package/dist/cjs/kup-magic-box.cjs.entry.js +298 -298
  29. package/dist/cjs/{kup-manager-b994cf71.js → kup-manager-16b684bd.js} +7273 -7126
  30. package/dist/cjs/kup-nav-bar.cjs.entry.js +130 -130
  31. package/dist/cjs/kup-numeric-picker.cjs.entry.js +367 -368
  32. package/dist/cjs/kup-photo-frame.cjs.entry.js +144 -144
  33. package/dist/cjs/kup-planner.cjs.entry.js +1151 -1009
  34. package/dist/cjs/kup-probe.cjs.entry.js +246 -246
  35. package/dist/cjs/kup-qlik.cjs.entry.js +138 -138
  36. package/dist/cjs/kup-snackbar.cjs.entry.js +116 -116
  37. package/dist/cjs/loader.cjs.js +3 -3
  38. package/dist/collection/assets/dash-list.js +466 -293
  39. package/dist/collection/assets/data-table.js +0 -44
  40. package/dist/collection/assets/index.js +4 -0
  41. package/dist/collection/assets/planner.js +8189 -0
  42. package/dist/collection/collection-manifest.json +2 -2
  43. package/dist/collection/components/kup-accordion/kup-accordion-declarations.js +10 -10
  44. package/dist/collection/components/kup-accordion/kup-accordion.js +445 -445
  45. package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +27 -27
  46. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +908 -908
  47. package/dist/collection/components/kup-badge/kup-badge-declarations.js +10 -10
  48. package/dist/collection/components/kup-badge/kup-badge.js +276 -276
  49. package/dist/collection/components/kup-box/kup-box-declarations.js +34 -33
  50. package/dist/collection/components/kup-box/kup-box-state.js +15 -15
  51. package/dist/collection/components/kup-box/kup-box.js +2159 -2079
  52. package/dist/collection/components/kup-button/kup-button-declarations.js +18 -18
  53. package/dist/collection/components/kup-button/kup-button.js +580 -580
  54. package/dist/collection/components/kup-button-list/kup-button-list-declarations.js +13 -13
  55. package/dist/collection/components/kup-button-list/kup-button-list.e2e.js +144 -0
  56. package/dist/collection/components/kup-button-list/kup-button-list.js +527 -527
  57. package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +35 -35
  58. package/dist/collection/components/kup-calendar/kup-calendar.css +0 -4
  59. package/dist/collection/components/kup-calendar/kup-calendar.js +690 -690
  60. package/dist/collection/components/kup-card/box/kup-card-box.js +227 -227
  61. package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +56 -56
  62. package/dist/collection/components/kup-card/built-in/kup-card-calendar.js +393 -449
  63. package/dist/collection/components/kup-card/built-in/kup-card-clock.js +308 -308
  64. package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +165 -165
  65. package/dist/collection/components/kup-card/built-in/kup-card-message-box.js +10 -10
  66. package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +118 -118
  67. package/dist/collection/components/kup-card/collapsible/kup-card-collapsible.js +64 -64
  68. package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +217 -217
  69. package/dist/collection/components/kup-card/free/kup-card-free.js +22 -22
  70. package/dist/collection/components/kup-card/kup-card-declarations.js +98 -98
  71. package/dist/collection/components/kup-card/kup-card-helper.js +196 -196
  72. package/dist/collection/components/kup-card/kup-card.js +809 -809
  73. package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +251 -251
  74. package/dist/collection/components/kup-card/standard/kup-card-standard.js +593 -593
  75. package/dist/collection/components/kup-cell/kup-cell-declarations.js +11 -11
  76. package/dist/collection/components/kup-cell/kup-cell.js +401 -401
  77. package/dist/collection/components/kup-chart/kup-chart-builder.js +93 -93
  78. package/dist/collection/components/kup-chart/kup-chart-declarations.js +49 -49
  79. package/dist/collection/components/kup-chart/kup-chart.js +1080 -1080
  80. package/dist/collection/components/kup-checkbox/kup-checkbox-declarations.js +13 -13
  81. package/dist/collection/components/kup-checkbox/kup-checkbox.js +433 -433
  82. package/dist/collection/components/kup-chip/kup-chip-declarations.js +12 -12
  83. package/dist/collection/components/kup-chip/kup-chip.js +558 -558
  84. package/dist/collection/components/kup-color-picker/kup-color-picker-declarations.js +12 -12
  85. package/dist/collection/components/kup-color-picker/kup-color-picker.js +546 -546
  86. package/dist/collection/components/kup-combobox/kup-combobox-declarations.js +15 -15
  87. package/dist/collection/components/kup-combobox/kup-combobox.js +821 -821
  88. package/dist/collection/components/kup-dash/kup-dash.js +171 -171
  89. package/dist/collection/components/kup-dash-list/kup-dash-list.js +327 -327
  90. package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -10
  91. package/dist/collection/components/kup-dashboard/kup-dashboard.js +588 -588
  92. package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +156 -156
  93. package/dist/collection/components/kup-data-table/kup-data-table-helper.js +808 -809
  94. package/dist/collection/components/kup-data-table/kup-data-table-state.js +36 -36
  95. package/dist/collection/components/kup-data-table/kup-data-table.js +5527 -5526
  96. package/dist/collection/components/kup-date-picker/kup-date-picker-declarations.js +18 -18
  97. package/dist/collection/components/kup-date-picker/kup-date-picker.js +816 -816
  98. package/dist/collection/components/kup-dialog/kup-dialog-declarations.js +14 -14
  99. package/dist/collection/components/kup-dialog/kup-dialog.js +467 -467
  100. package/dist/collection/components/kup-drawer/kup-drawer-declarations.js +10 -10
  101. package/dist/collection/components/kup-drawer/kup-drawer.e2e.js +9 -0
  102. package/dist/collection/components/kup-drawer/kup-drawer.js +383 -383
  103. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button-declarations.js +18 -18
  104. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +800 -800
  105. package/dist/collection/components/kup-echart/kup-echart-declarations.js +52 -52
  106. package/dist/collection/components/kup-echart/kup-echart.js +1437 -1437
  107. package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +15 -15
  108. package/dist/collection/components/kup-family-tree/kup-family-tree.js +829 -829
  109. package/dist/collection/components/kup-form/kup-form-declarations.js +29 -29
  110. package/dist/collection/components/kup-form/kup-form.js +731 -731
  111. package/dist/collection/components/kup-gauge/kup-gauge-declarations.js +26 -26
  112. package/dist/collection/components/kup-gauge/kup-gauge.js +764 -764
  113. package/dist/collection/components/kup-grid/kup-grid-declarations.js +10 -10
  114. package/dist/collection/components/kup-grid/kup-grid.js +253 -253
  115. package/dist/collection/components/kup-iframe/kup-iframe-declarations.js +10 -10
  116. package/dist/collection/components/kup-iframe/kup-iframe.js +281 -281
  117. package/dist/collection/components/kup-image/canvas/kup-image-canvas-declarations.js +184 -184
  118. package/dist/collection/components/kup-image/canvas/kup-image-canvas-helper.js +19 -19
  119. package/dist/collection/components/kup-image/canvas/kup-image-canvas.js +225 -225
  120. package/dist/collection/components/kup-image/kup-image-declarations.js +16 -16
  121. package/dist/collection/components/kup-image/kup-image.js +491 -491
  122. package/dist/collection/components/kup-image-list/kup-image-list-declarations.js +10 -10
  123. package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -9
  124. package/dist/collection/components/kup-image-list/kup-image-list.js +533 -533
  125. package/dist/collection/components/kup-lazy/kup-lazy-declarations.js +20 -20
  126. package/dist/collection/components/kup-lazy/kup-lazy.js +430 -430
  127. package/dist/collection/components/kup-list/kup-list-declarations.js +34 -34
  128. package/dist/collection/components/kup-list/kup-list-helper.js +121 -121
  129. package/dist/collection/components/kup-list/kup-list.js +949 -949
  130. package/dist/collection/components/kup-magic-box/kup-magic-box-declarations.js +23 -23
  131. package/dist/collection/components/kup-magic-box/kup-magic-box.js +431 -431
  132. package/dist/collection/components/kup-nav-bar/kup-nav-bar-declarations.js +21 -21
  133. package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +315 -315
  134. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +16 -16
  135. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +864 -864
  136. package/dist/collection/components/kup-photo-frame/kup-photo-frame-declarations.js +10 -10
  137. package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +372 -372
  138. package/dist/collection/components/kup-planner/kup-planner-declarations.js +83 -76
  139. package/dist/collection/components/kup-planner/kup-planner-helper.js +54 -54
  140. package/dist/collection/components/kup-planner/kup-planner-state.js +16 -0
  141. package/dist/collection/components/kup-planner/kup-planner.js +1725 -1352
  142. package/dist/collection/components/kup-probe/kup-probe.js +358 -358
  143. package/dist/collection/components/kup-progress-bar/kup-progress-bar-declarations.js +14 -14
  144. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +405 -405
  145. package/dist/collection/components/kup-qlik/kup-qlik-declarations.js +1 -1
  146. package/dist/collection/components/kup-qlik/kup-qlik.js +326 -326
  147. package/dist/collection/components/kup-radio/kup-radio-declarations.js +12 -12
  148. package/dist/collection/components/kup-radio/kup-radio.js +398 -398
  149. package/dist/collection/components/kup-rating/kup-rating-declarations.js +11 -11
  150. package/dist/collection/components/kup-rating/kup-rating.js +332 -332
  151. package/dist/collection/components/kup-snackbar/kup-snackbar-declarations.js +13 -13
  152. package/dist/collection/components/kup-snackbar/kup-snackbar.js +389 -389
  153. package/dist/collection/components/kup-spinner/kup-spinner-declarations.js +15 -15
  154. package/dist/collection/components/kup-spinner/kup-spinner.js +468 -468
  155. package/dist/collection/components/kup-state/kup-state.js +1 -1
  156. package/dist/collection/components/kup-state/kup-store.js +1 -1
  157. package/dist/collection/components/kup-state/mock-store.js +13 -13
  158. package/dist/collection/components/kup-switch/kup-switch-declarations.js +12 -12
  159. package/dist/collection/components/kup-switch/kup-switch.js +402 -402
  160. package/dist/collection/components/kup-tab-bar/kup-tab-bar-declarations.js +10 -10
  161. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +443 -443
  162. package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +35 -35
  163. package/dist/collection/components/kup-text-field/kup-text-field.js +1193 -1190
  164. package/dist/collection/components/kup-time-picker/kup-time-picker-declarations.js +14 -14
  165. package/dist/collection/components/kup-time-picker/kup-time-picker.js +921 -921
  166. package/dist/collection/components/kup-tree/kup-tree-declarations.js +43 -43
  167. package/dist/collection/components/kup-tree/kup-tree-faker.js +305 -305
  168. package/dist/collection/components/kup-tree/kup-tree-state.js +15 -15
  169. package/dist/collection/components/kup-tree/kup-tree.js +2479 -2479
  170. package/dist/collection/f-components/f-button/f-button-declarations.js +17 -17
  171. package/dist/collection/f-components/f-button/f-button.js +91 -91
  172. package/dist/collection/f-components/f-cell/f-cell-declarations.js +158 -158
  173. package/dist/collection/f-components/f-cell/f-cell.js +429 -428
  174. package/dist/collection/f-components/f-checkbox/f-checkbox-declarations.js +1 -1
  175. package/dist/collection/f-components/f-checkbox/f-checkbox.js +16 -16
  176. package/dist/collection/f-components/f-chip/f-chip-declarations.js +15 -15
  177. package/dist/collection/f-components/f-chip/f-chip.js +101 -101
  178. package/dist/collection/f-components/f-image/f-image-declarations.js +8 -8
  179. package/dist/collection/f-components/f-image/f-image.js +100 -100
  180. package/dist/collection/f-components/f-paginator/f-paginator-declarations.js +5 -5
  181. package/dist/collection/f-components/f-paginator/f-paginator-utils.js +28 -28
  182. package/dist/collection/f-components/f-paginator/f-paginator.js +86 -86
  183. package/dist/collection/f-components/f-switch/f-switch-declarations.js +1 -1
  184. package/dist/collection/f-components/f-switch/f-switch.js +12 -12
  185. package/dist/collection/f-components/f-text-field/f-text-field-declarations.js +1 -1
  186. package/dist/collection/f-components/f-text-field/f-text-field-mdc.js +29 -29
  187. package/dist/collection/f-components/f-text-field/f-text-field.js +151 -151
  188. package/dist/collection/managers/kup-data/kup-data-cell-helper.js +86 -86
  189. package/dist/collection/managers/kup-data/kup-data-column-helper.js +300 -300
  190. package/dist/collection/managers/kup-data/kup-data-declarations.js +10 -10
  191. package/dist/collection/managers/kup-data/kup-data-node-helper.js +165 -165
  192. package/dist/collection/managers/kup-data/kup-data-row-helper.js +28 -28
  193. package/dist/collection/managers/kup-data/kup-data.js +499 -497
  194. package/dist/collection/managers/kup-dates/kup-dates-declarations.js +43 -32
  195. package/dist/collection/managers/kup-dates/kup-dates.js +654 -343
  196. package/dist/collection/managers/kup-debug/kup-debug-declarations.js +20 -20
  197. package/dist/collection/managers/kup-debug/kup-debug.js +670 -670
  198. package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position-declarations.js +27 -27
  199. package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +244 -244
  200. package/dist/collection/managers/kup-interact/kup-interact-declarations.js +49 -49
  201. package/dist/collection/managers/kup-interact/kup-interact.js +397 -397
  202. package/dist/collection/managers/kup-language/kup-language-declarations.js +211 -211
  203. package/dist/collection/managers/kup-language/kup-language.js +151 -151
  204. package/dist/collection/managers/kup-manager/kup-manager-declarations.js +1 -1
  205. package/dist/collection/managers/kup-manager/kup-manager.js +303 -303
  206. package/dist/collection/managers/kup-math/kup-math-declarations.js +13 -13
  207. package/dist/collection/managers/kup-math/kup-math-helper.js +39 -39
  208. package/dist/collection/managers/kup-math/kup-math.js +413 -242
  209. package/dist/collection/managers/kup-objects/kup-objects-declarations.js +1 -1
  210. package/dist/collection/managers/kup-objects/kup-objects.js +387 -387
  211. package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +10 -10
  212. package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover.js +334 -334
  213. package/dist/collection/managers/kup-search/kup-search-declarations.js +1 -1
  214. package/dist/collection/managers/kup-search/kup-search.js +75 -75
  215. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +177 -177
  216. package/dist/collection/managers/kup-theme/kup-theme.js +715 -715
  217. package/dist/collection/managers/kup-toolbar/kup-toolbar-declarations.js +9 -9
  218. package/dist/collection/managers/kup-toolbar/kup-toolbar.js +111 -111
  219. package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -1
  220. package/dist/collection/managers/kup-tooltip/kup-tooltip.js +229 -229
  221. package/dist/collection/types/GenericTypes.js +54 -54
  222. package/dist/collection/utils/cell-utils.js +156 -157
  223. package/dist/collection/utils/filters/filters-column-menu.js +360 -360
  224. package/dist/collection/utils/filters/filters-declarations.js +25 -25
  225. package/dist/collection/utils/filters/filters-rows.js +238 -238
  226. package/dist/collection/utils/filters/filters-tree-items.js +117 -117
  227. package/dist/collection/utils/filters/filters.js +287 -289
  228. package/dist/collection/utils/kup-column-menu/kup-column-menu-declarations.js +20 -20
  229. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +751 -751
  230. package/dist/collection/utils/utils.js +84 -497
  231. package/dist/collection/variables/GenericVariables.js +4 -4
  232. package/dist/components/kup-accordion.js +355 -355
  233. package/dist/components/kup-autocomplete2.js +31828 -31684
  234. package/dist/components/kup-box2.js +1470 -1406
  235. package/dist/components/kup-calendar.js +9788 -10280
  236. package/dist/components/kup-card.js +1 -1
  237. package/dist/components/kup-cell.js +325 -325
  238. package/dist/components/kup-chart.js +1 -1
  239. package/dist/components/kup-checkbox.js +1 -1
  240. package/dist/components/kup-chip.js +1 -1
  241. package/dist/components/kup-color-picker.js +1 -1
  242. package/dist/components/kup-combobox.js +1 -1
  243. package/dist/components/kup-dash-list.js +276 -276
  244. package/dist/components/kup-dash2.js +220 -220
  245. package/dist/components/kup-dashboard.js +549 -549
  246. package/dist/components/kup-data-table.js +1 -1
  247. package/dist/components/kup-date-picker.js +1 -1
  248. package/dist/components/kup-dialog.js +1 -1
  249. package/dist/components/kup-drawer.js +295 -295
  250. package/dist/components/kup-dropdown-button.js +1 -1
  251. package/dist/components/kup-echart2.js +7312 -6765
  252. package/dist/components/kup-family-tree.js +604 -604
  253. package/dist/components/kup-form.js +1 -1
  254. package/dist/components/kup-gauge.js +1 -1
  255. package/dist/components/kup-grid2.js +252 -252
  256. package/dist/components/kup-iframe.js +250 -250
  257. package/dist/components/kup-image-list.js +407 -407
  258. package/dist/components/kup-image.js +1 -1
  259. package/dist/components/kup-lazy.js +344 -344
  260. package/dist/components/kup-list.js +1 -1
  261. package/dist/components/kup-magic-box.js +461 -461
  262. package/dist/components/kup-nav-bar.js +284 -284
  263. package/dist/components/kup-numeric-picker.js +529 -529
  264. package/dist/components/kup-photo-frame.js +300 -300
  265. package/dist/components/kup-planner.js +1342 -1189
  266. package/dist/components/kup-probe.js +399 -399
  267. package/dist/components/kup-progress-bar.js +1 -1
  268. package/dist/components/kup-qlik.js +296 -296
  269. package/dist/components/kup-radio.js +1 -1
  270. package/dist/components/kup-rating.js +1 -1
  271. package/dist/components/kup-snackbar.js +273 -273
  272. package/dist/components/kup-spinner.js +1 -1
  273. package/dist/components/kup-switch.js +1 -1
  274. package/dist/components/kup-tab-bar.js +1 -1
  275. package/dist/components/kup-text-field.js +1 -1
  276. package/dist/components/kup-time-picker.js +1 -1
  277. package/dist/components/kup-tree.js +1 -1
  278. package/dist/esm/{GenericVariables-665de00a.js → GenericVariables-6dfdd433.js} +3 -3
  279. package/dist/esm/{component-120651a0.js → component-e86c51ea.js} +81 -2
  280. package/dist/esm/{f-button-c377973d.js → f-button-c6a69f75.js} +99 -99
  281. package/dist/esm/{f-button-declarations-b1b4cac4.js → f-button-declarations-fd4965d1.js} +16 -16
  282. package/dist/esm/{f-cell-e5a98bc8.js → f-cell-5822ea68.js} +472 -470
  283. package/dist/esm/{f-checkbox-9b3f5f5b.js → f-checkbox-c15911de.js} +23 -23
  284. package/dist/esm/{f-chip-c8a18c48.js → f-chip-f46a03f5.js} +125 -125
  285. package/dist/esm/{f-image-5cbdf39d.js → f-image-f57832fa.js} +107 -107
  286. package/dist/esm/{f-paginator-utils-a1dab059.js → f-paginator-utils-bafc463d.js} +1548 -1547
  287. package/dist/esm/{f-text-field-dafb7c8b.js → f-text-field-15850e05.js} +172 -172
  288. package/dist/esm/{f-text-field-mdc-cee583ea.js → f-text-field-mdc-a1b4a919.js} +27 -28
  289. package/dist/esm/{index-8bd38435.js → index-238342f2.js} +78 -24
  290. package/dist/esm/ketchup.js +4 -4
  291. package/dist/esm/kup-accordion.entry.js +199 -200
  292. package/dist/esm/kup-autocomplete_27.entry.js +17546 -17563
  293. package/dist/esm/kup-box.entry.js +1294 -1232
  294. package/dist/esm/kup-calendar.entry.js +9557 -10050
  295. package/dist/esm/kup-cell.entry.js +172 -172
  296. package/dist/esm/kup-dash-list.entry.js +106 -106
  297. package/dist/esm/kup-dash_2.entry.js +162 -162
  298. package/dist/esm/kup-dashboard.entry.js +400 -401
  299. package/dist/esm/kup-drawer.entry.js +138 -138
  300. package/dist/esm/kup-echart.entry.js +7145 -6598
  301. package/dist/esm/kup-family-tree.entry.js +439 -439
  302. package/dist/esm/kup-iframe.entry.js +94 -94
  303. package/dist/esm/kup-image-list.entry.js +255 -256
  304. package/dist/esm/kup-lazy.entry.js +186 -186
  305. package/dist/esm/kup-magic-box.entry.js +298 -298
  306. package/dist/esm/{kup-manager-3594cde8.js → kup-manager-89dd9137.js} +7273 -7116
  307. package/dist/esm/kup-nav-bar.entry.js +130 -130
  308. package/dist/esm/kup-numeric-picker.entry.js +367 -368
  309. package/dist/esm/kup-photo-frame.entry.js +144 -144
  310. package/dist/esm/kup-planner.entry.js +1151 -1009
  311. package/dist/esm/kup-probe.entry.js +246 -246
  312. package/dist/esm/kup-qlik.entry.js +138 -138
  313. package/dist/esm/kup-snackbar.entry.js +116 -116
  314. package/dist/esm/loader.js +4 -4
  315. package/dist/ketchup/ketchup.esm.js +1 -1
  316. package/dist/ketchup/{p-d1164680.entry.js → p-01d44efe.entry.js} +1 -1
  317. package/dist/ketchup/{p-6762d447.js → p-1a8a06de.js} +1 -1
  318. package/dist/ketchup/p-206245c0.js +1 -0
  319. package/dist/ketchup/p-4bd63e97.entry.js +25 -0
  320. package/dist/ketchup/{p-cf322853.entry.js → p-4da77173.entry.js} +1 -1
  321. package/dist/ketchup/{p-7be5ef32.entry.js → p-514dcb7d.entry.js} +1 -1
  322. package/dist/ketchup/{p-22e72f06.entry.js → p-51573263.entry.js} +1 -1
  323. package/dist/ketchup/{p-9f9b6656.js → p-54248440.js} +1 -1
  324. package/dist/ketchup/{p-37ada0f0.entry.js → p-5dfa5c49.entry.js} +1 -1
  325. package/dist/ketchup/{p-10d84b1b.js → p-6507e9eb.js} +7 -6
  326. package/dist/ketchup/p-673bb93e.js +1 -0
  327. package/dist/ketchup/{p-31abf4b6.entry.js → p-688478e9.entry.js} +1 -1
  328. package/dist/ketchup/p-6a5d95df.entry.js +1 -0
  329. package/dist/ketchup/p-6ec8629e.js +30 -0
  330. package/dist/ketchup/p-785e8d74.entry.js +1 -0
  331. package/dist/ketchup/{p-d76be079.entry.js → p-78cc5a2d.entry.js} +1 -1
  332. package/dist/ketchup/{p-ce5b6ce7.entry.js → p-799f7f10.entry.js} +1 -1
  333. package/dist/ketchup/p-7e757c27.entry.js +1 -0
  334. package/dist/ketchup/p-843253dd.entry.js +1 -0
  335. package/dist/ketchup/{p-473d2bea.entry.js → p-84d3f676.entry.js} +1 -1
  336. package/dist/ketchup/p-8c1edebd.js +2 -0
  337. package/dist/ketchup/{p-2d32e3cd.js → p-a5f15864.js} +1 -1
  338. package/dist/ketchup/p-af7202ff.entry.js +1 -0
  339. package/dist/ketchup/{p-7f4f5f0f.entry.js → p-ba959bb5.entry.js} +1 -1
  340. package/dist/ketchup/p-c1931214.js +1 -0
  341. package/dist/ketchup/{p-8b248655.js → p-c354c5d0.js} +1 -1
  342. package/dist/ketchup/p-cd8512d9.entry.js +39 -0
  343. package/dist/ketchup/p-d4f86197.entry.js +9 -0
  344. package/dist/ketchup/{p-b718af72.entry.js → p-e59c2bc0.entry.js} +1 -1
  345. package/dist/ketchup/{p-afff7a6e.entry.js → p-f2fda43b.entry.js} +1 -1
  346. package/dist/ketchup/p-f4b6aa3f.entry.js +1 -0
  347. package/dist/ketchup/p-f4f5170c.entry.js +1 -0
  348. package/dist/ketchup/{p-27a56c87.js → p-fb03f2f5.js} +2 -2
  349. package/dist/loader/index.d.ts +1 -1
  350. package/dist/types/components/kup-accordion/kup-accordion-declarations.d.ts +20 -20
  351. package/dist/types/components/kup-accordion/kup-accordion.d.ts +80 -80
  352. package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +35 -35
  353. package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +119 -119
  354. package/dist/types/components/kup-badge/kup-badge-declarations.d.ts +9 -9
  355. package/dist/types/components/kup-badge/kup-badge.d.ts +51 -51
  356. package/dist/types/components/kup-box/kup-box-declarations.d.ts +114 -113
  357. package/dist/types/components/kup-box/kup-box-state.d.ts +10 -10
  358. package/dist/types/components/kup-box/kup-box.d.ts +275 -270
  359. package/dist/types/components/kup-button/kup-button-declarations.d.ts +24 -24
  360. package/dist/types/components/kup-button/kup-button.d.ts +111 -111
  361. package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +24 -24
  362. package/dist/types/components/kup-button-list/kup-button-list.d.ts +82 -82
  363. package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +70 -70
  364. package/dist/types/components/kup-calendar/kup-calendar.d.ts +100 -100
  365. package/dist/types/components/kup-card/box/kup-card-box.d.ts +50 -50
  366. package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +39 -39
  367. package/dist/types/components/kup-card/built-in/kup-card-calendar.d.ts +2 -2
  368. package/dist/types/components/kup-card/built-in/kup-card-clock.d.ts +2 -2
  369. package/dist/types/components/kup-card/built-in/kup-card-column-drop-menu.d.ts +3 -3
  370. package/dist/types/components/kup-card/built-in/kup-card-message-box.d.ts +3 -3
  371. package/dist/types/components/kup-card/built-in/kup-card-numeric.d.ts +2 -2
  372. package/dist/types/components/kup-card/collapsible/kup-card-collapsible.d.ts +14 -14
  373. package/dist/types/components/kup-card/dialog/kup-card-dialog.d.ts +44 -44
  374. package/dist/types/components/kup-card/free/kup-card-free.d.ts +14 -14
  375. package/dist/types/components/kup-card/kup-card-declarations.d.ts +236 -236
  376. package/dist/types/components/kup-card/kup-card-helper.d.ts +27 -27
  377. package/dist/types/components/kup-card/kup-card.d.ts +159 -159
  378. package/dist/types/components/kup-card/scalable/kup-card-scalable.d.ts +56 -56
  379. package/dist/types/components/kup-card/standard/kup-card-standard.d.ts +92 -92
  380. package/dist/types/components/kup-cell/kup-cell-declarations.d.ts +10 -10
  381. package/dist/types/components/kup-cell/kup-cell.d.ts +67 -67
  382. package/dist/types/components/kup-chart/kup-chart-builder.d.ts +7 -7
  383. package/dist/types/components/kup-chart/kup-chart-declarations.d.ts +135 -135
  384. package/dist/types/components/kup-chart/kup-chart.d.ts +170 -170
  385. package/dist/types/components/kup-checkbox/kup-checkbox-declarations.d.ts +17 -17
  386. package/dist/types/components/kup-checkbox/kup-checkbox.d.ts +85 -85
  387. package/dist/types/components/kup-chip/kup-chip-declarations.d.ts +22 -22
  388. package/dist/types/components/kup-chip/kup-chip.d.ts +89 -89
  389. package/dist/types/components/kup-color-picker/kup-color-picker-declarations.d.ts +15 -15
  390. package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +89 -89
  391. package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +24 -24
  392. package/dist/types/components/kup-combobox/kup-combobox.d.ts +95 -95
  393. package/dist/types/components/kup-dash/kup-dash.d.ts +33 -33
  394. package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +22 -22
  395. package/dist/types/components/kup-dashboard/kup-dashboard-declarations.d.ts +61 -61
  396. package/dist/types/components/kup-dashboard/kup-dashboard.d.ts +80 -80
  397. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +254 -254
  398. package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +25 -25
  399. package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +36 -36
  400. package/dist/types/components/kup-data-table/kup-data-table.d.ts +444 -444
  401. package/dist/types/components/kup-date-picker/kup-date-picker-declarations.d.ts +20 -20
  402. package/dist/types/components/kup-date-picker/kup-date-picker.d.ts +110 -110
  403. package/dist/types/components/kup-dialog/kup-dialog-declarations.d.ts +26 -26
  404. package/dist/types/components/kup-dialog/kup-dialog.d.ts +77 -77
  405. package/dist/types/components/kup-drawer/kup-drawer-declarations.d.ts +9 -9
  406. package/dist/types/components/kup-drawer/kup-drawer.d.ts +74 -74
  407. package/dist/types/components/kup-dropdown-button/kup-dropdown-button-declarations.d.ts +21 -21
  408. package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +161 -161
  409. package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +62 -62
  410. package/dist/types/components/kup-echart/kup-echart.d.ts +111 -111
  411. package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +38 -38
  412. package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +87 -87
  413. package/dist/types/components/kup-form/kup-form-declarations.d.ts +64 -64
  414. package/dist/types/components/kup-form/kup-form.d.ts +83 -83
  415. package/dist/types/components/kup-gauge/kup-gauge-declarations.d.ts +25 -25
  416. package/dist/types/components/kup-gauge/kup-gauge.d.ts +147 -147
  417. package/dist/types/components/kup-grid/kup-grid-declarations.d.ts +9 -9
  418. package/dist/types/components/kup-grid/kup-grid.d.ts +48 -48
  419. package/dist/types/components/kup-iframe/kup-iframe-declarations.d.ts +9 -9
  420. package/dist/types/components/kup-iframe/kup-iframe.d.ts +49 -49
  421. package/dist/types/components/kup-image/canvas/kup-image-canvas-declarations.d.ts +23 -23
  422. package/dist/types/components/kup-image/canvas/kup-image-canvas-helper.d.ts +2 -2
  423. package/dist/types/components/kup-image/canvas/kup-image-canvas.d.ts +28 -28
  424. package/dist/types/components/kup-image/kup-image-declarations.d.ts +19 -19
  425. package/dist/types/components/kup-image/kup-image.d.ts +103 -103
  426. package/dist/types/components/kup-image-list/kup-image-list-declarations.d.ts +14 -14
  427. package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -6
  428. package/dist/types/components/kup-image-list/kup-image-list.d.ts +73 -73
  429. package/dist/types/components/kup-lazy/kup-lazy-declarations.d.ts +18 -18
  430. package/dist/types/components/kup-lazy/kup-lazy.d.ts +78 -78
  431. package/dist/types/components/kup-list/kup-list-declarations.d.ts +48 -48
  432. package/dist/types/components/kup-list/kup-list-helper.d.ts +6 -6
  433. package/dist/types/components/kup-list/kup-list.d.ts +128 -128
  434. package/dist/types/components/kup-magic-box/kup-magic-box-declarations.d.ts +21 -21
  435. package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +65 -65
  436. package/dist/types/components/kup-nav-bar/kup-nav-bar-declarations.d.ts +19 -19
  437. package/dist/types/components/kup-nav-bar/kup-nav-bar.d.ts +65 -65
  438. package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +19 -19
  439. package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +121 -121
  440. package/dist/types/components/kup-photo-frame/kup-photo-frame-declarations.d.ts +9 -9
  441. package/dist/types/components/kup-photo-frame/kup-photo-frame.d.ts +61 -61
  442. package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +127 -106
  443. package/dist/types/components/kup-planner/kup-planner-helper.d.ts +6 -6
  444. package/dist/types/components/kup-planner/kup-planner-state.d.ts +13 -0
  445. package/dist/types/components/kup-planner/kup-planner.d.ts +266 -212
  446. package/dist/types/components/kup-probe/kup-probe.d.ts +72 -72
  447. package/dist/types/components/kup-progress-bar/kup-progress-bar-declarations.d.ts +13 -13
  448. package/dist/types/components/kup-progress-bar/kup-progress-bar.d.ts +69 -69
  449. package/dist/types/components/kup-qlik/kup-qlik-declarations.d.ts +19 -19
  450. package/dist/types/components/kup-qlik/kup-qlik.d.ts +100 -100
  451. package/dist/types/components/kup-radio/kup-radio-declarations.d.ts +23 -23
  452. package/dist/types/components/kup-radio/kup-radio.d.ts +80 -80
  453. package/dist/types/components/kup-rating/kup-rating-declarations.d.ts +14 -14
  454. package/dist/types/components/kup-rating/kup-rating.d.ts +62 -62
  455. package/dist/types/components/kup-snackbar/kup-snackbar-declarations.d.ts +12 -12
  456. package/dist/types/components/kup-snackbar/kup-snackbar.d.ts +84 -84
  457. package/dist/types/components/kup-spinner/kup-spinner-declarations.d.ts +14 -14
  458. package/dist/types/components/kup-spinner/kup-spinner.d.ts +79 -79
  459. package/dist/types/components/kup-state/kup-state.d.ts +3 -3
  460. package/dist/types/components/kup-state/kup-store.d.ts +4 -4
  461. package/dist/types/components/kup-state/mock-store.d.ts +8 -8
  462. package/dist/types/components/kup-switch/kup-switch-declarations.d.ts +15 -15
  463. package/dist/types/components/kup-switch/kup-switch.d.ts +80 -80
  464. package/dist/types/components/kup-tab-bar/kup-tab-bar-declarations.d.ts +21 -21
  465. package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +77 -77
  466. package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +38 -38
  467. package/dist/types/components/kup-text-field/kup-text-field.d.ts +253 -253
  468. package/dist/types/components/kup-time-picker/kup-time-picker-declarations.d.ts +17 -17
  469. package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +125 -125
  470. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +97 -97
  471. package/dist/types/components/kup-tree/kup-tree-faker.d.ts +54 -54
  472. package/dist/types/components/kup-tree/kup-tree-state.d.ts +14 -14
  473. package/dist/types/components/kup-tree/kup-tree.d.ts +362 -362
  474. package/dist/types/components.d.ts +98 -2
  475. package/dist/types/f-components/f-button/f-button-declarations.d.ts +41 -41
  476. package/dist/types/f-components/f-button/f-button.d.ts +3 -3
  477. package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +162 -162
  478. package/dist/types/f-components/f-cell/f-cell.d.ts +3 -3
  479. package/dist/types/f-components/f-checkbox/f-checkbox-declarations.d.ts +15 -15
  480. package/dist/types/f-components/f-checkbox/f-checkbox.d.ts +3 -3
  481. package/dist/types/f-components/f-chip/f-chip-declarations.d.ts +29 -29
  482. package/dist/types/f-components/f-chip/f-chip.d.ts +3 -3
  483. package/dist/types/f-components/f-image/f-image-declarations.d.ts +36 -36
  484. package/dist/types/f-components/f-image/f-image.d.ts +3 -3
  485. package/dist/types/f-components/f-paginator/f-paginator-declarations.d.ts +22 -22
  486. package/dist/types/f-components/f-paginator/f-paginator-utils.d.ts +2 -2
  487. package/dist/types/f-components/f-paginator/f-paginator.d.ts +3 -3
  488. package/dist/types/f-components/f-switch/f-switch-declarations.d.ts +14 -14
  489. package/dist/types/f-components/f-switch/f-switch.d.ts +3 -3
  490. package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +42 -42
  491. package/dist/types/f-components/f-text-field/f-text-field-mdc.d.ts +6 -6
  492. package/dist/types/f-components/f-text-field/f-text-field.d.ts +3 -3
  493. package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +31 -31
  494. package/dist/types/managers/kup-data/kup-data-column-helper.d.ts +39 -39
  495. package/dist/types/managers/kup-data/kup-data-declarations.d.ts +173 -173
  496. package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +44 -44
  497. package/dist/types/managers/kup-data/kup-data-row-helper.d.ts +14 -14
  498. package/dist/types/managers/kup-data/kup-data.d.ts +86 -86
  499. package/dist/types/managers/kup-dates/kup-dates-declarations.d.ts +39 -29
  500. package/dist/types/managers/kup-dates/kup-dates.d.ts +207 -114
  501. package/dist/types/managers/kup-debug/kup-debug-declarations.d.ts +38 -38
  502. package/dist/types/managers/kup-debug/kup-debug.d.ts +95 -95
  503. package/dist/types/managers/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +50 -50
  504. package/dist/types/managers/kup-dynamic-position/kup-dynamic-position.d.ts +61 -61
  505. package/dist/types/managers/kup-interact/kup-interact-declarations.d.ts +128 -128
  506. package/dist/types/managers/kup-interact/kup-interact.d.ts +105 -105
  507. package/dist/types/managers/kup-language/kup-language-declarations.d.ts +225 -225
  508. package/dist/types/managers/kup-language/kup-language.d.ts +52 -52
  509. package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +162 -162
  510. package/dist/types/managers/kup-manager/kup-manager.d.ts +95 -95
  511. package/dist/types/managers/kup-math/kup-math-declarations.d.ts +33 -33
  512. package/dist/types/managers/kup-math/kup-math-helper.d.ts +17 -17
  513. package/dist/types/managers/kup-math/kup-math.d.ts +147 -85
  514. package/dist/types/managers/kup-objects/kup-objects-declarations.d.ts +15 -15
  515. package/dist/types/managers/kup-objects/kup-objects.d.ts +210 -210
  516. package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +28 -28
  517. package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +62 -62
  518. package/dist/types/managers/kup-search/kup-search-declarations.d.ts +7 -7
  519. package/dist/types/managers/kup-search/kup-search.d.ts +20 -20
  520. package/dist/types/managers/kup-theme/kup-theme-declarations.d.ts +185 -185
  521. package/dist/types/managers/kup-theme/kup-theme.d.ts +127 -127
  522. package/dist/types/managers/kup-toolbar/kup-toolbar-declarations.d.ts +8 -8
  523. package/dist/types/managers/kup-toolbar/kup-toolbar.d.ts +39 -39
  524. package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -8
  525. package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +51 -51
  526. package/dist/types/stencil-public-runtime.d.ts +1 -0
  527. package/dist/types/types/GenericTypes.d.ts +110 -110
  528. package/dist/types/utils/cell-utils.d.ts +10 -10
  529. package/dist/types/utils/filters/filters-column-menu.d.ts +96 -96
  530. package/dist/types/utils/filters/filters-declarations.d.ts +39 -39
  531. package/dist/types/utils/filters/filters-rows.d.ts +30 -30
  532. package/dist/types/utils/filters/filters-tree-items.d.ts +19 -19
  533. package/dist/types/utils/filters/filters.d.ts +72 -72
  534. package/dist/types/utils/kup-column-menu/kup-column-menu-declarations.d.ts +19 -19
  535. package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +142 -142
  536. package/dist/types/utils/utils.d.ts +37 -124
  537. package/dist/types/variables/GenericVariables.d.ts +4 -4
  538. package/package.json +21 -16
  539. package/dist/cjs/tslib.es6-386654de.js +0 -87
  540. package/dist/esm/tslib.es6-8c2af864.js +0 -82
  541. package/dist/ketchup/p-017418e7.entry.js +0 -27
  542. package/dist/ketchup/p-38f16697.entry.js +0 -9
  543. package/dist/ketchup/p-4638fbff.js +0 -1
  544. package/dist/ketchup/p-4c56e199.entry.js +0 -1
  545. package/dist/ketchup/p-5205286a.entry.js +0 -25
  546. package/dist/ketchup/p-61319cfa.js +0 -1
  547. package/dist/ketchup/p-6c726886.entry.js +0 -1
  548. package/dist/ketchup/p-7f59211b.js +0 -1
  549. package/dist/ketchup/p-80815edf.entry.js +0 -1
  550. package/dist/ketchup/p-9dcfbb1e.js +0 -2
  551. package/dist/ketchup/p-9fc6a9a8.entry.js +0 -1
  552. package/dist/ketchup/p-acaa171f.js +0 -30
  553. package/dist/ketchup/p-bf4a881b.js +0 -1
  554. package/dist/ketchup/p-d4eb9a76.entry.js +0 -1
  555. package/dist/ketchup/p-ed7e118e.entry.js +0 -1
  556. package/dist/ketchup/p-ef0b4f19.entry.js +0 -39
  557. /package/dist/ketchup/{p-6c77a36c.js → p-0fd98ab4.js} +0 -0
  558. /package/dist/ketchup/{p-97e8ea42.js → p-ad2e21d2.js} +0 -0
@@ -1,86 +1,92 @@
1
- import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement, a as getAssetPath } from './index-8bd38435.js';
2
- import { at as createCommonjsModule, az as commonjsGlobal, k as kupManagerInstance, f as KupDatesFormats, an as getCellValueForDisplay, g as getProps, s as setProps, K as KupThemeIconValues, I as KupLanguageSearch } from './kup-manager-3594cde8.js';
3
- import { c as componentWrapperId } from './GenericVariables-665de00a.js';
4
- import { F as FTextField } from './f-text-field-dafb7c8b.js';
5
- import { F as FTextFieldMDC } from './f-text-field-mdc-cee583ea.js';
6
- import './tslib.es6-8c2af864.js';
7
- import './component-120651a0.js';
8
-
9
- /**
10
- * Props of the kup-gantt component.
11
- * Used to export every prop in an object.
12
- */
13
- var KupPlannerProps;
14
- (function (KupPlannerProps) {
15
- KupPlannerProps["customStyle"] = "Custom style of the component.";
16
- KupPlannerProps["data"] = "Dataset containg the tasks list";
17
- KupPlannerProps["detailData"] = "Dataset containg the details list";
18
- KupPlannerProps["detailColorCol"] = "Column containing the detail color, in hex format";
19
- KupPlannerProps["detailColumns"] = "Columns containing informations displayed in the left box, near the gantt of details";
20
- KupPlannerProps["detailDates"] = "Columns containing detail duration, from (firstDate) to (secondDate)";
21
- KupPlannerProps["detailHeight"] = "Height for detail gantt";
22
- KupPlannerProps["detailIdCol"] = "Column containing unique detail identifier";
23
- KupPlannerProps["detailNameCol"] = "Column containing detail name displayed";
24
- KupPlannerProps["detailPrevDates"] = "Columns containing forecast detail duration, from (firstDate) to (secondDate)";
25
- KupPlannerProps["listCellWidth"] = "Total size of the cells inside to the left box, near the gantt";
26
- KupPlannerProps["maxWidth"] = "Max width for component";
27
- KupPlannerProps["phaseColorCol"] = "Column containing the phase color in hex format";
28
- KupPlannerProps["phaseColumns"] = "Columns containing informations displayed in the left box ,near the gantt of phases";
29
- KupPlannerProps["phaseColParDep"] = "Column containing the name of the parent phases";
30
- KupPlannerProps["phaseDates"] = "Columns containing phase duration, from (firstDate) to (secondDate)";
31
- KupPlannerProps["phaseIdCol"] = "Column containing unique phase identifier";
32
- KupPlannerProps["phaseNameCol"] = "Column containing phase name displayed";
33
- KupPlannerProps["phasePrevDates"] = "Columns containing forecast phase duration, from (firstDate) to (secondDate)";
34
- KupPlannerProps["showSecondaryDates"] = "Enable/disable display of secondary dates";
35
- KupPlannerProps["taskColumns"] = "Columns containing informations displayed in the left box, near the gantt";
36
- KupPlannerProps["taskDates"] = "Columns containing task duration, from (firstDate) to (secondDate)";
37
- KupPlannerProps["taskHeight"] = "Height for main gantt";
38
- KupPlannerProps["taskIdCol"] = "Column containing unique task identifier";
39
- KupPlannerProps["taskNameCol"] = "Column containing task name displayed";
40
- KupPlannerProps["taskPrevDates"] = "Columns containing forecast task duration, from (firstDate) to (secondDate)";
41
- KupPlannerProps["titleMess"] = "Message displayed on top";
42
- })(KupPlannerProps || (KupPlannerProps = {}));
43
- var KupPlannerTaskAction;
44
- (function (KupPlannerTaskAction) {
45
- KupPlannerTaskAction["onTaskOpening"] = "onTaskOpening";
46
- KupPlannerTaskAction["onTaskClosing"] = "onTaskClosing";
47
- KupPlannerTaskAction["onClick"] = "onClick";
48
- KupPlannerTaskAction["onResize"] = "onResize";
49
- KupPlannerTaskAction["onRightClick"] = "onRightClick";
50
- })(KupPlannerTaskAction || (KupPlannerTaskAction = {}));
51
- var KupPlannerGanttRowType;
52
- (function (KupPlannerGanttRowType) {
53
- KupPlannerGanttRowType["TASK"] = "task";
54
- KupPlannerGanttRowType["PHASE"] = "phase";
55
- KupPlannerGanttRowType["DETAIL"] = "detail";
56
- })(KupPlannerGanttRowType || (KupPlannerGanttRowType = {}));
57
- class KupPlannerLastOnChangeReceived {
58
- constructor(event, threshold = 100) {
59
- this.dateTime = new Date();
60
- this.event = event;
61
- this.threshold = threshold;
62
- }
63
- isEquivalent(newEvent) {
64
- const intervalTime = new Date().valueOf() - this.dateTime.valueOf();
65
- const equals = JSON.stringify(this.event) === JSON.stringify(newEvent);
66
- return equals && intervalTime < this.threshold;
67
- }
68
- resetDateTime() {
69
- this.dateTime = new Date();
70
- }
71
- }
72
- const defaultStylingOptions = {
73
- listCellWidth: '300px',
74
- rowHeight: 40,
75
- barFill: 90,
76
- projectProgressColor: '#CBCBCB',
77
- projectProgressSelectedColor: '#CBCBCB',
78
- projectBackgroundColor: '#CBCBCB',
79
- projectBackgroundSelectedColor: '#CBCBCB',
80
- barProgressColor: '#A2A415',
81
- barProgressSelectedColor: '#A2A415',
82
- barBackgroundColor: '#A2A415',
83
- barBackgroundSelectedColor: '#A2A415',
1
+ import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement, a as getAssetPath } from './index-238342f2.js';
2
+ import { ao as createCommonjsModule, ap as commonjsGlobal, k as kupManagerInstance, h as KupDatesFormats, af as getCellValueForDisplay, g as getProps, s as setProps, K as KupThemeIconValues, I as KupLanguageSearch } from './kup-manager-89dd9137.js';
3
+ import { c as componentWrapperId } from './GenericVariables-6dfdd433.js';
4
+ import { F as FTextField } from './f-text-field-15850e05.js';
5
+ import { F as FTextFieldMDC } from './f-text-field-mdc-a1b4a919.js';
6
+ import './component-e86c51ea.js';
7
+
8
+ /**
9
+ * Props of the kup-gantt component.
10
+ * Used to export every prop in an object.
11
+ */
12
+ var KupPlannerProps;
13
+ (function (KupPlannerProps) {
14
+ KupPlannerProps["customStyle"] = "Custom style of the component.";
15
+ KupPlannerProps["data"] = "Dataset containg the tasks list";
16
+ KupPlannerProps["detailData"] = "Dataset containg the details list";
17
+ KupPlannerProps["detailColorCol"] = "Column containing the detail color, in hex format";
18
+ KupPlannerProps["detailColumns"] = "Columns containing informations displayed in the left box, near the gantt of details";
19
+ KupPlannerProps["detailDates"] = "Columns containing detail duration, from (firstDate) to (secondDate)";
20
+ KupPlannerProps["detailFilter"] = "Sets the detail's filter.";
21
+ KupPlannerProps["detailHeight"] = "Height for detail gantt";
22
+ KupPlannerProps["detailIdCol"] = "Column containing unique detail identifier";
23
+ KupPlannerProps["detailNameCol"] = "Column containing detail name displayed";
24
+ KupPlannerProps["detailPrevDates"] = "Columns containing forecast detail duration, from (firstDate) to (secondDate)";
25
+ KupPlannerProps["detailInitialScrollX"] = "Sets the initial scroll X for the detail.";
26
+ KupPlannerProps["detailInitialScrollY"] = "Sets the initial scroll Y for the detail.";
27
+ KupPlannerProps["listCellWidth"] = "Total size of the cells inside to the left box, near the gantt";
28
+ KupPlannerProps["maxWidth"] = "Max width for component";
29
+ KupPlannerProps["phaseColorCol"] = "Column containing the phase color in hex format";
30
+ KupPlannerProps["phaseColumns"] = "Columns containing informations displayed in the left box ,near the gantt of phases";
31
+ KupPlannerProps["phaseColParDep"] = "Column containing the name of the parent phases";
32
+ KupPlannerProps["phaseDates"] = "Columns containing phase duration, from (firstDate) to (secondDate)";
33
+ KupPlannerProps["phaseIdCol"] = "Column containing unique phase identifier";
34
+ KupPlannerProps["phaseNameCol"] = "Column containing phase name displayed";
35
+ KupPlannerProps["phasePrevDates"] = "Columns containing forecast phase duration, from (firstDate) to (secondDate)";
36
+ KupPlannerProps["readOnly"] = "When true, the two gantts are not interactable.";
37
+ KupPlannerProps["showSecondaryDates"] = "Enable/disable display of secondary dates";
38
+ KupPlannerProps["taskColumns"] = "Columns containing informations displayed in the left box, near the gantt";
39
+ KupPlannerProps["taskDates"] = "Columns containing task duration, from (firstDate) to (secondDate)";
40
+ KupPlannerProps["taskFilter"] = "Sets the task's filter.";
41
+ KupPlannerProps["taskHeight"] = "Height for main gantt";
42
+ KupPlannerProps["taskIdCol"] = "Column containing unique task identifier";
43
+ KupPlannerProps["taskNameCol"] = "Column containing task name displayed";
44
+ KupPlannerProps["taskPrevDates"] = "Columns containing forecast task duration, from (firstDate) to (secondDate)";
45
+ KupPlannerProps["taskInitialScrollX"] = "Sets the initial scroll X for the task.";
46
+ KupPlannerProps["taskInitialScrollY"] = "Sets the initial scroll Y for the task.";
47
+ KupPlannerProps["titleMess"] = "Message displayed on top";
48
+ })(KupPlannerProps || (KupPlannerProps = {}));
49
+ var KupPlannerTaskAction;
50
+ (function (KupPlannerTaskAction) {
51
+ KupPlannerTaskAction["onTaskOpening"] = "onTaskOpening";
52
+ KupPlannerTaskAction["onTaskClosing"] = "onTaskClosing";
53
+ KupPlannerTaskAction["onClick"] = "onClick";
54
+ KupPlannerTaskAction["onResize"] = "onResize";
55
+ KupPlannerTaskAction["onRightClick"] = "onRightClick";
56
+ })(KupPlannerTaskAction || (KupPlannerTaskAction = {}));
57
+ var KupPlannerGanttRowType;
58
+ (function (KupPlannerGanttRowType) {
59
+ KupPlannerGanttRowType["TASK"] = "task";
60
+ KupPlannerGanttRowType["PHASE"] = "phase";
61
+ KupPlannerGanttRowType["DETAIL"] = "detail";
62
+ })(KupPlannerGanttRowType || (KupPlannerGanttRowType = {}));
63
+ class KupPlannerLastOnChangeReceived {
64
+ constructor(event, threshold = 100) {
65
+ this.dateTime = new Date();
66
+ this.event = event;
67
+ this.threshold = threshold;
68
+ }
69
+ isEquivalent(newEvent) {
70
+ const intervalTime = new Date().valueOf() - this.dateTime.valueOf();
71
+ const equals = JSON.stringify(this.event) === JSON.stringify(newEvent);
72
+ return equals && intervalTime < this.threshold;
73
+ }
74
+ resetDateTime() {
75
+ this.dateTime = new Date();
76
+ }
77
+ }
78
+ const defaultStylingOptions = {
79
+ listCellWidth: '300px',
80
+ rowHeight: 40,
81
+ barFill: 90,
82
+ projectProgressColor: '#CBCBCB',
83
+ projectProgressSelectedColor: '#CBCBCB',
84
+ projectBackgroundColor: '#CBCBCB',
85
+ projectBackgroundSelectedColor: '#CBCBCB',
86
+ barProgressColor: '#A2A415',
87
+ barProgressSelectedColor: '#A2A415',
88
+ barBackgroundColor: '#A2A415',
89
+ barBackgroundSelectedColor: '#A2A415',
84
90
  };
85
91
 
86
92
  /**
@@ -8954,25 +8960,6 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
8954
8960
  }
8955
8961
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8956
8962
  }
8957
-
8958
- var ViewMode;
8959
- (function (ViewMode) {
8960
- ViewMode["Hour"] = "Hour";
8961
- ViewMode["QuarterDay"] = "Quarter Day";
8962
- ViewMode["HalfDay"] = "Half Day";
8963
- ViewMode["Day"] = "Day";
8964
- ViewMode["Week"] = "Week";
8965
- ViewMode["Month"] = "Month";
8966
- ViewMode["Year"] = "Year";
8967
- })(ViewMode || (ViewMode = {}));
8968
-
8969
- var TimeUnit;
8970
- (function (TimeUnit) {
8971
- TimeUnit["DAY"] = "days";
8972
- TimeUnit["WEEK"] = "weeks";
8973
- TimeUnit["MONTH"] = "months";
8974
- TimeUnit["YEAR"] = "YEAR";
8975
- })(TimeUnit || (TimeUnit = {}));
8976
8963
  var parseToDayStart = function parseToDayStart(ymd) {
8977
8964
  return luxon.DateTime.fromISO(ymd).toJSDate();
8978
8965
  };
@@ -9001,211 +8988,6 @@ function validDates(startDate, endDate, _name) {
9001
8988
  };
9002
8989
  }
9003
8990
 
9004
- var MAIN_GANTT_ID = "main";
9005
- var SECONDARY_GANTT_ID = "secondary";
9006
- var toViewMode = function toViewMode(timeUnit) {
9007
- switch (timeUnit) {
9008
- case TimeUnit.DAY:
9009
- return ViewMode.Day;
9010
- case TimeUnit.WEEK:
9011
- return ViewMode.Week;
9012
- case TimeUnit.MONTH:
9013
- return ViewMode.Month;
9014
- case TimeUnit.YEAR:
9015
- return ViewMode.Year;
9016
- }
9017
- };
9018
- var columnWidthForTimeUnit = function columnWidthForTimeUnit(timeUnit) {
9019
- switch (timeUnit) {
9020
- case TimeUnit.YEAR:
9021
- return 60 * 2;
9022
- default:
9023
- return 60;
9024
- }
9025
- };
9026
- var convertPhaseToTask = function convertPhaseToTask(item) {
9027
- var mapPhase = function mapPhase(_ref) {
9028
- var phaseStart = _ref.startDate,
9029
- phaseEnd = _ref.endDate,
9030
- secondaryStartDate = _ref.secondaryStartDate,
9031
- secondaryEndDate = _ref.secondaryEndDate,
9032
- phaseName = _ref.name,
9033
- phaseId = _ref.id,
9034
- color = _ref.color,
9035
- selectedColor = _ref.selectedColor,
9036
- dependencies = _ref.dependencies,
9037
- icon = _ref.icon;
9038
- var _validDates = validDates(phaseStart, phaseEnd),
9039
- start = _validDates.start,
9040
- end = _validDates.end;
9041
- var _validDates2 = validDates(secondaryStartDate, secondaryEndDate),
9042
- phaseStart2 = _validDates2.start,
9043
- phaseEnd2 = _validDates2.end;
9044
- return {
9045
- start: start,
9046
- end: end,
9047
- secondaryStart: phaseStart2,
9048
- secondaryEnd: phaseEnd2,
9049
- name: phaseName,
9050
- valuesToShow: item.valuesToShow,
9051
- id: phaseId,
9052
- type: "task",
9053
- progress: 100,
9054
- dependencies: dependencies,
9055
- styles: color ? {
9056
- backgroundColor: color,
9057
- progressColor: color,
9058
- backgroundSelectedColor: selectedColor,
9059
- progressSelectedColor: selectedColor
9060
- } : {},
9061
- icon: icon
9062
- };
9063
- };
9064
- return mapPhase(item);
9065
- };
9066
- var convertDetailToTimeline = function convertDetailToTimeline(item, mainGanttStartDate, mainGanttEndDate) {
9067
- var id = item.id,
9068
- name = item.name,
9069
- schedule = item.schedule;
9070
- var getDatesForTask = function getDatesForTask(item) {
9071
- var start = mainGanttStartDate != null ? mainGanttStartDate : "";
9072
- var end = mainGanttEndDate != null ? mainGanttEndDate : "";
9073
- for (var i = 0; i < item.schedule.length; i++) {
9074
- var lstart = item.schedule[i].startDate;
9075
- var lend = item.schedule[i].endDate;
9076
- if (!start || lstart.localeCompare(start) < 0) {
9077
- start = lstart;
9078
- }
9079
- if (!end || lend.localeCompare(end) > 0) {
9080
- end = lend;
9081
- }
9082
- }
9083
- return validDates(start, end);
9084
- };
9085
- var _getDatesForTask = getDatesForTask(item),
9086
- start = _getDatesForTask.start,
9087
- end = _getDatesForTask.end;
9088
- var convertToFrame = function convertToFrame(x) {
9089
- var startDate = x.startDate,
9090
- endDate = x.endDate,
9091
- color = x.color,
9092
- selectedColor = x.selectedColor,
9093
- icon = x.icon;
9094
- var _validDates3 = validDates(startDate, endDate),
9095
- start = _validDates3.start,
9096
- end = _validDates3.end;
9097
- return {
9098
- start: start,
9099
- end: end,
9100
- backgroundColor: color != null ? color : "0xffffff",
9101
- backgroundSelectedColor: selectedColor != null ? selectedColor : color,
9102
- icon: icon
9103
- };
9104
- };
9105
- var defaultColor = "#595959";
9106
- return {
9107
- id: id,
9108
- type: "timeline",
9109
- timeline: schedule.map(convertToFrame),
9110
- name: name,
9111
- valuesToShow: item.valuesToShow,
9112
- start: start,
9113
- end: end,
9114
- progress: 100,
9115
- styles: {
9116
- backgroundColor: defaultColor,
9117
- progressColor: defaultColor,
9118
- backgroundSelectedColor: defaultColor,
9119
- progressSelectedColor: defaultColor
9120
- }
9121
- };
9122
- };
9123
- var isDetail = function isDetail(row) {
9124
- return row && row.schedule && row.schedule.length !== 0;
9125
- };
9126
- var convertProjectToTasks = function convertProjectToTasks(item, mainGanttStartDate, mainGanttEndDate) {
9127
- if (!isDetail(item)) {
9128
- var _row$phases;
9129
- var row = item;
9130
- var _validDates4 = validDates(row.startDate, row.endDate),
9131
- start = _validDates4.start,
9132
- end = _validDates4.end;
9133
- var _validDates5 = validDates(row.secondaryStartDate, row.secondaryEndDate),
9134
- start2 = _validDates5.start,
9135
- end2 = _validDates5.end;
9136
- var mainTask = {
9137
- start: start,
9138
- end: end,
9139
- id: row.id,
9140
- name: row.name,
9141
- type: row.type,
9142
- valuesToShow: row.valuesToShow,
9143
- secondaryStart: start2,
9144
- secondaryEnd: end2,
9145
- progress: 100,
9146
- isDisabled: false,
9147
- hideChildren: false,
9148
- icon: row.icon
9149
- };
9150
- var children1 = ((_row$phases = row.phases) != null ? _row$phases : []).map(convertPhaseToTask);
9151
- return [mainTask].concat(children1);
9152
- } else {
9153
- var _row = item;
9154
- return [_extends({}, convertDetailToTimeline(_row, mainGanttStartDate, mainGanttEndDate))];
9155
- }
9156
- };
9157
- var mergeTaskIntoProjects = function mergeTaskIntoProjects(projects, _ref2) {
9158
- var id = _ref2.id,
9159
- start = _ref2.start,
9160
- end = _ref2.end;
9161
- return projects.map(function (project) {
9162
- return project.id === id ? withNewDates(project, start, end) : project;
9163
- });
9164
- };
9165
- var mergeTaskIntoPhases = function mergeTaskIntoPhases(phases, _ref3) {
9166
- var id = _ref3.id,
9167
- start = _ref3.start,
9168
- end = _ref3.end;
9169
- if (phases) {
9170
- return phases.map(function (phase) {
9171
- return phase.id === id ? withNewDates(phase, start, end) : phase;
9172
- });
9173
- }
9174
- return undefined;
9175
- };
9176
- var withNewDates = function withNewDates(p, start, end) {
9177
- var startDate = formatToIsoDate(start);
9178
- var endDate = formatToIsoDate(end);
9179
- var extra = {
9180
- startDate: startDate,
9181
- endDate: endDate
9182
- };
9183
- return _extends({}, p, extra);
9184
- };
9185
- var getProjectById = function getProjectById(id, items) {
9186
- for (var i = 0; i < items.length; i++) {
9187
- if (items[i].id === id) {
9188
- return items[i];
9189
- }
9190
- }
9191
- return undefined;
9192
- };
9193
- var getPhaseById = function getPhaseById(id, items) {
9194
- for (var i = 0; i < items.length; i++) {
9195
- if (isDetail(items[i])) {
9196
- continue;
9197
- }
9198
- var item = items[i];
9199
- if (!item.phases) {
9200
- continue;
9201
- }
9202
- for (var j = 0; j < item.phases.length; j++) if (item.phases[j].id === id) {
9203
- return item.phases[j];
9204
- }
9205
- }
9206
- return undefined;
9207
- };
9208
-
9209
8991
  var intlDTCache = {};
9210
8992
  var getCachedDateTimeFormat = function getCachedDateTimeFormat(locString, opts) {
9211
8993
  if (opts === void 0) {
@@ -9253,9 +9035,9 @@ var ganttDateRangeFromTask = function ganttDateRangeFromTask(tasks, viewMode, pr
9253
9035
  return ganttDateRangeGeneric(dates, viewMode, preStepsCount, showSecondaryDates);
9254
9036
  };
9255
9037
  var calculateDisplayedDateRange = function calculateDisplayedDateRange(mainGanttItems, timeUnit, mainGanttDoubleView, secondaryGanttItems, preStepsCount) {
9256
- var dates = ganttDateRangeFromGanttTask(mainGanttItems, toViewMode(timeUnit), preStepsCount != null ? preStepsCount : 1, mainGanttDoubleView);
9038
+ var dates = ganttDateRangeFromGanttTask(mainGanttItems, timeUnit, preStepsCount != null ? preStepsCount : 1, mainGanttDoubleView);
9257
9039
  if (secondaryGanttItems) {
9258
- var dates2 = ganttDateRangeFromDetail(secondaryGanttItems, toViewMode(timeUnit), preStepsCount != null ? preStepsCount : 1, mainGanttDoubleView);
9040
+ var dates2 = ganttDateRangeFromDetail(secondaryGanttItems, timeUnit, preStepsCount != null ? preStepsCount : 1, mainGanttDoubleView);
9259
9041
  if (dates2[0] < dates[0]) {
9260
9042
  dates[0] = dates2[0];
9261
9043
  }
@@ -9330,48 +9112,30 @@ var ganttDateRangeGeneric = function ganttDateRangeGeneric(dates, viewMode, preS
9330
9112
  return [newStartDate, newEndDate];
9331
9113
  }
9332
9114
  switch (viewMode) {
9333
- case ViewMode.Year:
9115
+ case "year":
9334
9116
  newStartDate = addToDate(newStartDate, -1, "year");
9335
9117
  newStartDate = startOfDate(newStartDate, "year");
9336
9118
  newEndDate = addToDate(newEndDate, 1, "year");
9337
9119
  newEndDate = startOfDate(newEndDate, "year");
9338
9120
  break;
9339
- case ViewMode.Month:
9121
+ case "month":
9340
9122
  newStartDate = addToDate(newStartDate, -1 * preStepsCount, "month");
9341
9123
  newStartDate = startOfDate(newStartDate, "month");
9342
9124
  newEndDate = addToDate(newEndDate, 1, "year");
9343
9125
  newEndDate = startOfDate(newEndDate, "year");
9344
9126
  break;
9345
- case ViewMode.Week:
9127
+ case "week":
9346
9128
  newStartDate = startOfDate(newStartDate, "day");
9347
9129
  newStartDate = addToDate(getMonday(newStartDate), -7 * preStepsCount, "day");
9348
9130
  newEndDate = startOfDate(newEndDate, "day");
9349
9131
  newEndDate = addToDate(newEndDate, 1.5, "month");
9350
9132
  break;
9351
- case ViewMode.Day:
9133
+ case "day":
9352
9134
  newStartDate = startOfDate(newStartDate, "day");
9353
9135
  newStartDate = addToDate(newStartDate, -1 * preStepsCount, "day");
9354
9136
  newEndDate = startOfDate(newEndDate, "day");
9355
9137
  newEndDate = addToDate(newEndDate, 19, "day");
9356
9138
  break;
9357
- case ViewMode.QuarterDay:
9358
- newStartDate = startOfDate(newStartDate, "day");
9359
- newStartDate = addToDate(newStartDate, -1 * preStepsCount, "day");
9360
- newEndDate = startOfDate(newEndDate, "day");
9361
- newEndDate = addToDate(newEndDate, 66, "hour");
9362
- break;
9363
- case ViewMode.HalfDay:
9364
- newStartDate = startOfDate(newStartDate, "day");
9365
- newStartDate = addToDate(newStartDate, -1 * preStepsCount, "day");
9366
- newEndDate = startOfDate(newEndDate, "day");
9367
- newEndDate = addToDate(newEndDate, 108, "hour");
9368
- break;
9369
- case ViewMode.Hour:
9370
- newStartDate = startOfDate(newStartDate, "hour");
9371
- newStartDate = addToDate(newStartDate, -1 * preStepsCount, "hour");
9372
- newEndDate = startOfDate(newEndDate, "day");
9373
- newEndDate = addToDate(newEndDate, 1, "day");
9374
- break;
9375
9139
  }
9376
9140
  return [newStartDate, newEndDate];
9377
9141
  };
@@ -9380,27 +9144,18 @@ var seedDates = function seedDates(startDate, endDate, viewMode) {
9380
9144
  var dates = [currentDate];
9381
9145
  while (currentDate < endDate) {
9382
9146
  switch (viewMode) {
9383
- case ViewMode.Year:
9147
+ case "year":
9384
9148
  currentDate = addToDate(currentDate, 1, "year");
9385
9149
  break;
9386
- case ViewMode.Month:
9150
+ case "month":
9387
9151
  currentDate = addToDate(currentDate, 1, "month");
9388
9152
  break;
9389
- case ViewMode.Week:
9153
+ case "week":
9390
9154
  currentDate = addToDate(currentDate, 7, "day");
9391
9155
  break;
9392
- case ViewMode.Day:
9156
+ case "day":
9393
9157
  currentDate = addToDate(currentDate, 1, "day");
9394
9158
  break;
9395
- case ViewMode.HalfDay:
9396
- currentDate = addToDate(currentDate, 12, "hour");
9397
- break;
9398
- case ViewMode.QuarterDay:
9399
- currentDate = addToDate(currentDate, 6, "hour");
9400
- break;
9401
- case ViewMode.Hour:
9402
- currentDate = addToDate(currentDate, 1, "hour");
9403
- break;
9404
9159
  }
9405
9160
  dates.push(currentDate);
9406
9161
  }
@@ -9702,6 +9457,15 @@ var VerticalScroll = function VerticalScroll(_ref) {
9702
9457
  rtl = _ref.rtl,
9703
9458
  onScroll = _ref.onScroll;
9704
9459
  var scrollRef = react.useRef(null);
9460
+ react.useEffect(function () {
9461
+ if (scrollRef.current) {
9462
+ var wrap = scrollRef.current;
9463
+ var setScrollTop = function setScrollTop() {
9464
+ wrap.scrollTop = scroll;
9465
+ };
9466
+ setTimeout(setScrollTop, 250);
9467
+ }
9468
+ }, []);
9705
9469
  react.useEffect(function () {
9706
9470
  if (scrollRef.current) {
9707
9471
  scrollRef.current.scrollTop = scroll;
@@ -9744,12 +9508,12 @@ var TaskList = function TaskList(_ref) {
9744
9508
  TaskListHeader = _ref.TaskListHeader,
9745
9509
  TaskListTable = _ref.TaskListTable,
9746
9510
  filter = _ref.filter;
9747
- var horizontalContainerRef = react.useRef(null);
9511
+ var horizontalContainerRef = react.createRef();
9748
9512
  react.useEffect(function () {
9749
9513
  if (horizontalContainerRef.current) {
9750
9514
  horizontalContainerRef.current.scrollTop = scrollY;
9751
9515
  }
9752
- }, [scrollY]);
9516
+ }, [horizontalContainerRef, scrollY]);
9753
9517
  var headerProps = {
9754
9518
  headerHeight: headerHeight,
9755
9519
  fontFamily: fontFamily,
@@ -9905,10 +9669,9 @@ var SinglePartOfCalendar = function SinglePartOfCalendar(_ref) {
9905
9669
  };
9906
9670
 
9907
9671
  var Calendar = function Calendar(_ref) {
9908
- var _dateTimeFormatters$y, _dateTimeFormatters$m, _dateTimeFormatters$m2, _dateTimeFormatters$w, _dateTimeFormatters$d, _dateTimeFormatters$h, _dateTimeFormatters$d2, _getters;
9672
+ var _dateTimeFormatters$y, _dateTimeFormatters$m, _dateTimeFormatters$m2, _dateTimeFormatters$w, _dateTimeFormatters$d;
9909
9673
  var dateSetup = _ref.dateSetup,
9910
9674
  locale = _ref.locale,
9911
- viewMode = _ref.viewMode,
9912
9675
  rtl = _ref.rtl,
9913
9676
  headerHeight = _ref.headerHeight,
9914
9677
  columnWidth = _ref.columnWidth,
@@ -9918,15 +9681,13 @@ var Calendar = function Calendar(_ref) {
9918
9681
  _ref$singleLineHeader = _ref.singleLineHeader,
9919
9682
  singleLineHeader = _ref$singleLineHeader === void 0 ? false : _ref$singleLineHeader,
9920
9683
  currentDateIndicator = _ref.currentDateIndicator;
9921
- var simplifiedHeader = singleLineHeader && dateSetup.viewMode !== ViewMode.Year;
9684
+ var simplifiedHeader = singleLineHeader && dateSetup.viewMode !== "year";
9922
9685
  var TopCal = simplifiedHeader ? SinglePartOfCalendar : TopPartOfCalendar;
9923
9686
  var formatYear = (_dateTimeFormatters$y = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.year) != null ? _dateTimeFormatters$y : defaultDateTimeFormatters.year;
9924
9687
  var formatMonth = (_dateTimeFormatters$m = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.month) != null ? _dateTimeFormatters$m : defaultDateTimeFormatters.month;
9925
9688
  var formatMonthAndYear = (_dateTimeFormatters$m2 = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.monthAndYear) != null ? _dateTimeFormatters$m2 : defaultDateTimeFormatters.monthAndYear;
9926
9689
  var formatWeek = (_dateTimeFormatters$w = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.week) != null ? _dateTimeFormatters$w : defaultDateTimeFormatters.week;
9927
9690
  var formatDay = (_dateTimeFormatters$d = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.day) != null ? _dateTimeFormatters$d : defaultDateTimeFormatters.day;
9928
- var formatHour = (_dateTimeFormatters$h = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.hour) != null ? _dateTimeFormatters$h : defaultDateTimeFormatters.hour;
9929
- var formatDayAndMonth = (_dateTimeFormatters$d2 = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.dayAndMonth) != null ? _dateTimeFormatters$d2 : defaultDateTimeFormatters.dayAndMonth;
9930
9691
  var getCalendarValuesForYear = function getCalendarValuesForYear() {
9931
9692
  var topValues = [];
9932
9693
  var bottomValues = [];
@@ -10061,70 +9822,12 @@ var Calendar = function Calendar(_ref) {
10061
9822
  }
10062
9823
  return [topValues, bottomValues];
10063
9824
  };
10064
- var getCalendarValuesForPartOfDay = function getCalendarValuesForPartOfDay() {
10065
- var topValues = [];
10066
- var bottomValues = [];
10067
- var ticks = viewMode === ViewMode.HalfDay ? 2 : 4;
10068
- var topDefaultHeight = headerHeight * 0.5;
10069
- var dates = dateSetup.dates;
10070
- for (var i = 0; i < dates.length; i++) {
10071
- var date = dates[i];
10072
- var bottomValue = formatHour(date, locale);
10073
- bottomValues.push(react.createElement("text", {
10074
- key: date.getTime(),
10075
- y: headerHeight * 0.8,
10076
- x: columnWidth * (i + +rtl),
10077
- className: styles$5.calendarBottomText,
10078
- fontFamily: fontFamily
10079
- }, bottomValue));
10080
- if (i === 0 || date.getDate() !== dates[i - 1].getDate()) {
10081
- var topValue = formatDayAndMonth(date, locale);
10082
- topValues.push(react.createElement(TopCal, {
10083
- key: date.toISOString(),
10084
- value: topValue,
10085
- x1Line: columnWidth * i + ticks * columnWidth,
10086
- y1Line: 0,
10087
- y2Line: topDefaultHeight,
10088
- xText: columnWidth * i + ticks * columnWidth * 0.5,
10089
- yText: topDefaultHeight * 0.9
10090
- }));
10091
- }
10092
- }
10093
- return [topValues, bottomValues];
9825
+ var getters = {
9826
+ year: getCalendarValuesForYear,
9827
+ month: getCalendarValuesForMonth,
9828
+ week: getCalendarValuesForWeek,
9829
+ day: getCalendarValuesForDay
10094
9830
  };
10095
- var getCalendarValuesForHour = function getCalendarValuesForHour() {
10096
- var topValues = [];
10097
- var bottomValues = [];
10098
- var topDefaultHeight = headerHeight * 0.5;
10099
- var dates = dateSetup.dates;
10100
- for (var i = 0; i < dates.length; i++) {
10101
- var date = dates[i];
10102
- var bottomValue = formatHour(date, locale);
10103
- bottomValues.push(react.createElement("text", {
10104
- key: date.getTime(),
10105
- y: headerHeight * 0.8,
10106
- x: columnWidth * (i + +rtl),
10107
- className: styles$5.calendarBottomText,
10108
- fontFamily: fontFamily
10109
- }, bottomValue));
10110
- if (i !== 0 && date.getDate() !== dates[i - 1].getDate()) {
10111
- var displayDate = dates[i - 1];
10112
- var topValue = formatDayAndMonth(date, locale);
10113
- var topPosition = (date.getHours() - 24) / 2;
10114
- topValues.push(react.createElement(TopCal, {
10115
- key: topValue + displayDate.getFullYear(),
10116
- value: topValue,
10117
- x1Line: columnWidth * i,
10118
- y1Line: 0,
10119
- y2Line: topDefaultHeight,
10120
- xText: columnWidth * (i + topPosition),
10121
- yText: topDefaultHeight * 0.9
10122
- }));
10123
- }
10124
- }
10125
- return [topValues, bottomValues];
10126
- };
10127
- var getters = (_getters = {}, _getters[ViewMode.Year] = getCalendarValuesForYear, _getters[ViewMode.Month] = getCalendarValuesForMonth, _getters[ViewMode.Week] = getCalendarValuesForWeek, _getters[ViewMode.Day] = getCalendarValuesForDay, _getters[ViewMode.QuarterDay] = getCalendarValuesForPartOfDay, _getters[ViewMode.HalfDay] = getCalendarValuesForPartOfDay, _getters[ViewMode.Hour] = getCalendarValuesForHour, _getters);
10128
9831
  var _getters$dateSetup$vi = getters[dateSetup.viewMode](),
10129
9832
  topValues = _getters$dateSetup$vi[0],
10130
9833
  bottomValues = _getters$dateSetup$vi[1];
@@ -10993,6 +10696,7 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
10993
10696
  showSecondaryDates = _ref$showSecondaryDat === void 0 ? false : _ref$showSecondaryDat,
10994
10697
  currentDateIndicator = _ref.currentDateIndicator,
10995
10698
  projection = _ref.projection,
10699
+ readOnly = _ref.readOnly,
10996
10700
  setGanttEvent = _ref.setGanttEvent,
10997
10701
  setFailedTask = _ref.setFailedTask,
10998
10702
  setSelectedTask = _ref.setSelectedTask,
@@ -11109,6 +10813,9 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
11109
10813
  }
11110
10814
  }, [ganttEvent, xStep, initEventX1Delta, onProgressChange, timeStep, onDateChange, svg, isMoving, point, rtl, setFailedTask, setGanttEvent]);
11111
10815
  var hasMovedHorizontally = function hasMovedHorizontally(event) {
10816
+ if (readOnly) {
10817
+ return false;
10818
+ }
11112
10819
  return initEventXClick !== (event === null || event === void 0 ? void 0 : event.clientX);
11113
10820
  };
11114
10821
  var handleBarEventStart = function handleBarEventStart(action, task, event) {
@@ -11160,8 +10867,8 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
11160
10867
  } else if (action === "dblclick") {
11161
10868
  !!onDoubleClick && onDoubleClick(task);
11162
10869
  } else if (action === "click") {
11163
- var skipClick = !hasMovedHorizontally(event);
11164
- skipClick && !!onClick && onClick(task);
10870
+ var skipClick = hasMovedHorizontally(event);
10871
+ !skipClick && !!onClick && onClick(task);
11165
10872
  } else if (action === "contextmenu") {
11166
10873
  event.preventDefault();
11167
10874
  !!onContextMenu && onContextMenu(event, task);
@@ -11231,9 +10938,9 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
11231
10938
  task: task,
11232
10939
  arrowIndent: arrowIndent,
11233
10940
  taskHeight: taskHeight,
11234
- isProgressChangeable: !!onProgressChange && !task.isDisabled,
11235
- isDateMovable: !!onDateChange && !task.isDisabled,
11236
- isDateResizable: !!onDateChange && !task.isDisabled && !forbidResize,
10941
+ isProgressChangeable: !readOnly && !!onProgressChange && !task.isDisabled,
10942
+ isDateMovable: !readOnly && !!onDateChange && !task.isDisabled,
10943
+ isDateResizable: !readOnly && !!onDateChange && !task.isDisabled && !forbidResize,
11237
10944
  isDelete: !task.isDisabled,
11238
10945
  onEventStart: handleBarEventStart,
11239
10946
  key: task.id,
@@ -11256,8 +10963,8 @@ var TaskGantt = function TaskGantt(_ref) {
11256
10963
  scrollY = _ref.scrollY,
11257
10964
  scrollX = _ref.scrollX;
11258
10965
  var ganttSVGRef = react.useRef(null);
11259
- var horizontalContainerRef = react.useRef(null);
11260
- var verticalGanttContainerRef = react.useRef(null);
10966
+ var horizontalContainerRef = react.createRef();
10967
+ var verticalGanttContainerRef = react.createRef();
11261
10968
  var newBarProps = _extends({}, barProps, {
11262
10969
  svg: ganttSVGRef
11263
10970
  });
@@ -11265,12 +10972,12 @@ var TaskGantt = function TaskGantt(_ref) {
11265
10972
  if (horizontalContainerRef.current) {
11266
10973
  horizontalContainerRef.current.scrollTop = scrollY;
11267
10974
  }
11268
- }, [scrollY]);
10975
+ }, [horizontalContainerRef, scrollY]);
11269
10976
  react.useEffect(function () {
11270
10977
  if (verticalGanttContainerRef.current) {
11271
10978
  verticalGanttContainerRef.current.scrollLeft = scrollX;
11272
10979
  }
11273
- }, [scrollX]);
10980
+ }, [scrollX, verticalGanttContainerRef]);
11274
10981
  return react.createElement("div", {
11275
10982
  className: styles$7.ganttContainer,
11276
10983
  ref: taskGanttRef
@@ -11311,6 +11018,15 @@ var HorizontalScroll = function HorizontalScroll(_ref) {
11311
11018
  rtl = _ref.rtl,
11312
11019
  onScroll = _ref.onScroll;
11313
11020
  var scrollRef = react.useRef(null);
11021
+ react.useEffect(function () {
11022
+ if (scrollRef.current) {
11023
+ var wrap = scrollRef.current;
11024
+ var setScrollLeft = function setScrollLeft() {
11025
+ wrap.scrollLeft = scroll;
11026
+ };
11027
+ setTimeout(setScrollLeft, 250);
11028
+ }
11029
+ }, []);
11314
11030
  react.useEffect(function () {
11315
11031
  if (scrollRef.current) {
11316
11032
  scrollRef.current.scrollLeft = scroll;
@@ -11324,6 +11040,7 @@ var HorizontalScroll = function HorizontalScroll(_ref) {
11324
11040
  } : undefined,
11325
11041
  className: styles$8.scrollWrapper,
11326
11042
  onScroll: onScroll,
11043
+ "data-scrollx": "true",
11327
11044
  ref: scrollRef
11328
11045
  }, react.createElement("div", {
11329
11046
  style: {
@@ -11347,8 +11064,6 @@ var Gantt = function Gantt(_ref) {
11347
11064
  filter = _ref.filter,
11348
11065
  _ref$ganttHeight = _ref.ganttHeight,
11349
11066
  ganttHeight = _ref$ganttHeight === void 0 ? 0 : _ref$ganttHeight,
11350
- _ref$viewMode = _ref.viewMode,
11351
- viewMode = _ref$viewMode === void 0 ? ViewMode.Day : _ref$viewMode,
11352
11067
  _ref$preStepsCount = _ref.preStepsCount,
11353
11068
  preStepsCount = _ref$preStepsCount === void 0 ? 1 : _ref$preStepsCount,
11354
11069
  _ref$locale = _ref.locale,
@@ -11412,6 +11127,12 @@ var Gantt = function Gantt(_ref) {
11412
11127
  projection = _ref.projection,
11413
11128
  displayedStartDate = _ref.displayedStartDate,
11414
11129
  displayedEndDate = _ref.displayedEndDate,
11130
+ _ref$initialScrollX = _ref.initialScrollX,
11131
+ initialScrollX = _ref$initialScrollX === void 0 ? -1 : _ref$initialScrollX,
11132
+ _ref$initialScrollY = _ref.initialScrollY,
11133
+ initialScrollY = _ref$initialScrollY === void 0 ? 0 : _ref$initialScrollY,
11134
+ _ref$readOnly = _ref.readOnly,
11135
+ readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
11415
11136
  onDateChange = _ref.onDateChange,
11416
11137
  onProgressChange = _ref.onProgressChange,
11417
11138
  onDoubleClick = _ref.onDoubleClick,
@@ -11419,7 +11140,11 @@ var Gantt = function Gantt(_ref) {
11419
11140
  onContextMenu = _ref.onContextMenu,
11420
11141
  onDelete = _ref.onDelete,
11421
11142
  onSelect = _ref.onSelect,
11422
- onExpanderClick = _ref.onExpanderClick;
11143
+ onExpanderClick = _ref.onExpanderClick,
11144
+ _ref$viewMode = _ref.viewMode,
11145
+ viewMode = _ref$viewMode === void 0 ? "month" : _ref$viewMode,
11146
+ onScrollX = _ref.onScrollX,
11147
+ onScrollY = _ref.onScrollY;
11423
11148
  var wrapperRef = react.useRef(null);
11424
11149
  var taskGanttRef = react.useRef(null);
11425
11150
  var taskListRef = react.useRef(null);
@@ -11471,12 +11196,12 @@ var Gantt = function Gantt(_ref) {
11471
11196
  setFailedTask = _useState5[1];
11472
11197
  var svgWidth = dateSetup.dates.length * columnWidth;
11473
11198
  var ganttFullHeight = barTasks.length * rowHeight;
11474
- var _useState6 = react.useState(0),
11475
- scrollY = _useState6[0],
11476
- setScrollY = _useState6[1];
11477
- var _useState7 = react.useState(-1),
11478
- scrollX = _useState7[0],
11479
- setScrollX = _useState7[1];
11199
+ var _useState6 = react.useState(initialScrollX),
11200
+ scrollX = _useState6[0],
11201
+ setScrollX = _useState6[1];
11202
+ var _useState7 = react.useState(initialScrollY),
11203
+ scrollY = _useState7[0],
11204
+ setScrollY = _useState7[1];
11480
11205
  var ignoreScrollEvent = react.useRef(false);
11481
11206
  var setIgnoreScrollEvent = function setIgnoreScrollEvent(value) {
11482
11207
  ignoreScrollEvent.current = value;
@@ -11491,9 +11216,12 @@ var Gantt = function Gantt(_ref) {
11491
11216
  window.addEventListener("gantt-sync-scroll-event", function (e) {
11492
11217
  if (e.detail.id !== id) {
11493
11218
  setScrollX(e.detail.scrollX);
11219
+ if (onScrollX) {
11220
+ onScrollX(e.detail.scrollX);
11221
+ }
11494
11222
  }
11495
11223
  });
11496
- }, [id]);
11224
+ }, [id, onScrollX]);
11497
11225
  react.useEffect(function () {
11498
11226
  var filteredTasks;
11499
11227
  if (onExpanderClick) {
@@ -11587,6 +11315,24 @@ var Gantt = function Gantt(_ref) {
11587
11315
  setTaskListWidth(taskListRef.current.offsetWidth);
11588
11316
  }
11589
11317
  }, [taskListRef, listCellWidth]);
11318
+ react.useEffect(function () {
11319
+ if (wrapperRef.current) {
11320
+ if (scrollX !== -1) {
11321
+ var wrap = wrapperRef.current;
11322
+ var setScrollLeft = function setScrollLeft() {
11323
+ wrap.scrollLeft = scrollX;
11324
+ };
11325
+ setTimeout(setScrollLeft, 125);
11326
+ }
11327
+ if (scrollY !== 0) {
11328
+ var _wrap = wrapperRef.current;
11329
+ var setScrollTop = function setScrollTop() {
11330
+ _wrap.scrollTop = scrollY;
11331
+ };
11332
+ setTimeout(setScrollTop, 125);
11333
+ }
11334
+ }
11335
+ }, []);
11590
11336
  react.useEffect(function () {
11591
11337
  if (wrapperRef.current) {
11592
11338
  setSvgContainerWidth(wrapperRef.current.offsetWidth - taskListWidth.current);
@@ -11634,9 +11380,16 @@ var Gantt = function Gantt(_ref) {
11634
11380
  };
11635
11381
  }, [wrapperRef, scrollY, scrollX, ganttHeight, svgWidth, rtl, ganttFullHeight]);
11636
11382
  var handleScrollY = function handleScrollY(event) {
11637
- if (scrollY !== event.currentTarget.scrollTop && !ignoreScrollEvent.current) {
11638
- setScrollY(event.currentTarget.scrollTop);
11639
- setIgnoreScrollEvent(true);
11383
+ if (scrollY !== event.currentTarget.scrollTop) {
11384
+ if (onScrollY) {
11385
+ onScrollY(event.currentTarget.scrollTop);
11386
+ }
11387
+ if (!ignoreScrollEvent.current) {
11388
+ setScrollY(event.currentTarget.scrollTop);
11389
+ setIgnoreScrollEvent(true);
11390
+ } else {
11391
+ setIgnoreScrollEvent(false);
11392
+ }
11640
11393
  } else {
11641
11394
  setIgnoreScrollEvent(false);
11642
11395
  }
@@ -11702,6 +11455,9 @@ var Gantt = function Gantt(_ref) {
11702
11455
  } else if (newScrollY > ganttFullHeight - ganttHeight) {
11703
11456
  newScrollY = ganttFullHeight - ganttHeight;
11704
11457
  }
11458
+ if (onScrollY) {
11459
+ onScrollY(event.currentTarget.scrollTop);
11460
+ }
11705
11461
  setScrollY(newScrollY);
11706
11462
  }
11707
11463
  setIgnoreScrollEvent(true);
@@ -11795,6 +11551,7 @@ var Gantt = function Gantt(_ref) {
11795
11551
  ganttHeight: ganttHeight,
11796
11552
  currentDateIndicator: currentDateIndicatorContent,
11797
11553
  projection: projectionContent,
11554
+ readOnly: readOnly,
11798
11555
  setGanttEvent: setGanttEvent,
11799
11556
  setFailedTask: setFailedTask,
11800
11557
  setSelectedTask: handleSelectedTask,
@@ -11825,7 +11582,7 @@ var Gantt = function Gantt(_ref) {
11825
11582
  TaskListTable: TaskListTable
11826
11583
  };
11827
11584
  return react.createElement("div", null, react.createElement("div", {
11828
- className: styles$7.wrapper,
11585
+ className: "" + styles$7.wrapper,
11829
11586
  onKeyDown: handleKeyDown,
11830
11587
  tabIndex: 0,
11831
11588
  ref: wrapperRef
@@ -11869,6 +11626,199 @@ var Gantt = function Gantt(_ref) {
11869
11626
  }));
11870
11627
  };
11871
11628
 
11629
+ var MAIN_GANTT_ID = "main";
11630
+ var SECONDARY_GANTT_ID = "secondary";
11631
+ var columnWidthForTimeUnit = function columnWidthForTimeUnit(timeUnit) {
11632
+ switch (timeUnit) {
11633
+ case "year":
11634
+ return 60 * 2;
11635
+ default:
11636
+ return 60;
11637
+ }
11638
+ };
11639
+ var convertPhaseToTask = function convertPhaseToTask(item) {
11640
+ var mapPhase = function mapPhase(_ref) {
11641
+ var phaseStart = _ref.startDate,
11642
+ phaseEnd = _ref.endDate,
11643
+ secondaryStartDate = _ref.secondaryStartDate,
11644
+ secondaryEndDate = _ref.secondaryEndDate,
11645
+ phaseName = _ref.name,
11646
+ phaseId = _ref.id,
11647
+ color = _ref.color,
11648
+ selectedColor = _ref.selectedColor,
11649
+ dependencies = _ref.dependencies,
11650
+ icon = _ref.icon;
11651
+ var _validDates = validDates(phaseStart, phaseEnd),
11652
+ start = _validDates.start,
11653
+ end = _validDates.end;
11654
+ var _validDates2 = validDates(secondaryStartDate, secondaryEndDate),
11655
+ phaseStart2 = _validDates2.start,
11656
+ phaseEnd2 = _validDates2.end;
11657
+ return {
11658
+ start: start,
11659
+ end: end,
11660
+ secondaryStart: phaseStart2,
11661
+ secondaryEnd: phaseEnd2,
11662
+ name: phaseName,
11663
+ valuesToShow: item.valuesToShow,
11664
+ id: phaseId,
11665
+ type: "task",
11666
+ progress: 100,
11667
+ dependencies: dependencies,
11668
+ styles: color ? {
11669
+ backgroundColor: color,
11670
+ progressColor: color,
11671
+ backgroundSelectedColor: selectedColor,
11672
+ progressSelectedColor: selectedColor
11673
+ } : {},
11674
+ icon: icon
11675
+ };
11676
+ };
11677
+ return mapPhase(item);
11678
+ };
11679
+ var convertDetailToTimeline = function convertDetailToTimeline(item, mainGanttStartDate, mainGanttEndDate) {
11680
+ var id = item.id,
11681
+ name = item.name,
11682
+ schedule = item.schedule;
11683
+ var getDatesForTask = function getDatesForTask(item) {
11684
+ var start = mainGanttStartDate != null ? mainGanttStartDate : "";
11685
+ var end = mainGanttEndDate != null ? mainGanttEndDate : "";
11686
+ for (var i = 0; i < item.schedule.length; i++) {
11687
+ var lstart = item.schedule[i].startDate;
11688
+ var lend = item.schedule[i].endDate;
11689
+ if (!start || lstart.localeCompare(start) < 0) {
11690
+ start = lstart;
11691
+ }
11692
+ if (!end || lend.localeCompare(end) > 0) {
11693
+ end = lend;
11694
+ }
11695
+ }
11696
+ return validDates(start, end);
11697
+ };
11698
+ var _getDatesForTask = getDatesForTask(item),
11699
+ start = _getDatesForTask.start,
11700
+ end = _getDatesForTask.end;
11701
+ var convertToFrame = function convertToFrame(x) {
11702
+ var startDate = x.startDate,
11703
+ endDate = x.endDate,
11704
+ color = x.color,
11705
+ selectedColor = x.selectedColor,
11706
+ icon = x.icon;
11707
+ var _validDates3 = validDates(startDate, endDate),
11708
+ start = _validDates3.start,
11709
+ end = _validDates3.end;
11710
+ return {
11711
+ start: start,
11712
+ end: end,
11713
+ backgroundColor: color != null ? color : "0xffffff",
11714
+ backgroundSelectedColor: selectedColor != null ? selectedColor : color,
11715
+ icon: icon
11716
+ };
11717
+ };
11718
+ var defaultColor = "#595959";
11719
+ return {
11720
+ id: id,
11721
+ type: "timeline",
11722
+ timeline: schedule.map(convertToFrame),
11723
+ name: name,
11724
+ valuesToShow: item.valuesToShow,
11725
+ start: start,
11726
+ end: end,
11727
+ progress: 100,
11728
+ styles: {
11729
+ backgroundColor: defaultColor,
11730
+ progressColor: defaultColor,
11731
+ backgroundSelectedColor: defaultColor,
11732
+ progressSelectedColor: defaultColor
11733
+ }
11734
+ };
11735
+ };
11736
+ var isDetail = function isDetail(row) {
11737
+ return row && row.schedule && row.schedule.length !== 0;
11738
+ };
11739
+ var convertProjectToTasks = function convertProjectToTasks(item, mainGanttStartDate, mainGanttEndDate) {
11740
+ if (!isDetail(item)) {
11741
+ var _row$phases;
11742
+ var row = item;
11743
+ var _validDates4 = validDates(row.startDate, row.endDate),
11744
+ start = _validDates4.start,
11745
+ end = _validDates4.end;
11746
+ var _validDates5 = validDates(row.secondaryStartDate, row.secondaryEndDate),
11747
+ start2 = _validDates5.start,
11748
+ end2 = _validDates5.end;
11749
+ var mainTask = {
11750
+ start: start,
11751
+ end: end,
11752
+ id: row.id,
11753
+ name: row.name,
11754
+ type: row.type,
11755
+ valuesToShow: row.valuesToShow,
11756
+ secondaryStart: start2,
11757
+ secondaryEnd: end2,
11758
+ progress: 100,
11759
+ isDisabled: false,
11760
+ hideChildren: false,
11761
+ icon: row.icon
11762
+ };
11763
+ var children1 = ((_row$phases = row.phases) != null ? _row$phases : []).map(convertPhaseToTask);
11764
+ return [mainTask].concat(children1);
11765
+ } else {
11766
+ var _row = item;
11767
+ return [_extends({}, convertDetailToTimeline(_row, mainGanttStartDate, mainGanttEndDate))];
11768
+ }
11769
+ };
11770
+ var mergeTaskIntoProjects = function mergeTaskIntoProjects(projects, _ref2) {
11771
+ var id = _ref2.id,
11772
+ start = _ref2.start,
11773
+ end = _ref2.end;
11774
+ return projects.map(function (project) {
11775
+ return project.id === id ? withNewDates(project, start, end) : project;
11776
+ });
11777
+ };
11778
+ var mergeTaskIntoPhases = function mergeTaskIntoPhases(phases, _ref3) {
11779
+ var id = _ref3.id,
11780
+ start = _ref3.start,
11781
+ end = _ref3.end;
11782
+ if (phases) {
11783
+ return phases.map(function (phase) {
11784
+ return phase.id === id ? withNewDates(phase, start, end) : phase;
11785
+ });
11786
+ }
11787
+ return undefined;
11788
+ };
11789
+ var withNewDates = function withNewDates(p, start, end) {
11790
+ var startDate = formatToIsoDate(start);
11791
+ var endDate = formatToIsoDate(end);
11792
+ var extra = {
11793
+ startDate: startDate,
11794
+ endDate: endDate
11795
+ };
11796
+ return _extends({}, p, extra);
11797
+ };
11798
+ var getProjectById = function getProjectById(id, items) {
11799
+ for (var i = 0; i < items.length; i++) {
11800
+ if (items[i].id === id) {
11801
+ return items[i];
11802
+ }
11803
+ }
11804
+ return undefined;
11805
+ };
11806
+ var getPhaseById = function getPhaseById(id, items) {
11807
+ for (var i = 0; i < items.length; i++) {
11808
+ if (isDetail(items[i])) {
11809
+ continue;
11810
+ }
11811
+ var item = items[i];
11812
+ if (!item.phases) {
11813
+ continue;
11814
+ }
11815
+ for (var j = 0; j < item.phases.length; j++) if (item.phases[j].id === id) {
11816
+ return item.phases[j];
11817
+ }
11818
+ }
11819
+ return undefined;
11820
+ };
11821
+
11872
11822
  var cachedFormats = {};
11873
11823
  var getOrBuildCachedFormat = function getOrBuildCachedFormat(locale, options) {
11874
11824
  var _cachedFormats$key;
@@ -12142,16 +12092,16 @@ var classes$2 = {"switcher":"_3P0WE","button":"_1oXbe","label":"_1R9mh"};
12142
12092
  var Switcher = function Switcher(_ref) {
12143
12093
  var onTimeUnitChange = _ref.onTimeUnitChange;
12144
12094
  var day = function day() {
12145
- return onTimeUnitChange(TimeUnit.DAY);
12095
+ return onTimeUnitChange("day");
12146
12096
  };
12147
12097
  var week = function week() {
12148
- return onTimeUnitChange(TimeUnit.WEEK);
12098
+ return onTimeUnitChange("week");
12149
12099
  };
12150
12100
  var month = function month() {
12151
- return onTimeUnitChange(TimeUnit.MONTH);
12101
+ return onTimeUnitChange("month");
12152
12102
  };
12153
12103
  var year = function year() {
12154
- return onTimeUnitChange(TimeUnit.YEAR);
12104
+ return onTimeUnitChange("year");
12155
12105
  };
12156
12106
  return react.createElement("div", {
12157
12107
  className: classes$2.switcher
@@ -12184,7 +12134,7 @@ var Switcher = function Switcher(_ref) {
12184
12134
 
12185
12135
  var Planner = function Planner(props) {
12186
12136
  var _props$secondaryGantt, _props$mainGantt$show, _props$mainGantt$task, _props$mainGantt$task2, _props$mainGantt$tool, _props$secondaryGantt3, _props$secondaryGantt4, _props$secondaryGantt5, _props$secondaryGantt6;
12187
- var _useState = react.useState(TimeUnit.MONTH),
12137
+ var _useState = react.useState(props.viewMode),
12188
12138
  timeUnit = _useState[0],
12189
12139
  setTimeUnit = _useState[1];
12190
12140
  var currentTasks = react.useRef(props.mainGantt.items);
@@ -12297,6 +12247,17 @@ var Planner = function Planner(props) {
12297
12247
  }
12298
12248
  }
12299
12249
  onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(row);
12250
+ var getScrollX = function getScrollX() {
12251
+ if (wrapperRef.current) {
12252
+ var _wrapperRef$current$q;
12253
+ var x = (_wrapperRef$current$q = wrapperRef.current.querySelector('[data-scrollx="true"]')) === null || _wrapperRef$current$q === void 0 ? void 0 : _wrapperRef$current$q.scrollLeft;
12254
+ if (x !== undefined) {
12255
+ var _props$onScrollX;
12256
+ (_props$onScrollX = props.onScrollX) === null || _props$onScrollX === void 0 ? void 0 : _props$onScrollX.call(props, x);
12257
+ }
12258
+ }
12259
+ };
12260
+ setTimeout(getScrollX, 500);
12300
12261
  };
12301
12262
  react.useEffect(function () {
12302
12263
  var _props$secondaryGantt2;
@@ -12327,8 +12288,13 @@ var Planner = function Planner(props) {
12327
12288
  }
12328
12289
  }
12329
12290
  console.log("PLANNER render");
12330
- return react.createElement("div", null, react.createElement(Switcher, {
12291
+ var wrapperRef = react.useRef(null);
12292
+ return react.createElement("div", {
12293
+ ref: wrapperRef
12294
+ }, react.createElement(Switcher, {
12331
12295
  onTimeUnitChange: function onTimeUnitChange(timeUnit) {
12296
+ var _props$onSetViewMode;
12297
+ (_props$onSetViewMode = props.onSetViewMode) === null || _props$onSetViewMode === void 0 ? void 0 : _props$onSetViewMode.call(props, timeUnit);
12332
12298
  setTimeUnit(timeUnit);
12333
12299
  setViewDate(undefined);
12334
12300
  }
@@ -12350,7 +12316,7 @@ var Planner = function Planner(props) {
12350
12316
  viewDate: viewDate,
12351
12317
  tasks: tasks,
12352
12318
  columnWidth: columnWidthForTimeUnit(timeUnit),
12353
- viewMode: toViewMode(timeUnit)
12319
+ viewMode: timeUnit
12354
12320
  }, props.mainGantt.stylingOptions, {
12355
12321
  TaskListHeader: (_props$mainGantt$task = props.mainGantt.taskListHeaderProject) != null ? _props$mainGantt$task : CustomTaskListHeaderHOC(props.mainGantt.title, mainGanttDoubleView != null ? mainGanttDoubleView : false, handleSetDoubleView),
12356
12322
  TaskListTable: (_props$mainGantt$task2 = props.mainGantt.taskListTableProject) != null ? _props$mainGantt$task2 : CustomTaskListTableHOC(function (id) {
@@ -12393,7 +12359,12 @@ var Planner = function Planner(props) {
12393
12359
  return handleDateChange(task, currentTasks.current, props.mainGantt.onDateChange);
12394
12360
  },
12395
12361
  locale: locale,
12396
- dateTimeFormatters: ganttDateTimeFormatters
12362
+ dateTimeFormatters: ganttDateTimeFormatters,
12363
+ initialScrollX: props.mainGantt.initialScrollX,
12364
+ initialScrollY: props.mainGantt.initialScrollY,
12365
+ readOnly: props.mainGantt.readOnly,
12366
+ onScrollX: props.onScrollX,
12367
+ onScrollY: props.mainGantt.onScrollY
12397
12368
  })), props.secondaryGantt && react.createElement(Gantt, Object.assign({
12398
12369
  id: SECONDARY_GANTT_ID,
12399
12370
  key: SECONDARY_GANTT_ID,
@@ -12407,7 +12378,7 @@ var Planner = function Planner(props) {
12407
12378
  viewDate: viewDate,
12408
12379
  tasks: details,
12409
12380
  columnWidth: columnWidthForTimeUnit(timeUnit),
12410
- viewMode: toViewMode(timeUnit)
12381
+ viewMode: timeUnit
12411
12382
  }, props.mainGantt.stylingOptions, {
12412
12383
  TaskListHeader: (_props$secondaryGantt3 = props.secondaryGantt.taskListHeaderProject) != null ? _props$secondaryGantt3 : CustomTaskListHeaderHOC(props.secondaryGantt.title),
12413
12384
  TaskListTable: (_props$secondaryGantt4 = (_props$secondaryGantt5 = props.secondaryGantt) === null || _props$secondaryGantt5 === void 0 ? void 0 : _props$secondaryGantt5.taskListTableProject) != null ? _props$secondaryGantt4 : CustomTaskListTableHOC(function (id) {
@@ -12443,576 +12414,747 @@ var Planner = function Planner(props) {
12443
12414
  return handleDateChange(task, currentDetails.current, (_props$secondaryGantt7 = props.secondaryGantt) === null || _props$secondaryGantt7 === void 0 ? void 0 : _props$secondaryGantt7.onDateChange);
12444
12415
  },
12445
12416
  locale: locale,
12446
- dateTimeFormatters: ganttDateTimeFormatters
12417
+ dateTimeFormatters: ganttDateTimeFormatters,
12418
+ initialScrollX: props.secondaryGantt.initialScrollX,
12419
+ initialScrollY: props.secondaryGantt.initialScrollY,
12420
+ readOnly: props.secondaryGantt.readOnly,
12421
+ onScrollY: props.secondaryGantt.onScrollY
12447
12422
  }))));
12448
12423
  };
12449
12424
 
12450
- const kupManager = kupManagerInstance();
12451
- function sanitizeAllDates(startDateCell, endDateCell, secStartDateCell, secEndDateCell) {
12452
- const sanitizedDateValues = sanitizeDates(startDateCell, endDateCell);
12453
- let sanitizedSecDateValues = [];
12454
- if (secStartDateCell && secEndDateCell) {
12455
- if (isAtLeastOneDateValid(secStartDateCell, secEndDateCell)) {
12456
- sanitizedSecDateValues = sanitizeDates(secStartDateCell, secEndDateCell);
12457
- }
12458
- else {
12459
- sanitizedSecDateValues = [...sanitizedDateValues];
12460
- }
12461
- }
12462
- return {
12463
- dateValues: sanitizedDateValues,
12464
- secDateValues: sanitizedSecDateValues,
12465
- };
12466
- }
12467
- function sanitizeDates(startDateCell, endDateCell) {
12468
- let returnValues = [startDateCell.value, endDateCell.value];
12469
- if (isDateValid(startDateCell) && isDateValid(endDateCell)) {
12470
- return returnValues;
12471
- }
12472
- else if (isDateValid(startDateCell)) {
12473
- return [startDateCell.value, startDateCell.value];
12474
- }
12475
- else if (isDateValid(endDateCell)) {
12476
- return [endDateCell.value, endDateCell.value];
12477
- }
12478
- else {
12479
- return returnValues;
12480
- }
12481
- }
12482
- function isDateValid(dateCell) {
12483
- return (kupManager.objects.isDate(dateCell.obj) &&
12484
- kupManager.dates.isValid(dateCell.value, KupDatesFormats.ISO_DATE));
12485
- }
12486
- function isAtLeastOneDateValid(startDateCell, endDateCell) {
12487
- return isDateValid(startDateCell) || isDateValid(endDateCell);
12488
- }
12489
- function getValuesToShow(row, idCol, nameCol, dataColumns, columns, customToValuesFunction) {
12490
- let toValuesFunction = () => columns.map((col) => {
12491
- return getCellValueForDisplay(dataColumns.find((kCol) => kCol.name == col), row.cells[col]);
12492
- });
12493
- if (customToValuesFunction) {
12494
- toValuesFunction = customToValuesFunction;
12495
- }
12496
- const valuesToShow = (columns === null || columns === void 0 ? void 0 : columns.length) >= 2
12497
- ? toValuesFunction()
12498
- : [row.cells[idCol].value, row.cells[nameCol].value];
12499
- return valuesToShow;
12425
+ const kupManager = kupManagerInstance();
12426
+ function sanitizeAllDates(startDateCell, endDateCell, secStartDateCell, secEndDateCell) {
12427
+ const sanitizedDateValues = sanitizeDates(startDateCell, endDateCell);
12428
+ let sanitizedSecDateValues = [];
12429
+ if (secStartDateCell && secEndDateCell) {
12430
+ if (isAtLeastOneDateValid(secStartDateCell, secEndDateCell)) {
12431
+ sanitizedSecDateValues = sanitizeDates(secStartDateCell, secEndDateCell);
12432
+ }
12433
+ else {
12434
+ sanitizedSecDateValues = [...sanitizedDateValues];
12435
+ }
12436
+ }
12437
+ return {
12438
+ dateValues: sanitizedDateValues,
12439
+ secDateValues: sanitizedSecDateValues,
12440
+ };
12441
+ }
12442
+ function sanitizeDates(startDateCell, endDateCell) {
12443
+ let returnValues = [startDateCell.value, endDateCell.value];
12444
+ if (isDateValid(startDateCell) && isDateValid(endDateCell)) {
12445
+ return returnValues;
12446
+ }
12447
+ else if (isDateValid(startDateCell)) {
12448
+ return [startDateCell.value, startDateCell.value];
12449
+ }
12450
+ else if (isDateValid(endDateCell)) {
12451
+ return [endDateCell.value, endDateCell.value];
12452
+ }
12453
+ else {
12454
+ return returnValues;
12455
+ }
12456
+ }
12457
+ function isDateValid(dateCell) {
12458
+ return (kupManager.objects.isDate(dateCell.obj) &&
12459
+ kupManager.dates.isValid(dateCell.value, KupDatesFormats.ISO_DATE));
12460
+ }
12461
+ function isAtLeastOneDateValid(startDateCell, endDateCell) {
12462
+ return isDateValid(startDateCell) || isDateValid(endDateCell);
12463
+ }
12464
+ function getValuesToShow(row, idCol, nameCol, dataColumns, columns, customToValuesFunction) {
12465
+ let toValuesFunction = () => columns.map((col) => {
12466
+ return getCellValueForDisplay(dataColumns.find((kCol) => kCol.name == col), row.cells[col]);
12467
+ });
12468
+ if (customToValuesFunction) {
12469
+ toValuesFunction = customToValuesFunction;
12470
+ }
12471
+ const valuesToShow = (columns === null || columns === void 0 ? void 0 : columns.length) >= 2
12472
+ ? toValuesFunction()
12473
+ : [row.cells[idCol].value, row.cells[nameCol].value];
12474
+ return valuesToShow;
12475
+ }
12476
+
12477
+ class KupPlannerState {
12478
+ constructor() {
12479
+ this.showSecondaryDates = false;
12480
+ this.detailFilter = "";
12481
+ this.detailInitialScrollX = 0;
12482
+ this.detailInitialScrollY = 0;
12483
+ this.taskFilter = "";
12484
+ this.taskInitialScrollX = 0;
12485
+ this.taskInitialScrollY = 0;
12486
+ this.viewMode = "day";
12487
+ }
12488
+ toDebugString() {
12489
+ // TODO
12490
+ return 'dt state';
12491
+ }
12500
12492
  }
12501
12493
 
12502
12494
  const kupPlannerCss = "._3_ygE{display:table;border-bottom:#e6e4e4 1px solid;border-top:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}._1nBOt{display:table-row;list-style:none}._2eZzQ{border-right:1px solid rgb(196, 196, 196);opacity:1;margin-left:-2px}._WuQ0f{display:table-cell;vertical-align:-webkit-baseline-middle;vertical-align:middle}._3ZbQT{display:table;border-bottom:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}._34SS0{display:table-row;text-overflow:ellipsis}._34SS0:nth-of-type(even){}._3lLk3{display:table-cell;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._nI1Xw{display:flex}._2QjE6{color:rgb(86 86 86);font-size:0.6rem;padding:0.15rem 0.2rem 0 0.2rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}._2TfEi{font-size:0.6rem;padding-left:1rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}._3T42e{background:#fff;padding:12px;box-shadow:0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23)}._29NTg{font-size:12px;margin-bottom:6px;color:#666}._25P-K{position:absolute;display:flex;flex-shrink:0;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}._3gVAq{visibility:hidden;position:absolute;display:flex;pointer-events:none}._1eT-t{overflow:hidden auto;width:1rem;flex-shrink:0;scrollbar-width:thin}._1eT-t::-webkit-scrollbar{width:1.1rem;height:1.1rem}._1eT-t::-webkit-scrollbar-corner{background:transparent}._1eT-t::-webkit-scrollbar-thumb{border:6px solid transparent;background:rgba(0, 0, 0, 0.2);background:var(--palette-black-alpha-20, rgba(0, 0, 0, 0.2));border-radius:10px;background-clip:padding-box}._1eT-t::-webkit-scrollbar-thumb:hover{border:4px solid transparent;background:rgba(0, 0, 0, 0.3);background:var(--palette-black-alpha-30, rgba(0, 0, 0, 0.3));background-clip:padding-box}._EvhC1{border-radius:8px;background:#efefef;margin:12px;padding:12px}._2dZTy{fill:#fff}._2dZTy:nth-child(even){}._3rUKi{stroke:transparent}._RuwuK{stroke:#e6e4e4}._9w8d5{text-anchor:middle;fill:#333;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._1rLuZ{stroke:#e6e4e4}._2q1Kt{text-anchor:middle;fill:#555;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._35nLX{fill:#ffffff;stroke:#e0e0e0;stroke-width:1.4}._KxSXS{cursor:pointer;outline:none}._KxSXS:hover ._3w_5u{visibility:visible;opacity:1}._3w_5u{fill:#ddd;cursor:ew-resize;opacity:0;visibility:hidden}._31ERP{-webkit-user-select:none;-moz-user-select:none;user-select:none;stroke-width:0}._3zRJQ{fill:#fff;text-anchor:middle;font-weight:lighter;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._3KcaM{fill:#555;text-anchor:start;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._11iN9{background:#efefef;border-radius:8px;margin:12px;overflow:hidden;padding:12px}._CZjuD{overflow:hidden;font-size:0;margin:0;padding:0}._2B2zv{margin:0;padding:0;overflow:hidden}._3eULf{display:flex;padding:0;margin:0;list-style:none;outline:none;position:relative}._2k9Ys{overflow:auto;max-width:100%;scrollbar-width:thin;height:1.2rem}._2k9Ys::-webkit-scrollbar{width:1.1rem;height:1.1rem}._2k9Ys::-webkit-scrollbar-corner{background:transparent}._2k9Ys::-webkit-scrollbar-thumb{border:6px solid transparent;background:rgba(0, 0, 0, 0.2);background:var(--palette-black-alpha-20, rgba(0, 0, 0, 0.2));border-radius:10px;background-clip:padding-box}._2k9Ys::-webkit-scrollbar-thumb:hover{border:4px solid transparent;background:rgba(0, 0, 0, 0.3);background:var(--palette-black-alpha-30, rgba(0, 0, 0, 0.3));background-clip:padding-box}._19jgW{height:1px}._37E9D{display:flex;justify-content:space-around;max-width:330px;place-items:\"center\";text-align:center;align-items:center}._WrYI6{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._c53zr{max-width:-moz-max-content;max-width:max-content;padding:0 4px;text-align:right}._2eBO5{position:relative;display:inline-block;width:30px;height:17px}._hiyro{opacity:0;width:0;height:0}._hiyro:checked+._2HI58{background-color:#003b77}._hiyro:checked+._2HI58:before{transform:translateX(13px)}._hiyro:focus+._2HI58{box-shadow:0 0 1px #003b77}._2HI58{-webkit-transition:0.4s;cursor:pointer;background-color:#ccc;bottom:0;border-radius:17px;left:0;position:absolute;right:0;top:0;transition:0.4s}._2HI58:before{-webkit-transition:0.1s;background-color:white;border-radius:50%;bottom:2px;content:\"\";height:13px;left:2px;position:absolute;transition:0.1s;width:13px}._2gSdA{font-size:12px;padding:6px}._2cfRI{font-size:12px}._lEI6r{padding:0 10px;margin-right:10px}._RU6Aa{background:var(--kup-background-color, #ffffff);border:1px solid var(--kup-border-color, #acacac);border-radius:4px;box-sizing:border-box;color:var(--kup-text-color, #595959);cursor:pointer;display:grid;font-weight:400;grid-template-columns:var(--grid-project-columns, 1fr 1fr 1fr);place-items:center}._RU6Aa>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}._RU6Aa ._30j6y{font-weight:700;width:100%;text-align:center}._T0HQN{cursor:pointer;display:grid;border-width:1px;border-style:solid;border-color:#acacac;border-bottom-left-radius:4px;border-bottom-right-radius:4px;box-sizing:border-box;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background:#ffffff;color:#595959;font-weight:400}._T0HQN>*{font-size:12px;line-height:14px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}._T0HQN:has(+._T0HQN),._RU6Aa:has(+._T0HQN){border-bottom-left-radius:0;border-bottom-right-radius:0}._yp2DW{cursor:pointer;display:grid;border-width:1px;border-style:solid;border-color:#cbcbcb;border-radius:4px;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background:#fff;color:#595959;font-weight:400;box-sizing:border-box}._yp2DW>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}._yp2DW ._30j6y{font-weight:700;width:100%;text-align:center}._3P0WE{display:grid;grid-auto-flow:column;grid-gap:8px;margin-left:12px;width:-moz-max-content;width:max-content}._1oXbe{background:transparent;border-color:var(--kup-primary-color, #003b77);border-radius:4px;border-width:1px;box-shadow:0 3px 1px -2px rgba(var(--kup-text-color-rgb, 51 51 51), 0.2), 0 2px 2px 0 rgba(var(--kup-text-color-rgb, 51 51 51), 0.14), 0 1px 5px 0 rgba(var(--kup-text-color-rgb, 51 51 51), 0.12);box-sizing:border-box;color:var(--kup-primary-color, #003b77);cursor:pointer;font-size:11px;height:32px;min-width:64px}._1R9mh{font-family:var(--kup-font-family, inherit);font-size:11px;letter-spacing:0.0892857143em;text-decoration:none;text-transform:uppercase;padding:0 6px}:host{display:block}.filter{margin:12px 10px 12px 0;padding:0 10px}";
12503
12495
 
12504
- var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12505
- if (kind === "m")
12506
- throw new TypeError("Private method is not writable");
12507
- if (kind === "a" && !f)
12508
- throw new TypeError("Private accessor was defined without a setter");
12509
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
12510
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
12511
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12512
- };
12513
- var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12514
- if (kind === "a" && !f)
12515
- throw new TypeError("Private accessor was defined without a getter");
12516
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
12517
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
12518
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12519
- };
12520
- var _KupPlanner_instances, _KupPlanner_kupManager, _KupPlanner_lastOnChangeReceived, _KupPlanner_rootPlanner, _KupPlanner_phases, _KupPlanner_showSecondaryDatesLocal, _KupPlanner_renderReactPlannerElement, _KupPlanner_toTasks, _KupPlanner_toDetails, _KupPlanner_getTask, _KupPlanner_removePhases, _KupPlanner_handleOnClickOnTask, _KupPlanner_handleOnClickOnPhase, _KupPlanner_handleOnClickOnDetail, _KupPlanner_handleOnContextMenuOnTask, _KupPlanner_handleOnContextMenuOnPhase, _KupPlanner_handleOnContextMenuOnDetail, _KupPlanner_emitOnChangeEventsReceived, _KupPlanner_onFilter, _KupPlanner_getIconUrl, _KupPlanner_getIconColor;
12521
- const KupPlanner = class {
12522
- constructor(hostRef) {
12523
- registerInstance(this, hostRef);
12524
- this.kupClick = createEvent(this, "kup-planner-click", 6);
12525
- this.kupDateChange = createEvent(this, "kup-planner-datechange", 6);
12526
- this.kupReady = createEvent(this, "kup-planner-ready", 6);
12527
- this.kupContextMenu = createEvent(this, "kup-planner-contextmenu", 6);
12528
- _KupPlanner_instances.add(this);
12529
- /*-------------------------------------------------*/
12530
- /* I n t e r n a l V a r i a b l e s */
12531
- /*-------------------------------------------------*/
12532
- _KupPlanner_kupManager.set(this, kupManagerInstance());
12533
- _KupPlanner_lastOnChangeReceived.set(this, void 0);
12534
- _KupPlanner_rootPlanner.set(this, void 0);
12535
- _KupPlanner_phases.set(this, {});
12536
- // no re-render
12537
- _KupPlanner_showSecondaryDatesLocal.set(this, false);
12538
- this.customStyle = '';
12539
- this.data = undefined;
12540
- this.detailData = undefined;
12541
- this.detailColorCol = undefined;
12542
- this.detailColumns = undefined;
12543
- this.detailDates = undefined;
12544
- this.detailHeight = undefined;
12545
- this.detailIconCol = undefined;
12546
- this.detailIdCol = undefined;
12547
- this.detailNameCol = undefined;
12548
- this.detailPrevDates = undefined;
12549
- this.listCellWidth = '300px';
12550
- this.maxWidth = '90vw';
12551
- this.phaseColorCol = undefined;
12552
- this.phaseColumns = undefined;
12553
- this.phaseColParDep = undefined;
12554
- this.phaseDates = undefined;
12555
- this.phaseIconCol = undefined;
12556
- this.phaseIdCol = undefined;
12557
- this.phaseNameCol = undefined;
12558
- this.phasePrevDates = undefined;
12559
- this.showSecondaryDates = false;
12560
- this.taskColumns = undefined;
12561
- this.taskDates = undefined;
12562
- this.taskHeight = undefined;
12563
- this.taskIconCol = undefined;
12564
- this.taskIdCol = undefined;
12565
- this.taskNameCol = undefined;
12566
- this.taskPrevDates = undefined;
12567
- this.titleMess = undefined;
12568
- this.plannerProps = undefined;
12569
- }
12570
- dataChanged() {
12571
- __classPrivateFieldSet(this, _KupPlanner_phases, {}, "f");
12572
- }
12573
- showSecondaryDatesChanged() {
12574
- var _a;
12575
- __classPrivateFieldSet(this, _KupPlanner_showSecondaryDatesLocal, this.showSecondaryDates, "f");
12576
- if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
12577
- this.plannerProps.mainGantt.showSecondaryDates =
12578
- this.showSecondaryDates;
12579
- }
12580
- }
12581
- /*-------------------------------------------------*/
12582
- /* P u b l i c M e t h o d s */
12583
- /*-------------------------------------------------*/
12584
- /**
12585
- * Used to retrieve component's props values.
12586
- * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
12587
- * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
12588
- */
12589
- async getProps(descriptions) {
12590
- return getProps(this, KupPlannerProps, descriptions);
12591
- }
12592
- /**
12593
- * This method is used to trigger a new render of the component.
12594
- */
12595
- async refresh() {
12596
- forceUpdate(this);
12597
- }
12598
- /**
12599
- * Sets the props to the component.
12600
- * @param {GenericObject} props - Object containing props that will be set to the component.
12601
- */
12602
- async setProps(props) {
12603
- setProps(this, KupPlannerProps, props);
12604
- }
12605
- /**
12606
- * Add a list of phases to the project
12607
- * @param taskId
12608
- * @param data - Matrix which contains project phases
12609
- */
12610
- async addPhases(taskId, data) {
12611
- var _a;
12612
- const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
12613
- if (task) {
12614
- __classPrivateFieldGet(this, _KupPlanner_phases, "f")[taskId] = data;
12615
- task.phases = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.filter((row) => isAtLeastOneDateValid(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]])).map((row) => {
12616
- const datesSanitized = sanitizeAllDates(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]], row.cells[this.phasePrevDates[0]], row.cells[this.phasePrevDates[1]]);
12617
- const valuesToShow = getValuesToShow(row, this.phaseIdCol, this.phaseNameCol, data.columns, this.phaseColumns, () => this.phaseColumns.map((col) => col == this.phaseDates[0]
12618
- ? '#START#'
12619
- : col == this.phaseDates[1]
12620
- ? '#END#'
12621
- : getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
12622
- let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.phaseIconCol);
12623
- let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.phaseIconCol);
12624
- let phase = {
12625
- taskRow: task.taskRow,
12626
- phaseRow: row,
12627
- id: task.id + '_' + row.cells[this.phaseIdCol].value,
12628
- phaseRowId: row.id,
12629
- taskRowId: task.taskRowId,
12630
- name: row.cells[this.phaseNameCol].value,
12631
- startDate: datesSanitized.dateValues[0],
12632
- endDate: datesSanitized.dateValues[1],
12633
- secondaryStartDate: datesSanitized.secDateValues[0],
12634
- secondaryEndDate: datesSanitized.secDateValues[1],
12635
- type: 'task',
12636
- color: row.cells[this.phaseColorCol].value,
12637
- selectedColor: row.cells[this.phaseColorCol].value,
12638
- valuesToShow: valuesToShow,
12639
- rowType: KupPlannerGanttRowType.PHASE,
12640
- icon: iconUrl
12641
- ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
12642
- : undefined,
12643
- };
12644
- return phase;
12645
- });
12646
- }
12647
- this.plannerProps = Object.assign({}, this.plannerProps);
12648
- }
12649
- //---- Lifecycle hooks ----
12650
- componentWillLoad() {
12651
- __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, false);
12652
- __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.register(this);
12653
- }
12654
- componentDidLoad() {
12655
- __classPrivateFieldSet(this, _KupPlanner_showSecondaryDatesLocal, this.showSecondaryDates, "f");
12656
- let details = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, this.detailData);
12657
- if (details && details.length == 0) {
12658
- details = undefined;
12659
- }
12660
- const mainFilter = this.rootElement.shadowRoot.querySelector('#main-filter');
12661
- FTextFieldMDC(mainFilter);
12662
- const secondaryFilter = this.rootElement.shadowRoot.querySelector('#secondary-filter');
12663
- if (details) {
12664
- FTextFieldMDC(secondaryFilter);
12665
- }
12666
- this.plannerProps = {
12667
- mainGantt: {
12668
- title: this.titleMess,
12669
- items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, this.data),
12670
- stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
12671
- filter: mainFilter,
12672
- hideLabel: true,
12673
- ganttHeight: this.taskHeight,
12674
- showSecondaryDates: __classPrivateFieldGet(this, _KupPlanner_showSecondaryDatesLocal, "f"),
12675
- onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
12676
- onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
12677
- onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
12678
- },
12679
- secondaryGantt: details
12680
- ? {
12681
- title: '',
12682
- items: details,
12683
- stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
12684
- filter: secondaryFilter,
12685
- hideLabel: true,
12686
- ganttHeight: this.detailHeight,
12687
- onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
12688
- onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
12689
- onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
12690
- }
12691
- : undefined,
12692
- onSetDoubleView: (checked) => this.handleOnSetDoubleView(checked),
12693
- };
12694
- __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
12695
- this.kupReady.emit({
12696
- comp: this,
12697
- id: this.rootElement.id,
12698
- value: undefined,
12699
- });
12700
- __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, true);
12701
- }
12702
- componentWillRender() {
12703
- __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
12704
- }
12705
- componentDidRender() {
12706
- __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logRender(this, true);
12707
- }
12708
- onKupClick(event, taskAction) {
12709
- this.kupClick.emit({
12710
- comp: this,
12711
- id: this.rootElement.id,
12712
- value: event,
12713
- taskAction: taskAction,
12714
- });
12715
- }
12716
- onKupContextMenu(event, ganttRow, taskAction) {
12717
- let row;
12718
- let cell;
12719
- let column;
12720
- switch (ganttRow.type) {
12721
- case 'project': {
12722
- row = ganttRow.taskRow;
12723
- cell = row.cells[this.taskIdCol];
12724
- column = this.data.columns[this.taskIdCol];
12725
- break;
12726
- }
12727
- case 'task': {
12728
- row = ganttRow.phaseRow;
12729
- cell = row.cells[this.phaseIdCol];
12730
- //column = this.data.columns[this.taskIdCol];
12731
- break;
12732
- }
12733
- case 'timeline': {
12734
- row = ganttRow.detailRow;
12735
- cell = row.cells[this.detailIdCol];
12736
- column = this.data.columns[this.detailIdCol];
12737
- break;
12738
- }
12739
- }
12740
- this.kupContextMenu.emit({
12741
- comp: this,
12742
- id: this.rootElement.id,
12743
- value: ganttRow,
12744
- taskAction: taskAction,
12745
- details: {
12746
- cell: cell,
12747
- column: column,
12748
- originalEvent: event,
12749
- row: row,
12750
- },
12751
- });
12752
- }
12753
- onKupDateChange(event, taskAction) {
12754
- this.kupDateChange.emit({
12755
- comp: this,
12756
- id: this.rootElement.id,
12757
- value: event,
12758
- taskAction: taskAction,
12759
- });
12760
- }
12761
- handleOnClick(nativeEvent) {
12762
- switch (nativeEvent.rowType) {
12763
- case KupPlannerGanttRowType.TASK:
12764
- const taskAction = nativeEvent.phases
12765
- ? KupPlannerTaskAction.onTaskClosing
12766
- : KupPlannerTaskAction.onTaskOpening;
12767
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnTask).call(this, nativeEvent)) {
12768
- this.onKupClick(nativeEvent, taskAction);
12769
- }
12770
- break;
12771
- case KupPlannerGanttRowType.PHASE:
12772
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
12773
- this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
12774
- }
12775
- break;
12776
- case KupPlannerGanttRowType.DETAIL:
12777
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnDetail).call(this)) {
12778
- this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
12779
- }
12780
- break;
12781
- }
12782
- }
12783
- handleOnContextMenu(event, row) {
12784
- switch (row.rowType) {
12785
- case KupPlannerGanttRowType.TASK:
12786
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnTask).call(this)) {
12787
- this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
12788
- }
12789
- break;
12790
- case KupPlannerGanttRowType.PHASE:
12791
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnPhase).call(this)) {
12792
- this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
12793
- }
12794
- break;
12795
- case KupPlannerGanttRowType.DETAIL:
12796
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnDetail).call(this)) {
12797
- this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
12798
- }
12799
- break;
12800
- }
12801
- }
12802
- handleOnSetDoubleView(checked) {
12803
- var _a;
12804
- __classPrivateFieldSet(this, _KupPlanner_showSecondaryDatesLocal, checked, "f");
12805
- if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
12806
- this.plannerProps.mainGantt.showSecondaryDates = checked;
12807
- }
12808
- }
12809
- handleOnDateChange(nativeEvent) {
12810
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_emitOnChangeEventsReceived).call(this, nativeEvent)) {
12811
- if (nativeEvent.rowType != KupPlannerGanttRowType.DETAIL) {
12812
- this.onKupDateChange(nativeEvent, KupPlannerTaskAction.onResize);
12813
- }
12814
- }
12815
- }
12816
- render() {
12817
- var _a;
12818
- return (h(Host, null, h("style", null, __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId, style: { maxWidth: this.maxWidth } }), h(FTextField, { icon: KupThemeIconValues.SEARCH, id: "main-filter", label: __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), onKeyDown: (e) => {
12819
- if (e.key === 'Enter') {
12820
- __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e);
12821
- }
12822
- }, wrapperClass: "filter" }), ((_a = this.detailData) === null || _a === void 0 ? void 0 : _a.rows) && this.detailData.rows.length > 0 ? (h(FTextField, { icon: KupThemeIconValues.SEARCH, id: "secondary-filter", label: __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), onKeyDown: (e) => {
12823
- if (e.key === 'Enter') {
12824
- __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e, true);
12825
- }
12826
- }, wrapperClass: "filter" })) : null));
12827
- }
12828
- disconnectedCallback() {
12829
- __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.unregister(this);
12830
- }
12831
- get rootElement() { return getElement(this); }
12832
- static get watchers() { return {
12833
- "data": ["dataChanged"],
12834
- "showSecondaryDates": ["showSecondaryDatesChanged"]
12835
- }; }
12836
- };
12837
- _KupPlanner_kupManager = new WeakMap(), _KupPlanner_lastOnChangeReceived = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(), _KupPlanner_phases = new WeakMap(), _KupPlanner_showSecondaryDatesLocal = new WeakMap(), _KupPlanner_instances = new WeakSet(), _KupPlanner_renderReactPlannerElement = function _KupPlanner_renderReactPlannerElement() {
12838
- var _a;
12839
- (_a = __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f")) === null || _a === void 0 ? void 0 : _a.unmount();
12840
- const componentWrapperElement = this.rootElement.shadowRoot.getElementById(componentWrapperId);
12841
- if (componentWrapperElement) {
12842
- __classPrivateFieldSet(this, _KupPlanner_rootPlanner, client.createRoot(componentWrapperElement), "f");
12843
- __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f").render(react.createElement(Planner, this.plannerProps));
12844
- }
12845
- }, _KupPlanner_toTasks = function _KupPlanner_toTasks(data) {
12846
- var _a;
12847
- let tasks = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.filter((row) => isAtLeastOneDateValid(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]])).map((row) => {
12848
- const datesSanitized = sanitizeAllDates(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]], row.cells[this.taskPrevDates[0]], row.cells[this.taskPrevDates[1]]);
12849
- const valuesToShow = getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns, () => this.taskColumns.map((col) => col == this.taskDates[0]
12850
- ? '#START#'
12851
- : col == this.taskDates[1]
12852
- ? '#END#'
12853
- : getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
12854
- let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.taskIconCol);
12855
- let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.taskIconCol);
12856
- let task = {
12857
- taskRow: row,
12858
- taskRowId: row.id,
12859
- id: row.cells[this.taskIdCol].value,
12860
- name: row.cells[this.taskNameCol].value,
12861
- startDate: datesSanitized.dateValues[0],
12862
- endDate: datesSanitized.dateValues[1],
12863
- secondaryStartDate: datesSanitized.secDateValues[0],
12864
- secondaryEndDate: datesSanitized.secDateValues[1],
12865
- type: 'project',
12866
- valuesToShow: valuesToShow,
12867
- rowType: KupPlannerGanttRowType.TASK,
12868
- icon: iconUrl
12869
- ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
12870
- : undefined,
12871
- };
12872
- return task;
12873
- });
12874
- return tasks;
12875
- }, _KupPlanner_toDetails = function _KupPlanner_toDetails(data) {
12876
- let details = [];
12877
- if (!data || !data.rows) {
12878
- return details;
12879
- }
12880
- data.rows
12881
- .filter((row) => isAtLeastOneDateValid(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]))
12882
- .forEach((row) => {
12883
- var _a, _b;
12884
- const detailId = row.cells[this.detailIdCol].value;
12885
- const detailNameId = row.cells[this.detailNameCol].value;
12886
- const datesSanitized = sanitizeAllDates(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]);
12887
- const valuesToShow = getValuesToShow(row, this.detailIdCol, this.detailNameCol, data.columns, this.detailColumns);
12888
- let detail = details.find((det) => det.id == detailId);
12889
- if (!detail) {
12890
- detail = {
12891
- id: detailId,
12892
- name: detailNameId,
12893
- detailRow: row,
12894
- type: 'timeline',
12895
- valuesToShow: valuesToShow,
12896
- rowType: KupPlannerGanttRowType.DETAIL,
12897
- schedule: [],
12898
- };
12899
- details.push(detail);
12900
- }
12901
- let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.detailIconCol);
12902
- let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.detailIconCol);
12903
- detail.schedule.push({
12904
- startDate: datesSanitized.dateValues[0],
12905
- endDate: datesSanitized.dateValues[1],
12906
- color: this.detailColorCol
12907
- ? (_a = row.cells[this.detailColorCol].value) !== null && _a !== void 0 ? _a : '#D9D9D8'
12908
- : '#D9D9D8',
12909
- selectedColor: this.detailColorCol
12910
- ? (_b = row.cells[this.detailColorCol].value) !== null && _b !== void 0 ? _b : '#D9D9D8'
12911
- : '#D9D9D8',
12912
- icon: iconUrl
12913
- ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
12914
- : undefined,
12915
- });
12916
- });
12917
- return details;
12918
- }, _KupPlanner_getTask = function _KupPlanner_getTask(taskId) {
12919
- return this.plannerProps.mainGantt.items.find((task) => task.id == taskId);
12920
- }, _KupPlanner_removePhases = function _KupPlanner_removePhases(taskId) {
12921
- const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
12922
- if (task)
12923
- task.phases = undefined;
12924
- this.plannerProps = Object.assign({}, this.plannerProps);
12925
- }, _KupPlanner_handleOnClickOnTask = function _KupPlanner_handleOnClickOnTask(nativeEvent) {
12926
- const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, nativeEvent.id);
12927
- if (task === null || task === void 0 ? void 0 : task.phases) {
12928
- __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_removePhases).call(this, task.id);
12929
- }
12930
- return true;
12931
- }, _KupPlanner_handleOnClickOnPhase = function _KupPlanner_handleOnClickOnPhase() {
12932
- return true;
12933
- }, _KupPlanner_handleOnClickOnDetail = function _KupPlanner_handleOnClickOnDetail() {
12934
- return true;
12935
- }, _KupPlanner_handleOnContextMenuOnTask = function _KupPlanner_handleOnContextMenuOnTask() {
12936
- return true;
12937
- }, _KupPlanner_handleOnContextMenuOnPhase = function _KupPlanner_handleOnContextMenuOnPhase() {
12938
- return true;
12939
- }, _KupPlanner_handleOnContextMenuOnDetail = function _KupPlanner_handleOnContextMenuOnDetail() {
12940
- return true;
12941
- }, _KupPlanner_emitOnChangeEventsReceived = function _KupPlanner_emitOnChangeEventsReceived(nativeEvent) {
12942
- let emitEvent = false;
12943
- if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f")) {
12944
- emitEvent = true;
12945
- __classPrivateFieldSet(this, _KupPlanner_lastOnChangeReceived, new KupPlannerLastOnChangeReceived(nativeEvent), "f");
12946
- }
12947
- else if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f").isEquivalent(nativeEvent)) {
12948
- __classPrivateFieldSet(this, _KupPlanner_lastOnChangeReceived, new KupPlannerLastOnChangeReceived(nativeEvent), "f");
12949
- emitEvent = true;
12950
- }
12951
- return emitEvent;
12952
- }, _KupPlanner_onFilter = function _KupPlanner_onFilter(e, isDetail) {
12953
- const tempData = {
12954
- columns: this.data.columns,
12955
- rows: [],
12956
- };
12957
- const value = e.target.value;
12958
- const data = isDetail ? this.detailData : this.data;
12959
- const tempRows = [];
12960
- for (let index = 0; index < data.rows.length; index++) {
12961
- const row = data.rows[index];
12962
- const cells = row.cells;
12963
- for (let index = 0; index < data.columns.length; index++) {
12964
- const column = data.columns[index];
12965
- const cell = cells[column.name];
12966
- if (cell) {
12967
- const dValue = getCellValueForDisplay(data.columns[index], cell);
12968
- const found = !!(dValue.toLowerCase().indexOf(value.toLowerCase()) > -1);
12969
- if (found) {
12970
- tempRows.push({ row, weight: index });
12971
- break;
12972
- }
12973
- }
12974
- }
12975
- }
12976
- tempRows
12977
- .sort((a, b) => a.weight - b.weight)
12978
- .forEach((tempRow) => {
12979
- tempData.rows.push(tempRow.row);
12980
- });
12981
- const newGantt = isDetail
12982
- ? {
12983
- secondaryGantt: Object.assign(Object.assign({}, this.plannerProps.secondaryGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, tempData) }),
12984
- }
12985
- : {
12986
- mainGantt: Object.assign(Object.assign({}, this.plannerProps.mainGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, tempData) }),
12987
- };
12988
- this.plannerProps = Object.assign(Object.assign({}, this.plannerProps), newGantt);
12989
- }, _KupPlanner_getIconUrl = function _KupPlanner_getIconUrl(row, columnName) {
12990
- var _a;
12991
- let iconUrl = undefined;
12992
- if (columnName) {
12993
- const iconCell = row.cells[columnName];
12994
- let icon = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.resource;
12995
- if (!icon) {
12996
- icon = iconCell.value;
12997
- }
12998
- if (icon) {
12999
- iconUrl = getAssetPath('./assets/svg/' + icon + '.svg');
13000
- }
13001
- }
13002
- return iconUrl;
13003
- }, _KupPlanner_getIconColor = function _KupPlanner_getIconColor(row, columnName) {
13004
- var _a;
13005
- let iconColor = undefined;
13006
- if (columnName) {
13007
- const iconCell = row.cells[columnName];
13008
- iconColor = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.color;
13009
- if (iconColor) {
13010
- iconColor =
13011
- __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.colorCheck(iconColor).hexColor;
13012
- }
13013
- }
13014
- return iconColor;
13015
- };
12496
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12497
+ if (kind === "a" && !f)
12498
+ throw new TypeError("Private accessor was defined without a getter");
12499
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
12500
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
12501
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12502
+ };
12503
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12504
+ if (kind === "m")
12505
+ throw new TypeError("Private method is not writable");
12506
+ if (kind === "a" && !f)
12507
+ throw new TypeError("Private accessor was defined without a setter");
12508
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
12509
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
12510
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12511
+ };
12512
+ var _KupPlanner_instances, _KupPlanner_kupManager, _KupPlanner_lastOnChangeReceived, _KupPlanner_rootPlanner, _KupPlanner_phases, _KupPlanner_storedSettings, _KupPlanner_renderReactPlannerElement, _KupPlanner_toTasks, _KupPlanner_toDetails, _KupPlanner_getTask, _KupPlanner_removePhases, _KupPlanner_handleOnClickOnTask, _KupPlanner_handleOnClickOnPhase, _KupPlanner_handleOnClickOnDetail, _KupPlanner_handleOnContextMenuOnTask, _KupPlanner_handleOnContextMenuOnPhase, _KupPlanner_handleOnContextMenuOnDetail, _KupPlanner_emitOnChangeEventsReceived, _KupPlanner_onFilter, _KupPlanner_getFilteredRows, _KupPlanner_getIconUrl, _KupPlanner_getIconColor;
12513
+ const KupPlanner = class {
12514
+ constructor(hostRef) {
12515
+ registerInstance(this, hostRef);
12516
+ this.kupClick = createEvent(this, "kup-planner-click", 6);
12517
+ this.kupDateChange = createEvent(this, "kup-planner-datechange", 6);
12518
+ this.kupReady = createEvent(this, "kup-planner-ready", 6);
12519
+ this.kupContextMenu = createEvent(this, "kup-planner-contextmenu", 6);
12520
+ this.kupDidUnload = createEvent(this, "kup-planner-didunload", 6);
12521
+ _KupPlanner_instances.add(this);
12522
+ this.state = new KupPlannerState();
12523
+ /*-------------------------------------------------*/
12524
+ /* I n t e r n a l V a r i a b l e s */
12525
+ /*-------------------------------------------------*/
12526
+ _KupPlanner_kupManager.set(this, kupManagerInstance());
12527
+ _KupPlanner_lastOnChangeReceived.set(this, void 0);
12528
+ _KupPlanner_rootPlanner.set(this, void 0);
12529
+ _KupPlanner_phases.set(this, {});
12530
+ // no re-render
12531
+ _KupPlanner_storedSettings.set(this, void 0);
12532
+ this.stateId = '';
12533
+ this.store = undefined;
12534
+ this.customStyle = '';
12535
+ this.data = undefined;
12536
+ this.detailData = undefined;
12537
+ this.detailColorCol = undefined;
12538
+ this.detailColumns = undefined;
12539
+ this.detailDates = undefined;
12540
+ this.detailFilter = undefined;
12541
+ this.detailHeight = undefined;
12542
+ this.detailIconCol = undefined;
12543
+ this.detailIdCol = undefined;
12544
+ this.detailNameCol = undefined;
12545
+ this.detailPrevDates = undefined;
12546
+ this.detailInitialScrollX = undefined;
12547
+ this.detailInitialScrollY = undefined;
12548
+ this.listCellWidth = '300px';
12549
+ this.maxWidth = '90vw';
12550
+ this.phaseColorCol = undefined;
12551
+ this.phaseColumns = undefined;
12552
+ this.phaseColParDep = undefined;
12553
+ this.phaseDates = undefined;
12554
+ this.phaseIconCol = undefined;
12555
+ this.phaseIdCol = undefined;
12556
+ this.phaseNameCol = undefined;
12557
+ this.phasePrevDates = undefined;
12558
+ this.readOnly = false;
12559
+ this.showSecondaryDates = false;
12560
+ this.taskColumns = undefined;
12561
+ this.taskDates = undefined;
12562
+ this.taskFilter = undefined;
12563
+ this.taskHeight = undefined;
12564
+ this.taskIconCol = undefined;
12565
+ this.taskIdCol = undefined;
12566
+ this.taskInitialScrollX = undefined;
12567
+ this.taskInitialScrollY = undefined;
12568
+ this.taskNameCol = undefined;
12569
+ this.taskPrevDates = undefined;
12570
+ this.titleMess = undefined;
12571
+ this.viewMode = 'month';
12572
+ this.plannerProps = undefined;
12573
+ }
12574
+ initWithPersistedState() {
12575
+ if (this.store && this.stateId) {
12576
+ const state = this.store.getState(this.stateId);
12577
+ if (state != null) {
12578
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logMessage(this, 'Initializing stateId ' + this.stateId);
12579
+ // *** PROPS ***
12580
+ this.detailFilter = state.detailFilter;
12581
+ this.showSecondaryDates = state.showSecondaryDates;
12582
+ this.detailInitialScrollX = state.detailInitialScrollX;
12583
+ this.detailInitialScrollY = state.detailInitialScrollY;
12584
+ this.taskFilter = state.taskFilter;
12585
+ this.taskInitialScrollX = state.taskInitialScrollX;
12586
+ this.taskInitialScrollY = state.taskInitialScrollY;
12587
+ this.viewMode = state.viewMode;
12588
+ }
12589
+ }
12590
+ }
12591
+ persistState() {
12592
+ if (this.store && this.stateId) {
12593
+ let somethingChanged = false;
12594
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.detailFilter, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter)) {
12595
+ this.state.detailFilter = __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter;
12596
+ somethingChanged = true;
12597
+ }
12598
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.showSecondaryDates, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates)) {
12599
+ this.state.showSecondaryDates =
12600
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates;
12601
+ somethingChanged = true;
12602
+ }
12603
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.detailInitialScrollX, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX)) {
12604
+ this.state.detailInitialScrollX =
12605
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX;
12606
+ somethingChanged = true;
12607
+ }
12608
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.detailInitialScrollY, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY)) {
12609
+ this.state.detailInitialScrollY =
12610
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY;
12611
+ somethingChanged = true;
12612
+ }
12613
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.taskFilter, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter)) {
12614
+ this.state.taskFilter = __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter;
12615
+ somethingChanged = true;
12616
+ }
12617
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.taskInitialScrollX, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX)) {
12618
+ this.state.taskInitialScrollX =
12619
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX;
12620
+ somethingChanged = true;
12621
+ }
12622
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.taskInitialScrollY, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY)) {
12623
+ this.state.taskInitialScrollY =
12624
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY;
12625
+ somethingChanged = true;
12626
+ }
12627
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.viewMode, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").viewMode)) {
12628
+ this.state.viewMode = __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").viewMode;
12629
+ somethingChanged = true;
12630
+ }
12631
+ if (somethingChanged) {
12632
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logMessage(this, 'Persisting stateId ' + this.stateId);
12633
+ this.store.persistState(this.stateId, this.state);
12634
+ }
12635
+ }
12636
+ }
12637
+ dataChanged() {
12638
+ __classPrivateFieldSet(this, _KupPlanner_phases, {}, "f");
12639
+ }
12640
+ /*-------------------------------------------------*/
12641
+ /* P u b l i c M e t h o d s */
12642
+ /*-------------------------------------------------*/
12643
+ /**
12644
+ * Used to retrieve component's props values.
12645
+ * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
12646
+ * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
12647
+ */
12648
+ async getProps(descriptions) {
12649
+ return getProps(this, KupPlannerProps, descriptions);
12650
+ }
12651
+ /**
12652
+ * This method is used to trigger a new render of the component.
12653
+ */
12654
+ async refresh() {
12655
+ forceUpdate(this);
12656
+ }
12657
+ /**
12658
+ * Sets the props to the component.
12659
+ * @param {GenericObject} props - Object containing props that will be set to the component.
12660
+ */
12661
+ async setProps(props) {
12662
+ setProps(this, KupPlannerProps, props);
12663
+ }
12664
+ /**
12665
+ * Add a list of phases to the project
12666
+ * @param taskId
12667
+ * @param data - Matrix which contains project phases
12668
+ */
12669
+ async addPhases(taskId, data) {
12670
+ var _a;
12671
+ const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
12672
+ if (task) {
12673
+ __classPrivateFieldGet(this, _KupPlanner_phases, "f")[taskId] = data;
12674
+ task.phases = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.filter((row) => isAtLeastOneDateValid(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]])).map((row) => {
12675
+ const datesSanitized = sanitizeAllDates(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]], row.cells[this.phasePrevDates[0]], row.cells[this.phasePrevDates[1]]);
12676
+ const valuesToShow = getValuesToShow(row, this.phaseIdCol, this.phaseNameCol, data.columns, this.phaseColumns, () => this.phaseColumns.map((col) => col == this.phaseDates[0]
12677
+ ? '#START#'
12678
+ : col == this.phaseDates[1]
12679
+ ? '#END#'
12680
+ : getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
12681
+ let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.phaseIconCol);
12682
+ let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.phaseIconCol);
12683
+ let phase = {
12684
+ taskRow: task.taskRow,
12685
+ phaseRow: row,
12686
+ id: task.id + '_' + row.cells[this.phaseIdCol].value,
12687
+ phaseRowId: row.id,
12688
+ taskRowId: task.taskRowId,
12689
+ name: row.cells[this.phaseNameCol].value,
12690
+ startDate: datesSanitized.dateValues[0],
12691
+ endDate: datesSanitized.dateValues[1],
12692
+ secondaryStartDate: datesSanitized.secDateValues[0],
12693
+ secondaryEndDate: datesSanitized.secDateValues[1],
12694
+ type: 'task',
12695
+ color: row.cells[this.phaseColorCol].value,
12696
+ selectedColor: row.cells[this.phaseColorCol].value,
12697
+ valuesToShow: valuesToShow,
12698
+ rowType: KupPlannerGanttRowType.PHASE,
12699
+ icon: iconUrl
12700
+ ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
12701
+ : undefined,
12702
+ };
12703
+ return phase;
12704
+ });
12705
+ }
12706
+ this.plannerProps = Object.assign({}, this.plannerProps);
12707
+ }
12708
+ //---- Lifecycle hooks ----
12709
+ componentWillLoad() {
12710
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, false);
12711
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.register(this);
12712
+ // *** Store
12713
+ this.initWithPersistedState();
12714
+ __classPrivateFieldSet(this, _KupPlanner_storedSettings, {
12715
+ detailFilter: this.detailFilter,
12716
+ detailInitialScrollX: this.detailInitialScrollX,
12717
+ detailInitialScrollY: this.detailInitialScrollY,
12718
+ showSecondaryDates: this.showSecondaryDates,
12719
+ taskFilter: this.taskFilter,
12720
+ taskInitialScrollX: this.taskInitialScrollX,
12721
+ taskInitialScrollY: this.taskInitialScrollY,
12722
+ viewMode: this.viewMode,
12723
+ }, "f");
12724
+ }
12725
+ componentDidLoad() {
12726
+ let details = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getFilteredRows).call(this, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter, true));
12727
+ const mainFilter = this.rootElement.shadowRoot.querySelector('#main-filter');
12728
+ FTextFieldMDC(mainFilter);
12729
+ const secondaryFilter = this.rootElement.shadowRoot.querySelector('#secondary-filter');
12730
+ if (details) {
12731
+ FTextFieldMDC(secondaryFilter);
12732
+ }
12733
+ // timeout for scroll events
12734
+ let scrollXTimeout;
12735
+ let taskScrollYTimeout;
12736
+ let detailScrollYTimeout;
12737
+ const scrollDelay = 1500;
12738
+ this.plannerProps = {
12739
+ mainGantt: {
12740
+ title: this.titleMess,
12741
+ items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getFilteredRows).call(this, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter, false)),
12742
+ stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
12743
+ filter: mainFilter,
12744
+ hideLabel: true,
12745
+ ganttHeight: this.taskHeight,
12746
+ showSecondaryDates: __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates,
12747
+ onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
12748
+ onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
12749
+ onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
12750
+ initialScrollX: this.taskInitialScrollX,
12751
+ initialScrollY: this.taskInitialScrollY,
12752
+ readOnly: this.readOnly,
12753
+ onScrollY: (y) => {
12754
+ window.clearTimeout(taskScrollYTimeout);
12755
+ taskScrollYTimeout = window.setTimeout(() => this.handleTaskGanttScrollY(y), scrollDelay);
12756
+ },
12757
+ },
12758
+ secondaryGantt: details
12759
+ ? {
12760
+ title: '',
12761
+ items: details,
12762
+ stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
12763
+ filter: secondaryFilter,
12764
+ hideLabel: true,
12765
+ ganttHeight: this.detailHeight,
12766
+ onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
12767
+ onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
12768
+ onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
12769
+ initialScrollX: this.detailInitialScrollX,
12770
+ initialScrollY: this.detailInitialScrollY,
12771
+ readOnly: this.readOnly,
12772
+ onScrollY: (y) => {
12773
+ window.clearTimeout(detailScrollYTimeout);
12774
+ detailScrollYTimeout = window.setTimeout(() => this.handleDetailGanttScrollY(y), scrollDelay);
12775
+ },
12776
+ }
12777
+ : undefined,
12778
+ onSetDoubleView: (checked) => this.handleOnSetDoubleView(checked),
12779
+ onSetViewMode: (value) => this.handleOnSetViewMode(value),
12780
+ viewMode: this.viewMode,
12781
+ onScrollX: (x) => {
12782
+ window.clearTimeout(scrollXTimeout);
12783
+ scrollXTimeout = window.setTimeout(() => this.handleOnScrollX(x), scrollDelay);
12784
+ },
12785
+ };
12786
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
12787
+ this.kupReady.emit({
12788
+ comp: this,
12789
+ id: this.rootElement.id,
12790
+ value: undefined,
12791
+ });
12792
+ if (this.taskFilter) {
12793
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, this.taskFilter);
12794
+ }
12795
+ if (this.detailFilter) {
12796
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, this.detailFilter, true);
12797
+ }
12798
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, true);
12799
+ }
12800
+ componentWillRender() {
12801
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
12802
+ }
12803
+ componentDidRender() {
12804
+ this.persistState();
12805
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logRender(this, true);
12806
+ }
12807
+ onKupClick(event, taskAction) {
12808
+ this.kupClick.emit({
12809
+ comp: this,
12810
+ id: this.rootElement.id,
12811
+ value: event,
12812
+ taskAction: taskAction,
12813
+ });
12814
+ }
12815
+ onKupContextMenu(event, ganttRow, taskAction) {
12816
+ let row;
12817
+ let cell;
12818
+ let column;
12819
+ switch (ganttRow.type) {
12820
+ case 'project': {
12821
+ row = ganttRow.taskRow;
12822
+ cell = row.cells[this.taskIdCol];
12823
+ column = this.data.columns[this.taskIdCol];
12824
+ break;
12825
+ }
12826
+ case 'task': {
12827
+ row = ganttRow.phaseRow;
12828
+ cell = row.cells[this.phaseIdCol];
12829
+ //column = this.data.columns[this.taskIdCol];
12830
+ break;
12831
+ }
12832
+ case 'timeline': {
12833
+ row = ganttRow.detailRow;
12834
+ cell = row.cells[this.detailIdCol];
12835
+ column = this.data.columns[this.detailIdCol];
12836
+ break;
12837
+ }
12838
+ }
12839
+ this.kupContextMenu.emit({
12840
+ comp: this,
12841
+ id: this.rootElement.id,
12842
+ value: ganttRow,
12843
+ taskAction: taskAction,
12844
+ details: {
12845
+ cell: cell,
12846
+ column: column,
12847
+ originalEvent: event,
12848
+ row: row,
12849
+ },
12850
+ });
12851
+ }
12852
+ onKupDateChange(event, taskAction) {
12853
+ this.kupDateChange.emit({
12854
+ comp: this,
12855
+ id: this.rootElement.id,
12856
+ value: event,
12857
+ taskAction: taskAction,
12858
+ });
12859
+ }
12860
+ handleOnClick(nativeEvent) {
12861
+ switch (nativeEvent.rowType) {
12862
+ case KupPlannerGanttRowType.TASK:
12863
+ const taskAction = nativeEvent.phases
12864
+ ? KupPlannerTaskAction.onTaskClosing
12865
+ : KupPlannerTaskAction.onTaskOpening;
12866
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnTask).call(this, nativeEvent)) {
12867
+ this.onKupClick(nativeEvent, taskAction);
12868
+ }
12869
+ break;
12870
+ case KupPlannerGanttRowType.PHASE:
12871
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
12872
+ this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
12873
+ }
12874
+ break;
12875
+ case KupPlannerGanttRowType.DETAIL:
12876
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnDetail).call(this)) {
12877
+ this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
12878
+ }
12879
+ break;
12880
+ }
12881
+ }
12882
+ handleOnContextMenu(event, row) {
12883
+ switch (row.rowType) {
12884
+ case KupPlannerGanttRowType.TASK:
12885
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnTask).call(this)) {
12886
+ this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
12887
+ }
12888
+ break;
12889
+ case KupPlannerGanttRowType.PHASE:
12890
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnPhase).call(this)) {
12891
+ this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
12892
+ }
12893
+ break;
12894
+ case KupPlannerGanttRowType.DETAIL:
12895
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnDetail).call(this)) {
12896
+ this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
12897
+ }
12898
+ break;
12899
+ }
12900
+ }
12901
+ handleOnSetDoubleView(checked) {
12902
+ var _a;
12903
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates = checked;
12904
+ if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
12905
+ this.plannerProps.mainGantt.showSecondaryDates = checked;
12906
+ }
12907
+ this.persistState();
12908
+ }
12909
+ handleOnSetViewMode(value) {
12910
+ var _a;
12911
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").viewMode = value;
12912
+ if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
12913
+ this.plannerProps.mainGantt.viewMode = value;
12914
+ }
12915
+ this.persistState();
12916
+ }
12917
+ handleOnScrollX(x) {
12918
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX = x;
12919
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX = x;
12920
+ this.persistState();
12921
+ }
12922
+ handleTaskGanttScrollY(y) {
12923
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY = y;
12924
+ this.persistState();
12925
+ }
12926
+ handleDetailGanttScrollY(y) {
12927
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY = y;
12928
+ this.persistState();
12929
+ }
12930
+ handleOnDateChange(nativeEvent) {
12931
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_emitOnChangeEventsReceived).call(this, nativeEvent)) {
12932
+ if (nativeEvent.rowType != KupPlannerGanttRowType.DETAIL) {
12933
+ this.onKupDateChange(nativeEvent, KupPlannerTaskAction.onResize);
12934
+ }
12935
+ }
12936
+ }
12937
+ render() {
12938
+ var _a;
12939
+ return (h(Host, null, h("style", null, __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId, style: { maxWidth: this.maxWidth } }), h(FTextField, { icon: KupThemeIconValues.SEARCH, id: "main-filter", label: __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), onKeyDown: (e) => {
12940
+ if (e.key === 'Enter') {
12941
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e.target.value);
12942
+ }
12943
+ }, value: this.taskFilter, wrapperClass: "filter" }), ((_a = this.detailData) === null || _a === void 0 ? void 0 : _a.rows) && this.detailData.rows.length > 0 ? (h(FTextField, { icon: KupThemeIconValues.SEARCH, id: "secondary-filter", label: __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), onKeyDown: (e) => {
12944
+ if (e.key === 'Enter') {
12945
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e.target.value, true);
12946
+ }
12947
+ }, value: this.detailFilter, wrapperClass: "filter" })) : null));
12948
+ }
12949
+ disconnectedCallback() {
12950
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.unregister(this);
12951
+ this.kupDidUnload.emit({
12952
+ comp: this,
12953
+ id: this.rootElement.id,
12954
+ storedSettings: __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f"),
12955
+ });
12956
+ }
12957
+ get rootElement() { return getElement(this); }
12958
+ static get watchers() { return {
12959
+ "data": ["dataChanged"]
12960
+ }; }
12961
+ };
12962
+ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_lastOnChangeReceived = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(), _KupPlanner_phases = new WeakMap(), _KupPlanner_storedSettings = new WeakMap(), _KupPlanner_instances = new WeakSet(), _KupPlanner_renderReactPlannerElement = function _KupPlanner_renderReactPlannerElement() {
12963
+ var _a;
12964
+ (_a = __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f")) === null || _a === void 0 ? void 0 : _a.unmount();
12965
+ const componentWrapperElement = this.rootElement.shadowRoot.getElementById(componentWrapperId);
12966
+ if (componentWrapperElement) {
12967
+ __classPrivateFieldSet(this, _KupPlanner_rootPlanner, client.createRoot(componentWrapperElement), "f");
12968
+ __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f").render(react.createElement(Planner, this.plannerProps));
12969
+ }
12970
+ }, _KupPlanner_toTasks = function _KupPlanner_toTasks(data) {
12971
+ var _a;
12972
+ if (!data || !data.rows) {
12973
+ return [];
12974
+ }
12975
+ let tasks = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.filter((row) => isAtLeastOneDateValid(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]])).map((row) => {
12976
+ const datesSanitized = sanitizeAllDates(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]], row.cells[this.taskPrevDates[0]], row.cells[this.taskPrevDates[1]]);
12977
+ const valuesToShow = getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns, () => this.taskColumns.map((col) => col == this.taskDates[0]
12978
+ ? '#START#'
12979
+ : col == this.taskDates[1]
12980
+ ? '#END#'
12981
+ : getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
12982
+ let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.taskIconCol);
12983
+ let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.taskIconCol);
12984
+ let task = {
12985
+ taskRow: row,
12986
+ taskRowId: row.id,
12987
+ id: row.cells[this.taskIdCol].value,
12988
+ name: row.cells[this.taskNameCol].value,
12989
+ startDate: datesSanitized.dateValues[0],
12990
+ endDate: datesSanitized.dateValues[1],
12991
+ secondaryStartDate: datesSanitized.secDateValues[0],
12992
+ secondaryEndDate: datesSanitized.secDateValues[1],
12993
+ type: 'project',
12994
+ valuesToShow: valuesToShow,
12995
+ rowType: KupPlannerGanttRowType.TASK,
12996
+ icon: iconUrl
12997
+ ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
12998
+ : undefined,
12999
+ };
13000
+ return task;
13001
+ });
13002
+ return tasks;
13003
+ }, _KupPlanner_toDetails = function _KupPlanner_toDetails(data) {
13004
+ if (!data || !data.rows) {
13005
+ return undefined;
13006
+ }
13007
+ let details = [];
13008
+ data.rows
13009
+ .filter((row) => isAtLeastOneDateValid(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]))
13010
+ .forEach((row) => {
13011
+ var _a, _b;
13012
+ const detailId = row.cells[this.detailIdCol].value;
13013
+ const detailNameId = row.cells[this.detailNameCol].value;
13014
+ const datesSanitized = sanitizeAllDates(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]);
13015
+ const valuesToShow = getValuesToShow(row, this.detailIdCol, this.detailNameCol, data.columns, this.detailColumns);
13016
+ let detail = details.find((det) => det.id == detailId);
13017
+ if (!detail) {
13018
+ detail = {
13019
+ id: detailId,
13020
+ name: detailNameId,
13021
+ detailRow: row,
13022
+ type: 'timeline',
13023
+ valuesToShow: valuesToShow,
13024
+ rowType: KupPlannerGanttRowType.DETAIL,
13025
+ schedule: [],
13026
+ };
13027
+ details.push(detail);
13028
+ }
13029
+ let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.detailIconCol);
13030
+ let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.detailIconCol);
13031
+ detail.schedule.push({
13032
+ startDate: datesSanitized.dateValues[0],
13033
+ endDate: datesSanitized.dateValues[1],
13034
+ color: this.detailColorCol
13035
+ ? (_a = row.cells[this.detailColorCol].value) !== null && _a !== void 0 ? _a : '#D9D9D8'
13036
+ : '#D9D9D8',
13037
+ selectedColor: this.detailColorCol
13038
+ ? (_b = row.cells[this.detailColorCol].value) !== null && _b !== void 0 ? _b : '#D9D9D8'
13039
+ : '#D9D9D8',
13040
+ icon: iconUrl
13041
+ ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
13042
+ : undefined,
13043
+ });
13044
+ });
13045
+ return details;
13046
+ }, _KupPlanner_getTask = function _KupPlanner_getTask(taskId) {
13047
+ return this.plannerProps.mainGantt.items.find((task) => task.id == taskId);
13048
+ }, _KupPlanner_removePhases = function _KupPlanner_removePhases(taskId) {
13049
+ const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
13050
+ if (task)
13051
+ task.phases = undefined;
13052
+ this.plannerProps = Object.assign({}, this.plannerProps);
13053
+ }, _KupPlanner_handleOnClickOnTask = function _KupPlanner_handleOnClickOnTask(nativeEvent) {
13054
+ const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, nativeEvent.id);
13055
+ if (task === null || task === void 0 ? void 0 : task.phases) {
13056
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_removePhases).call(this, task.id);
13057
+ }
13058
+ return true;
13059
+ }, _KupPlanner_handleOnClickOnPhase = function _KupPlanner_handleOnClickOnPhase() {
13060
+ return true;
13061
+ }, _KupPlanner_handleOnClickOnDetail = function _KupPlanner_handleOnClickOnDetail() {
13062
+ return true;
13063
+ }, _KupPlanner_handleOnContextMenuOnTask = function _KupPlanner_handleOnContextMenuOnTask() {
13064
+ return true;
13065
+ }, _KupPlanner_handleOnContextMenuOnPhase = function _KupPlanner_handleOnContextMenuOnPhase() {
13066
+ return true;
13067
+ }, _KupPlanner_handleOnContextMenuOnDetail = function _KupPlanner_handleOnContextMenuOnDetail() {
13068
+ return true;
13069
+ }, _KupPlanner_emitOnChangeEventsReceived = function _KupPlanner_emitOnChangeEventsReceived(nativeEvent) {
13070
+ let emitEvent = false;
13071
+ if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f")) {
13072
+ emitEvent = true;
13073
+ __classPrivateFieldSet(this, _KupPlanner_lastOnChangeReceived, new KupPlannerLastOnChangeReceived(nativeEvent), "f");
13074
+ }
13075
+ else if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f").isEquivalent(nativeEvent)) {
13076
+ __classPrivateFieldSet(this, _KupPlanner_lastOnChangeReceived, new KupPlannerLastOnChangeReceived(nativeEvent), "f");
13077
+ emitEvent = true;
13078
+ }
13079
+ return emitEvent;
13080
+ }, _KupPlanner_onFilter = function _KupPlanner_onFilter(value, isDetail) {
13081
+ if (isDetail) {
13082
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter = value;
13083
+ }
13084
+ else {
13085
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter = value;
13086
+ }
13087
+ const newGantt = isDetail
13088
+ ? {
13089
+ secondaryGantt: Object.assign(Object.assign({}, this.plannerProps.secondaryGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getFilteredRows).call(this, value, isDetail)) }),
13090
+ }
13091
+ : {
13092
+ mainGantt: Object.assign(Object.assign({}, this.plannerProps.mainGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getFilteredRows).call(this, value, isDetail)) }),
13093
+ };
13094
+ this.plannerProps = Object.assign(Object.assign({}, this.plannerProps), newGantt);
13095
+ this.persistState();
13096
+ }, _KupPlanner_getFilteredRows = function _KupPlanner_getFilteredRows(value, isDetail) {
13097
+ const data = isDetail ? this.detailData : this.data;
13098
+ if (!data || !data.rows || data.rows.length == 0) {
13099
+ return undefined;
13100
+ }
13101
+ if (!value) {
13102
+ return data;
13103
+ }
13104
+ const tempData = {
13105
+ columns: this.data.columns,
13106
+ rows: [],
13107
+ };
13108
+ const tempRows = [];
13109
+ for (let index = 0; index < data.rows.length; index++) {
13110
+ const row = data.rows[index];
13111
+ const cells = row.cells;
13112
+ for (let index = 0; index < data.columns.length; index++) {
13113
+ const column = data.columns[index];
13114
+ const cell = cells[column.name];
13115
+ if (cell) {
13116
+ const dValue = getCellValueForDisplay(data.columns[index], cell);
13117
+ const found = !!(dValue.toLowerCase().indexOf(value.toLowerCase()) > -1);
13118
+ if (found) {
13119
+ tempRows.push({ row, weight: index });
13120
+ break;
13121
+ }
13122
+ }
13123
+ }
13124
+ }
13125
+ tempRows
13126
+ .sort((a, b) => a.weight - b.weight)
13127
+ .forEach((tempRow) => {
13128
+ tempData.rows.push(tempRow.row);
13129
+ });
13130
+ return tempData;
13131
+ }, _KupPlanner_getIconUrl = function _KupPlanner_getIconUrl(row, columnName) {
13132
+ var _a;
13133
+ let iconUrl = undefined;
13134
+ if (columnName) {
13135
+ const iconCell = row.cells[columnName];
13136
+ let icon = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.resource;
13137
+ if (!icon) {
13138
+ icon = iconCell.value;
13139
+ }
13140
+ if (icon) {
13141
+ iconUrl = getAssetPath('./assets/svg/' + icon + '.svg');
13142
+ }
13143
+ }
13144
+ return iconUrl;
13145
+ }, _KupPlanner_getIconColor = function _KupPlanner_getIconColor(row, columnName) {
13146
+ var _a;
13147
+ let iconColor = undefined;
13148
+ if (columnName) {
13149
+ const iconCell = row.cells[columnName];
13150
+ iconColor = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.color;
13151
+ if (iconColor) {
13152
+ iconColor =
13153
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.colorCheck(iconColor).hexColor;
13154
+ }
13155
+ }
13156
+ return iconColor;
13157
+ };
13016
13158
  KupPlanner.style = kupPlannerCss;
13017
13159
 
13018
13160
  export { KupPlanner as kup_planner };