@sme.up/ketchup 8.0.2 → 8.1.0

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