@sme.up/ketchup 8.0.2 → 8.2.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-9524bbf7.js → f-button-797c8e7f.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-bcb75ade.js → f-cell-9c8ed48b.js} +478 -472
  6. package/dist/cjs/{f-checkbox-1148e791.js → f-checkbox-cff77b2c.js} +23 -23
  7. package/dist/cjs/{f-chip-2249b386.js → f-chip-318863df.js} +125 -125
  8. package/dist/cjs/{f-image-47d74999.js → f-image-f10144e9.js} +107 -107
  9. package/dist/cjs/{f-paginator-utils-b0a9ae5f.js → f-paginator-utils-8c44a37b.js} +1548 -1548
  10. package/dist/cjs/{f-text-field-579c0fc0.js → f-text-field-9610c198.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-a9a3b467.js} +93 -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 +17557 -17508
  16. package/dist/cjs/kup-box.cjs.entry.js +1289 -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 +7228 -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-85b2a756.js → kup-manager-7747decd.js} +7287 -7287
  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 +1185 -1027
  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 +45 -0
  40. package/dist/collection/assets/echart.js +176 -0
  41. package/dist/collection/assets/index.js +4 -0
  42. package/dist/collection/assets/planner.js +8189 -0
  43. package/dist/collection/collection-manifest.json +2 -2
  44. package/dist/collection/components/kup-accordion/kup-accordion-declarations.js +10 -10
  45. package/dist/collection/components/kup-accordion/kup-accordion.js +445 -445
  46. package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +27 -27
  47. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +908 -908
  48. package/dist/collection/components/kup-badge/kup-badge-declarations.js +10 -10
  49. package/dist/collection/components/kup-badge/kup-badge.js +276 -276
  50. package/dist/collection/components/kup-box/kup-box-declarations.js +33 -33
  51. package/dist/collection/components/kup-box/kup-box-state.js +15 -15
  52. package/dist/collection/components/kup-box/kup-box.js +2134 -2079
  53. package/dist/collection/components/kup-button/kup-button-declarations.js +18 -18
  54. package/dist/collection/components/kup-button/kup-button.js +580 -580
  55. package/dist/collection/components/kup-button-list/kup-button-list-declarations.js +13 -13
  56. package/dist/collection/components/kup-button-list/kup-button-list.e2e.js +144 -0
  57. package/dist/collection/components/kup-button-list/kup-button-list.js +527 -527
  58. package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +35 -35
  59. package/dist/collection/components/kup-calendar/kup-calendar.css +0 -4
  60. package/dist/collection/components/kup-calendar/kup-calendar.js +690 -690
  61. package/dist/collection/components/kup-card/box/kup-card-box.js +227 -227
  62. package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +56 -56
  63. package/dist/collection/components/kup-card/built-in/kup-card-calendar.js +393 -393
  64. package/dist/collection/components/kup-card/built-in/kup-card-clock.js +308 -308
  65. package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +165 -165
  66. package/dist/collection/components/kup-card/built-in/kup-card-message-box.js +10 -10
  67. package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +118 -118
  68. package/dist/collection/components/kup-card/collapsible/kup-card-collapsible.js +64 -64
  69. package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +217 -217
  70. package/dist/collection/components/kup-card/free/kup-card-free.js +22 -22
  71. package/dist/collection/components/kup-card/kup-card-declarations.js +98 -98
  72. package/dist/collection/components/kup-card/kup-card-helper.js +196 -196
  73. package/dist/collection/components/kup-card/kup-card.js +809 -809
  74. package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +251 -251
  75. package/dist/collection/components/kup-card/standard/kup-card-standard.js +593 -593
  76. package/dist/collection/components/kup-cell/kup-cell-declarations.js +11 -11
  77. package/dist/collection/components/kup-cell/kup-cell.js +401 -401
  78. package/dist/collection/components/kup-chart/kup-chart-builder.js +93 -93
  79. package/dist/collection/components/kup-chart/kup-chart-declarations.js +49 -49
  80. package/dist/collection/components/kup-chart/kup-chart.js +1080 -1080
  81. package/dist/collection/components/kup-checkbox/kup-checkbox-declarations.js +13 -13
  82. package/dist/collection/components/kup-checkbox/kup-checkbox.js +433 -433
  83. package/dist/collection/components/kup-chip/kup-chip-declarations.js +12 -12
  84. package/dist/collection/components/kup-chip/kup-chip.js +558 -558
  85. package/dist/collection/components/kup-color-picker/kup-color-picker-declarations.js +12 -12
  86. package/dist/collection/components/kup-color-picker/kup-color-picker.js +546 -546
  87. package/dist/collection/components/kup-combobox/kup-combobox-declarations.js +15 -15
  88. package/dist/collection/components/kup-combobox/kup-combobox.js +821 -821
  89. package/dist/collection/components/kup-dash/kup-dash.js +171 -171
  90. package/dist/collection/components/kup-dash-list/kup-dash-list.js +327 -327
  91. package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -10
  92. package/dist/collection/components/kup-dashboard/kup-dashboard.js +588 -588
  93. package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +157 -156
  94. package/dist/collection/components/kup-data-table/kup-data-table-helper.js +808 -808
  95. package/dist/collection/components/kup-data-table/kup-data-table-state.js +36 -36
  96. package/dist/collection/components/kup-data-table/kup-data-table.css +1 -0
  97. package/dist/collection/components/kup-data-table/kup-data-table.js +5572 -5527
  98. package/dist/collection/components/kup-date-picker/kup-date-picker-declarations.js +18 -18
  99. package/dist/collection/components/kup-date-picker/kup-date-picker.js +816 -816
  100. package/dist/collection/components/kup-dialog/kup-dialog-declarations.js +14 -14
  101. package/dist/collection/components/kup-dialog/kup-dialog.js +467 -467
  102. package/dist/collection/components/kup-drawer/kup-drawer-declarations.js +10 -10
  103. package/dist/collection/components/kup-drawer/kup-drawer.e2e.js +9 -0
  104. package/dist/collection/components/kup-drawer/kup-drawer.js +383 -383
  105. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button-declarations.js +18 -18
  106. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +800 -800
  107. package/dist/collection/components/kup-echart/kup-echart-declarations.js +53 -52
  108. package/dist/collection/components/kup-echart/kup-echart.js +1519 -1437
  109. package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +15 -15
  110. package/dist/collection/components/kup-family-tree/kup-family-tree.js +829 -829
  111. package/dist/collection/components/kup-form/kup-form-declarations.js +29 -29
  112. package/dist/collection/components/kup-form/kup-form.js +734 -731
  113. package/dist/collection/components/kup-gauge/kup-gauge-declarations.js +26 -26
  114. package/dist/collection/components/kup-gauge/kup-gauge.js +764 -764
  115. package/dist/collection/components/kup-grid/kup-grid-declarations.js +10 -10
  116. package/dist/collection/components/kup-grid/kup-grid.js +253 -253
  117. package/dist/collection/components/kup-iframe/kup-iframe-declarations.js +10 -10
  118. package/dist/collection/components/kup-iframe/kup-iframe.js +281 -281
  119. package/dist/collection/components/kup-image/canvas/kup-image-canvas-declarations.js +184 -184
  120. package/dist/collection/components/kup-image/canvas/kup-image-canvas-helper.js +19 -19
  121. package/dist/collection/components/kup-image/canvas/kup-image-canvas.js +225 -225
  122. package/dist/collection/components/kup-image/kup-image-declarations.js +16 -16
  123. package/dist/collection/components/kup-image/kup-image.js +491 -491
  124. package/dist/collection/components/kup-image-list/kup-image-list-declarations.js +10 -10
  125. package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -9
  126. package/dist/collection/components/kup-image-list/kup-image-list.js +533 -533
  127. package/dist/collection/components/kup-lazy/kup-lazy-declarations.js +20 -20
  128. package/dist/collection/components/kup-lazy/kup-lazy.js +430 -430
  129. package/dist/collection/components/kup-list/kup-list-declarations.js +34 -34
  130. package/dist/collection/components/kup-list/kup-list-helper.js +121 -121
  131. package/dist/collection/components/kup-list/kup-list.js +949 -949
  132. package/dist/collection/components/kup-magic-box/kup-magic-box-declarations.js +23 -23
  133. package/dist/collection/components/kup-magic-box/kup-magic-box.js +431 -431
  134. package/dist/collection/components/kup-nav-bar/kup-nav-bar-declarations.js +21 -21
  135. package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +315 -315
  136. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +16 -16
  137. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +864 -864
  138. package/dist/collection/components/kup-photo-frame/kup-photo-frame-declarations.js +10 -10
  139. package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +372 -372
  140. package/dist/collection/components/kup-planner/kup-planner-declarations.js +83 -76
  141. package/dist/collection/components/kup-planner/kup-planner-helper.js +54 -54
  142. package/dist/collection/components/kup-planner/kup-planner-state.js +16 -0
  143. package/dist/collection/components/kup-planner/kup-planner.css +2 -2
  144. package/dist/collection/components/kup-planner/kup-planner.js +1732 -1352
  145. package/dist/collection/components/kup-probe/kup-probe.js +358 -358
  146. package/dist/collection/components/kup-progress-bar/kup-progress-bar-declarations.js +14 -14
  147. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +405 -405
  148. package/dist/collection/components/kup-qlik/kup-qlik-declarations.js +1 -1
  149. package/dist/collection/components/kup-qlik/kup-qlik.js +326 -326
  150. package/dist/collection/components/kup-radio/kup-radio-declarations.js +12 -12
  151. package/dist/collection/components/kup-radio/kup-radio.js +398 -398
  152. package/dist/collection/components/kup-rating/kup-rating-declarations.js +11 -11
  153. package/dist/collection/components/kup-rating/kup-rating.js +332 -332
  154. package/dist/collection/components/kup-snackbar/kup-snackbar-declarations.js +13 -13
  155. package/dist/collection/components/kup-snackbar/kup-snackbar.js +389 -389
  156. package/dist/collection/components/kup-spinner/kup-spinner-declarations.js +15 -15
  157. package/dist/collection/components/kup-spinner/kup-spinner.js +468 -468
  158. package/dist/collection/components/kup-state/kup-state.js +1 -1
  159. package/dist/collection/components/kup-state/kup-store.js +1 -1
  160. package/dist/collection/components/kup-state/mock-store.js +13 -13
  161. package/dist/collection/components/kup-switch/kup-switch-declarations.js +12 -12
  162. package/dist/collection/components/kup-switch/kup-switch.js +402 -402
  163. package/dist/collection/components/kup-tab-bar/kup-tab-bar-declarations.js +10 -10
  164. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +443 -443
  165. package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +35 -35
  166. package/dist/collection/components/kup-text-field/kup-text-field.js +1193 -1189
  167. package/dist/collection/components/kup-time-picker/kup-time-picker-declarations.js +14 -14
  168. package/dist/collection/components/kup-time-picker/kup-time-picker.js +921 -921
  169. package/dist/collection/components/kup-tree/kup-tree-declarations.js +43 -43
  170. package/dist/collection/components/kup-tree/kup-tree-faker.js +305 -305
  171. package/dist/collection/components/kup-tree/kup-tree-state.js +15 -15
  172. package/dist/collection/components/kup-tree/kup-tree.js +2479 -2479
  173. package/dist/collection/f-components/f-button/f-button-declarations.js +17 -17
  174. package/dist/collection/f-components/f-button/f-button.js +91 -91
  175. package/dist/collection/f-components/f-cell/f-cell-declarations.js +158 -158
  176. package/dist/collection/f-components/f-cell/f-cell.js +435 -429
  177. package/dist/collection/f-components/f-checkbox/f-checkbox-declarations.js +1 -1
  178. package/dist/collection/f-components/f-checkbox/f-checkbox.js +16 -16
  179. package/dist/collection/f-components/f-chip/f-chip-declarations.js +15 -15
  180. package/dist/collection/f-components/f-chip/f-chip.js +101 -101
  181. package/dist/collection/f-components/f-image/f-image-declarations.js +8 -8
  182. package/dist/collection/f-components/f-image/f-image.js +100 -100
  183. package/dist/collection/f-components/f-paginator/f-paginator-declarations.js +5 -5
  184. package/dist/collection/f-components/f-paginator/f-paginator-utils.js +28 -28
  185. package/dist/collection/f-components/f-paginator/f-paginator.js +86 -86
  186. package/dist/collection/f-components/f-switch/f-switch-declarations.js +1 -1
  187. package/dist/collection/f-components/f-switch/f-switch.js +12 -12
  188. package/dist/collection/f-components/f-text-field/f-text-field-declarations.js +1 -1
  189. package/dist/collection/f-components/f-text-field/f-text-field-mdc.js +29 -29
  190. package/dist/collection/f-components/f-text-field/f-text-field.js +151 -151
  191. package/dist/collection/managers/kup-data/kup-data-cell-helper.js +86 -86
  192. package/dist/collection/managers/kup-data/kup-data-column-helper.js +300 -300
  193. package/dist/collection/managers/kup-data/kup-data-declarations.js +10 -10
  194. package/dist/collection/managers/kup-data/kup-data-node-helper.js +165 -165
  195. package/dist/collection/managers/kup-data/kup-data-row-helper.js +28 -28
  196. package/dist/collection/managers/kup-data/kup-data.js +499 -499
  197. package/dist/collection/managers/kup-dates/kup-dates-declarations.js +43 -43
  198. package/dist/collection/managers/kup-dates/kup-dates.js +654 -654
  199. package/dist/collection/managers/kup-debug/kup-debug-declarations.js +20 -20
  200. package/dist/collection/managers/kup-debug/kup-debug.js +670 -670
  201. package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position-declarations.js +27 -27
  202. package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +244 -244
  203. package/dist/collection/managers/kup-interact/kup-interact-declarations.js +49 -49
  204. package/dist/collection/managers/kup-interact/kup-interact.js +397 -397
  205. package/dist/collection/managers/kup-language/kup-language-declarations.js +211 -211
  206. package/dist/collection/managers/kup-language/kup-language.js +151 -151
  207. package/dist/collection/managers/kup-manager/kup-manager-declarations.js +1 -1
  208. package/dist/collection/managers/kup-manager/kup-manager.js +303 -303
  209. package/dist/collection/managers/kup-math/kup-math-declarations.js +13 -13
  210. package/dist/collection/managers/kup-math/kup-math-helper.js +39 -39
  211. package/dist/collection/managers/kup-math/kup-math.js +413 -413
  212. package/dist/collection/managers/kup-objects/kup-objects-declarations.js +1 -1
  213. package/dist/collection/managers/kup-objects/kup-objects.js +387 -387
  214. package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +10 -10
  215. package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover.js +334 -334
  216. package/dist/collection/managers/kup-search/kup-search-declarations.js +1 -1
  217. package/dist/collection/managers/kup-search/kup-search.js +75 -75
  218. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +177 -177
  219. package/dist/collection/managers/kup-theme/kup-theme.js +715 -715
  220. package/dist/collection/managers/kup-toolbar/kup-toolbar-declarations.js +9 -9
  221. package/dist/collection/managers/kup-toolbar/kup-toolbar.js +111 -111
  222. package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -1
  223. package/dist/collection/managers/kup-tooltip/kup-tooltip.js +229 -229
  224. package/dist/collection/types/GenericTypes.js +54 -54
  225. package/dist/collection/utils/cell-utils.js +156 -156
  226. package/dist/collection/utils/filters/filters-column-menu.js +360 -360
  227. package/dist/collection/utils/filters/filters-declarations.js +25 -25
  228. package/dist/collection/utils/filters/filters-rows.js +238 -238
  229. package/dist/collection/utils/filters/filters-tree-items.js +117 -117
  230. package/dist/collection/utils/filters/filters.js +287 -287
  231. package/dist/collection/utils/kup-column-menu/kup-column-menu-declarations.js +20 -20
  232. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +751 -751
  233. package/dist/collection/utils/utils.js +84 -80
  234. package/dist/collection/variables/GenericVariables.js +4 -4
  235. package/dist/components/kup-accordion.js +355 -355
  236. package/dist/components/kup-autocomplete2.js +31821 -31763
  237. package/dist/components/kup-box2.js +1463 -1405
  238. package/dist/components/kup-calendar.js +9788 -10280
  239. package/dist/components/kup-card.js +1 -1
  240. package/dist/components/kup-cell.js +325 -325
  241. package/dist/components/kup-chart.js +1 -1
  242. package/dist/components/kup-checkbox.js +1 -1
  243. package/dist/components/kup-chip.js +1 -1
  244. package/dist/components/kup-color-picker.js +1 -1
  245. package/dist/components/kup-combobox.js +1 -1
  246. package/dist/components/kup-dash-list.js +276 -276
  247. package/dist/components/kup-dash2.js +220 -220
  248. package/dist/components/kup-dashboard.js +549 -549
  249. package/dist/components/kup-data-table.js +1 -1
  250. package/dist/components/kup-date-picker.js +1 -1
  251. package/dist/components/kup-dialog.js +1 -1
  252. package/dist/components/kup-drawer.js +295 -295
  253. package/dist/components/kup-dropdown-button.js +1 -1
  254. package/dist/components/kup-echart2.js +7395 -6765
  255. package/dist/components/kup-family-tree.js +604 -604
  256. package/dist/components/kup-form.js +1 -1
  257. package/dist/components/kup-gauge.js +1 -1
  258. package/dist/components/kup-grid2.js +251 -251
  259. package/dist/components/kup-iframe.js +249 -249
  260. package/dist/components/kup-image-list.js +407 -407
  261. package/dist/components/kup-image.js +1 -1
  262. package/dist/components/kup-lazy.js +344 -344
  263. package/dist/components/kup-list.js +1 -1
  264. package/dist/components/kup-magic-box.js +461 -461
  265. package/dist/components/kup-nav-bar.js +284 -284
  266. package/dist/components/kup-numeric-picker.js +529 -529
  267. package/dist/components/kup-photo-frame.js +300 -300
  268. package/dist/components/kup-planner.js +1376 -1207
  269. package/dist/components/kup-probe.js +399 -399
  270. package/dist/components/kup-progress-bar.js +1 -1
  271. package/dist/components/kup-qlik.js +296 -296
  272. package/dist/components/kup-radio.js +1 -1
  273. package/dist/components/kup-rating.js +1 -1
  274. package/dist/components/kup-snackbar.js +273 -273
  275. package/dist/components/kup-spinner.js +1 -1
  276. package/dist/components/kup-switch.js +1 -1
  277. package/dist/components/kup-tab-bar.js +1 -1
  278. package/dist/components/kup-text-field.js +1 -1
  279. package/dist/components/kup-time-picker.js +1 -1
  280. package/dist/components/kup-tree.js +1 -1
  281. package/dist/esm/{GenericVariables-665de00a.js → GenericVariables-6dfdd433.js} +3 -3
  282. package/dist/esm/{component-120651a0.js → component-e86c51ea.js} +81 -2
  283. package/dist/esm/{f-button-declarations-b1b4cac4.js → f-button-declarations-fd4965d1.js} +16 -16
  284. package/dist/esm/{f-button-024f0cfe.js → f-button-e0e6f65f.js} +99 -99
  285. package/dist/esm/{f-cell-90240a8c.js → f-cell-359dfe28.js} +478 -472
  286. package/dist/esm/{f-checkbox-9b3f5f5b.js → f-checkbox-91358c27.js} +23 -23
  287. package/dist/esm/{f-chip-2238ad43.js → f-chip-0fd043b4.js} +125 -125
  288. package/dist/esm/{f-image-f2e9bf79.js → f-image-b853b0cc.js} +107 -107
  289. package/dist/esm/{f-paginator-utils-8cb3c023.js → f-paginator-utils-124c146a.js} +1548 -1548
  290. package/dist/esm/{f-text-field-d231982c.js → f-text-field-92bb3a1f.js} +172 -172
  291. package/dist/esm/{f-text-field-mdc-cee583ea.js → f-text-field-mdc-a1b4a919.js} +27 -28
  292. package/dist/esm/{index-8bd38435.js → index-bb15ce14.js} +93 -25
  293. package/dist/esm/ketchup.js +4 -4
  294. package/dist/esm/kup-accordion.entry.js +199 -200
  295. package/dist/esm/kup-autocomplete_27.entry.js +17557 -17508
  296. package/dist/esm/kup-box.entry.js +1289 -1232
  297. package/dist/esm/kup-calendar.entry.js +9557 -10050
  298. package/dist/esm/kup-cell.entry.js +172 -172
  299. package/dist/esm/kup-dash-list.entry.js +106 -106
  300. package/dist/esm/kup-dash_2.entry.js +162 -162
  301. package/dist/esm/kup-dashboard.entry.js +400 -401
  302. package/dist/esm/kup-drawer.entry.js +138 -138
  303. package/dist/esm/kup-echart.entry.js +7228 -6598
  304. package/dist/esm/kup-family-tree.entry.js +439 -439
  305. package/dist/esm/kup-iframe.entry.js +94 -94
  306. package/dist/esm/kup-image-list.entry.js +255 -256
  307. package/dist/esm/kup-lazy.entry.js +186 -186
  308. package/dist/esm/kup-magic-box.entry.js +298 -298
  309. package/dist/esm/{kup-manager-d1da769e.js → kup-manager-1e6ea451.js} +7288 -7287
  310. package/dist/esm/kup-nav-bar.entry.js +130 -130
  311. package/dist/esm/kup-numeric-picker.entry.js +367 -368
  312. package/dist/esm/kup-photo-frame.entry.js +144 -144
  313. package/dist/esm/kup-planner.entry.js +1185 -1027
  314. package/dist/esm/kup-probe.entry.js +246 -246
  315. package/dist/esm/kup-qlik.entry.js +138 -138
  316. package/dist/esm/kup-snackbar.entry.js +116 -116
  317. package/dist/esm/loader.js +4 -4
  318. package/dist/ketchup/ketchup.esm.js +1 -1
  319. package/dist/ketchup/{p-3cf64473.js → p-0143e942.js} +1 -1
  320. package/dist/ketchup/{p-5f3680f2.js → p-1ca9aece.js} +1 -1
  321. package/dist/ketchup/p-1cd5785e.entry.js +9 -0
  322. package/dist/ketchup/{p-410c102a.js → p-2ac2c05e.js} +1 -1
  323. package/dist/ketchup/{p-8b46e7ce.js → p-349d4715.js} +1 -1
  324. package/dist/ketchup/{p-83435e6c.entry.js → p-374f867e.entry.js} +1 -1
  325. package/dist/ketchup/{p-c42b80c1.entry.js → p-41c00681.entry.js} +1 -1
  326. package/dist/ketchup/p-5dbd4402.entry.js +1 -0
  327. package/dist/ketchup/{p-89743989.entry.js → p-620faa59.entry.js} +1 -1
  328. package/dist/ketchup/{p-10d84b1b.js → p-6507e9eb.js} +7 -6
  329. package/dist/ketchup/{p-a84f1d24.entry.js → p-6837f725.entry.js} +1 -1
  330. package/dist/ketchup/p-6d46cbb0.js +30 -0
  331. package/dist/ketchup/{p-e1f1e661.entry.js → p-6e79b764.entry.js} +1 -1
  332. package/dist/ketchup/{p-1ad628fb.entry.js → p-818a4a09.entry.js} +1 -1
  333. package/dist/ketchup/p-81e20baa.entry.js +1 -0
  334. package/dist/ketchup/p-85d6bb1f.entry.js +1 -0
  335. package/dist/ketchup/p-8c1804d7.entry.js +1 -0
  336. package/dist/ketchup/{p-163b18b9.entry.js → p-ad919f87.entry.js} +1 -1
  337. package/dist/ketchup/{p-651d89c8.entry.js → p-adad6804.entry.js} +1 -1
  338. package/dist/ketchup/{p-37067ee6.entry.js → p-adebe276.entry.js} +1 -1
  339. package/dist/ketchup/p-b5deb573.js +2 -0
  340. package/dist/ketchup/{p-f876125d.entry.js → p-b73b3b52.entry.js} +1 -1
  341. package/dist/ketchup/{p-0d7d59c7.entry.js → p-ba0c4019.entry.js} +1 -1
  342. package/dist/ketchup/p-c010483d.entry.js +25 -0
  343. package/dist/ketchup/p-c1b10c9c.entry.js +1 -0
  344. package/dist/ketchup/{p-063d4c27.entry.js → p-c28be862.entry.js} +1 -1
  345. package/dist/ketchup/p-c6088459.entry.js +39 -0
  346. package/dist/ketchup/{p-43b67de4.entry.js → p-cf24193b.entry.js} +1 -1
  347. package/dist/ketchup/p-e646523d.js +1 -0
  348. package/dist/ketchup/p-e8977116.entry.js +1 -0
  349. package/dist/ketchup/{p-27a56c87.js → p-fb03f2f5.js} +2 -2
  350. package/dist/ketchup/{p-eda7f130.js → p-fb29ba2a.js} +1 -1
  351. package/dist/ketchup/{p-9f9b6656.js → p-fd1323da.js} +1 -1
  352. package/dist/loader/index.d.ts +1 -1
  353. package/dist/types/components/kup-accordion/kup-accordion-declarations.d.ts +20 -20
  354. package/dist/types/components/kup-accordion/kup-accordion.d.ts +80 -80
  355. package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +35 -35
  356. package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +119 -119
  357. package/dist/types/components/kup-badge/kup-badge-declarations.d.ts +9 -9
  358. package/dist/types/components/kup-badge/kup-badge.d.ts +51 -51
  359. package/dist/types/components/kup-box/kup-box-declarations.d.ts +113 -113
  360. package/dist/types/components/kup-box/kup-box-state.d.ts +10 -10
  361. package/dist/types/components/kup-box/kup-box.d.ts +270 -270
  362. package/dist/types/components/kup-button/kup-button-declarations.d.ts +24 -24
  363. package/dist/types/components/kup-button/kup-button.d.ts +111 -111
  364. package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +24 -24
  365. package/dist/types/components/kup-button-list/kup-button-list.d.ts +82 -82
  366. package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +70 -70
  367. package/dist/types/components/kup-calendar/kup-calendar.d.ts +100 -100
  368. package/dist/types/components/kup-card/box/kup-card-box.d.ts +50 -50
  369. package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +39 -39
  370. package/dist/types/components/kup-card/built-in/kup-card-calendar.d.ts +2 -2
  371. package/dist/types/components/kup-card/built-in/kup-card-clock.d.ts +2 -2
  372. package/dist/types/components/kup-card/built-in/kup-card-column-drop-menu.d.ts +3 -3
  373. package/dist/types/components/kup-card/built-in/kup-card-message-box.d.ts +3 -3
  374. package/dist/types/components/kup-card/built-in/kup-card-numeric.d.ts +2 -2
  375. package/dist/types/components/kup-card/collapsible/kup-card-collapsible.d.ts +14 -14
  376. package/dist/types/components/kup-card/dialog/kup-card-dialog.d.ts +44 -44
  377. package/dist/types/components/kup-card/free/kup-card-free.d.ts +14 -14
  378. package/dist/types/components/kup-card/kup-card-declarations.d.ts +236 -236
  379. package/dist/types/components/kup-card/kup-card-helper.d.ts +27 -27
  380. package/dist/types/components/kup-card/kup-card.d.ts +159 -159
  381. package/dist/types/components/kup-card/scalable/kup-card-scalable.d.ts +56 -56
  382. package/dist/types/components/kup-card/standard/kup-card-standard.d.ts +92 -92
  383. package/dist/types/components/kup-cell/kup-cell-declarations.d.ts +10 -10
  384. package/dist/types/components/kup-cell/kup-cell.d.ts +67 -67
  385. package/dist/types/components/kup-chart/kup-chart-builder.d.ts +7 -7
  386. package/dist/types/components/kup-chart/kup-chart-declarations.d.ts +135 -135
  387. package/dist/types/components/kup-chart/kup-chart.d.ts +170 -170
  388. package/dist/types/components/kup-checkbox/kup-checkbox-declarations.d.ts +17 -17
  389. package/dist/types/components/kup-checkbox/kup-checkbox.d.ts +85 -85
  390. package/dist/types/components/kup-chip/kup-chip-declarations.d.ts +22 -22
  391. package/dist/types/components/kup-chip/kup-chip.d.ts +89 -89
  392. package/dist/types/components/kup-color-picker/kup-color-picker-declarations.d.ts +15 -15
  393. package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +89 -89
  394. package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +24 -24
  395. package/dist/types/components/kup-combobox/kup-combobox.d.ts +95 -95
  396. package/dist/types/components/kup-dash/kup-dash.d.ts +33 -33
  397. package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +22 -22
  398. package/dist/types/components/kup-dashboard/kup-dashboard-declarations.d.ts +61 -61
  399. package/dist/types/components/kup-dashboard/kup-dashboard.d.ts +80 -80
  400. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +258 -254
  401. package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +25 -25
  402. package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +36 -36
  403. package/dist/types/components/kup-data-table/kup-data-table.d.ts +452 -444
  404. package/dist/types/components/kup-date-picker/kup-date-picker-declarations.d.ts +20 -20
  405. package/dist/types/components/kup-date-picker/kup-date-picker.d.ts +110 -110
  406. package/dist/types/components/kup-dialog/kup-dialog-declarations.d.ts +26 -26
  407. package/dist/types/components/kup-dialog/kup-dialog.d.ts +77 -77
  408. package/dist/types/components/kup-drawer/kup-drawer-declarations.d.ts +9 -9
  409. package/dist/types/components/kup-drawer/kup-drawer.d.ts +74 -74
  410. package/dist/types/components/kup-dropdown-button/kup-dropdown-button-declarations.d.ts +21 -21
  411. package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +161 -161
  412. package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +63 -62
  413. package/dist/types/components/kup-echart/kup-echart.d.ts +111 -111
  414. package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +38 -38
  415. package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +87 -87
  416. package/dist/types/components/kup-form/kup-form-declarations.d.ts +64 -64
  417. package/dist/types/components/kup-form/kup-form.d.ts +83 -83
  418. package/dist/types/components/kup-gauge/kup-gauge-declarations.d.ts +25 -25
  419. package/dist/types/components/kup-gauge/kup-gauge.d.ts +147 -147
  420. package/dist/types/components/kup-grid/kup-grid-declarations.d.ts +9 -9
  421. package/dist/types/components/kup-grid/kup-grid.d.ts +48 -48
  422. package/dist/types/components/kup-iframe/kup-iframe-declarations.d.ts +9 -9
  423. package/dist/types/components/kup-iframe/kup-iframe.d.ts +49 -49
  424. package/dist/types/components/kup-image/canvas/kup-image-canvas-declarations.d.ts +23 -23
  425. package/dist/types/components/kup-image/canvas/kup-image-canvas-helper.d.ts +2 -2
  426. package/dist/types/components/kup-image/canvas/kup-image-canvas.d.ts +28 -28
  427. package/dist/types/components/kup-image/kup-image-declarations.d.ts +19 -19
  428. package/dist/types/components/kup-image/kup-image.d.ts +103 -103
  429. package/dist/types/components/kup-image-list/kup-image-list-declarations.d.ts +14 -14
  430. package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -6
  431. package/dist/types/components/kup-image-list/kup-image-list.d.ts +73 -73
  432. package/dist/types/components/kup-lazy/kup-lazy-declarations.d.ts +18 -18
  433. package/dist/types/components/kup-lazy/kup-lazy.d.ts +78 -78
  434. package/dist/types/components/kup-list/kup-list-declarations.d.ts +48 -48
  435. package/dist/types/components/kup-list/kup-list-helper.d.ts +6 -6
  436. package/dist/types/components/kup-list/kup-list.d.ts +128 -128
  437. package/dist/types/components/kup-magic-box/kup-magic-box-declarations.d.ts +21 -21
  438. package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +65 -65
  439. package/dist/types/components/kup-nav-bar/kup-nav-bar-declarations.d.ts +19 -19
  440. package/dist/types/components/kup-nav-bar/kup-nav-bar.d.ts +65 -65
  441. package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +19 -19
  442. package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +121 -121
  443. package/dist/types/components/kup-photo-frame/kup-photo-frame-declarations.d.ts +9 -9
  444. package/dist/types/components/kup-photo-frame/kup-photo-frame.d.ts +61 -61
  445. package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +127 -106
  446. package/dist/types/components/kup-planner/kup-planner-helper.d.ts +6 -6
  447. package/dist/types/components/kup-planner/kup-planner-state.d.ts +13 -0
  448. package/dist/types/components/kup-planner/kup-planner.d.ts +266 -212
  449. package/dist/types/components/kup-probe/kup-probe.d.ts +72 -72
  450. package/dist/types/components/kup-progress-bar/kup-progress-bar-declarations.d.ts +13 -13
  451. package/dist/types/components/kup-progress-bar/kup-progress-bar.d.ts +69 -69
  452. package/dist/types/components/kup-qlik/kup-qlik-declarations.d.ts +19 -19
  453. package/dist/types/components/kup-qlik/kup-qlik.d.ts +100 -100
  454. package/dist/types/components/kup-radio/kup-radio-declarations.d.ts +23 -23
  455. package/dist/types/components/kup-radio/kup-radio.d.ts +80 -80
  456. package/dist/types/components/kup-rating/kup-rating-declarations.d.ts +14 -14
  457. package/dist/types/components/kup-rating/kup-rating.d.ts +62 -62
  458. package/dist/types/components/kup-snackbar/kup-snackbar-declarations.d.ts +12 -12
  459. package/dist/types/components/kup-snackbar/kup-snackbar.d.ts +84 -84
  460. package/dist/types/components/kup-spinner/kup-spinner-declarations.d.ts +14 -14
  461. package/dist/types/components/kup-spinner/kup-spinner.d.ts +79 -79
  462. package/dist/types/components/kup-state/kup-state.d.ts +3 -3
  463. package/dist/types/components/kup-state/kup-store.d.ts +4 -4
  464. package/dist/types/components/kup-state/mock-store.d.ts +8 -8
  465. package/dist/types/components/kup-switch/kup-switch-declarations.d.ts +15 -15
  466. package/dist/types/components/kup-switch/kup-switch.d.ts +80 -80
  467. package/dist/types/components/kup-tab-bar/kup-tab-bar-declarations.d.ts +21 -21
  468. package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +77 -77
  469. package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +38 -38
  470. package/dist/types/components/kup-text-field/kup-text-field.d.ts +253 -253
  471. package/dist/types/components/kup-time-picker/kup-time-picker-declarations.d.ts +17 -17
  472. package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +125 -125
  473. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +97 -97
  474. package/dist/types/components/kup-tree/kup-tree-faker.d.ts +54 -54
  475. package/dist/types/components/kup-tree/kup-tree-state.d.ts +14 -14
  476. package/dist/types/components/kup-tree/kup-tree.d.ts +362 -362
  477. package/dist/types/components.d.ts +112 -14
  478. package/dist/types/f-components/f-button/f-button-declarations.d.ts +41 -41
  479. package/dist/types/f-components/f-button/f-button.d.ts +3 -3
  480. package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +162 -162
  481. package/dist/types/f-components/f-cell/f-cell.d.ts +3 -3
  482. package/dist/types/f-components/f-checkbox/f-checkbox-declarations.d.ts +15 -15
  483. package/dist/types/f-components/f-checkbox/f-checkbox.d.ts +3 -3
  484. package/dist/types/f-components/f-chip/f-chip-declarations.d.ts +29 -29
  485. package/dist/types/f-components/f-chip/f-chip.d.ts +3 -3
  486. package/dist/types/f-components/f-image/f-image-declarations.d.ts +36 -36
  487. package/dist/types/f-components/f-image/f-image.d.ts +3 -3
  488. package/dist/types/f-components/f-paginator/f-paginator-declarations.d.ts +22 -22
  489. package/dist/types/f-components/f-paginator/f-paginator-utils.d.ts +2 -2
  490. package/dist/types/f-components/f-paginator/f-paginator.d.ts +3 -3
  491. package/dist/types/f-components/f-switch/f-switch-declarations.d.ts +14 -14
  492. package/dist/types/f-components/f-switch/f-switch.d.ts +3 -3
  493. package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +42 -42
  494. package/dist/types/f-components/f-text-field/f-text-field-mdc.d.ts +6 -6
  495. package/dist/types/f-components/f-text-field/f-text-field.d.ts +3 -3
  496. package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +31 -31
  497. package/dist/types/managers/kup-data/kup-data-column-helper.d.ts +39 -39
  498. package/dist/types/managers/kup-data/kup-data-declarations.d.ts +173 -173
  499. package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +44 -44
  500. package/dist/types/managers/kup-data/kup-data-row-helper.d.ts +14 -14
  501. package/dist/types/managers/kup-data/kup-data.d.ts +86 -86
  502. package/dist/types/managers/kup-dates/kup-dates-declarations.d.ts +39 -39
  503. package/dist/types/managers/kup-dates/kup-dates.d.ts +207 -207
  504. package/dist/types/managers/kup-debug/kup-debug-declarations.d.ts +38 -38
  505. package/dist/types/managers/kup-debug/kup-debug.d.ts +95 -95
  506. package/dist/types/managers/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +50 -50
  507. package/dist/types/managers/kup-dynamic-position/kup-dynamic-position.d.ts +61 -61
  508. package/dist/types/managers/kup-interact/kup-interact-declarations.d.ts +128 -128
  509. package/dist/types/managers/kup-interact/kup-interact.d.ts +105 -105
  510. package/dist/types/managers/kup-language/kup-language-declarations.d.ts +225 -225
  511. package/dist/types/managers/kup-language/kup-language.d.ts +52 -52
  512. package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +162 -162
  513. package/dist/types/managers/kup-manager/kup-manager.d.ts +95 -95
  514. package/dist/types/managers/kup-math/kup-math-declarations.d.ts +33 -33
  515. package/dist/types/managers/kup-math/kup-math-helper.d.ts +17 -17
  516. package/dist/types/managers/kup-math/kup-math.d.ts +147 -146
  517. package/dist/types/managers/kup-objects/kup-objects-declarations.d.ts +15 -15
  518. package/dist/types/managers/kup-objects/kup-objects.d.ts +210 -210
  519. package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +28 -28
  520. package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +62 -62
  521. package/dist/types/managers/kup-search/kup-search-declarations.d.ts +7 -7
  522. package/dist/types/managers/kup-search/kup-search.d.ts +20 -20
  523. package/dist/types/managers/kup-theme/kup-theme-declarations.d.ts +185 -185
  524. package/dist/types/managers/kup-theme/kup-theme.d.ts +127 -127
  525. package/dist/types/managers/kup-toolbar/kup-toolbar-declarations.d.ts +8 -8
  526. package/dist/types/managers/kup-toolbar/kup-toolbar.d.ts +39 -39
  527. package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -8
  528. package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +51 -51
  529. package/dist/types/stencil-public-runtime.d.ts +3 -0
  530. package/dist/types/types/GenericTypes.d.ts +110 -110
  531. package/dist/types/utils/cell-utils.d.ts +10 -10
  532. package/dist/types/utils/filters/filters-column-menu.d.ts +96 -96
  533. package/dist/types/utils/filters/filters-declarations.d.ts +39 -39
  534. package/dist/types/utils/filters/filters-rows.d.ts +30 -30
  535. package/dist/types/utils/filters/filters-tree-items.d.ts +19 -19
  536. package/dist/types/utils/filters/filters.d.ts +72 -72
  537. package/dist/types/utils/kup-column-menu/kup-column-menu-declarations.d.ts +19 -19
  538. package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +142 -142
  539. package/dist/types/utils/utils.d.ts +37 -35
  540. package/dist/types/variables/GenericVariables.d.ts +4 -4
  541. package/package.json +21 -16
  542. package/dist/cjs/tslib.es6-386654de.js +0 -87
  543. package/dist/esm/tslib.es6-8c2af864.js +0 -82
  544. package/dist/ketchup/p-0bcda0e2.entry.js +0 -1
  545. package/dist/ketchup/p-33aff1ca.entry.js +0 -25
  546. package/dist/ketchup/p-3432ebaf.entry.js +0 -9
  547. package/dist/ketchup/p-35b29b22.entry.js +0 -1
  548. package/dist/ketchup/p-36dac88e.js +0 -30
  549. package/dist/ketchup/p-39a55c47.js +0 -1
  550. package/dist/ketchup/p-489d55ff.entry.js +0 -39
  551. package/dist/ketchup/p-73c8d651.entry.js +0 -1
  552. package/dist/ketchup/p-7f59211b.js +0 -1
  553. package/dist/ketchup/p-9dcfbb1e.js +0 -2
  554. package/dist/ketchup/p-b2fd2dbf.entry.js +0 -1
  555. package/dist/ketchup/p-d1b050d0.entry.js +0 -27
  556. package/dist/ketchup/p-d6ea709e.entry.js +0 -1
  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,1352 +1,1732 @@
