@bryntum/gantt-react 7.1.2 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/README.md +12 -6
  2. package/lib/BryntumAIFilterField.d.ts +2 -2
  3. package/lib/BryntumAIFilterField.js.map +1 -1
  4. package/lib/BryntumAssignmentField.d.ts +2 -2
  5. package/lib/BryntumAssignmentField.js.map +1 -1
  6. package/lib/BryntumAssignmentGrid.d.ts +22 -10
  7. package/lib/BryntumAssignmentGrid.js +3 -0
  8. package/lib/BryntumAssignmentGrid.js.map +1 -1
  9. package/lib/BryntumAssignmentPicker.d.ts +254 -0
  10. package/lib/BryntumAssignmentPicker.js +183 -0
  11. package/lib/BryntumAssignmentPicker.js.map +1 -0
  12. package/lib/BryntumButton.d.ts +2 -2
  13. package/lib/BryntumButton.js.map +1 -1
  14. package/lib/BryntumButtonGroup.d.ts +1 -0
  15. package/lib/BryntumButtonGroup.js +1 -0
  16. package/lib/BryntumButtonGroup.js.map +1 -1
  17. package/lib/BryntumCalendarEditor.d.ts +3 -2
  18. package/lib/BryntumCalendarEditor.js +1 -0
  19. package/lib/BryntumCalendarEditor.js.map +1 -1
  20. package/lib/BryntumCalendarField.d.ts +2 -2
  21. package/lib/BryntumCalendarField.js.map +1 -1
  22. package/lib/BryntumCalendarPicker.d.ts +2 -2
  23. package/lib/BryntumCalendarPicker.js.map +1 -1
  24. package/lib/BryntumChatPanel.d.ts +3 -2
  25. package/lib/BryntumChatPanel.js +1 -0
  26. package/lib/BryntumChatPanel.js.map +1 -1
  27. package/lib/BryntumCheckboxGroup.d.ts +3 -2
  28. package/lib/BryntumCheckboxGroup.js +1 -0
  29. package/lib/BryntumCheckboxGroup.js.map +1 -1
  30. package/lib/BryntumChecklistFilterCombo.d.ts +2 -2
  31. package/lib/BryntumChecklistFilterCombo.js.map +1 -1
  32. package/lib/BryntumChipView.d.ts +2 -2
  33. package/lib/BryntumChipView.js +2 -2
  34. package/lib/BryntumChipView.js.map +1 -1
  35. package/lib/BryntumCodeEditor.d.ts +3 -2
  36. package/lib/BryntumCodeEditor.js +1 -0
  37. package/lib/BryntumCodeEditor.js.map +1 -1
  38. package/lib/BryntumCombo.d.ts +2 -2
  39. package/lib/BryntumCombo.js.map +1 -1
  40. package/lib/BryntumConstraintTypePicker.d.ts +2 -2
  41. package/lib/BryntumConstraintTypePicker.js.map +1 -1
  42. package/lib/BryntumContainer.d.ts +3 -2
  43. package/lib/BryntumContainer.js +1 -0
  44. package/lib/BryntumContainer.js.map +1 -1
  45. package/lib/BryntumCostAccrualField.d.ts +2 -2
  46. package/lib/BryntumCostAccrualField.js.map +1 -1
  47. package/lib/BryntumDateField.d.ts +3 -2
  48. package/lib/BryntumDateField.js +1 -0
  49. package/lib/BryntumDateField.js.map +1 -1
  50. package/lib/BryntumDatePicker.d.ts +3 -2
  51. package/lib/BryntumDatePicker.js +2 -1
  52. package/lib/BryntumDatePicker.js.map +1 -1
  53. package/lib/BryntumDateRangeField.d.ts +2 -2
  54. package/lib/BryntumDateRangeField.js.map +1 -1
  55. package/lib/BryntumDateTimeField.d.ts +2 -2
  56. package/lib/BryntumDateTimeField.js.map +1 -1
  57. package/lib/BryntumDemoCodeEditor.d.ts +3 -2
  58. package/lib/BryntumDemoCodeEditor.js +1 -0
  59. package/lib/BryntumDemoCodeEditor.js.map +1 -1
  60. package/lib/BryntumDependencyField.d.ts +2 -2
  61. package/lib/BryntumDependencyField.js.map +1 -1
  62. package/lib/BryntumDependencyTypePicker.d.ts +3 -2
  63. package/lib/BryntumDependencyTypePicker.js +1 -0
  64. package/lib/BryntumDependencyTypePicker.js.map +1 -1
  65. package/lib/BryntumDisplayField.d.ts +2 -2
  66. package/lib/BryntumDisplayField.js.map +1 -1
  67. package/lib/BryntumDurationField.d.ts +2 -2
  68. package/lib/BryntumDurationField.js.map +1 -1
  69. package/lib/BryntumEditor.d.ts +3 -2
  70. package/lib/BryntumEditor.js +1 -0
  71. package/lib/BryntumEditor.js.map +1 -1
  72. package/lib/BryntumEffortField.d.ts +2 -2
  73. package/lib/BryntumEffortField.js.map +1 -1
  74. package/lib/BryntumEndDateField.d.ts +3 -2
  75. package/lib/BryntumEndDateField.js +1 -0
  76. package/lib/BryntumEndDateField.js.map +1 -1
  77. package/lib/BryntumFieldFilterPicker.d.ts +3 -2
  78. package/lib/BryntumFieldFilterPicker.js +1 -0
  79. package/lib/BryntumFieldFilterPicker.js.map +1 -1
  80. package/lib/BryntumFieldFilterPickerGroup.d.ts +3 -2
  81. package/lib/BryntumFieldFilterPickerGroup.js +1 -0
  82. package/lib/BryntumFieldFilterPickerGroup.js.map +1 -1
  83. package/lib/BryntumFieldSet.d.ts +3 -2
  84. package/lib/BryntumFieldSet.js +1 -0
  85. package/lib/BryntumFieldSet.js.map +1 -1
  86. package/lib/BryntumFileField.d.ts +2 -2
  87. package/lib/BryntumFileField.js.map +1 -1
  88. package/lib/BryntumFilePicker.d.ts +3 -2
  89. package/lib/BryntumFilePicker.js +1 -0
  90. package/lib/BryntumFilePicker.js.map +1 -1
  91. package/lib/BryntumFilterField.d.ts +2 -2
  92. package/lib/BryntumFilterField.js.map +1 -1
  93. package/lib/BryntumGantt.d.ts +24 -11
  94. package/lib/BryntumGantt.js +5 -0
  95. package/lib/BryntumGantt.js.map +1 -1
  96. package/lib/BryntumGanttBase.d.ts +24 -11
  97. package/lib/BryntumGanttBase.js +5 -0
  98. package/lib/BryntumGanttBase.js.map +1 -1
  99. package/lib/BryntumGanttProjectModel.d.ts +1 -0
  100. package/lib/BryntumGanttProjectModel.js +1 -0
  101. package/lib/BryntumGanttProjectModel.js.map +1 -1
  102. package/lib/BryntumGrid.d.ts +22 -10
  103. package/lib/BryntumGrid.js +4 -0
  104. package/lib/BryntumGrid.js.map +1 -1
  105. package/lib/BryntumGridBase.d.ts +22 -10
  106. package/lib/BryntumGridBase.js +4 -0
  107. package/lib/BryntumGridBase.js.map +1 -1
  108. package/lib/BryntumGridChartDesigner.d.ts +2 -2
  109. package/lib/BryntumGridChartDesigner.js.map +1 -1
  110. package/lib/BryntumGridFieldFilterPicker.d.ts +3 -2
  111. package/lib/BryntumGridFieldFilterPicker.js +1 -0
  112. package/lib/BryntumGridFieldFilterPicker.js.map +1 -1
  113. package/lib/BryntumGridFieldFilterPickerGroup.d.ts +3 -2
  114. package/lib/BryntumGridFieldFilterPickerGroup.js +1 -0
  115. package/lib/BryntumGridFieldFilterPickerGroup.js.map +1 -1
  116. package/lib/BryntumGroupBar.d.ts +2 -2
  117. package/lib/BryntumGroupBar.js +2 -2
  118. package/lib/BryntumGroupBar.js.map +1 -1
  119. package/lib/BryntumHint.d.ts +3 -2
  120. package/lib/BryntumHint.js +1 -0
  121. package/lib/BryntumHint.js.map +1 -1
  122. package/lib/BryntumLabel.d.ts +2 -2
  123. package/lib/BryntumLabel.js.map +1 -1
  124. package/lib/BryntumList.d.ts +2 -2
  125. package/lib/BryntumList.js +2 -2
  126. package/lib/BryntumList.js.map +1 -1
  127. package/lib/BryntumMenu.d.ts +3 -2
  128. package/lib/BryntumMenu.js +1 -0
  129. package/lib/BryntumMenu.js.map +1 -1
  130. package/lib/BryntumModelCombo.d.ts +2 -2
  131. package/lib/BryntumModelCombo.js.map +1 -1
  132. package/lib/BryntumMonthPicker.d.ts +3 -2
  133. package/lib/BryntumMonthPicker.js +1 -0
  134. package/lib/BryntumMonthPicker.js.map +1 -1
  135. package/lib/BryntumNumberField.d.ts +2 -2
  136. package/lib/BryntumNumberField.js.map +1 -1
  137. package/lib/BryntumPagingToolbar.d.ts +3 -2
  138. package/lib/BryntumPagingToolbar.js +1 -0
  139. package/lib/BryntumPagingToolbar.js.map +1 -1
  140. package/lib/BryntumPanel.d.ts +3 -2
  141. package/lib/BryntumPanel.js +1 -0
  142. package/lib/BryntumPanel.js.map +1 -1
  143. package/lib/BryntumPasswordField.d.ts +2 -2
  144. package/lib/BryntumPasswordField.js.map +1 -1
  145. package/lib/BryntumProgressBar.d.ts +165 -0
  146. package/lib/BryntumProgressBar.js +130 -0
  147. package/lib/BryntumProgressBar.js.map +1 -0
  148. package/lib/BryntumProjectCombo.d.ts +2 -2
  149. package/lib/BryntumProjectCombo.js.map +1 -1
  150. package/lib/BryntumRadioGroup.d.ts +3 -2
  151. package/lib/BryntumRadioGroup.js +1 -0
  152. package/lib/BryntumRadioGroup.js.map +1 -1
  153. package/lib/BryntumRateTableField.d.ts +2 -2
  154. package/lib/BryntumRateTableField.js.map +1 -1
  155. package/lib/BryntumResourceCombo.d.ts +2 -2
  156. package/lib/BryntumResourceCombo.js.map +1 -1
  157. package/lib/BryntumResourceEditor.d.ts +3 -2
  158. package/lib/BryntumResourceEditor.js +1 -0
  159. package/lib/BryntumResourceEditor.js.map +1 -1
  160. package/lib/BryntumResourceFilter.d.ts +2 -2
  161. package/lib/BryntumResourceFilter.js +2 -2
  162. package/lib/BryntumResourceFilter.js.map +1 -1
  163. package/lib/BryntumResourceGrid.d.ts +22 -10
  164. package/lib/BryntumResourceGrid.js +3 -0
  165. package/lib/BryntumResourceGrid.js.map +1 -1
  166. package/lib/BryntumResourceHistogram.d.ts +23 -11
  167. package/lib/BryntumResourceHistogram.js +4 -0
  168. package/lib/BryntumResourceHistogram.js.map +1 -1
  169. package/lib/BryntumResourceTypeField.d.ts +2 -2
  170. package/lib/BryntumResourceTypeField.js.map +1 -1
  171. package/lib/BryntumResourceUtilization.d.ts +23 -11
  172. package/lib/BryntumResourceUtilization.js +4 -0
  173. package/lib/BryntumResourceUtilization.js.map +1 -1
  174. package/lib/BryntumScheduler.d.ts +75 -11
  175. package/lib/BryntumScheduler.js +12 -0
  176. package/lib/BryntumScheduler.js.map +1 -1
  177. package/lib/BryntumSchedulerBase.d.ts +75 -11
  178. package/lib/BryntumSchedulerBase.js +12 -0
  179. package/lib/BryntumSchedulerBase.js.map +1 -1
  180. package/lib/BryntumSchedulerDatePicker.d.ts +3 -2
  181. package/lib/BryntumSchedulerDatePicker.js +2 -1
  182. package/lib/BryntumSchedulerDatePicker.js.map +1 -1
  183. package/lib/BryntumSchedulerPro.d.ts +75 -11
  184. package/lib/BryntumSchedulerPro.js +12 -0
  185. package/lib/BryntumSchedulerPro.js.map +1 -1
  186. package/lib/BryntumSchedulerProBase.d.ts +75 -11
  187. package/lib/BryntumSchedulerProBase.js +12 -0
  188. package/lib/BryntumSchedulerProBase.js.map +1 -1
  189. package/lib/BryntumSchedulingDirectionPicker.d.ts +2 -2
  190. package/lib/BryntumSchedulingDirectionPicker.js.map +1 -1
  191. package/lib/BryntumSchedulingModePicker.d.ts +2 -2
  192. package/lib/BryntumSchedulingModePicker.js.map +1 -1
  193. package/lib/BryntumSlider.d.ts +2 -2
  194. package/lib/BryntumSlider.js.map +1 -1
  195. package/lib/BryntumSplitter.d.ts +2 -2
  196. package/lib/BryntumSplitter.js.map +1 -1
  197. package/lib/BryntumStartDateField.d.ts +3 -2
  198. package/lib/BryntumStartDateField.js +1 -0
  199. package/lib/BryntumStartDateField.js.map +1 -1
  200. package/lib/BryntumTabPanel.d.ts +3 -2
  201. package/lib/BryntumTabPanel.js +1 -0
  202. package/lib/BryntumTabPanel.js.map +1 -1
  203. package/lib/BryntumTextAreaField.d.ts +2 -2
  204. package/lib/BryntumTextAreaField.js.map +1 -1
  205. package/lib/BryntumTextAreaPickerField.d.ts +2 -2
  206. package/lib/BryntumTextAreaPickerField.js.map +1 -1
  207. package/lib/BryntumTextField.d.ts +2 -2
  208. package/lib/BryntumTextField.js.map +1 -1
  209. package/lib/BryntumTimeField.d.ts +3 -2
  210. package/lib/BryntumTimeField.js +1 -0
  211. package/lib/BryntumTimeField.js.map +1 -1
  212. package/lib/BryntumTimePicker.d.ts +3 -2
  213. package/lib/BryntumTimePicker.js +1 -0
  214. package/lib/BryntumTimePicker.js.map +1 -1
  215. package/lib/BryntumTimeline.d.ts +75 -11
  216. package/lib/BryntumTimeline.js +10 -0
  217. package/lib/BryntumTimeline.js.map +1 -1
  218. package/lib/BryntumTimelineHistogram.d.ts +23 -11
  219. package/lib/BryntumTimelineHistogram.js +4 -0
  220. package/lib/BryntumTimelineHistogram.js.map +1 -1
  221. package/lib/BryntumToolbar.d.ts +3 -2
  222. package/lib/BryntumToolbar.js +1 -0
  223. package/lib/BryntumToolbar.js.map +1 -1
  224. package/lib/BryntumTreeCombo.d.ts +2 -2
  225. package/lib/BryntumTreeCombo.js.map +1 -1
  226. package/lib/BryntumTreeGrid.d.ts +22 -10
  227. package/lib/BryntumTreeGrid.js +4 -0
  228. package/lib/BryntumTreeGrid.js.map +1 -1
  229. package/lib/BryntumUndoRedo.d.ts +1 -0
  230. package/lib/BryntumUndoRedo.js +1 -0
  231. package/lib/BryntumUndoRedo.js.map +1 -1
  232. package/lib/BryntumVersionGrid.d.ts +22 -10
  233. package/lib/BryntumVersionGrid.js +3 -0
  234. package/lib/BryntumVersionGrid.js.map +1 -1
  235. package/lib/BryntumViewPresetCombo.d.ts +2 -2
  236. package/lib/BryntumViewPresetCombo.js.map +1 -1
  237. package/lib/BryntumWidget.d.ts +2 -2
  238. package/lib/BryntumWidget.js.map +1 -1
  239. package/lib/BryntumYearPicker.d.ts +3 -2
  240. package/lib/BryntumYearPicker.js +1 -0
  241. package/lib/BryntumYearPicker.js.map +1 -1
  242. package/lib/WrapperHelper.js +46 -1
  243. package/lib/WrapperHelper.js.map +1 -1
  244. package/lib/index.d.ts +2 -0
  245. package/lib/index.js +2 -0
  246. package/lib/index.js.map +1 -1
  247. package/package.json +1 -1
  248. package/src/BryntumAIFilterField.tsx +2 -2
  249. package/src/BryntumAssignmentField.tsx +2 -2
  250. package/src/BryntumAssignmentGrid.tsx +56 -24
  251. package/src/BryntumAssignmentPicker.tsx +1114 -0
  252. package/src/BryntumButton.tsx +2 -2
  253. package/src/BryntumButtonGroup.tsx +5 -0
  254. package/src/BryntumCalendarEditor.tsx +7 -2
  255. package/src/BryntumCalendarField.tsx +2 -2
  256. package/src/BryntumCalendarPicker.tsx +2 -2
  257. package/src/BryntumChatPanel.tsx +7 -2
  258. package/src/BryntumCheckboxGroup.tsx +7 -2
  259. package/src/BryntumChecklistFilterCombo.tsx +2 -2
  260. package/src/BryntumChipView.tsx +4 -4
  261. package/src/BryntumCodeEditor.tsx +7 -2
  262. package/src/BryntumCombo.tsx +2 -2
  263. package/src/BryntumConstraintTypePicker.tsx +2 -2
  264. package/src/BryntumContainer.tsx +7 -2
  265. package/src/BryntumCostAccrualField.tsx +2 -2
  266. package/src/BryntumDateField.tsx +13 -3
  267. package/src/BryntumDatePicker.tsx +8 -3
  268. package/src/BryntumDateRangeField.tsx +2 -2
  269. package/src/BryntumDateTimeField.tsx +2 -2
  270. package/src/BryntumDemoCodeEditor.tsx +7 -2
  271. package/src/BryntumDependencyField.tsx +2 -2
  272. package/src/BryntumDependencyTypePicker.tsx +8 -2
  273. package/src/BryntumDisplayField.tsx +2 -2
  274. package/src/BryntumDurationField.tsx +2 -2
  275. package/src/BryntumEditor.tsx +7 -2
  276. package/src/BryntumEffortField.tsx +2 -2
  277. package/src/BryntumEndDateField.tsx +13 -3
  278. package/src/BryntumFieldFilterPicker.tsx +7 -2
  279. package/src/BryntumFieldFilterPickerGroup.tsx +7 -2
  280. package/src/BryntumFieldSet.tsx +7 -2
  281. package/src/BryntumFileField.tsx +2 -2
  282. package/src/BryntumFilePicker.tsx +7 -2
  283. package/src/BryntumFilterField.tsx +2 -2
  284. package/src/BryntumGantt.tsx +65 -26
  285. package/src/BryntumGanttBase.tsx +65 -26
  286. package/src/BryntumGanttProjectModel.tsx +9 -0
  287. package/src/BryntumGrid.tsx +57 -24
  288. package/src/BryntumGridBase.tsx +57 -24
  289. package/src/BryntumGridChartDesigner.tsx +2 -2
  290. package/src/BryntumGridFieldFilterPicker.tsx +7 -2
  291. package/src/BryntumGridFieldFilterPickerGroup.tsx +7 -2
  292. package/src/BryntumGroupBar.tsx +4 -4
  293. package/src/BryntumHint.tsx +7 -2
  294. package/src/BryntumLabel.tsx +2 -2
  295. package/src/BryntumList.tsx +4 -4
  296. package/src/BryntumMenu.tsx +7 -2
  297. package/src/BryntumModelCombo.tsx +2 -2
  298. package/src/BryntumMonthPicker.tsx +7 -2
  299. package/src/BryntumNumberField.tsx +2 -2
  300. package/src/BryntumPagingToolbar.tsx +7 -2
  301. package/src/BryntumPanel.tsx +7 -2
  302. package/src/BryntumPasswordField.tsx +2 -2
  303. package/src/BryntumProgressBar.tsx +742 -0
  304. package/src/BryntumProjectCombo.tsx +2 -2
  305. package/src/BryntumRadioGroup.tsx +7 -2
  306. package/src/BryntumRateTableField.tsx +2 -2
  307. package/src/BryntumResourceCombo.tsx +2 -2
  308. package/src/BryntumResourceEditor.tsx +7 -2
  309. package/src/BryntumResourceFilter.tsx +4 -4
  310. package/src/BryntumResourceGrid.tsx +56 -24
  311. package/src/BryntumResourceHistogram.tsx +58 -25
  312. package/src/BryntumResourceTypeField.tsx +2 -2
  313. package/src/BryntumResourceUtilization.tsx +58 -25
  314. package/src/BryntumScheduler.tsx +142 -25
  315. package/src/BryntumSchedulerBase.tsx +142 -25
  316. package/src/BryntumSchedulerDatePicker.tsx +8 -3
  317. package/src/BryntumSchedulerPro.tsx +142 -25
  318. package/src/BryntumSchedulerProBase.tsx +142 -25
  319. package/src/BryntumSchedulingDirectionPicker.tsx +2 -2
  320. package/src/BryntumSchedulingModePicker.tsx +2 -2
  321. package/src/BryntumSlider.tsx +2 -2
  322. package/src/BryntumSplitter.tsx +2 -2
  323. package/src/BryntumStartDateField.tsx +13 -3
  324. package/src/BryntumTabPanel.tsx +7 -2
  325. package/src/BryntumTextAreaField.tsx +2 -2
  326. package/src/BryntumTextAreaPickerField.tsx +2 -2
  327. package/src/BryntumTextField.tsx +2 -2
  328. package/src/BryntumTimeField.tsx +11 -2
  329. package/src/BryntumTimePicker.tsx +7 -2
  330. package/src/BryntumTimeline.tsx +140 -25
  331. package/src/BryntumTimelineHistogram.tsx +58 -25
  332. package/src/BryntumToolbar.tsx +7 -2
  333. package/src/BryntumTreeCombo.tsx +2 -2
  334. package/src/BryntumTreeGrid.tsx +57 -24
  335. package/src/BryntumUndoRedo.tsx +5 -0
  336. package/src/BryntumVersionGrid.tsx +56 -24
  337. package/src/BryntumViewPresetCombo.tsx +2 -2
  338. package/src/BryntumWidget.tsx +2 -2
  339. package/src/BryntumYearPicker.tsx +7 -2
  340. package/src/WrapperHelper.tsx +162 -35
  341. package/src/index.ts +2 -0
@@ -20,9 +20,43 @@ declare global {
20
20
  }
21
21
 
22
22
  /**
23
- * Development warning. Showed when environment is set to 'development'
24
- * @param {String} clsName react component instance
25
- * @param {String} msg console message
23
+ * Extends the standard React.ReactPortal type to include an optional `taskGeneration` property.
24
+ * This property can be used to track or associate a generation number with the portal,
25
+ * which may be useful for managing updates or synchronization tasks in complex React applications.
26
+ *
27
+ * @property {number} [taskGeneration] Optional generation number for task tracking or synchronization.
28
+ */
29
+ type ReactPortalWithTaskGeneration = React.ReactPortal & { taskGeneration?: number };
30
+
31
+ /**
32
+ * Represents the state for a React component that manages portals and their generation.
33
+ *
34
+ * @property {Map} portals A map associating unique string keys with `ReactPortalWithTaskGeneration` instances.
35
+ * @property {number} generation A numeric value indicating the current generation or version of the component state.
36
+ */
37
+ type ReactComponentState = {
38
+ portals : Map<string, ReactPortalWithTaskGeneration>
39
+ generation : number
40
+ };
41
+
42
+ /**
43
+ * Extends the standard HTMLElement to include additional optional properties
44
+ * used for managing element-specific data and state within the application.
45
+ *
46
+ * @property {any} [elementData] Arbitrary data associated with the element.
47
+ * @property {string|null} [lastPortalId] Identifier for the last portal rendered into this element, or null if none.
48
+ * @property {boolean} [didSetTextContent] Indicates whether the text content of the element has been set.
49
+ */
50
+ type HTMLElementWithData = HTMLElement & {
51
+ elementData?: any
52
+ lastPortalId?: string | null
53
+ didSetTextContent?: boolean
54
+ };
55
+
56
+ /**
57
+ * Development warning. Shown when environment is set to 'development'
58
+ * @param {string} clsName react component instance
59
+ * @param {string} msg console message
26
60
  */