1
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
- if (kind === "m")
3
- throw new TypeError("Private method is not writable");
4
- if (kind === "a" && !f)
5
- throw new TypeError("Private accessor was defined without a setter");
6
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
7
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
8
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
9
- };
10
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11
- if (kind === "a" && !f)
12
- throw new TypeError("Private accessor was defined without a getter");
13
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
14
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
15
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
16
- };
17
- 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;
18
- import { forceUpdate, getAssetPath, h, Host, } from '@stencil/core';
19
- import { kupManagerInstance, } from '../../managers/kup-manager/kup-manager';
20
- import { defaultStylingOptions, KupPlannerLastOnChangeReceived, KupPlannerProps, KupPlannerTaskAction, KupPlannerGanttRowType, } from './kup-planner-declarations';
21
- import { getProps, setProps } from '../../utils/utils';
22
- import { componentWrapperId } from '../../variables/GenericVariables';
23
- import { createRoot } from 'react-dom/client';
24
- import React from 'react';
25
- import { Planner, } from '@sme.up/gantt-component';
26
- import { getCellValueForDisplay } from '../../utils/cell-utils';
27
- import { getValuesToShow, isAtLeastOneDateValid, sanitizeAllDates, } from './kup-planner-helper';
28
- import { FTextField } from '../../f-components/f-text-field/f-text-field';
29
- import { FTextFieldMDC } from '../../f-components/f-text-field/f-text-field-mdc';
30
- import { KupThemeIconValues } from '../../managers/kup-theme/kup-theme-declarations';
31
- import { KupLanguageSearch } from '../../managers/kup-language/kup-language-declarations';
32
- export class KupPlanner {
33
- constructor() {
34
- _KupPlanner_instances.add(this);
35
- /*-------------------------------------------------*/
36
- /* I n t e r n a l V a r i a b l e s */
37
- /*-------------------------------------------------*/
38
- _KupPlanner_kupManager.set(this, kupManagerInstance());
39
- _KupPlanner_lastOnChangeReceived.set(this, void 0);
40
- _KupPlanner_rootPlanner.set(this, void 0);
41
- _KupPlanner_phases.set(this, {});
42
- // no re-render
43
- _KupPlanner_showSecondaryDatesLocal.set(this, false);
44
- this.customStyle = '';
45
- this.data = undefined;
46
- this.detailData = undefined;
47
- this.detailColorCol = undefined;
48
- this.detailColumns = undefined;
49
- this.detailDates = undefined;
50
- this.detailHeight = undefined;
51
- this.detailIconCol = undefined;
52
- this.detailIdCol = undefined;
53
- this.detailNameCol = undefined;
54
- this.detailPrevDates = undefined;
55
- this.listCellWidth = '300px';
56
- this.maxWidth = '90vw';
57
- this.phaseColorCol = undefined;
58
- this.phaseColumns = undefined;
59
- this.phaseColParDep = undefined;
60
- this.phaseDates = undefined;
61
- this.phaseIconCol = undefined;
62
- this.phaseIdCol = undefined;
63
- this.phaseNameCol = undefined;
64
- this.phasePrevDates = undefined;
65
- this.showSecondaryDates = false;
66
- this.taskColumns = undefined;
67
- this.taskDates = undefined;
68
- this.taskHeight = undefined;
69
- this.taskIconCol = undefined;
70
- this.taskIdCol = undefined;
71
- this.taskNameCol = undefined;
72
- this.taskPrevDates = undefined;
73
- this.titleMess = undefined;
74
- this.plannerProps = undefined;
75
- }
76
- dataChanged() {
77
- __classPrivateFieldSet(this, _KupPlanner_phases, {}, "f");
78
- }
79
- showSecondaryDatesChanged() {
80
- var _a;
81
- __classPrivateFieldSet(this, _KupPlanner_showSecondaryDatesLocal, this.showSecondaryDates, "f");
82
- if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
83
- this.plannerProps.mainGantt.showSecondaryDates =
84
- this.showSecondaryDates;
85
- }
86
- }
87
- /*-------------------------------------------------*/
88
- /* P u b l i c M e t h o d s */
89
- /*-------------------------------------------------*/
90
- /**
91
- * Used to retrieve component's props values.
92
- * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
93
- * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
94
- */
95
- async getProps(descriptions) {
96
- return getProps(this, KupPlannerProps, descriptions);
97
- }
98
- /**
99
- * This method is used to trigger a new render of the component.
100
- */
101
- async refresh() {
102
- forceUpdate(this);
103
- }
104
- /**
105
- * Sets the props to the component.
106
- * @param {GenericObject} props - Object containing props that will be set to the component.
107
- */
108
- async setProps(props) {
109
- setProps(this, KupPlannerProps, props);
110
- }
111
- /**
112
- * Add a list of phases to the project
113
- * @param taskId
114
- * @param data - Matrix which contains project phases
115
- */
116
- async addPhases(taskId, data) {
117
- var _a;
118
- const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
119
- if (task) {
120
- __classPrivateFieldGet(this, _KupPlanner_phases, "f")[taskId] = data;
121
- 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) => {
122
- const datesSanitized = sanitizeAllDates(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]], row.cells[this.phasePrevDates[0]], row.cells[this.phasePrevDates[1]]);
123
- const valuesToShow = getValuesToShow(row, this.phaseIdCol, this.phaseNameCol, data.columns, this.phaseColumns, () => this.phaseColumns.map((col) => col == this.phaseDates[0]
124
- ? '#START#'
125
- : col == this.phaseDates[1]
126
- ? '#END#'
127
- : getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
128
- let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.phaseIconCol);
129
- let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.phaseIconCol);
130
- let phase = {
131
- taskRow: task.taskRow,
132
- phaseRow: row,
133
- id: task.id + '_' + row.cells[this.phaseIdCol].value,
134
- phaseRowId: row.id,
135
- taskRowId: task.taskRowId,
136
- name: row.cells[this.phaseNameCol].value,
137
- startDate: datesSanitized.dateValues[0],
138
- endDate: datesSanitized.dateValues[1],
139
- secondaryStartDate: datesSanitized.secDateValues[0],
140
- secondaryEndDate: datesSanitized.secDateValues[1],
141
- type: 'task',
142
- color: row.cells[this.phaseColorCol].value,
143
- selectedColor: row.cells[this.phaseColorCol].value,
144
- valuesToShow: valuesToShow,
145
- rowType: KupPlannerGanttRowType.PHASE,
146
- icon: iconUrl
147
- ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
148
- : undefined,
149
- };
150
- return phase;
151
- });
152
- }
153
- this.plannerProps = Object.assign({}, this.plannerProps);
154
- }
155
- //---- Lifecycle hooks ----
156
- componentWillLoad() {
157
- __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, false);
158
- __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.register(this);
159
- }
160
- componentDidLoad() {
161
- __classPrivateFieldSet(this, _KupPlanner_showSecondaryDatesLocal, this.showSecondaryDates, "f");
162
- let details = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, this.detailData);
163
- if (details && details.length == 0) {
164
- details = undefined;
165
- }
166
- const mainFilter = this.rootElement.shadowRoot.querySelector('#main-filter');
167
- FTextFieldMDC(mainFilter);
168
- const secondaryFilter = this.rootElement.shadowRoot.querySelector('#secondary-filter');
169
- if (details) {
170
- FTextFieldMDC(secondaryFilter);
171
- }
172
- this.plannerProps = {
173
- mainGantt: {
174
- title: this.titleMess,
175
- items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, this.data),
176
- stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
177
- filter: mainFilter,
178
- hideLabel: true,
179
- ganttHeight: this.taskHeight,
180
- showSecondaryDates: __classPrivateFieldGet(this, _KupPlanner_showSecondaryDatesLocal, "f"),
181
- onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
182
- onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
183
- onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
184
- },
185
- secondaryGantt: details
186
- ? {
187
- title: '',
188
- items: details,
189
- stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
190
- filter: secondaryFilter,
191
- hideLabel: true,
192
- ganttHeight: this.detailHeight,
193
- onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
194
- onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
195
- onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
196
- }
197
- : undefined,
198
- onSetDoubleView: (checked) => this.handleOnSetDoubleView(checked),
199
- };
200
- __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
201
- this.kupReady.emit({
202
- comp: this,
203
- id: this.rootElement.id,
204
- value: undefined,
205
- });
206
- __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, true);
207
- }
208
- componentWillRender() {
209
- __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
210
- }
211
- componentDidRender() {
212
- __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logRender(this, true);
213
- }
214
- onKupClick(event, taskAction) {
215
- this.kupClick.emit({
216
- comp: this,
217
- id: this.rootElement.id,
218
- value: event,
219
- taskAction: taskAction,
220
- });
221
- }
222
- onKupContextMenu(event, ganttRow, taskAction) {
223
- let row;
224
- let cell;
225
- let column;
226
- switch (ganttRow.type) {
227
- case 'project': {
228
- row = ganttRow.taskRow;
229
- cell = row.cells[this.taskIdCol];
230
- column = this.data.columns[this.taskIdCol];
231
- break;
232
- }
233
- case 'task': {
234
- row = ganttRow.phaseRow;
235
- cell = row.cells[this.phaseIdCol];
236
- //column = this.data.columns[this.taskIdCol];
237
- break;
238
- }
239
- case 'timeline': {
240
- row = ganttRow.detailRow;
241
- cell = row.cells[this.detailIdCol];
242
- column = this.data.columns[this.detailIdCol];
243
- break;
244
- }
245
- }
246
- this.kupContextMenu.emit({
247
- comp: this,
248
- id: this.rootElement.id,
249
- value: ganttRow,
250
- taskAction: taskAction,
251
- details: {
252
- cell: cell,
253
- column: column,
254
- originalEvent: event,
255
- row: row,
256
- },
257
- });
258
- }
259
- onKupDateChange(event, taskAction) {
260
- this.kupDateChange.emit({
261
- comp: this,
262
- id: this.rootElement.id,
263
- value: event,
264
- taskAction: taskAction,
265
- });
266
- }
267
- handleOnClick(nativeEvent) {
268
- switch (nativeEvent.rowType) {
269
- case KupPlannerGanttRowType.TASK:
270
- const taskAction = nativeEvent.phases
271
- ? KupPlannerTaskAction.onTaskClosing
272
- : KupPlannerTaskAction.onTaskOpening;
273
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnTask).call(this, nativeEvent)) {
274
- this.onKupClick(nativeEvent, taskAction);
275
- }
276
- break;
277
- case KupPlannerGanttRowType.PHASE:
278
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
279
- this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
280
- }
281
- break;
282
- case KupPlannerGanttRowType.DETAIL:
283
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnDetail).call(this)) {
284
- this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
285
- }
286
- break;
287
- }
288
- }
289
- handleOnContextMenu(event, row) {
290
- switch (row.rowType) {
291
- case KupPlannerGanttRowType.TASK:
292
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnTask).call(this)) {
293
- this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
294
- }
295
- break;
296
- case KupPlannerGanttRowType.PHASE:
297
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnPhase).call(this)) {
298
- this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
299
- }
300
- break;
301
- case KupPlannerGanttRowType.DETAIL:
302
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnDetail).call(this)) {
303
- this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
304
- }
305
- break;
306
- }
307
- }
308
- handleOnSetDoubleView(checked) {
309
- var _a;
310
- __classPrivateFieldSet(this, _KupPlanner_showSecondaryDatesLocal, checked, "f");
311
- if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
312
- this.plannerProps.mainGantt.showSecondaryDates = checked;
313
- }
314
- }
315
- handleOnDateChange(nativeEvent) {
316
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_emitOnChangeEventsReceived).call(this, nativeEvent)) {
317
- if (nativeEvent.rowType != KupPlannerGanttRowType.DETAIL) {
318
- this.onKupDateChange(nativeEvent, KupPlannerTaskAction.onResize);
319
- }
320
- }
321
- }
322
- render() {
323
- var _a;
324
- 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) => {
325
- if (e.key === 'Enter') {
326
- __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e);
327
- }
328
- }, 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) => {
329
- if (e.key === 'Enter') {
330
- __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e, true);
331
- }
332
- }, wrapperClass: "filter" })) : null));
333
- }
334
- disconnectedCallback() {
335
- __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.unregister(this);
336
- }
337
- static get is() { return "kup-planner"; }
338
- static get encapsulation() { return "shadow"; }
339
- static get originalStyleUrls() {
340
- return {
341
- "$": ["kup-planner.scss"]
342
- };
343
- }
344
- static get styleUrls() {
345
- return {
346
- "$": ["kup-planner.css"]
347
- };
348
- }
349
- static get properties() {
350
- return {
351
- "customStyle": {
352
- "type": "string",
353
- "mutable": false,
354
- "complexType": {
355
- "original": "string",
356
- "resolved": "string",
357
- "references": {}
358
- },
359
- "required": false,
360
- "optional": false,
361
- "docs": {
362
- "tags": [{
363
- "name": "default",
364
- "text": "\"\""
365
- }, {
366
- "name": "see",
367
- "text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
368
- }],
369
- "text": "Custom style of the component."
370
- },
371
- "attribute": "custom-style",
372
- "reflect": false,
373
- "defaultValue": "''"
374
- },
375
- "data": {
376
- "type": "unknown",
377
- "mutable": false,
378
- "complexType": {
379
- "original": "KupDataDataset",
380
- "resolved": "KupDataDataset",
381
- "references": {
382
- "KupDataDataset": {
383
- "location": "import",
384
- "path": "../../managers/kup-data/kup-data-declarations"
385
- }
386
- }
387
- },
388
- "required": false,
389
- "optional": false,
390
- "docs": {
391
- "tags": [{
392
- "name": "default",
393
- "text": "null"
394
- }],
395
- "text": "Dataset containg the tasks list"
396
- }
397
- },
398
- "detailData": {
399
- "type": "unknown",
400
- "mutable": false,
401
- "complexType": {
402
- "original": "KupDataDataset",
403
- "resolved": "KupDataDataset",
404
- "references": {
405
- "KupDataDataset": {
406
- "location": "import",
407
- "path": "../../managers/kup-data/kup-data-declarations"
408
- }
409
- }
410
- },
411
- "required": false,
412
- "optional": false,
413
- "docs": {
414
- "tags": [{
415
- "name": "default",
416
- "text": "null"
417
- }],
418
- "text": "Dataset containg the details list"
419
- }
420
- },
421
- "detailColorCol": {
422
- "type": "string",
423
- "mutable": false,
424
- "complexType": {
425
- "original": "string",
426
- "resolved": "string",
427
- "references": {}
428
- },
429
- "required": false,
430
- "optional": false,
431
- "docs": {
432
- "tags": [{
433
- "name": "default",
434
- "text": "null"
435
- }],
436
- "text": "Column containing the detail color, in hex format"
437
- },
438
- "attribute": "detail-color-col",
439
- "reflect": false
440
- },
441
- "detailColumns": {
442
- "type": "unknown",
443
- "mutable": false,
444
- "complexType": {
445
- "original": "string[]",
446
- "resolved": "string[]",
447
- "references": {}
448
- },
449
- "required": false,
450
- "optional": false,
451
- "docs": {
452
- "tags": [{
453
- "name": "default",
454
- "text": "null"
455
- }],
456
- "text": "Columns containing informations displayed in the left box, near the gantt of details"
457
- }
458
- },
459
- "detailDates": {
460
- "type": "unknown",
461
- "mutable": false,
462
- "complexType": {
463
- "original": "string[]",
464
- "resolved": "string[]",
465
- "references": {}
466
- },
467
- "required": false,
468
- "optional": false,
469
- "docs": {
470
- "tags": [{
471
- "name": "default",
472
- "text": "null"
473
- }],
474
- "text": "Columns containing detail duration, from (firstDate) to (secondDate)"
475
- }
476
- },
477
- "detailHeight": {
478
- "type": "number",
479
- "mutable": false,
480
- "complexType": {
481
- "original": "number",
482
- "resolved": "number",
483
- "references": {}
484
- },
485
- "required": false,
486
- "optional": false,
487
- "docs": {
488
- "tags": [{
489
- "name": "default",
490
- "text": "null"
491
- }],
492
- "text": "Height for detail gantt"
493
- },
494
- "attribute": "detail-height",
495
- "reflect": false
496
- },
497
- "detailIconCol": {
498
- "type": "string",
499
- "mutable": false,
500
- "complexType": {
501
- "original": "string",
502
- "resolved": "string",
503
- "references": {}
504
- },
505
- "required": false,
506
- "optional": false,
507
- "docs": {
508
- "tags": [{
509
- "name": "default",
510
- "text": "null"
511
- }],
512
- "text": "Column containing icon name to show, for detail"
513
- },
514
- "attribute": "detail-icon-col",
515
- "reflect": false
516
- },
517
- "detailIdCol": {
518
- "type": "string",
519
- "mutable": false,
520
- "complexType": {
521
- "original": "string",
522
- "resolved": "string",
523
- "references": {}
524
- },
525
- "required": false,
526
- "optional": false,
527
- "docs": {
528
- "tags": [{
529
- "name": "default",
530
- "text": "null"
531
- }],
532
- "text": "Column containing unique detail identifier"
533
- },
534
- "attribute": "detail-id-col",
535
- "reflect": false
536
- },
537
- "detailNameCol": {
538
- "type": "string",
539
- "mutable": false,
540
- "complexType": {
541
- "original": "string",
542
- "resolved": "string",
543
- "references": {}
544
- },
545
- "required": false,
546
- "optional": false,
547
- "docs": {
548
- "tags": [{
549
- "name": "default",
550
- "text": "null"
551
- }],
552
- "text": "Column containing detail name displayed"
553
- },
554
- "attribute": "detail-name-col",
555
- "reflect": false
556
- },
557
- "detailPrevDates": {
558
- "type": "unknown",
559
- "mutable": false,
560
- "complexType": {
561
- "original": "string[]",
562
- "resolved": "string[]",
563
- "references": {}
564
- },
565
- "required": false,
566
- "optional": false,
567
- "docs": {
568
- "tags": [{
569
- "name": "default",
570
- "text": "null"
571
- }],
572
- "text": "Columns containing forecast detail duration, from (firstDate) to (secondDate)"
573
- }
574
- },
575
- "listCellWidth": {
576
- "type": "string",
577
- "mutable": false,
578
- "complexType": {
579
- "original": "string",
580
- "resolved": "string",
581
- "references": {}
582
- },
583
- "required": false,
584
- "optional": false,
585
- "docs": {
586
- "tags": [{
587
- "name": "default",
588
- "text": "'300px'"
589
- }],
590
- "text": "Total size of the cells inside to the left box, near the gantt"
591
- },
592
- "attribute": "list-cell-width",
593
- "reflect": false,
594
- "defaultValue": "'300px'"
595
- },
596
- "maxWidth": {
597
- "type": "string",
598
- "mutable": false,
599
- "complexType": {
600
- "original": "string",
601
- "resolved": "string",
602
- "references": {}
603
- },
604
- "required": false,
605
- "optional": false,
606
- "docs": {
607
- "tags": [{
608
- "name": "default",
609
- "text": "'90vw'"
610
- }],
611
- "text": "Max width for component"
612
- },
613
- "attribute": "max-width",
614
- "reflect": false,
615
- "defaultValue": "'90vw'"
616
- },
617
- "phaseColorCol": {
618
- "type": "string",
619
- "mutable": false,
620
- "complexType": {
621
- "original": "string",
622
- "resolved": "string",
623
- "references": {}
624
- },
625
- "required": false,
626
- "optional": false,
627
- "docs": {
628
- "tags": [{
629
- "name": "default",
630
- "text": "null"
631
- }],
632
- "text": "Column containing the phase color in hex format"
633
- },
634
- "attribute": "phase-color-col",
635
- "reflect": false
636
- },
637
- "phaseColumns": {
638
- "type": "unknown",
639
- "mutable": false,
640
- "complexType": {
641
- "original": "string[]",
642
- "resolved": "string[]",
643
- "references": {}
644
- },
645
- "required": false,
646
- "optional": false,
647
- "docs": {
648
- "tags": [{
649
- "name": "default",
650
- "text": "null"
651
- }],
652
- "text": "Columns containing informations displayed in the left box ,near the gantt of phases"
653
- }
654
- },
655
- "phaseColParDep": {
656
- "type": "string",
657
- "mutable": false,
658
- "complexType": {
659
- "original": "string",
660
- "resolved": "string",
661
- "references": {}
662
- },
663
- "required": false,
664
- "optional": false,
665
- "docs": {
666
- "tags": [{
667
- "name": "default",
668
- "text": "null"
669
- }],
670
- "text": "Column containing the name of the parent phases"
671
- },
672
- "attribute": "phase-col-par-dep",
673
- "reflect": false
674
- },
675
- "phaseDates": {
676
- "type": "unknown",
677
- "mutable": false,
678
- "complexType": {
679
- "original": "string[]",
680
- "resolved": "string[]",
681
- "references": {}
682
- },
683
- "required": false,
684
- "optional": false,
685
- "docs": {
686
- "tags": [{
687
- "name": "default",
688
- "text": "null"
689
- }],
690
- "text": "Columns containing phase duration, from (firstDate) to (secondDate)"
691
- }
692
- },
693
- "phaseIconCol": {
694
- "type": "string",
695
- "mutable": false,
696
- "complexType": {
697
- "original": "string",
698
- "resolved": "string",
699
- "references": {}
700
- },
701
- "required": false,
702
- "optional": false,
703
- "docs": {
704
- "tags": [{
705
- "name": "default",
706
- "text": "null"
707
- }],
708
- "text": "Column containing icon name to show, for phase"
709
- },
710
- "attribute": "phase-icon-col",
711
- "reflect": false
712
- },
713
- "phaseIdCol": {
714
- "type": "string",
715
- "mutable": false,
716
- "complexType": {
717
- "original": "string",
718
- "resolved": "string",
719
- "references": {}
720
- },
721
- "required": false,
722
- "optional": false,
723
- "docs": {
724
- "tags": [{
725
- "name": "default",
726
- "text": "null"
727
- }],
728
- "text": "Column containing unique phase identifier"
729
- },
730
- "attribute": "phase-id-col",
731
- "reflect": false
732
- },
733
- "phaseNameCol": {
734
- "type": "string",
735
- "mutable": false,
736
- "complexType": {
737
- "original": "string",
738
- "resolved": "string",
739
- "references": {}
740
- },
741
- "required": false,
742
- "optional": false,
743
- "docs": {
744
- "tags": [{
745
- "name": "default",
746
- "text": "null"
747
- }],
748
- "text": "Column containing phase name displayed"
749
- },
750
- "attribute": "phase-name-col",
751
- "reflect": false
752
- },
753
- "phasePrevDates": {
754
- "type": "unknown",
755
- "mutable": false,
756
- "complexType": {
757
- "original": "string[]",
758
- "resolved": "string[]",
759
- "references": {}
760
- },
761
- "required": false,
762
- "optional": false,
763
- "docs": {
764
- "tags": [{
765
- "name": "default",
766
- "text": "null"
767
- }],
768
- "text": "Columns containing forecast phase duration, from (firstDate) to (secondDate)"
769
- }
770
- },
771
- "showSecondaryDates": {
772
- "type": "boolean",
773
- "mutable": false,
774
- "complexType": {
775
- "original": "boolean",
776
- "resolved": "boolean",
777
- "references": {}
778
- },
779
- "required": false,
780
- "optional": false,
781
- "docs": {
782
- "tags": [{
783
- "name": "default",
784
- "text": "false"
785
- }],
786
- "text": "Enable/disable display of secondary dates"
787
- },
788
- "attribute": "show-secondary-dates",
789
- "reflect": false,
790
- "defaultValue": "false"
791
- },
792
- "taskColumns": {
793
- "type": "unknown",
794
- "mutable": false,
795
- "complexType": {
796
- "original": "string[]",
797
- "resolved": "string[]",
798
- "references": {}
799
- },
800
- "required": false,
801
- "optional": false,
802
- "docs": {
803
- "tags": [{
804
- "name": "default",
805
- "text": "null"
806
- }],
807
- "text": "Columns containing informations displayed in the left box, near the gantt"
808
- }
809
- },
810
- "taskDates": {
811
- "type": "unknown",
812
- "mutable": false,
813
- "complexType": {
814
- "original": "string[]",
815
- "resolved": "string[]",
816
- "references": {}
817
- },
818
- "required": false,
819
- "optional": false,
820
- "docs": {
821
- "tags": [{
822
- "name": "default",
823
- "text": "null"
824
- }],
825
- "text": "Columns containing task duration, from (firstDate) to (secondDate)"
826
- }
827
- },
828
- "taskHeight": {
829
- "type": "number",
830
- "mutable": false,
831
- "complexType": {
832
- "original": "number",
833
- "resolved": "number",
834
- "references": {}
835
- },
836
- "required": false,
837
- "optional": false,
838
- "docs": {
839
- "tags": [{
840
- "name": "default",
841
- "text": "null"
842
- }],
843
- "text": "Height for main gantt"
844
- },
845
- "attribute": "task-height",
846
- "reflect": false
847
- },
848
- "taskIconCol": {
849
- "type": "string",
850
- "mutable": false,
851
- "complexType": {
852
- "original": "string",
853
- "resolved": "string",
854
- "references": {}
855
- },
856
- "required": false,
857
- "optional": false,
858
- "docs": {
859
- "tags": [{
860
- "name": "default",
861
- "text": "null"
862
- }],
863
- "text": "Column containing icon name to show, for task"
864
- },
865
- "attribute": "task-icon-col",
866
- "reflect": false
867
- },
868
- "taskIdCol": {
869
- "type": "string",
870
- "mutable": false,
871
- "complexType": {
872
- "original": "string",
873
- "resolved": "string",
874
- "references": {}
875
- },
876
- "required": false,
877
- "optional": false,
878
- "docs": {
879
- "tags": [{
880
- "name": "default",
881
- "text": "null"
882
- }],
883
- "text": "Column containing unique task identifier"
884
- },
885
- "attribute": "task-id-col",
886
- "reflect": false
887
- },
888
- "taskNameCol": {
889
- "type": "string",
890
- "mutable": false,
891
- "complexType": {
892
- "original": "string",
893
- "resolved": "string",
894
- "references": {}
895
- },
896
- "required": false,
897
- "optional": false,
898
- "docs": {
899
- "tags": [{
900
- "name": "default",
901
- "text": "null"
902
- }],
903
- "text": "Column containing task name displayed"
904
- },
905
- "attribute": "task-name-col",
906
- "reflect": false
907
- },
908
- "taskPrevDates": {
909
- "type": "unknown",
910
- "mutable": false,
911
- "complexType": {
912
- "original": "string[]",
913
- "resolved": "string[]",
914
- "references": {}
915
- },
916
- "required": false,
917
- "optional": false,
918
- "docs": {
919
- "tags": [{
920
- "name": "default",
921
- "text": "null"
922
- }],
923
- "text": "Columns containing forecast task duration, from (firstDate) to (secondDate)"
924
- }
925
- },
926
- "titleMess": {
927
- "type": "string",
928
- "mutable": false,
929
- "complexType": {
930
- "original": "string",
931
- "resolved": "string",
932
- "references": {}
933
- },
934
- "required": false,
935
- "optional": false,
936
- "docs": {
937
- "tags": [{
938
- "name": "default",
939
- "text": "null"
940
- }],
941
- "text": "Message displayed on top"
942
- },
943
- "attribute": "title-mess",
944
- "reflect": false
945
- }
946
- };
947
- }
948
- static get states() {
949
- return {
950
- "plannerProps": {}
951
- };
952
- }
953
- static get events() {
954
- return [{
955
- "method": "kupClick",
956
- "name": "kup-planner-click",
957
- "bubbles": true,
958
- "cancelable": false,
959
- "composed": true,
960
- "docs": {
961
- "tags": [],
962
- "text": ""
963
- },
964
- "complexType": {
965
- "original": "KupPlannerEventPayload",
966
- "resolved": "KupPlannerEventPayload",
967
- "references": {
968
- "KupPlannerEventPayload": {
969
- "location": "import",
970
- "path": "./kup-planner-declarations"
971
- }
972
- }
973
- }
974
- }, {
975
- "method": "kupDateChange",
976
- "name": "kup-planner-datechange",
977
- "bubbles": true,
978
- "cancelable": false,
979
- "composed": true,
980
- "docs": {
981
- "tags": [],
982
- "text": ""
983
- },
984
- "complexType": {
985
- "original": "KupPlannerEventPayload",
986
- "resolved": "KupPlannerEventPayload",
987
- "references": {
988
- "KupPlannerEventPayload": {
989
- "location": "import",
990
- "path": "./kup-planner-declarations"
991
- }
992
- }
993
- }
994
- }, {
995
- "method": "kupReady",
996
- "name": "kup-planner-ready",
997
- "bubbles": true,
998
- "cancelable": false,
999
- "composed": true,
1000
- "docs": {
1001
- "tags": [],
1002
- "text": ""
1003
- },
1004
- "complexType": {
1005
- "original": "KupPlannerEventPayload",
1006
- "resolved": "KupPlannerEventPayload",
1007
- "references": {
1008
- "KupPlannerEventPayload": {
1009
- "location": "import",
1010
- "path": "./kup-planner-declarations"
1011
- }
1012
- }
1013
- }
1014
- }, {
1015
- "method": "kupContextMenu",
1016
- "name": "kup-planner-contextmenu",
1017
- "bubbles": true,
1018
- "cancelable": false,
1019
- "composed": true,
1020
- "docs": {
1021
- "tags": [],
1022
- "text": "Generic right click event on planner."
1023
- },
1024
- "complexType": {
1025
- "original": "KupPlannerClickEventPayload",
1026
- "resolved": "KupPlannerClickEventPayload",
1027
- "references": {
1028
- "KupPlannerClickEventPayload": {
1029
- "location": "import",
1030
- "path": "./kup-planner-declarations"
1031
- }
1032
- }
1033
- }
1034
- }];
1035
- }
1036
- static get methods() {
1037
- return {
1038
- "getProps": {
1039
- "complexType": {
1040
- "signature": "(descriptions?: boolean) => Promise<GenericObject>",
1041
- "parameters": [{
1042
- "tags": [{
1043
- "name": "param",
1044
- "text": "descriptions - When provided and true, the result will be the list of props with their description."
1045
- }],
1046
- "text": "- When provided and true, the result will be the list of props with their description."
1047
- }],
1048
- "references": {
1049
- "Promise": {
1050
- "location": "global"
1051
- },
1052
- "GenericObject": {
1053
- "location": "import",
1054
- "path": "../../types/GenericTypes"
1055
- }
1056
- },
1057
- "return": "Promise<GenericObject>"
1058
- },
1059
- "docs": {
1060
- "text": "Used to retrieve component's props values.",
1061
- "tags": [{
1062
- "name": "param",
1063
- "text": "descriptions - When provided and true, the result will be the list of props with their description."
1064
- }, {
1065
- "name": "returns",
1066
- "text": "List of props as object, each key will be a prop."
1067
- }]
1068
- }
1069
- },
1070
- "refresh": {
1071
- "complexType": {
1072
- "signature": "() => Promise<void>",
1073
- "parameters": [],
1074
- "references": {
1075
- "Promise": {
1076
- "location": "global"
1077
- }
1078
- },
1079
- "return": "Promise<void>"
1080
- },
1081
- "docs": {
1082
- "text": "This method is used to trigger a new render of the component.",
1083
- "tags": []
1084
- }
1085
- },
1086
- "setProps": {
1087
- "complexType": {
1088
- "signature": "(props: GenericObject) => Promise<void>",
1089
- "parameters": [{
1090
- "tags": [{
1091
- "name": "param",
1092
- "text": "props - Object containing props that will be set to the component."
1093
- }],
1094
- "text": "- Object containing props that will be set to the component."
1095
- }],
1096
- "references": {
1097
- "Promise": {
1098
- "location": "global"
1099
- },
1100
- "GenericObject": {
1101
- "location": "import",
1102
- "path": "../../types/GenericTypes"
1103
- }
1104
- },
1105
- "return": "Promise<void>"
1106
- },
1107
- "docs": {
1108
- "text": "Sets the props to the component.",
1109
- "tags": [{
1110
- "name": "param",
1111
- "text": "props - Object containing props that will be set to the component."
1112
- }]
1113
- }
1114
- },
1115
- "addPhases": {
1116
- "complexType": {
1117
- "signature": "(taskId: string, data: KupDataDataset) => Promise<void>",
1118
- "parameters": [{
1119
- "tags": [{
1120
- "name": "param",
1121
- "text": "taskId"
1122
- }],
1123
- "text": ""
1124
- }, {
1125
- "tags": [{
1126
- "name": "param",
1127
- "text": "data - Matrix which contains project phases"
1128
- }],
1129
- "text": "- Matrix which contains project phases"
1130
- }],
1131
- "references": {
1132
- "Promise": {
1133
- "location": "global"
1134
- },
1135
- "KupDataDataset": {
1136
- "location": "import",
1137
- "path": "../../managers/kup-data/kup-data-declarations"
1138
- },
1139
- "KupPlannerPhase": {
1140
- "location": "import",
1141
- "path": "./kup-planner-declarations"
1142
- },
1143
- "TaskType": {
1144
- "location": "import",
1145
- "path": "@sme.up/gantt-component/dist/types/public-types"
1146
- }
1147
- },
1148
- "return": "Promise<void>"
1149
- },
1150
- "docs": {
1151
- "text": "Add a list of phases to the project",
1152
- "tags": [{
1153
- "name": "param",
1154
- "text": "taskId"
1155
- }, {
1156
- "name": "param",
1157
- "text": "data - Matrix which contains project phases"
1158
- }]
1159
- }
1160
- }
1161
- };
1162
- }
1163
- static get elementRef() { return "rootElement"; }
1164
- static get watchers() {
1165
- return [{
1166
- "propName": "data",
1167
- "methodName": "dataChanged"
1168
- }, {
1169
- "propName": "showSecondaryDates",
1170
- "methodName": "showSecondaryDatesChanged"
1171
- }];
1172
- }
1173
- }
1174
- _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() {
1175
- var _a;
1176
- (_a = __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f")) === null || _a === void 0 ? void 0 : _a.unmount();
1177
- const componentWrapperElement = this.rootElement.shadowRoot.getElementById(componentWrapperId);
1178
- if (componentWrapperElement) {
1179
- __classPrivateFieldSet(this, _KupPlanner_rootPlanner, createRoot(componentWrapperElement), "f");
1180
- __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f").render(React.createElement(Planner, this.plannerProps));
1181
- }
1182
- }, _KupPlanner_toTasks = function _KupPlanner_toTasks(data) {
1183
- var _a;
1184
- 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) => {
1185
- const datesSanitized = sanitizeAllDates(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]], row.cells[this.taskPrevDates[0]], row.cells[this.taskPrevDates[1]]);
1186
- const valuesToShow = getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns, () => this.taskColumns.map((col) => col == this.taskDates[0]
1187
- ? '#START#'
1188
- : col == this.taskDates[1]
1189
- ? '#END#'
1190
- : getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
1191
- let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.taskIconCol);
1192
- let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.taskIconCol);
1193
- let task = {
1194
- taskRow: row,
1195
- taskRowId: row.id,
1196
- id: row.cells[this.taskIdCol].value,
1197
- name: row.cells[this.taskNameCol].value,
1198
- startDate: datesSanitized.dateValues[0],
1199
- endDate: datesSanitized.dateValues[1],
1200
- secondaryStartDate: datesSanitized.secDateValues[0],
1201
- secondaryEndDate: datesSanitized.secDateValues[1],
1202
- type: 'project',
1203
- valuesToShow: valuesToShow,
1204
- rowType: KupPlannerGanttRowType.TASK,
1205
- icon: iconUrl
1206
- ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
1207
- : undefined,
1208
- };
1209
- return task;
1210
- });
1211
- return tasks;
1212
- }, _KupPlanner_toDetails = function _KupPlanner_toDetails(data) {
1213
- let details = [];
1214
- if (!data || !data.rows) {
1215
- return details;
1216
- }
1217
- data.rows
1218
- .filter((row) => isAtLeastOneDateValid(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]))
1219
- .forEach((row) => {
1220
- var _a, _b;
1221
- const detailId = row.cells[this.detailIdCol].value;
1222
- const detailNameId = row.cells[this.detailNameCol].value;
1223
- const datesSanitized = sanitizeAllDates(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]);
1224
- const valuesToShow = getValuesToShow(row, this.detailIdCol, this.detailNameCol, data.columns, this.detailColumns);
1225
- let detail = details.find((det) => det.id == detailId);
1226
- if (!detail) {
1227
- detail = {
1228
- id: detailId,
1229
- name: detailNameId,
1230
- detailRow: row,
1231
- type: 'timeline',
1232
- valuesToShow: valuesToShow,
1233
- rowType: KupPlannerGanttRowType.DETAIL,
1234
- schedule: [],
1235
- };
1236
- details.push(detail);
1237
- }
1238
- let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.detailIconCol);
1239
- let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.detailIconCol);
1240
- detail.schedule.push({
1241
- startDate: datesSanitized.dateValues[0],
1242
- endDate: datesSanitized.dateValues[1],
1243
- color: this.detailColorCol
1244
- ? (_a = row.cells[this.detailColorCol].value) !== null && _a !== void 0 ? _a : '#D9D9D8'
1245
- : '#D9D9D8',
1246
- selectedColor: this.detailColorCol
1247
- ? (_b = row.cells[this.detailColorCol].value) !== null && _b !== void 0 ? _b : '#D9D9D8'
1248
- : '#D9D9D8',
1249
- icon: iconUrl
1250
- ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
1251
- : undefined,
1252
- });
1253
- });
1254
- return details;
1255
- }, _KupPlanner_getTask = function _KupPlanner_getTask(taskId) {
1256
- return this.plannerProps.mainGantt.items.find((task) => task.id == taskId);
1257
- }, _KupPlanner_removePhases = function _KupPlanner_removePhases(taskId) {
1258
- const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
1259
- if (task)
1260
- task.phases = undefined;
1261
- this.plannerProps = Object.assign({}, this.plannerProps);
1262
- }, _KupPlanner_handleOnClickOnTask = function _KupPlanner_handleOnClickOnTask(nativeEvent) {
1263
- const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, nativeEvent.id);
1264
- if (task === null || task === void 0 ? void 0 : task.phases) {
1265
- __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_removePhases).call(this, task.id);
1266
- }
1267
- return true;
1268
- }, _KupPlanner_handleOnClickOnPhase = function _KupPlanner_handleOnClickOnPhase() {
1269
- return true;
1270
- }, _KupPlanner_handleOnClickOnDetail = function _KupPlanner_handleOnClickOnDetail() {
1271
- return true;
1272
- }, _KupPlanner_handleOnContextMenuOnTask = function _KupPlanner_handleOnContextMenuOnTask() {
1273
- return true;
1274
- }, _KupPlanner_handleOnContextMenuOnPhase = function _KupPlanner_handleOnContextMenuOnPhase() {
1275
- return true;
1276
- }, _KupPlanner_handleOnContextMenuOnDetail = function _KupPlanner_handleOnContextMenuOnDetail() {
1277
- return true;
1278
- }, _KupPlanner_emitOnChangeEventsReceived = function _KupPlanner_emitOnChangeEventsReceived(nativeEvent) {
1279
- let emitEvent = false;
1280
- if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f")) {
1281
- emitEvent = true;
1282
- __classPrivateFieldSet(this, _KupPlanner_lastOnChangeReceived, new KupPlannerLastOnChangeReceived(nativeEvent), "f");
1283
- }
1284
- else if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f").isEquivalent(nativeEvent)) {
1285
- __classPrivateFieldSet(this, _KupPlanner_lastOnChangeReceived, new KupPlannerLastOnChangeReceived(nativeEvent), "f");
1286
- emitEvent = true;
1287
- }
1288
- return emitEvent;
1289
- }, _KupPlanner_onFilter = function _KupPlanner_onFilter(e, isDetail) {
1290
- const tempData = {
1291
- columns: this.data.columns,
1292
- rows: [],
1293
- };
1294
- const value = e.target.value;
1295
- const data = isDetail ? this.detailData : this.data;
1296
- const tempRows = [];
1297
- for (let index = 0; index < data.rows.length; index++) {
1298
- const row = data.rows[index];
1299
- const cells = row.cells;
1300
- for (let index = 0; index < data.columns.length; index++) {
1301
- const column = data.columns[index];
1302
- const cell = cells[column.name];
1303
- if (cell) {
1304
- const dValue = getCellValueForDisplay(data.columns[index], cell);
1305
- const found = !!(dValue.toLowerCase().indexOf(value.toLowerCase()) > -1);
1306
- if (found) {
1307
- tempRows.push({ row, weight: index });
1308
- break;
1309
- }
1310
- }
1311
- }
1312
- }
1313
- tempRows
1314
- .sort((a, b) => a.weight - b.weight)
1315
- .forEach((tempRow) => {
1316
- tempData.rows.push(tempRow.row);
1317
- });
1318
- const newGantt = isDetail
1319
- ? {
1320
- secondaryGantt: Object.assign(Object.assign({}, this.plannerProps.secondaryGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, tempData) }),
1321
- }
1322
- : {
1323
- mainGantt: Object.assign(Object.assign({}, this.plannerProps.mainGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, tempData) }),
1324
- };
1325
- this.plannerProps = Object.assign(Object.assign({}, this.plannerProps), newGantt);
1326
- }, _KupPlanner_getIconUrl = function _KupPlanner_getIconUrl(row, columnName) {
1327
- var _a;
1328
- let iconUrl = undefined;
1329
- if (columnName) {
1330
- const iconCell = row.cells[columnName];
1331
- let icon = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.resource;
1332
- if (!icon) {
1333
- icon = iconCell.value;
1334
- }
1335
- if (icon) {
1336
- iconUrl = getAssetPath('./assets/svg/' + icon + '.svg');
1337
- }
1338
- }
1339
- return iconUrl;
1340
- }, _KupPlanner_getIconColor = function _KupPlanner_getIconColor(row, columnName) {
1341
- var _a;
1342
- let iconColor = undefined;
1343
- if (columnName) {
1344
- const iconCell = row.cells[columnName];
1345
- iconColor = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.color;
1346
- if (iconColor) {
1347
- iconColor =
1348
- __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.colorCheck(iconColor).hexColor;
1349
- }
1350
- }
1351
- return iconColor;
1352
- };
1
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
+ if (kind === "a" && !f)
3
+ throw new TypeError("Private accessor was defined without a getter");
4
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
5
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
6
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
7
+ };
8
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9
+ if (kind === "m")
10
+ throw new TypeError("Private method is not writable");
11
+ if (kind === "a" && !f)
12
+ throw new TypeError("Private accessor was defined without a setter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
14
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
15
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16
+ };
17
+ 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;
18
+ import { forceUpdate, getAssetPath, h, Host, } from '@stencil/core';
19
+ import { kupManagerInstance, } from '../../managers/kup-manager/kup-manager';
20
+ import { defaultStylingOptions, KupPlannerLastOnChangeReceived, KupPlannerProps, KupPlannerTaskAction, KupPlannerGanttRowType, } from './kup-planner-declarations';
21
+ import { getProps, setProps } from '../../utils/utils';
22
+ import { componentWrapperId } from '../../variables/GenericVariables';
23
+ import { createRoot } from 'react-dom/client';
24
+ import React from 'react';
25
+ import { Planner, } from '@sme.up/gantt-component';
26
+ import { getCellValueForDisplay } from '../../utils/cell-utils';
27
+ import { getValuesToShow, isAtLeastOneDateValid, sanitizeAllDates, } from './kup-planner-helper';
28
+ import { FTextField } from '../../f-components/f-text-field/f-text-field';
29
+ import { FTextFieldMDC } from '../../f-components/f-text-field/f-text-field-mdc';
30
+ import { KupThemeIconValues } from '../../managers/kup-theme/kup-theme-declarations';
31
+ import { KupLanguageSearch } from '../../managers/kup-language/kup-language-declarations';
32
+ import { KupPlannerState } from './kup-planner-state';
33
+ export class KupPlanner {
34
+ constructor() {
35
+ _KupPlanner_instances.add(this);
36
+ this.state = new KupPlannerState();
37
+ /*-------------------------------------------------*/
38
+ /* I n t e r n a l V a r i a b l e s */
39
+ /*-------------------------------------------------*/
40
+ _KupPlanner_kupManager.set(this, kupManagerInstance());
41
+ _KupPlanner_lastOnChangeReceived.set(this, void 0);
42
+ _KupPlanner_rootPlanner.set(this, void 0);
43
+ _KupPlanner_phases.set(this, {});
44
+ // no re-render
45
+ _KupPlanner_storedSettings.set(this, void 0);
46
+ this.stateId = '';
47
+ this.store = undefined;
48
+ this.customStyle = '';
49
+ this.data = undefined;
50
+ this.detailData = undefined;
51
+ this.detailColorCol = undefined;
52
+ this.detailColumns = undefined;
53
+ this.detailDates = undefined;
54
+ this.detailFilter = undefined;
55
+ this.detailHeight = undefined;
56
+ this.detailIconCol = undefined;
57
+ this.detailIdCol = undefined;
58
+ this.detailNameCol = undefined;
59
+ this.detailPrevDates = undefined;
60
+ this.detailInitialScrollX = undefined;
61
+ this.detailInitialScrollY = undefined;
62
+ this.listCellWidth = '300px';
63
+ this.maxWidth = '90vw';
64
+ this.phaseColorCol = undefined;
65
+ this.phaseColumns = undefined;
66
+ this.phaseColParDep = undefined;
67
+ this.phaseDates = undefined;
68
+ this.phaseIconCol = undefined;
69
+ this.phaseIdCol = undefined;
70
+ this.phaseNameCol = undefined;
71
+ this.phasePrevDates = undefined;
72
+ this.readOnly = false;
73
+ this.showSecondaryDates = false;
74
+ this.taskColumns = undefined;
75
+ this.taskDates = undefined;
76
+ this.taskFilter = undefined;
77
+ this.taskHeight = undefined;
78
+ this.taskIconCol = undefined;
79
+ this.taskIdCol = undefined;
80
+ this.taskInitialScrollX = undefined;
81
+ this.taskInitialScrollY = undefined;
82
+ this.taskNameCol = undefined;
83
+ this.taskPrevDates = undefined;
84
+ this.titleMess = undefined;
85
+ this.viewMode = 'month';
86
+ this.plannerProps = undefined;
87
+ }
88
+ initWithPersistedState() {
89
+ if (this.store && this.stateId) {
90
+ const state = this.store.getState(this.stateId);
91
+ if (state != null) {
92
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logMessage(this, 'Initializing stateId ' + this.stateId);
93
+ // *** PROPS ***
94
+ this.detailFilter = state.detailFilter;
95
+ this.showSecondaryDates = state.showSecondaryDates;
96
+ this.detailInitialScrollX = state.detailInitialScrollX;
97
+ this.detailInitialScrollY = state.detailInitialScrollY;
98
+ this.taskFilter = state.taskFilter;
99
+ this.taskInitialScrollX = state.taskInitialScrollX;
100
+ this.taskInitialScrollY = state.taskInitialScrollY;
101
+ this.viewMode = state.viewMode;
102
+ }
103
+ }
104
+ }
105
+ persistState() {
106
+ if (this.store && this.stateId) {
107
+ let somethingChanged = false;
108
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.detailFilter, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter)) {
109
+ this.state.detailFilter = __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter;
110
+ somethingChanged = true;
111
+ }
112
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.showSecondaryDates, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates)) {
113
+ this.state.showSecondaryDates =
114
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates;
115
+ somethingChanged = true;
116
+ }
117
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.detailInitialScrollX, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX)) {
118
+ this.state.detailInitialScrollX =
119
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX;
120
+ somethingChanged = true;
121
+ }
122
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.detailInitialScrollY, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY)) {
123
+ this.state.detailInitialScrollY =
124
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY;
125
+ somethingChanged = true;
126
+ }
127
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.taskFilter, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter)) {
128
+ this.state.taskFilter = __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter;
129
+ somethingChanged = true;
130
+ }
131
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.taskInitialScrollX, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX)) {
132
+ this.state.taskInitialScrollX =
133
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX;
134
+ somethingChanged = true;
135
+ }
136
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.taskInitialScrollY, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY)) {
137
+ this.state.taskInitialScrollY =
138
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY;
139
+ somethingChanged = true;
140
+ }
141
+ if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.viewMode, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").viewMode)) {
142
+ this.state.viewMode = __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").viewMode;
143
+ somethingChanged = true;
144
+ }
145
+ if (somethingChanged) {
146
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logMessage(this, 'Persisting stateId ' + this.stateId);
147
+ this.store.persistState(this.stateId, this.state);
148
+ }
149
+ }
150
+ }
151
+ dataChanged() {
152
+ __classPrivateFieldSet(this, _KupPlanner_phases, {}, "f");
153
+ }
154
+ /*-------------------------------------------------*/
155
+ /* P u b l i c M e t h o d s */
156
+ /*-------------------------------------------------*/
157
+ /**
158
+ * Used to retrieve component's props values.
159
+ * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
160
+ * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
161
+ */
162
+ async getProps(descriptions) {
163
+ return getProps(this, KupPlannerProps, descriptions);
164
+ }
165
+ /**
166
+ * This method is used to trigger a new render of the component.
167
+ */
168
+ async refresh() {
169
+ forceUpdate(this);
170
+ }
171
+ /**
172
+ * Sets the props to the component.
173
+ * @param {GenericObject} props - Object containing props that will be set to the component.
174
+ */
175
+ async setProps(props) {
176
+ setProps(this, KupPlannerProps, props);
177
+ }
178
+ /**
179
+ * Add a list of phases to the project
180
+ * @param taskId
181
+ * @param data - Matrix which contains project phases
182
+ */
183
+ async addPhases(taskId, data) {
184
+ var _a;
185
+ const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
186
+ if (task) {
187
+ __classPrivateFieldGet(this, _KupPlanner_phases, "f")[taskId] = data;
188
+ 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) => {
189
+ const datesSanitized = sanitizeAllDates(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]], row.cells[this.phasePrevDates[0]], row.cells[this.phasePrevDates[1]]);
190
+ const valuesToShow = getValuesToShow(row, this.phaseIdCol, this.phaseNameCol, data.columns, this.phaseColumns, () => this.phaseColumns.map((col) => col == this.phaseDates[0]
191
+ ? '#START#'
192
+ : col == this.phaseDates[1]
193
+ ? '#END#'
194
+ : getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
195
+ let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.phaseIconCol);
196
+ let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.phaseIconCol);
197
+ let phase = {
198
+ taskRow: task.taskRow,
199
+ phaseRow: row,
200
+ id: task.id + '_' + row.cells[this.phaseIdCol].value,
201
+ phaseRowId: row.id,
202
+ taskRowId: task.taskRowId,
203
+ name: row.cells[this.phaseNameCol].value,
204
+ startDate: datesSanitized.dateValues[0],
205
+ endDate: datesSanitized.dateValues[1],
206
+ secondaryStartDate: datesSanitized.secDateValues[0],
207
+ secondaryEndDate: datesSanitized.secDateValues[1],
208
+ type: 'task',
209
+ color: row.cells[this.phaseColorCol].value,
210
+ selectedColor: row.cells[this.phaseColorCol].value,
211
+ valuesToShow: valuesToShow,
212
+ rowType: KupPlannerGanttRowType.PHASE,
213
+ icon: iconUrl
214
+ ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
215
+ : undefined,
216
+ };
217
+ return phase;
218
+ });
219
+ }
220
+ this.plannerProps.mainGantt.initialScrollX =
221
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX;
222
+ this.plannerProps.mainGantt.initialScrollY =
223
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY;
224
+ if (this.plannerProps.secondaryGantt) {
225
+ this.plannerProps.secondaryGantt.initialScrollX =
226
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX;
227
+ this.plannerProps.secondaryGantt.initialScrollX =
228
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY;
229
+ }
230
+ this.plannerProps = Object.assign({}, this.plannerProps);
231
+ }
232
+ //---- Lifecycle hooks ----
233
+ componentWillLoad() {
234
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, false);
235
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.register(this);
236
+ // *** Store
237
+ this.initWithPersistedState();
238
+ __classPrivateFieldSet(this, _KupPlanner_storedSettings, {
239
+ detailFilter: this.detailFilter,
240
+ detailInitialScrollX: this.detailInitialScrollX,
241
+ detailInitialScrollY: this.detailInitialScrollY,
242
+ showSecondaryDates: this.showSecondaryDates,
243
+ taskFilter: this.taskFilter,
244
+ taskInitialScrollX: this.taskInitialScrollX,
245
+ taskInitialScrollY: this.taskInitialScrollY,
246
+ viewMode: this.viewMode,
247
+ }, "f");
248
+ }
249
+ componentDidLoad() {
250
+ 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));
251
+ const mainFilter = this.rootElement.shadowRoot.querySelector('#main-filter');
252
+ FTextFieldMDC(mainFilter);
253
+ const secondaryFilter = this.rootElement.shadowRoot.querySelector('#secondary-filter');
254
+ if (details) {
255
+ FTextFieldMDC(secondaryFilter);
256
+ }
257
+ // timeout for scroll events
258
+ let scrollXTimeout;
259
+ let taskScrollYTimeout;
260
+ let detailScrollYTimeout;
261
+ const scrollDelay = 500;
262
+ this.plannerProps = {
263
+ mainGantt: {
264
+ title: this.titleMess,
265
+ 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)),
266
+ stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
267
+ filter: mainFilter,
268
+ hideLabel: true,
269
+ ganttHeight: this.taskHeight,
270
+ showSecondaryDates: __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates,
271
+ onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
272
+ onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
273
+ onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
274
+ initialScrollX: this.taskInitialScrollX,
275
+ initialScrollY: this.taskInitialScrollY,
276
+ readOnly: this.readOnly,
277
+ onScrollY: (y) => {
278
+ window.clearTimeout(taskScrollYTimeout);
279
+ taskScrollYTimeout = window.setTimeout(() => this.handleTaskGanttScrollY(y), scrollDelay);
280
+ },
281
+ },
282
+ secondaryGantt: details
283
+ ? {
284
+ title: '',
285
+ items: details,
286
+ stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
287
+ filter: secondaryFilter,
288
+ hideLabel: true,
289
+ ganttHeight: this.detailHeight,
290
+ onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
291
+ onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
292
+ onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
293
+ initialScrollX: this.detailInitialScrollX,
294
+ initialScrollY: this.detailInitialScrollY,
295
+ readOnly: this.readOnly,
296
+ onScrollY: (y) => {
297
+ window.clearTimeout(detailScrollYTimeout);
298
+ detailScrollYTimeout = window.setTimeout(() => this.handleDetailGanttScrollY(y), scrollDelay);
299
+ },
300
+ }
301
+ : undefined,
302
+ onSetDoubleView: (checked) => this.handleOnSetDoubleView(checked),
303
+ onSetViewMode: (value) => this.handleOnSetViewMode(value),
304
+ viewMode: this.viewMode,
305
+ onScrollX: (x) => {
306
+ window.clearTimeout(scrollXTimeout);
307
+ scrollXTimeout = window.setTimeout(() => this.handleOnScrollX(x), scrollDelay);
308
+ },
309
+ };
310
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
311
+ this.kupReady.emit({
312
+ comp: this,
313
+ id: this.rootElement.id,
314
+ value: undefined,
315
+ });
316
+ if (this.taskFilter) {
317
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, this.taskFilter);
318
+ }
319
+ if (this.detailFilter) {
320
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, this.detailFilter, true);
321
+ }
322
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, true);
323
+ }
324
+ componentWillRender() {
325
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
326
+ }
327
+ componentDidRender() {
328
+ this.persistState();
329
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logRender(this, true);
330
+ }
331
+ onKupClick(event, taskAction) {
332
+ this.kupClick.emit({
333
+ comp: this,
334
+ id: this.rootElement.id,
335
+ value: event,
336
+ taskAction: taskAction,
337
+ });
338
+ }
339
+ onKupContextMenu(event, ganttRow, taskAction) {
340
+ let row;
341
+ let cell;
342
+ let column;
343
+ switch (ganttRow.type) {
344
+ case 'project': {
345
+ row = ganttRow.taskRow;
346
+ cell = row.cells[this.taskIdCol];
347
+ column = this.data.columns[this.taskIdCol];
348
+ break;
349
+ }
350
+ case 'task': {
351
+ row = ganttRow.phaseRow;
352
+ cell = row.cells[this.phaseIdCol];
353
+ //column = this.data.columns[this.taskIdCol];
354
+ break;
355
+ }
356
+ case 'timeline': {
357
+ row = ganttRow.detailRow;
358
+ cell = row.cells[this.detailIdCol];
359
+ column = this.data.columns[this.detailIdCol];
360
+ break;
361
+ }
362
+ }
363
+ this.kupContextMenu.emit({
364
+ comp: this,
365
+ id: this.rootElement.id,
366
+ value: ganttRow,
367
+ taskAction: taskAction,
368
+ details: {
369
+ cell: cell,
370
+ column: column,
371
+ originalEvent: event,
372
+ row: row,
373
+ },
374
+ });
375
+ }
376
+ onKupDateChange(event, taskAction) {
377
+ this.kupDateChange.emit({
378
+ comp: this,
379
+ id: this.rootElement.id,
380
+ value: event,
381
+ taskAction: taskAction,
382
+ });
383
+ }
384
+ handleOnClick(nativeEvent) {
385
+ switch (nativeEvent.rowType) {
386
+ case KupPlannerGanttRowType.TASK:
387
+ const taskAction = nativeEvent.phases
388
+ ? KupPlannerTaskAction.onTaskClosing
389
+ : KupPlannerTaskAction.onTaskOpening;
390
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnTask).call(this, nativeEvent)) {
391
+ this.onKupClick(nativeEvent, taskAction);
392
+ }
393
+ break;
394
+ case KupPlannerGanttRowType.PHASE:
395
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
396
+ this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
397
+ }
398
+ break;
399
+ case KupPlannerGanttRowType.DETAIL:
400
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnDetail).call(this)) {
401
+ this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
402
+ }
403
+ break;
404
+ }
405
+ }
406
+ handleOnContextMenu(event, row) {
407
+ switch (row.rowType) {
408
+ case KupPlannerGanttRowType.TASK:
409
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnTask).call(this)) {
410
+ this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
411
+ }
412
+ break;
413
+ case KupPlannerGanttRowType.PHASE:
414
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnPhase).call(this)) {
415
+ this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
416
+ }
417
+ break;
418
+ case KupPlannerGanttRowType.DETAIL:
419
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnDetail).call(this)) {
420
+ this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
421
+ }
422
+ break;
423
+ }
424
+ }
425
+ handleOnSetDoubleView(checked) {
426
+ var _a;
427
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates = checked;
428
+ if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
429
+ this.plannerProps.mainGantt.showSecondaryDates = checked;
430
+ }
431
+ this.persistState();
432
+ }
433
+ handleOnSetViewMode(value) {
434
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").viewMode = value;
435
+ this.plannerProps.viewMode = value;
436
+ this.persistState();
437
+ }
438
+ handleOnScrollX(x) {
439
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX = x;
440
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX = x;
441
+ this.persistState();
442
+ }
443
+ handleTaskGanttScrollY(y) {
444
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY = y;
445
+ this.persistState();
446
+ }
447
+ handleDetailGanttScrollY(y) {
448
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY = y;
449
+ this.persistState();
450
+ }
451
+ handleOnDateChange(nativeEvent) {
452
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_emitOnChangeEventsReceived).call(this, nativeEvent)) {
453
+ if (nativeEvent.rowType != KupPlannerGanttRowType.DETAIL) {
454
+ this.onKupDateChange(nativeEvent, KupPlannerTaskAction.onResize);
455
+ }
456
+ }
457
+ }
458
+ render() {
459
+ var _a;
460
+ 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) => {
461
+ if (e.key === 'Enter') {
462
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e.target.value);
463
+ }
464
+ }, 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) => {
465
+ if (e.key === 'Enter') {
466
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e.target.value, true);
467
+ }
468
+ }, value: this.detailFilter, wrapperClass: "filter" })) : null));
469
+ }
470
+ disconnectedCallback() {
471
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.unregister(this);
472
+ this.kupDidUnload.emit({
473
+ comp: this,
474
+ id: this.rootElement.id,
475
+ storedSettings: __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f"),
476
+ });
477
+ }
478
+ static get is() { return "kup-planner"; }
479
+ static get encapsulation() { return "shadow"; }
480
+ static get originalStyleUrls() {
481
+ return {
482
+ "$": ["kup-planner.scss"]
483
+ };
484
+ }
485
+ static get styleUrls() {
486
+ return {
487
+ "$": ["kup-planner.css"]
488
+ };
489
+ }
490
+ static get properties() {
491
+ return {
492
+ "stateId": {
493
+ "type": "string",
494
+ "mutable": false,
495
+ "complexType": {
496
+ "original": "string",
497
+ "resolved": "string",
498
+ "references": {}
499
+ },
500
+ "required": false,
501
+ "optional": false,
502
+ "docs": {
503
+ "tags": [],
504
+ "text": ""
505
+ },
506
+ "attribute": "state-id",
507
+ "reflect": false,
508
+ "defaultValue": "''"
509
+ },
510
+ "store": {
511
+ "type": "unknown",
512
+ "mutable": false,
513
+ "complexType": {
514
+ "original": "KupStore",
515
+ "resolved": "KupStore",
516
+ "references": {
517
+ "KupStore": {
518
+ "location": "import",
519
+ "path": "../kup-state/kup-store"
520
+ }
521
+ }
522
+ },
523
+ "required": false,
524
+ "optional": false,
525
+ "docs": {
526
+ "tags": [],
527
+ "text": ""
528
+ }
529
+ },
530
+ "customStyle": {
531
+ "type": "string",
532
+ "mutable": false,
533
+ "complexType": {
534
+ "original": "string",
535
+ "resolved": "string",
536
+ "references": {}
537
+ },
538
+ "required": false,
539
+ "optional": false,
540
+ "docs": {
541
+ "tags": [{
542
+ "name": "default",
543
+ "text": "\"\""
544
+ }, {
545
+ "name": "see",
546
+ "text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
547
+ }],
548
+ "text": "Custom style of the component."
549
+ },
550
+ "attribute": "custom-style",
551
+ "reflect": false,
552
+ "defaultValue": "''"
553
+ },
554
+ "data": {
555
+ "type": "unknown",
556
+ "mutable": false,
557
+ "complexType": {
558
+ "original": "KupDataDataset",
559
+ "resolved": "KupDataDataset",
560
+ "references": {
561
+ "KupDataDataset": {
562
+ "location": "import",
563
+ "path": "../../managers/kup-data/kup-data-declarations"
564
+ }
565
+ }
566
+ },
567
+ "required": false,
568
+ "optional": false,
569
+ "docs": {
570
+ "tags": [{
571
+ "name": "default",
572
+ "text": "null"
573
+ }],
574
+ "text": "Dataset containg the tasks list"
575
+ }
576
+ },
577
+ "detailData": {
578
+ "type": "unknown",
579
+ "mutable": false,
580
+ "complexType": {
581
+ "original": "KupDataDataset",
582
+ "resolved": "KupDataDataset",
583
+ "references": {
584
+ "KupDataDataset": {
585
+ "location": "import",
586
+ "path": "../../managers/kup-data/kup-data-declarations"
587
+ }
588
+ }
589
+ },
590
+ "required": false,
591
+ "optional": false,
592
+ "docs": {
593
+ "tags": [{
594
+ "name": "default",
595
+ "text": "null"
596
+ }],
597
+ "text": "Dataset containg the details list"
598
+ }
599
+ },
600
+ "detailColorCol": {
601
+ "type": "string",
602
+ "mutable": false,
603
+ "complexType": {
604
+ "original": "string",
605
+ "resolved": "string",
606
+ "references": {}
607
+ },
608
+ "required": false,
609
+ "optional": false,
610
+ "docs": {
611
+ "tags": [{
612
+ "name": "default",
613
+ "text": "null"
614
+ }],
615
+ "text": "Column containing the detail color, in hex format"
616
+ },
617
+ "attribute": "detail-color-col",
618
+ "reflect": false
619
+ },
620
+ "detailColumns": {
621
+ "type": "unknown",
622
+ "mutable": false,
623
+ "complexType": {
624
+ "original": "string[]",
625
+ "resolved": "string[]",
626
+ "references": {}
627
+ },
628
+ "required": false,
629
+ "optional": false,
630
+ "docs": {
631
+ "tags": [{
632
+ "name": "default",
633
+ "text": "null"
634
+ }],
635
+ "text": "Columns containing informations displayed in the left box, near the gantt of details"
636
+ }
637
+ },
638
+ "detailDates": {
639
+ "type": "unknown",
640
+ "mutable": false,
641
+ "complexType": {
642
+ "original": "string[]",
643
+ "resolved": "string[]",
644
+ "references": {}
645
+ },
646
+ "required": false,
647
+ "optional": false,
648
+ "docs": {
649
+ "tags": [{
650
+ "name": "default",
651
+ "text": "null"
652
+ }],
653
+ "text": "Columns containing detail duration, from (firstDate) to (secondDate)"
654
+ }
655
+ },
656
+ "detailFilter": {
657
+ "type": "string",
658
+ "mutable": false,
659
+ "complexType": {
660
+ "original": "string",
661
+ "resolved": "string",
662
+ "references": {}
663
+ },
664
+ "required": false,
665
+ "optional": false,
666
+ "docs": {
667
+ "tags": [{
668
+ "name": "default",
669
+ "text": "undefined"
670
+ }],
671
+ "text": "Sets the detail's filter."
672
+ },
673
+ "attribute": "detail-filter",
674
+ "reflect": false
675
+ },
676
+ "detailHeight": {
677
+ "type": "number",
678
+ "mutable": false,
679
+ "complexType": {
680
+ "original": "number",
681
+ "resolved": "number",
682
+ "references": {}
683
+ },
684
+ "required": false,
685
+ "optional": false,
686
+ "docs": {
687
+ "tags": [{
688
+ "name": "default",
689
+ "text": "null"
690
+ }],
691
+ "text": "Height for detail gantt"
692
+ },
693
+ "attribute": "detail-height",
694
+ "reflect": false
695
+ },
696
+ "detailIconCol": {
697
+ "type": "string",
698
+ "mutable": false,
699
+ "complexType": {
700
+ "original": "string",
701
+ "resolved": "string",
702
+ "references": {}
703
+ },
704
+ "required": false,
705
+ "optional": false,
706
+ "docs": {
707
+ "tags": [{
708
+ "name": "default",
709
+ "text": "null"
710
+ }],
711
+ "text": "Column containing icon name to show, for detail"
712
+ },
713
+ "attribute": "detail-icon-col",
714
+ "reflect": false
715
+ },
716
+ "detailIdCol": {
717
+ "type": "string",
718
+ "mutable": false,
719
+ "complexType": {
720
+ "original": "string",
721
+ "resolved": "string",
722
+ "references": {}
723
+ },
724
+ "required": false,
725
+ "optional": false,
726
+ "docs": {
727
+ "tags": [{
728
+ "name": "default",
729
+ "text": "null"
730
+ }],
731
+ "text": "Column containing unique detail identifier"
732
+ },
733
+ "attribute": "detail-id-col",
734
+ "reflect": false
735
+ },
736
+ "detailNameCol": {
737
+ "type": "string",
738
+ "mutable": false,
739
+ "complexType": {
740
+ "original": "string",
741
+ "resolved": "string",
742
+ "references": {}
743
+ },
744
+ "required": false,
745
+ "optional": false,
746
+ "docs": {
747
+ "tags": [{
748
+ "name": "default",
749
+ "text": "null"
750
+ }],
751
+ "text": "Column containing detail name displayed"
752
+ },
753
+ "attribute": "detail-name-col",
754
+ "reflect": false
755
+ },
756
+ "detailPrevDates": {
757
+ "type": "unknown",
758
+ "mutable": false,
759
+ "complexType": {
760
+ "original": "string[]",
761
+ "resolved": "string[]",
762
+ "references": {}
763
+ },
764
+ "required": false,
765
+ "optional": false,
766
+ "docs": {
767
+ "tags": [{
768
+ "name": "default",
769
+ "text": "null"
770
+ }],
771
+ "text": "Columns containing forecast detail duration, from (firstDate) to (secondDate)"
772
+ }
773
+ },
774
+ "detailInitialScrollX": {
775
+ "type": "number",
776
+ "mutable": false,
777
+ "complexType": {
778
+ "original": "number",
779
+ "resolved": "number",
780
+ "references": {}
781
+ },
782
+ "required": false,
783
+ "optional": false,
784
+ "docs": {
785
+ "tags": [{
786
+ "name": "default",
787
+ "text": "undefined"
788
+ }],
789
+ "text": "Sets the initial scroll X for the detail."
790
+ },
791
+ "attribute": "detail-initial-scroll-x",
792
+ "reflect": false
793
+ },
794
+ "detailInitialScrollY": {
795
+ "type": "number",
796
+ "mutable": false,
797
+ "complexType": {
798
+ "original": "number",
799
+ "resolved": "number",
800
+ "references": {}
801
+ },
802
+ "required": false,
803
+ "optional": false,
804
+ "docs": {
805
+ "tags": [{
806
+ "name": "default",
807
+ "text": "undefined"
808
+ }],
809
+ "text": "Sets the initial scroll Y for the detail."
810
+ },
811
+ "attribute": "detail-initial-scroll-y",
812
+ "reflect": false
813
+ },
814
+ "listCellWidth": {
815
+ "type": "string",
816
+ "mutable": false,
817
+ "complexType": {
818
+ "original": "string",
819
+ "resolved": "string",
820
+ "references": {}
821
+ },
822
+ "required": false,
823
+ "optional": false,
824
+ "docs": {
825
+ "tags": [{
826
+ "name": "default",
827
+ "text": "'300px'"
828
+ }],
829
+ "text": "Total size of the cells inside to the left box, near the gantt"
830
+ },
831
+ "attribute": "list-cell-width",
832
+ "reflect": false,
833
+ "defaultValue": "'300px'"
834
+ },
835
+ "maxWidth": {
836
+ "type": "string",
837
+ "mutable": false,
838
+ "complexType": {
839
+ "original": "string",
840
+ "resolved": "string",
841
+ "references": {}
842
+ },
843
+ "required": false,
844
+ "optional": false,
845
+ "docs": {
846
+ "tags": [{
847
+ "name": "default",
848
+ "text": "'90vw'"
849
+ }],
850
+ "text": "Max width for component"
851
+ },
852
+ "attribute": "max-width",
853
+ "reflect": false,
854
+ "defaultValue": "'90vw'"
855
+ },
856
+ "phaseColorCol": {
857
+ "type": "string",
858
+ "mutable": false,
859
+ "complexType": {
860
+ "original": "string",
861
+ "resolved": "string",
862
+ "references": {}
863
+ },
864
+ "required": false,
865
+ "optional": false,
866
+ "docs": {
867
+ "tags": [{
868
+ "name": "default",
869
+ "text": "null"
870
+ }],
871
+ "text": "Column containing the phase color in hex format"
872
+ },
873
+ "attribute": "phase-color-col",
874
+ "reflect": false
875
+ },
876
+ "phaseColumns": {
877
+ "type": "unknown",
878
+ "mutable": false,
879
+ "complexType": {
880
+ "original": "string[]",
881
+ "resolved": "string[]",
882
+ "references": {}
883
+ },
884
+ "required": false,
885
+ "optional": false,
886
+ "docs": {
887
+ "tags": [{
888
+ "name": "default",
889
+ "text": "null"
890
+ }],
891
+ "text": "Columns containing informations displayed in the left box ,near the gantt of phases"
892
+ }
893
+ },
894
+ "phaseColParDep": {
895
+ "type": "string",
896
+ "mutable": false,
897
+ "complexType": {
898
+ "original": "string",
899
+ "resolved": "string",
900
+ "references": {}
901
+ },
902
+ "required": false,
903
+ "optional": false,
904
+ "docs": {
905
+ "tags": [{
906
+ "name": "default",
907
+ "text": "null"
908
+ }],
909
+ "text": "Column containing the name of the parent phases"
910
+ },
911
+ "attribute": "phase-col-par-dep",
912
+ "reflect": false
913
+ },
914
+ "phaseDates": {
915
+ "type": "unknown",
916
+ "mutable": false,
917
+ "complexType": {
918
+ "original": "string[]",
919
+ "resolved": "string[]",
920
+ "references": {}
921
+ },
922
+ "required": false,
923
+ "optional": false,
924
+ "docs": {
925
+ "tags": [{
926
+ "name": "default",
927
+ "text": "null"
928
+ }],
929
+ "text": "Columns containing phase duration, from (firstDate) to (secondDate)"
930
+ }
931
+ },
932
+ "phaseIconCol": {
933
+ "type": "string",
934
+ "mutable": false,
935
+ "complexType": {
936
+ "original": "string",
937
+ "resolved": "string",
938
+ "references": {}
939
+ },
940
+ "required": false,
941
+ "optional": false,
942
+ "docs": {
943
+ "tags": [{
944
+ "name": "default",
945
+ "text": "null"
946
+ }],
947
+ "text": "Column containing icon name to show, for phase"
948
+ },
949
+ "attribute": "phase-icon-col",
950
+ "reflect": false
951
+ },
952
+ "phaseIdCol": {
953
+ "type": "string",
954
+ "mutable": false,
955
+ "complexType": {
956
+ "original": "string",
957
+ "resolved": "string",
958
+ "references": {}
959
+ },
960
+ "required": false,
961
+ "optional": false,
962
+ "docs": {
963
+ "tags": [{
964
+ "name": "default",
965
+ "text": "null"
966
+ }],
967
+ "text": "Column containing unique phase identifier"
968
+ },
969
+ "attribute": "phase-id-col",
970
+ "reflect": false
971
+ },
972
+ "phaseNameCol": {
973
+ "type": "string",
974
+ "mutable": false,
975
+ "complexType": {
976
+ "original": "string",
977
+ "resolved": "string",
978
+ "references": {}
979
+ },
980
+ "required": false,
981
+ "optional": false,
982
+ "docs": {
983
+ "tags": [{
984
+ "name": "default",
985
+ "text": "null"
986
+ }],
987
+ "text": "Column containing phase name displayed"
988
+ },
989
+ "attribute": "phase-name-col",
990
+ "reflect": false
991
+ },
992
+ "phasePrevDates": {
993
+ "type": "unknown",
994
+ "mutable": false,
995
+ "complexType": {
996
+ "original": "string[]",
997
+ "resolved": "string[]",
998
+ "references": {}
999
+ },
1000
+ "required": false,
1001
+ "optional": false,
1002
+ "docs": {
1003
+ "tags": [{
1004
+ "name": "default",
1005
+ "text": "null"
1006
+ }],
1007
+ "text": "Columns containing forecast phase duration, from (firstDate) to (secondDate)"
1008
+ }
1009
+ },
1010
+ "readOnly": {
1011
+ "type": "boolean",
1012
+ "mutable": false,
1013
+ "complexType": {
1014
+ "original": "boolean",
1015
+ "resolved": "boolean",
1016
+ "references": {}
1017
+ },
1018
+ "required": false,
1019
+ "optional": false,
1020
+ "docs": {
1021
+ "tags": [{
1022
+ "name": "default",
1023
+ "text": "false"
1024
+ }],
1025
+ "text": "When true, the two gantts are not interactable."
1026
+ },
1027
+ "attribute": "read-only",
1028
+ "reflect": false,
1029
+ "defaultValue": "false"
1030
+ },
1031
+ "showSecondaryDates": {
1032
+ "type": "boolean",
1033
+ "mutable": false,
1034
+ "complexType": {
1035
+ "original": "boolean",
1036
+ "resolved": "boolean",
1037
+ "references": {}
1038
+ },
1039
+ "required": false,
1040
+ "optional": false,
1041
+ "docs": {
1042
+ "tags": [{
1043
+ "name": "default",
1044
+ "text": "false"
1045
+ }],
1046
+ "text": "Enable/disable display of secondary dates"
1047
+ },
1048
+ "attribute": "show-secondary-dates",
1049
+ "reflect": false,
1050
+ "defaultValue": "false"
1051
+ },
1052
+ "taskColumns": {
1053
+ "type": "unknown",
1054
+ "mutable": false,
1055
+ "complexType": {
1056
+ "original": "string[]",
1057
+ "resolved": "string[]",
1058
+ "references": {}
1059
+ },
1060
+ "required": false,
1061
+ "optional": false,
1062
+ "docs": {
1063
+ "tags": [{
1064
+ "name": "default",
1065
+ "text": "null"
1066
+ }],
1067
+ "text": "Columns containing informations displayed in the left box, near the gantt"
1068
+ }
1069
+ },
1070
+ "taskDates": {
1071
+ "type": "unknown",
1072
+ "mutable": false,
1073
+ "complexType": {
1074
+ "original": "string[]",
1075
+ "resolved": "string[]",
1076
+ "references": {}
1077
+ },
1078
+ "required": false,
1079
+ "optional": false,
1080
+ "docs": {
1081
+ "tags": [{
1082
+ "name": "default",
1083
+ "text": "null"
1084
+ }],
1085
+ "text": "Columns containing task duration, from (firstDate) to (secondDate)"
1086
+ }
1087
+ },
1088
+ "taskFilter": {
1089
+ "type": "string",
1090
+ "mutable": false,
1091
+ "complexType": {
1092
+ "original": "string",
1093
+ "resolved": "string",
1094
+ "references": {}
1095
+ },
1096
+ "required": false,
1097
+ "optional": false,
1098
+ "docs": {
1099
+ "tags": [{
1100
+ "name": "default",
1101
+ "text": "undefined"
1102
+ }],
1103
+ "text": "Sets the task's filter."
1104
+ },
1105
+ "attribute": "task-filter",
1106
+ "reflect": false
1107
+ },
1108
+ "taskHeight": {
1109
+ "type": "number",
1110
+ "mutable": false,
1111
+ "complexType": {
1112
+ "original": "number",
1113
+ "resolved": "number",
1114
+ "references": {}
1115
+ },
1116
+ "required": false,
1117
+ "optional": false,
1118
+ "docs": {
1119
+ "tags": [{
1120
+ "name": "default",
1121
+ "text": "null"
1122
+ }],
1123
+ "text": "Height for main gantt"
1124
+ },
1125
+ "attribute": "task-height",
1126
+ "reflect": false
1127
+ },
1128
+ "taskIconCol": {
1129
+ "type": "string",
1130
+ "mutable": false,
1131
+ "complexType": {
1132
+ "original": "string",
1133
+ "resolved": "string",
1134
+ "references": {}
1135
+ },
1136
+ "required": false,
1137
+ "optional": false,
1138
+ "docs": {
1139
+ "tags": [{
1140
+ "name": "default",
1141
+ "text": "null"
1142
+ }],
1143
+ "text": "Column containing icon name to show, for task"
1144
+ },
1145
+ "attribute": "task-icon-col",
1146
+ "reflect": false
1147
+ },
1148
+ "taskIdCol": {
1149
+ "type": "string",
1150
+ "mutable": false,
1151
+ "complexType": {
1152
+ "original": "string",
1153
+ "resolved": "string",
1154
+ "references": {}
1155
+ },
1156
+ "required": false,
1157
+ "optional": false,
1158
+ "docs": {
1159
+ "tags": [{
1160
+ "name": "default",
1161
+ "text": "null"
1162
+ }],
1163
+ "text": "Column containing unique task identifier"
1164
+ },
1165
+ "attribute": "task-id-col",
1166
+ "reflect": false
1167
+ },
1168
+ "taskInitialScrollX": {
1169
+ "type": "number",
1170
+ "mutable": false,
1171
+ "complexType": {
1172
+ "original": "number",
1173
+ "resolved": "number",
1174
+ "references": {}
1175
+ },
1176
+ "required": false,
1177
+ "optional": false,
1178
+ "docs": {
1179
+ "tags": [{
1180
+ "name": "default",
1181
+ "text": "undefined"
1182
+ }],
1183
+ "text": "Sets the initial scroll X for the task."
1184
+ },
1185
+ "attribute": "task-initial-scroll-x",
1186
+ "reflect": false
1187
+ },
1188
+ "taskInitialScrollY": {
1189
+ "type": "number",
1190
+ "mutable": false,
1191
+ "complexType": {
1192
+ "original": "number",
1193
+ "resolved": "number",
1194
+ "references": {}
1195
+ },
1196
+ "required": false,
1197
+ "optional": false,
1198
+ "docs": {
1199
+ "tags": [{
1200
+ "name": "default",
1201
+ "text": "undefined"
1202
+ }],
1203
+ "text": "Sets the initial scroll Y for the task."
1204
+ },
1205
+ "attribute": "task-initial-scroll-y",
1206
+ "reflect": false
1207
+ },
1208
+ "taskNameCol": {
1209
+ "type": "string",
1210
+ "mutable": false,
1211
+ "complexType": {
1212
+ "original": "string",
1213
+ "resolved": "string",
1214
+ "references": {}
1215
+ },
1216
+ "required": false,
1217
+ "optional": false,
1218
+ "docs": {
1219
+ "tags": [{
1220
+ "name": "default",
1221
+ "text": "null"
1222
+ }],
1223
+ "text": "Column containing task name displayed"
1224
+ },
1225
+ "attribute": "task-name-col",
1226
+ "reflect": false
1227
+ },
1228
+ "taskPrevDates": {
1229
+ "type": "unknown",
1230
+ "mutable": false,
1231
+ "complexType": {
1232
+ "original": "string[]",
1233
+ "resolved": "string[]",
1234
+ "references": {}
1235
+ },
1236
+ "required": false,
1237
+ "optional": false,
1238
+ "docs": {
1239
+ "tags": [{
1240
+ "name": "default",
1241
+ "text": "null"
1242
+ }],
1243
+ "text": "Columns containing forecast task duration, from (firstDate) to (secondDate)"
1244
+ }
1245
+ },
1246
+ "titleMess": {
1247
+ "type": "string",
1248
+ "mutable": false,
1249
+ "complexType": {
1250
+ "original": "string",
1251
+ "resolved": "string",
1252
+ "references": {}
1253
+ },
1254
+ "required": false,
1255
+ "optional": false,
1256
+ "docs": {
1257
+ "tags": [{
1258
+ "name": "default",
1259
+ "text": "null"
1260
+ }],
1261
+ "text": "Message displayed on top"
1262
+ },
1263
+ "attribute": "title-mess",
1264
+ "reflect": false
1265
+ },
1266
+ "viewMode": {
1267
+ "type": "string",
1268
+ "mutable": false,
1269
+ "complexType": {
1270
+ "original": "KupPlannerViewMode",
1271
+ "resolved": "\"day\" | \"month\" | \"week\" | \"year\"",
1272
+ "references": {
1273
+ "KupPlannerViewMode": {
1274
+ "location": "import",
1275
+ "path": "./kup-planner-declarations"
1276
+ }
1277
+ }
1278
+ },
1279
+ "required": false,
1280
+ "optional": false,
1281
+ "docs": {
1282
+ "tags": [{
1283
+ "name": "default",
1284
+ "text": "'month'"
1285
+ }],
1286
+ "text": "Sets the view mode."
1287
+ },
1288
+ "attribute": "view-mode",
1289
+ "reflect": false,
1290
+ "defaultValue": "'month'"
1291
+ }
1292
+ };
1293
+ }
1294
+ static get states() {
1295
+ return {
1296
+ "plannerProps": {}
1297
+ };
1298
+ }
1299
+ static get events() {
1300
+ return [{
1301
+ "method": "kupClick",
1302
+ "name": "kup-planner-click",
1303
+ "bubbles": true,
1304
+ "cancelable": false,
1305
+ "composed": true,
1306
+ "docs": {
1307
+ "tags": [],
1308
+ "text": ""
1309
+ },
1310
+ "complexType": {
1311
+ "original": "KupPlannerEventPayload",
1312
+ "resolved": "KupPlannerEventPayload",
1313
+ "references": {
1314
+ "KupPlannerEventPayload": {
1315
+ "location": "import",
1316
+ "path": "./kup-planner-declarations"
1317
+ }
1318
+ }
1319
+ }
1320
+ }, {
1321
+ "method": "kupDateChange",
1322
+ "name": "kup-planner-datechange",
1323
+ "bubbles": true,
1324
+ "cancelable": false,
1325
+ "composed": true,
1326
+ "docs": {
1327
+ "tags": [],
1328
+ "text": ""
1329
+ },
1330
+ "complexType": {
1331
+ "original": "KupPlannerEventPayload",
1332
+ "resolved": "KupPlannerEventPayload",
1333
+ "references": {
1334
+ "KupPlannerEventPayload": {
1335
+ "location": "import",
1336
+ "path": "./kup-planner-declarations"
1337
+ }
1338
+ }
1339
+ }
1340
+ }, {
1341
+ "method": "kupReady",
1342
+ "name": "kup-planner-ready",
1343
+ "bubbles": true,
1344
+ "cancelable": false,
1345
+ "composed": true,
1346
+ "docs": {
1347
+ "tags": [],
1348
+ "text": ""
1349
+ },
1350
+ "complexType": {
1351
+ "original": "KupPlannerEventPayload",
1352
+ "resolved": "KupPlannerEventPayload",
1353
+ "references": {
1354
+ "KupPlannerEventPayload": {
1355
+ "location": "import",
1356
+ "path": "./kup-planner-declarations"
1357
+ }
1358
+ }
1359
+ }
1360
+ }, {
1361
+ "method": "kupContextMenu",
1362
+ "name": "kup-planner-contextmenu",
1363
+ "bubbles": true,
1364
+ "cancelable": false,
1365
+ "composed": true,
1366
+ "docs": {
1367
+ "tags": [],
1368
+ "text": "Generic right click event on planner."
1369
+ },
1370
+ "complexType": {
1371
+ "original": "KupPlannerClickEventPayload",
1372
+ "resolved": "KupPlannerClickEventPayload",
1373
+ "references": {
1374
+ "KupPlannerClickEventPayload": {
1375
+ "location": "import",
1376
+ "path": "./kup-planner-declarations"
1377
+ }
1378
+ }
1379
+ }
1380
+ }, {
1381
+ "method": "kupDidUnload",
1382
+ "name": "kup-planner-didunload",
1383
+ "bubbles": true,
1384
+ "cancelable": false,
1385
+ "composed": true,
1386
+ "docs": {
1387
+ "tags": [],
1388
+ "text": "When component unload is complete"
1389
+ },
1390
+ "complexType": {
1391
+ "original": "KupPlannerUnloadEventPayload",
1392
+ "resolved": "KupPlannerUnloadEventPayload",
1393
+ "references": {
1394
+ "KupPlannerUnloadEventPayload": {
1395
+ "location": "import",
1396
+ "path": "./kup-planner-declarations"
1397
+ }
1398
+ }
1399
+ }
1400
+ }];
1401
+ }
1402
+ static get methods() {
1403
+ return {
1404
+ "getProps": {
1405
+ "complexType": {
1406
+ "signature": "(descriptions?: boolean) => Promise<GenericObject>",
1407
+ "parameters": [{
1408
+ "tags": [{
1409
+ "name": "param",
1410
+ "text": "descriptions - When provided and true, the result will be the list of props with their description."
1411
+ }],
1412
+ "text": "- When provided and true, the result will be the list of props with their description."
1413
+ }],
1414
+ "references": {
1415
+ "Promise": {
1416
+ "location": "global"
1417
+ },
1418
+ "GenericObject": {
1419
+ "location": "import",
1420
+ "path": "../../types/GenericTypes"
1421
+ }
1422
+ },
1423
+ "return": "Promise<GenericObject>"
1424
+ },
1425
+ "docs": {
1426
+ "text": "Used to retrieve component's props values.",
1427
+ "tags": [{
1428
+ "name": "param",
1429
+ "text": "descriptions - When provided and true, the result will be the list of props with their description."
1430
+ }, {
1431
+ "name": "returns",
1432
+ "text": "List of props as object, each key will be a prop."
1433
+ }]
1434
+ }
1435
+ },
1436
+ "refresh": {
1437
+ "complexType": {
1438
+ "signature": "() => Promise<void>",
1439
+ "parameters": [],
1440
+ "references": {
1441
+ "Promise": {
1442
+ "location": "global"
1443
+ }
1444
+ },
1445
+ "return": "Promise<void>"
1446
+ },
1447
+ "docs": {
1448
+ "text": "This method is used to trigger a new render of the component.",
1449
+ "tags": []
1450
+ }
1451
+ },
1452
+ "setProps": {
1453
+ "complexType": {
1454
+ "signature": "(props: GenericObject) => Promise<void>",
1455
+ "parameters": [{
1456
+ "tags": [{
1457
+ "name": "param",
1458
+ "text": "props - Object containing props that will be set to the component."
1459
+ }],
1460
+ "text": "- Object containing props that will be set to the component."
1461
+ }],
1462
+ "references": {
1463
+ "Promise": {
1464
+ "location": "global"
1465
+ },
1466
+ "GenericObject": {
1467
+ "location": "import",
1468
+ "path": "../../types/GenericTypes"
1469
+ }
1470
+ },
1471
+ "return": "Promise<void>"
1472
+ },
1473
+ "docs": {
1474
+ "text": "Sets the props to the component.",
1475
+ "tags": [{
1476
+ "name": "param",
1477
+ "text": "props - Object containing props that will be set to the component."
1478
+ }]
1479
+ }
1480
+ },
1481
+ "addPhases": {
1482
+ "complexType": {
1483
+ "signature": "(taskId: string, data: KupDataDataset) => Promise<void>",
1484
+ "parameters": [{
1485
+ "tags": [{
1486
+ "name": "param",
1487
+ "text": "taskId"
1488
+ }],
1489
+ "text": ""
1490
+ }, {
1491
+ "tags": [{
1492
+ "name": "param",
1493
+ "text": "data - Matrix which contains project phases"
1494
+ }],
1495
+ "text": "- Matrix which contains project phases"
1496
+ }],
1497
+ "references": {
1498
+ "Promise": {
1499
+ "location": "global"
1500
+ },
1501
+ "KupDataDataset": {
1502
+ "location": "import",
1503
+ "path": "../../managers/kup-data/kup-data-declarations"
1504
+ },
1505
+ "KupPlannerPhase": {
1506
+ "location": "import",
1507
+ "path": "./kup-planner-declarations"
1508
+ },
1509
+ "TaskType": {
1510
+ "location": "import",
1511
+ "path": "@sme.up/gantt-component/dist/types/public-types"
1512
+ }
1513
+ },
1514
+ "return": "Promise<void>"
1515
+ },
1516
+ "docs": {
1517
+ "text": "Add a list of phases to the project",
1518
+ "tags": [{
1519
+ "name": "param",
1520
+ "text": "taskId"
1521
+ }, {
1522
+ "name": "param",
1523
+ "text": "data - Matrix which contains project phases"
1524
+ }]
1525
+ }
1526
+ }
1527
+ };
1528
+ }
1529
+ static get elementRef() { return "rootElement"; }
1530
+ static get watchers() {
1531
+ return [{
1532
+ "propName": "data",
1533
+ "methodName": "dataChanged"
1534
+ }];
1535
+ }
1536
+ }
1537
+ _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() {
1538
+ var _a;
1539
+ (_a = __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f")) === null || _a === void 0 ? void 0 : _a.unmount();
1540
+ const componentWrapperElement = this.rootElement.shadowRoot.getElementById(componentWrapperId);
1541
+ if (componentWrapperElement) {
1542
+ __classPrivateFieldSet(this, _KupPlanner_rootPlanner, createRoot(componentWrapperElement), "f");
1543
+ __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f").render(React.createElement(Planner, this.plannerProps));
1544
+ }
1545
+ }, _KupPlanner_toTasks = function _KupPlanner_toTasks(data) {
1546
+ var _a;
1547
+ if (!data || !data.rows) {
1548
+ return [];
1549
+ }
1550
+ 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) => {
1551
+ const datesSanitized = sanitizeAllDates(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]], row.cells[this.taskPrevDates[0]], row.cells[this.taskPrevDates[1]]);
1552
+ const valuesToShow = getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns, () => this.taskColumns.map((col) => col == this.taskDates[0]
1553
+ ? '#START#'
1554
+ : col == this.taskDates[1]
1555
+ ? '#END#'
1556
+ : getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
1557
+ let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.taskIconCol);
1558
+ let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.taskIconCol);
1559
+ let task = {
1560
+ taskRow: row,
1561
+ taskRowId: row.id,
1562
+ id: row.cells[this.taskIdCol].value,
1563
+ name: row.cells[this.taskNameCol].value,
1564
+ startDate: datesSanitized.dateValues[0],
1565
+ endDate: datesSanitized.dateValues[1],
1566
+ secondaryStartDate: datesSanitized.secDateValues[0],
1567
+ secondaryEndDate: datesSanitized.secDateValues[1],
1568
+ type: 'project',
1569
+ valuesToShow: valuesToShow,
1570
+ rowType: KupPlannerGanttRowType.TASK,
1571
+ icon: iconUrl
1572
+ ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
1573
+ : undefined,
1574
+ };
1575
+ return task;
1576
+ });
1577
+ return tasks;
1578
+ }, _KupPlanner_toDetails = function _KupPlanner_toDetails(data) {
1579
+ if (!data || !data.rows) {
1580
+ return undefined;
1581
+ }
1582
+ let details = [];
1583
+ data.rows
1584
+ .filter((row) => isAtLeastOneDateValid(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]))
1585
+ .forEach((row) => {
1586
+ var _a, _b;
1587
+ const detailId = row.cells[this.detailIdCol].value;
1588
+ const detailNameId = row.cells[this.detailNameCol].value;
1589
+ const datesSanitized = sanitizeAllDates(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]);
1590
+ const valuesToShow = getValuesToShow(row, this.detailIdCol, this.detailNameCol, data.columns, this.detailColumns);
1591
+ let detail = details.find((det) => det.id == detailId);
1592
+ if (!detail) {
1593
+ detail = {
1594
+ id: detailId,
1595
+ name: detailNameId,
1596
+ detailRow: row,
1597
+ type: 'timeline',
1598
+ valuesToShow: valuesToShow,
1599
+ rowType: KupPlannerGanttRowType.DETAIL,
1600
+ schedule: [],
1601
+ };
1602
+ details.push(detail);
1603
+ }
1604
+ let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.detailIconCol);
1605
+ let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.detailIconCol);
1606
+ detail.schedule.push({
1607
+ startDate: datesSanitized.dateValues[0],
1608
+ endDate: datesSanitized.dateValues[1],
1609
+ color: this.detailColorCol
1610
+ ? (_a = row.cells[this.detailColorCol].value) !== null && _a !== void 0 ? _a : '#D9D9D8'
1611
+ : '#D9D9D8',
1612
+ selectedColor: this.detailColorCol
1613
+ ? (_b = row.cells[this.detailColorCol].value) !== null && _b !== void 0 ? _b : '#D9D9D8'
1614
+ : '#D9D9D8',
1615
+ icon: iconUrl
1616
+ ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
1617
+ : undefined,
1618
+ });
1619
+ });
1620
+ return details;
1621
+ }, _KupPlanner_getTask = function _KupPlanner_getTask(taskId) {
1622
+ return this.plannerProps.mainGantt.items.find((task) => task.id == taskId);
1623
+ }, _KupPlanner_removePhases = function _KupPlanner_removePhases(taskId) {
1624
+ const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
1625
+ if (task)
1626
+ task.phases = undefined;
1627
+ this.plannerProps = Object.assign({}, this.plannerProps);
1628
+ }, _KupPlanner_handleOnClickOnTask = function _KupPlanner_handleOnClickOnTask(nativeEvent) {
1629
+ const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, nativeEvent.id);
1630
+ if (task === null || task === void 0 ? void 0 : task.phases) {
1631
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_removePhases).call(this, task.id);
1632
+ }
1633
+ return true;
1634
+ }, _KupPlanner_handleOnClickOnPhase = function _KupPlanner_handleOnClickOnPhase() {
1635
+ return true;
1636
+ }, _KupPlanner_handleOnClickOnDetail = function _KupPlanner_handleOnClickOnDetail() {
1637
+ return true;
1638
+ }, _KupPlanner_handleOnContextMenuOnTask = function _KupPlanner_handleOnContextMenuOnTask() {
1639
+ return true;
1640
+ }, _KupPlanner_handleOnContextMenuOnPhase = function _KupPlanner_handleOnContextMenuOnPhase() {
1641
+ return true;
1642
+ }, _KupPlanner_handleOnContextMenuOnDetail = function _KupPlanner_handleOnContextMenuOnDetail() {
1643
+ return true;
1644
+ }, _KupPlanner_emitOnChangeEventsReceived = function _KupPlanner_emitOnChangeEventsReceived(nativeEvent) {
1645
+ let emitEvent = false;
1646
+ if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f")) {
1647
+ emitEvent = true;
1648
+ __classPrivateFieldSet(this, _KupPlanner_lastOnChangeReceived, new KupPlannerLastOnChangeReceived(nativeEvent), "f");
1649
+ }
1650
+ else if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f").isEquivalent(nativeEvent)) {
1651
+ __classPrivateFieldSet(this, _KupPlanner_lastOnChangeReceived, new KupPlannerLastOnChangeReceived(nativeEvent), "f");
1652
+ emitEvent = true;
1653
+ }
1654
+ return emitEvent;
1655
+ }, _KupPlanner_onFilter = function _KupPlanner_onFilter(value, isDetail) {
1656
+ if (isDetail) {
1657
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter = value;
1658
+ }
1659
+ else {
1660
+ __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter = value;
1661
+ }
1662
+ const newGantt = isDetail
1663
+ ? {
1664
+ 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)) }),
1665
+ }
1666
+ : {
1667
+ 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)) }),
1668
+ };
1669
+ this.plannerProps = Object.assign(Object.assign({}, this.plannerProps), newGantt);
1670
+ this.persistState();
1671
+ }, _KupPlanner_getFilteredRows = function _KupPlanner_getFilteredRows(value, isDetail) {
1672
+ const data = isDetail ? this.detailData : this.data;
1673
+ if (!data || !data.rows || data.rows.length == 0) {
1674
+ return undefined;
1675
+ }
1676
+ if (!value) {
1677
+ return data;
1678
+ }
1679
+ const tempData = {
1680
+ columns: this.data.columns,
1681
+ rows: [],
1682
+ };
1683
+ const tempRows = [];
1684
+ for (let index = 0; index < data.rows.length; index++) {
1685
+ const row = data.rows[index];
1686
+ const cells = row.cells;
1687
+ for (let index = 0; index < data.columns.length; index++) {
1688
+ const column = data.columns[index];
1689
+ const cell = cells[column.name];
1690
+ if (cell) {
1691
+ const dValue = getCellValueForDisplay(data.columns[index], cell);
1692
+ const found = !!(dValue.toLowerCase().indexOf(value.toLowerCase()) > -1);
1693
+ if (found) {
1694
+ tempRows.push({ row, weight: index });
1695
+ break;
1696
+ }
1697
+ }
1698
+ }
1699
+ }
1700
+ tempRows
1701
+ .sort((a, b) => a.weight - b.weight)
1702
+ .forEach((tempRow) => {
1703
+ tempData.rows.push(tempRow.row);
1704
+ });
1705
+ return tempData;
1706
+ }, _KupPlanner_getIconUrl = function _KupPlanner_getIconUrl(row, columnName) {
1707
+ var _a;
1708
+ let iconUrl = undefined;
1709
+ if (columnName) {
1710
+ const iconCell = row.cells[columnName];
1711
+ let icon = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.resource;
1712
+ if (!icon) {
1713
+ icon = iconCell.value;
1714
+ }
1715
+ if (icon) {
1716
+ iconUrl = getAssetPath('./assets/svg/' + icon + '.svg');
1717
+ }
1718
+ }
1719
+ return iconUrl;
1720
+ }, _KupPlanner_getIconColor = function _KupPlanner_getIconColor(row, columnName) {
1721
+ var _a;
1722
+ let iconColor = undefined;
1723
+ if (columnName) {
1724
+ const iconCell = row.cells[columnName];
1725
+ iconColor = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.color;
1726
+ if (iconColor) {
1727
+ iconColor =
1728
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.colorCheck(iconColor).hexColor;
1729
+ }
1730
+ }
1731
+ return iconColor;
1732
+ };