27
61
  function devWarning(clsName: string, msg: string): void {
28
62
  // @ts-ignore
@@ -38,7 +72,7 @@ function devWarningContainer(clsName: string, containerParam: string): void {
38
72
  devWarning(
39
73
  clsName,
40
74
  `Using "${containerParam}" parameter for configuration is not recommended.\n` +
41
- "Widget is placed automatically inside it's container element.\n" +
75
+ 'Widget is placed automatically inside its container element.\n' +
42
76
  `Solution: remove "${containerParam}" parameter from configuration.`
43
77
  );
44
78
  }
@@ -62,14 +96,14 @@ function devWarningProjectProp(clsName: string): void {
62
96
  /**
63
97
  * Returns `true` if the provided element is an instance of React Element.
64
98
  * All React elements require an additional $$typeof: Symbol.for('react.element') field declared on the object for security reasons.
65
- * The object, which React.createElement() return has $$typeof property equals to Symbol.for('react.element')
99
+ * The object, which React.createElement() returns has $$typeof property equal to Symbol.for('react.element')
66
100
  *
67
101
  * Sources:
68
102
  * https://reactjs.org/blog/2015/12/18/react-components-elements-and-instances.html
69
103
  * https://github.com/facebook/react/pull/4832
70
104
  *
71
- * @param {*} element
72
- * @returns {Boolean}
105
+ * @param {*} element Element to check
106
+ * @returns {boolean} True if element is a React element
73
107
  * @internal
74
108
  */
75
109
  function isReactElement(element: any): boolean {
@@ -78,8 +112,8 @@ function isReactElement(element: any): boolean {
78
112
 
79
113
  /**
80
114
  * Creates bryntum component config from react component
81
- * @param {Object} reactInstance react component instance
82
- * @returns {Object} config object
115
+ * @param {object} reactInstance react component instance
116
+ * @returns {object} config object
83
117
  */
84
118
  function createConfig(reactInstance: any): object {
85
119
  const
@@ -101,6 +135,7 @@ function createConfig(reactInstance: any): object {
101
135
  processCellContent : isView ? processCellContent : undefined,
102
136
  processCellEditor : isView ? processCellEditor : undefined,
103
137
  processEventContent : isView ? processEventContent : undefined,
138
+ processTaskContent : isView ? processTaskContent : undefined,
104
139
  processTaskItemContent : isView ? processTaskItemContent : undefined,
105
140
  processResourceHeader : isView ? processResourceHeader : undefined
106
141
  } as any;
@@ -178,10 +213,10 @@ function createConfig(reactInstance: any): object {
178
213
 
179
214
  /**
180
215
  * Applies property value to Bryntum config or instance.
181
- * @param {Object} configOrInstance target object
182
- * @param {String} prop property name
183
- * @param {Object} value value
184
- * @param {Boolean} isConfig config setting mode
216
+ * @param {object} configOrInstance target object
217
+ * @param {string} prop property name
218
+ * @param {object} value value
219
+ * @param {boolean} isConfig config setting mode
185
220
  */
186
221
  function applyPropValue(configOrInstance: any, prop: string, value: any, isConfig = true): void {
187
222
  // Assigning React wrapper component instance
@@ -270,9 +305,9 @@ function createWidget(component: any): any {
270
305
 
271
306
  /**
272
307
  * Calculates the portalId from passed ids
273
- * @param {String|Number} id
274
- * @param {String|Number} columnId
275
- * @returns {String} portalId as `portal-${id}-${columnId}`
308
+ * @param {string|number} id Record id
309
+ * @param {string|number} columnId Column id
310
+ * @returns {string} portalId as `portal-${id}-${columnId}`
276
311
  */
277
312
  function getPortalId(id: string | number, columnId: string | number): string {
278
313
  return `portal-${id}-${columnId}`;
@@ -281,7 +316,7 @@ function getPortalId(id: string | number, columnId: string | number): string {
281
316
  /**
282
317
  * Delete portal and its container
283
318
  * @param {*} component React Component, the wrapper itself
284
- * @param {String} portalId As returned from getPortalId function
319
+ * @param {string} portalId As returned from getPortalId function
285
320
  */
286
321
  function deletePortal(component: any, portalId: string): void {
287
322
  const portal = component.state.portals.get(portalId);
@@ -313,7 +348,7 @@ function releaseReactCell(component: any, cellElement: any): void {
313
348
  /**
314
349
  * Calls releaseReactCell that implements the cleanup
315
350
  * @param {*} component React Component, the wrapper itself
316
- * @param {Object} context
351
+ * @param {object} context Event context object
317
352
  * @param {Core.data.Model[]} context.records Array of records that are going to be removed
318
353
  */
319
354
  function beforeRemoveRecords(component: any, { records, removingAll }: { records: any[]; removingAll: boolean }): void {
@@ -361,9 +396,9 @@ function updateGeneration(component: any, thisTick = false, callback = () => {})
361
396
  * Component about to be updated, from changing a prop using state.
362
397
  * React to it depending on what changed and prevent react from re-rendering our component.
363
398
  * @param {*} component react component instance
364
- * @param nextProps
365
- * @param nextState
366
- * @returns {Boolean}
399
+ * @param {object} nextProps Next props
400
+ * @param {object} nextState Next state
401
+ * @returns {boolean}
367
402
  */
368
403
  function shouldComponentUpdate(component: any, nextProps: Readonly<any>, nextState: Readonly<any>): boolean {
369
404
  const { props, instance, propertyNames } = component;
@@ -380,10 +415,10 @@ function shouldComponentUpdate(component: any, nextProps: Readonly<any>, nextSta
380
415
  }
381
416
 
382
417
  /**
383
- *
384
- * @param { Object } context
385
- * @param { * } context.cellContent Content to be rendered in cell (set by renderer)
386
- * @returns { Boolean } `true` if there is a React Renderer in this cell, `false` otherwise
418
+ * Checks if the cell content is a React element
419
+ * @param {object} context Renderer context object
420
+ * @param {*} context.cellContent Content to be rendered in cell (set by renderer)
421
+ * @returns {boolean} `true` if there is a React Renderer in this cell, `false` otherwise
387
422
  */
388
423
  function hasFrameworkRenderer({ cellContent }: { cellContent: any }): boolean {
389
424
  // @ts-ignore
@@ -393,9 +428,9 @@ function hasFrameworkRenderer({ cellContent }: { cellContent: any }): boolean {
393
428
  /**
394
429
  * Hook called by instance when rendering cells within
395
430
  * Row::renderCell(), creates portals for JSX supplied by renderers
396
- * @param {Object} context
397
- * @param {Object} context.rendererData Data passed from renderCell
398
- * @param {Object} context.cellElementData Data passed from renderCell
431
+ * @param {object} context Renderer context object
432
+ * @param {object} context.rendererData Data passed from renderCell
433
+ * @param {object} context.cellElementData Data passed from renderCell
399
434
  */
400
435
  function processCellContent(this: { reactComponent: any; isExporting: boolean; $isCollapsing: boolean; }, { rendererData, cellElementData, rendererHtml }: {
401
436
  rendererData: any
@@ -793,10 +828,102 @@ function processCalendarEventContent(this: any, {
793
828
  return returnValue;
794
829
  }
795
830
 
831
+ function processTaskContent(this: any, {
832
+ jsx, // React element to render in portal
833
+ action, // Rendering action
834
+ targetElement, // DOM element to create portal in
835
+ reactComponent // the React wrapper component
836
+ }: {
837
+ jsx: ReactElement
838
+ action: string
839
+ targetElement: HTMLElementWithData
840
+ reactComponent: React.Component & { syncContent: (fn: () => unknown) => void }
841
+ }): boolean {
842
+
843
+ const { taskResize } = this.features;
844
+
845
+ if (
846
+ !reactComponent ||
847
+ action !== 'syncFwConfig' ||
848
+ (taskResize?.isResizing && !taskResize.dragging.completed)
849
+ ) {
850
+ return false;
851
+ }
852
+
853
+ // Ensure we have the expected DOM structure and type safety
854
+ const wrap : HTMLElementWithData | null | undefined = targetElement.parentElement?.parentElement;
855
+
856
+ if (!wrap?.elementData) {
857
+ return false;
858
+ }
859
+
860
+ const
861
+ wrapData = wrap.elementData,
862
+ { taskRecord } = wrapData,
863
+ state = reactComponent.state as ReactComponentState,
864
+ { portals } = state,
865
+ portalId = `portal-task-${taskRecord.id}`;
866
+
867
+ if (taskRecord.isMilestone) {
868
+ deletePortal(reactComponent, portalId);
869
+ targetElement.innerHTML = '';
870
+ wrap.lastPortalId = null;
871
+ return false;
872
+ }
873
+
874
+ // Make this function available for testing. It is used for synchronizing task content, specifically
875
+ // for React portal rendering. It should only be called during event D&D drop operation.
876
+ reactComponent.syncContent = reactComponent.syncContent || function(fn: () => unknown) {
877
+ flushSync(fn);
878
+ };
879
+
880
+ const parent = wrap.querySelector('.b-gantt-task-content') as HTMLElement;
881
+
882
+ if (jsx) {
883
+
884
+ const
885
+ portal = portals.get(portalId),
886
+ updateContent = () => {
887
+ // Clean-up the content element
888
+ parent!.innerHTML = '';
889
+ const
890
+ jsxContainer = DomHelper.createElement({
891
+ className : 'b-jsx-container',
892
+ // As stated above, we are at the wrapper, but we should render the JSX inside the content element
893
+ parent,
894
+ // Signal DomSync to not remove React-controlled content
895
+ retainElement : true
896
+ }) as Element,
897
+ portal = ReactDOM.createPortal(jsx, jsxContainer) as ReactPortalWithTaskGeneration;
898
+
899
+ // Store taskGeneration on the portal to easily determine later if it needs to be updated
900
+ portal.taskGeneration = wrap.elementData.taskGeneration;
901
+
902
+ // Save portalId for later use
903
+ wrap.lastPortalId = portalId;
904
+
905
+ // Store portal in map in state, so that React can keep track of it
906
+ portals.set(portalId, portal);
907
+ updateGeneration(reactComponent, true);
908
+
909
+ targetElement.didSetTextContent = true;
910
+ };
911
+
912
+ // Recreate portal only if the underlying taskRecord has changed or is different from last used
913
+ if (!portal || portal.taskGeneration !== wrap.elementData.taskGeneration || wrap.lastPortalId !== portalId) {
914
+ // Delete the old portal if one exists
915
+ deletePortal(reactComponent, portalId);
916
+ updateContent();
917
+ }
918
+ }
919
+
920
+ return true;
921
+ }
922
+
796
923
  /**
797
924
  * Generate a unique portal ID for an event.
798
- * @param {Object} assignmentRecord The assignment record
799
- * @param {Object} [eventRecord] The event record
925
+ * @param {object} assignmentRecord The assignment record
926
+ * @param {object} [eventRecord] The event record
800
927
  * @param {string} [segment] Segment identifier for split events
801
928
  * @param {boolean} [isExporting] To check if exporting is in progress
802
929
  * @returns {string} The generated portal ID
@@ -811,8 +938,8 @@ function generateEventPortalId(assignmentRecord: any, eventRecord?: any, segment
811
938
  * DomSync only fires callback for it and not for children. The nested children are removed as part of
812
939
  * removing the parent, so their callbacks don't fire individually. We must explicitly clean up their portals here.
813
940
  * @param {*} component React Component, the wrapper itself
814
- * @param {Object} parentEventRecord The parent event record
815
- * @param {Object} resourceRecord The resource record (needed for assignment lookup)
941
+ * @param {object} parentEventRecord The parent event record
942
+ * @param {object} resourceRecord The resource record (needed for assignment lookup)
816
943
  * @param {boolean} isExporting Whether we're in export mode
817
944
  */
818
945
  function deleteNestedEventPortals(component: any, parentEventRecord: any, resourceRecord: any, isExporting: boolean): void {
@@ -959,7 +1086,7 @@ function processEventContent(this: any, {
959
1086
  generationUpdateFlag = true;
960
1087
  }
961
1088
 
962
- // If nestedEvents feature is enabled and this is a event with nested children, need
1089
+ // If nestedEvents feature is enabled and this is an event with nested children, need
963
1090
  // to clean up their portals. Because DomSync only fires callback for the parent when it's released,
964
1091
  // nested children are removed as part of removing the parent, so their callbacks don't fire.
965
1092
  if (nestedEvents?.enabled && eventRecord.children?.length) {
@@ -1097,9 +1224,9 @@ function handleReactElement(widget: Widget, element: any): void {
1097
1224
  /**
1098
1225
  * Handles the React header element by processing JSX content within the widget.
1099
1226
  *
1100
- * @param {Object} column Object containing grid and id properties
1227
+ * @param {object} column Object containing grid and id properties
1101
1228
  * @param {HTMLElement} headerElement The header element to be processed
1102
- * @param {Any} html JSX content to be processed
1229
+ * @param {any} html JSX content to be processed
1103
1230
  */
1104
1231
  function handleReactHeaderElement(column: { grid: any; id: string }, headerElement: HTMLElement, html: any): void {
1105
1232
  const
package/src/index.ts CHANGED
@@ -9,6 +9,7 @@ export * from './BryntumThemeCombo';
9
9
  export * from './BryntumAIFilterField';
10
10
  export * from './BryntumAssignmentField';
11
11
  export * from './BryntumAssignmentGrid';
12
+ export * from './BryntumAssignmentPicker';
12
13
  export * from './BryntumButton';
13
14
  export * from './BryntumButtonGroup';
14
15
  export * from './BryntumCalendarEditor';
@@ -62,6 +63,7 @@ export * from './BryntumNumberField';
62
63
  export * from './BryntumPagingToolbar';
63
64
  export * from './BryntumPanel';
64
65
  export * from './BryntumPasswordField';
66
+ export * from './BryntumProgressBar';
65
67
  export * from './BryntumProjectCombo';
66
68
  export * from './BryntumGanttProjectModel';
67
69
  export * from './BryntumRadio';