@baishuyun/ui-base 6.3.2 → 6.4.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 (249) hide show
  1. package/dist/Amap/AmapProvider/index.js +3 -3
  2. package/dist/Amap/{AmapProvider-CTn2CH8s.js → AmapProvider-By5tTMAj.js} +1 -1
  3. package/dist/Amap/index.js +3 -3
  4. package/dist/Calendar/{AllDaySection-DS0Frx1p.js → AllDaySection-DwQz-p7a.js} +3 -3
  5. package/dist/Calendar/{Calendar-BIjk9zys.js → Calendar-CuBzeTkR.js} +84 -95
  6. package/dist/Calendar/{CurrentTimeIndicator-DaIywtIA.js → CurrentTimeIndicator-CUeblc9r.js} +2 -2
  7. package/dist/Calendar/{EventCard-D_VeOVDQ.js → EventCard-DRJrT_AG.js} +2 -2
  8. package/dist/Calendar/{TimeAxis-gKb8dTwY.js → TimeAxis-cK2_3FeM.js} +1 -1
  9. package/dist/Calendar/{TimeGrid-D8Du5vFP.js → TimeGrid-B8lvUb1W.js} +2 -2
  10. package/dist/Calendar/index.js +15 -16
  11. package/dist/Calendar/{layout-DvWx_7gn.js → layout-CaPxiRd-.js} +94 -96
  12. package/dist/Calendar/subcomponents/AllDaySection/index.js +8 -0
  13. package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +5 -0
  14. package/dist/Calendar/subcomponents/EventCard/index.js +6 -0
  15. package/dist/Calendar/subcomponents/TimeAxis/index.js +4 -0
  16. package/dist/Calendar/subcomponents/TimeGrid/index.js +4 -0
  17. package/dist/Calendar/{style-hCRKx3m1.js → theme-BzNDRi0U.js} +19 -3
  18. package/dist/Calendar/utils/index.js +37 -41
  19. package/dist/Calendar/utils/layout/index.js +2 -2
  20. package/dist/Calendar/utils/theme/index.js +2 -0
  21. package/dist/ColorPicker/{ColorPicker-BNPxmfw_.js → ColorPicker-By-Y8Tyz.js} +3 -3
  22. package/dist/ColorPicker/index.js +4 -4
  23. package/dist/ConfigProvider/index.js +2 -2
  24. package/dist/DatePicker/DatePicker-B6ZFxTt6.js +114 -0
  25. package/dist/DatePicker/{DatePickerPanel-BaVC1tq2.js → DatePickerPanel-HoxXteK0.js} +13 -12
  26. package/dist/DatePicker/{ensureDayjsPlugins-DZjJnZgo.js → ensureDayjsPlugins-C3aqki6i.js} +3 -4
  27. package/dist/DatePicker/index.js +5 -5
  28. package/dist/DropDown/{DropDown-m3HT_eex.js → DropDown-C5H9UObs.js} +3 -3
  29. package/dist/DropDown/index.js +4 -4
  30. package/dist/Editor/{Buttons-BB3xV8ku.js → Buttons-B8_yDqF5.js} +3 -3
  31. package/dist/Editor/ToolbarPlugin/Buttons/index.js +7 -7
  32. package/dist/Editor/index.js +7 -7
  33. package/dist/Gantt/GanttChart/index.js +15 -0
  34. package/dist/Gantt/GanttChart-DpmbH0GI.js +1965 -0
  35. package/dist/Gantt/GanttHighlightContext-AIpN3-af.js +12 -0
  36. package/dist/Gantt/GanttTable/index.js +10 -0
  37. package/dist/Gantt/GanttTable-DSTq5XmX.js +83 -0
  38. package/dist/Gantt/GanttToolBar/index.js +11 -0
  39. package/dist/Gantt/GanttToolBar-fCAi-4zZ.js +91 -0
  40. package/dist/Gantt/collapseKeys-BWMH5k37.js +156 -0
  41. package/dist/Gantt/columnResize-By_1E48E.js +46 -0
  42. package/dist/Gantt/constants-_vMvDXFh.js +40 -0
  43. package/dist/Gantt/highlightTarget-DmzCIiQb.js +25 -0
  44. package/dist/Gantt/index.js +374 -0
  45. package/dist/Gantt/timelineViewConfig-DshzoBp7.js +118 -0
  46. package/dist/Gantt/utils/index.js +6 -0
  47. package/dist/Select/{Select-Dz_xr4my.js → Select-Gkywa_sm.js} +140 -134
  48. package/dist/Select/{SelectInputSearch-GHYAmQ3A.js → SelectInputSearch-DXPTGSc2.js} +1 -1
  49. package/dist/Select/index.js +4 -4
  50. package/dist/Table/Table-DVTq4n2V.js +544 -0
  51. package/dist/Table/constants-CKqc9Os_.js +25 -0
  52. package/dist/Table/hooks/index.js +2 -0
  53. package/dist/Table/hooks-CJ2CnSep.js +108 -0
  54. package/dist/Table/index.js +7 -0
  55. package/dist/Table/processRowspan-BCzfI5un.js +144 -0
  56. package/dist/Table/utils/index.js +2 -0
  57. package/dist/Tabs/{Tabs-CPRNkfMo.js → Tabs-DVQcB3YG.js} +1 -1
  58. package/dist/Tabs/index.js +1 -1
  59. package/dist/Tooltip/Tooltip-DW_XP13m.js +171 -0
  60. package/dist/Tooltip/index.js +1 -1
  61. package/dist/animations/index.d.ts +2 -2
  62. package/dist/components/Amap/__tests__/helpers.d.ts +6 -0
  63. package/dist/components/Calendar/__tests__/helpers/testFormatMessage.d.ts +1 -1
  64. package/dist/components/Calendar/context/CalendarContext.d.ts +2 -1
  65. package/dist/components/Calendar/index.d.ts +2 -2
  66. package/dist/components/Calendar/{shared → subcomponents}/AllDaySection/AllDaySection.d.ts +1 -1
  67. package/dist/components/Calendar/subcomponents/DayView/DayView.d.ts +3 -0
  68. package/dist/components/Calendar/{shared → subcomponents}/EventCard/EventCard.d.ts +1 -1
  69. package/dist/components/Calendar/{panels/MonthPanel → subcomponents}/MonthCell/MonthCellPopover/MonthCellPopover.d.ts +1 -1
  70. package/dist/components/Calendar/subcomponents/MonthView/MonthView.d.ts +3 -0
  71. package/dist/components/Calendar/{panels/WeekPanel → subcomponents}/WeekAllDaySection/WeekAllDaySection.d.ts +1 -1
  72. package/dist/components/Calendar/{panels/MonthPanel → subcomponents}/WeekEventLayer/MoreButton.d.ts +1 -1
  73. package/dist/components/Calendar/{panels/MonthPanel → subcomponents}/WeekEventLayer/WeekEventLayer.d.ts +1 -1
  74. package/dist/components/Calendar/subcomponents/WeekView/WeekView.d.ts +3 -0
  75. package/dist/components/Calendar/utils/dateUtils.d.ts +2 -1
  76. package/dist/components/Calendar/utils/eventUtils.d.ts +1 -1
  77. package/dist/components/Calendar/utils/layout/dayLayoutAlgorithm.d.ts +1 -1
  78. package/dist/components/Calendar/utils/localeKey.d.ts +2 -0
  79. package/dist/components/Calendar/utils/normalizeData.d.ts +1 -1
  80. package/dist/components/Calendar/{style → utils/theme}/index.d.ts +1 -0
  81. package/dist/components/Calendar/{adapters → utils/theme}/platformTheme.d.ts +1 -1
  82. package/dist/components/Calendar/{style → utils/theme}/resolveCalendarThemeVars.d.ts +1 -1
  83. package/dist/components/Calendar/{style → utils/theme}/resolveSubcomponentThemes.d.ts +3 -3
  84. package/dist/components/Calendar/utils/weekTimedLayout.d.ts +1 -1
  85. package/dist/components/DatePicker/__tests__/DatePicker.getPopupContainer.test.d.ts +1 -0
  86. package/dist/components/DatePicker/interface.d.ts +5 -0
  87. package/dist/components/Gantt/Gantt.d.ts +11 -0
  88. package/dist/components/Gantt/GanttChart/GanttBarTooltip/GanttBarTooltip.d.ts +3 -0
  89. package/dist/components/Gantt/GanttChart/GanttChart.d.ts +8 -0
  90. package/dist/components/Gantt/GanttChart/GanttChartCanvas.d.ts +4 -0
  91. package/dist/components/Gantt/GanttChart/GanttChartCanvasBackground.d.ts +4 -0
  92. package/dist/components/Gantt/GanttChart/GanttInteractionContext.d.ts +4 -0
  93. package/dist/components/Gantt/GanttChart/GanttSummaryBar/GanttSummaryBar.d.ts +4 -0
  94. package/dist/components/Gantt/GanttChart/GanttTaskBar/GanttTaskBar.d.ts +4 -0
  95. package/dist/components/Gantt/GanttChart/GanttTaskBar/useTaskBarPointer.d.ts +9 -0
  96. package/dist/components/Gantt/GanttChart/GanttTimelineContext.d.ts +4 -0
  97. package/dist/components/Gantt/GanttChart/GanttTimelineHeader/GanttTimelineHeader.d.ts +4 -0
  98. package/dist/components/Gantt/GanttChart/OffscreenTaskIndicators/OffscreenTaskIndicators.d.ts +4 -0
  99. package/dist/components/Gantt/GanttChart/TodayIndicator/TodayIndicator.d.ts +3 -0
  100. package/dist/components/Gantt/GanttChart/hooks/__tests__/timelineFocus.contract.test.d.ts +1 -0
  101. package/dist/components/Gantt/GanttChart/hooks/__tests__/useGanttColumnVirtual.test.d.ts +1 -0
  102. package/dist/components/Gantt/GanttChart/hooks/useBarTooltipHover.d.ts +19 -0
  103. package/dist/components/Gantt/GanttChart/hooks/useEdgeScroll.d.ts +7 -0
  104. package/dist/components/Gantt/GanttChart/hooks/useGanttColumnVirtual.d.ts +21 -0
  105. package/dist/components/Gantt/GanttChart/hooks/useGanttDrag.d.ts +15 -0
  106. package/dist/components/Gantt/GanttChart/hooks/useGanttRowVirtualScroll.d.ts +12 -0
  107. package/dist/components/Gantt/GanttChart/hooks/useGanttScrollbars.d.ts +2 -0
  108. package/dist/components/Gantt/GanttChart/hooks/useNormalizedItems.d.ts +11 -0
  109. package/dist/components/Gantt/GanttChart/hooks/useOffscreenIndicators.d.ts +11 -0
  110. package/dist/components/Gantt/GanttChart/hooks/useRowHoverHighlight.d.ts +10 -0
  111. package/dist/components/Gantt/GanttChart/hooks/useTimelineViewportController.d.ts +24 -0
  112. package/dist/components/Gantt/GanttChart/hooks/useTodayMs.d.ts +4 -0
  113. package/dist/components/Gantt/GanttChart/index.d.ts +1 -0
  114. package/dist/components/Gantt/GanttChart/utils/__tests__/dateRangeNormalizer.subday.test.d.ts +1 -0
  115. package/dist/components/Gantt/GanttChart/utils/__tests__/dragEngine.quarterMonth.test.d.ts +1 -0
  116. package/dist/components/Gantt/GanttChart/utils/__tests__/dragEngine.subday.test.d.ts +1 -0
  117. package/dist/components/Gantt/GanttChart/utils/__tests__/headerBuilder.quarterMonth.test.d.ts +1 -0
  118. package/dist/components/Gantt/GanttChart/utils/__tests__/headerBuilder.subday.test.d.ts +1 -0
  119. package/dist/components/Gantt/GanttChart/utils/__tests__/quarterMonthScale.test.d.ts +1 -0
  120. package/dist/components/Gantt/GanttChart/utils/__tests__/subdayScale.contract.test.d.ts +1 -0
  121. package/dist/components/Gantt/GanttChart/utils/__tests__/timelineViewConfig.test.d.ts +1 -0
  122. package/dist/components/Gantt/GanttChart/utils/buildSummaryBarTooltipContent.d.ts +6 -0
  123. package/dist/components/Gantt/GanttChart/utils/constants.d.ts +93 -0
  124. package/dist/components/Gantt/GanttChart/utils/dateRangeNormalizer.d.ts +18 -0
  125. package/dist/components/Gantt/GanttChart/utils/dragEngine.d.ts +60 -0
  126. package/dist/components/Gantt/GanttChart/utils/headerBuilder.d.ts +14 -0
  127. package/dist/components/Gantt/GanttChart/utils/quarterMonthScale.d.ts +8 -0
  128. package/dist/components/Gantt/GanttChart/utils/taskBarUtils.d.ts +3 -0
  129. package/dist/components/Gantt/GanttChart/utils/timeScale.d.ts +35 -0
  130. package/dist/components/Gantt/GanttChart/utils/timelineFocus.d.ts +42 -0
  131. package/dist/components/Gantt/GanttChart/utils/timelineMarkers.d.ts +1 -0
  132. package/dist/components/Gantt/GanttChart/utils/timelineViewConfig.d.ts +106 -0
  133. package/dist/components/Gantt/GanttChart/utils/timezoneUtils.d.ts +11 -0
  134. package/dist/components/Gantt/GanttHighlightContext.d.ts +3 -0
  135. package/dist/components/Gantt/GanttResizeIndicator.d.ts +3 -0
  136. package/dist/components/Gantt/GanttTable/GanttTable.d.ts +7 -0
  137. package/dist/components/Gantt/GanttTable/hooks/useGanttTableHighlightDomSync.d.ts +2 -0
  138. package/dist/components/Gantt/GanttTable/hooks/useGanttTableLinkedScroll.d.ts +7 -0
  139. package/dist/components/Gantt/GanttTable/index.d.ts +1 -0
  140. package/dist/components/Gantt/GanttTable/utils/mapGanttColumns.d.ts +13 -0
  141. package/dist/components/Gantt/GanttToolBar/GanttToolBar.d.ts +3 -0
  142. package/dist/components/Gantt/GanttToolBar/index.d.ts +1 -0
  143. package/dist/components/Gantt/__tests__/Gantt.contract.test.d.ts +0 -0
  144. package/dist/components/Gantt/__tests__/Gantt.grouped.contract.test.d.ts +0 -0
  145. package/dist/components/Gantt/__tests__/GanttChart.contract.test.d.ts +0 -0
  146. package/dist/components/Gantt/__tests__/GanttSummaryBar.tooltip.test.d.ts +1 -0
  147. package/dist/components/Gantt/__tests__/GanttToolBar.test.d.ts +1 -0
  148. package/dist/components/Gantt/__tests__/filterItemsByCollapse.test.d.ts +1 -0
  149. package/dist/components/Gantt/__tests__/helpers/ganttDomSetup.d.ts +1 -0
  150. package/dist/components/Gantt/__tests__/helpers/ganttTestFixtures.d.ts +7 -0
  151. package/dist/components/Gantt/__tests__/helpers/ganttTestMocks.d.ts +8 -0
  152. package/dist/components/Gantt/__tests__/helpers/renderWithLocale.d.ts +3 -0
  153. package/dist/components/Gantt/__tests__/helpers/testFormatMessage.d.ts +2 -0
  154. package/dist/components/Gantt/__tests__/interface.contract.types.test.d.ts +1 -0
  155. package/dist/components/Gantt/__tests__/timezoneUtils.test.d.ts +1 -0
  156. package/dist/components/Gantt/__tests__/useBarTooltipHover.test.d.ts +1 -0
  157. package/dist/components/Gantt/__tests__/useGanttHighlight.test.d.ts +1 -0
  158. package/dist/components/Gantt/__tests__/useTaskBarPointer.test.d.ts +1 -0
  159. package/dist/components/Gantt/hooks/useGanttCollapseState.d.ts +6 -0
  160. package/dist/components/Gantt/hooks/useGanttHighlight.d.ts +10 -0
  161. package/dist/components/Gantt/hooks/useGanttLayout.d.ts +7 -0
  162. package/dist/components/Gantt/hooks/useLinkedVerticalScroll.d.ts +6 -0
  163. package/dist/components/Gantt/index.d.ts +9 -0
  164. package/dist/components/Gantt/interface.d.ts +140 -0
  165. package/dist/components/Gantt/internal/GanttLayout.d.ts +8 -0
  166. package/dist/components/Gantt/internal/GanttTableShell.d.ts +3 -0
  167. package/dist/components/Gantt/types.internal.d.ts +313 -0
  168. package/dist/components/Gantt/utils/collapseKeys.d.ts +4 -0
  169. package/dist/components/Gantt/utils/columnResize.d.ts +19 -0
  170. package/dist/components/Gantt/utils/constants.d.ts +4 -0
  171. package/dist/components/Gantt/utils/filterItemsByCollapse.d.ts +9 -0
  172. package/dist/components/Gantt/utils/highlightTarget.d.ts +13 -0
  173. package/dist/components/Gantt/utils/index.d.ts +8 -0
  174. package/dist/components/Gantt/utils/localeKey.d.ts +2 -0
  175. package/dist/components/Gantt/utils/tableWidthStorage.d.ts +3 -0
  176. package/dist/components/Select/__tests__/Select.getPopupContainer.test.d.ts +1 -0
  177. package/dist/components/Select/interface.d.ts +4 -0
  178. package/dist/components/Table/Table.d.ts +4 -0
  179. package/dist/components/Table/__tests__/HeaderCell.test.d.ts +1 -0
  180. package/dist/components/Table/__tests__/TableBody.test.d.ts +1 -0
  181. package/dist/components/Table/__tests__/processRowspan.test.d.ts +1 -0
  182. package/dist/components/Table/components/HeaderCell.d.ts +16 -0
  183. package/dist/components/Table/components/TableBody.d.ts +45 -0
  184. package/dist/components/Table/components/TableFooter.d.ts +18 -0
  185. package/dist/components/Table/components/TableHeader.d.ts +14 -0
  186. package/dist/components/Table/constants.d.ts +29 -0
  187. package/dist/components/Table/hooks/index.d.ts +2 -0
  188. package/dist/components/Table/hooks/useColumnResize.d.ts +11 -0
  189. package/dist/components/Table/hooks/useTableVirtual.d.ts +19 -0
  190. package/dist/components/Table/index.d.ts +9 -0
  191. package/dist/components/Table/interface.d.ts +114 -0
  192. package/dist/components/Table/utils/flattenColumns.d.ts +17 -0
  193. package/dist/components/Table/utils/index.d.ts +3 -0
  194. package/dist/components/Table/utils/processRowspan.d.ts +16 -0
  195. package/dist/components/Table/utils/tableUtils.d.ts +22 -0
  196. package/dist/components/Tooltip/Tooltip.type.d.ts +2 -0
  197. package/dist/components/index.d.ts +4 -2
  198. package/dist/hooks/useLatchedPopupPortalRoot.d.ts +11 -0
  199. package/dist/index.js +24 -23
  200. package/dist/locale/lang/en-US.json.d.ts +63 -0
  201. package/dist/locale/lang/zh-CN.json.d.ts +63 -0
  202. package/dist/locale/lang/zh-TW.json.d.ts +63 -0
  203. package/dist/style.css +1 -1
  204. package/dist/vendors/{ConfigProvider-DCm-93oJ.js → ConfigProvider-BRfJ7gWc.js} +123 -1
  205. package/dist/vendors/{LocaleContext-CRlzP8UO.js → LocaleContext-BJdHS0sH.js} +61 -0
  206. package/dist/vendors/{animations-BmT0HT5q.js → animations-BeI8JZp1.js} +7 -3
  207. package/dist/vendors/{useFloatingOverlay-uxlI1G-V.js → useFloatingOverlay-3KB88hpZ.js} +1 -0
  208. package/dist/vendors/{useLocale-D9kAzQlB.js → useLocale-BTz4slNW.js} +1 -1
  209. package/dist/vitest-matchers.d.ts +1 -0
  210. package/package.json +3 -2
  211. package/dist/Calendar/adapters/index.js +0 -2
  212. package/dist/Calendar/adapters-zYR7CgzD.js +0 -20
  213. package/dist/Calendar/shared/AllDaySection/index.js +0 -8
  214. package/dist/Calendar/shared/CurrentTimeIndicator/index.js +0 -5
  215. package/dist/Calendar/shared/EventCard/index.js +0 -6
  216. package/dist/Calendar/shared/TimeAxis/index.js +0 -4
  217. package/dist/Calendar/shared/TimeGrid/index.js +0 -4
  218. package/dist/Calendar/style/index.js +0 -2
  219. package/dist/DatePicker/DatePicker-B2skjsiQ.js +0 -91
  220. package/dist/Tooltip/Tooltip-RkD8fs0B.js +0 -169
  221. package/dist/components/Calendar/adapters/index.d.ts +0 -1
  222. package/dist/components/Calendar/panels/DayPanel/DayPanel.d.ts +0 -3
  223. package/dist/components/Calendar/panels/MonthPanel/MonthPanel.d.ts +0 -3
  224. package/dist/components/Calendar/panels/WeekPanel/WeekPanel.d.ts +0 -3
  225. /package/dist/components/Calendar/{shared → subcomponents}/AllDaySection/index.d.ts +0 -0
  226. /package/dist/components/Calendar/{Header → subcomponents}/CalendarHeader/CalendarHeader.d.ts +0 -0
  227. /package/dist/components/Calendar/{Header → subcomponents}/CalendarHeaderLeft/CalendarHeaderLeft.d.ts +0 -0
  228. /package/dist/components/Calendar/{shared → subcomponents}/CurrentTimeIndicator/CurrentTimeIndicator.d.ts +0 -0
  229. /package/dist/components/Calendar/{shared → subcomponents}/CurrentTimeIndicator/index.d.ts +0 -0
  230. /package/dist/components/Calendar/{Header → subcomponents}/DateDisplay/DateDisplay.d.ts +0 -0
  231. /package/dist/components/Calendar/{Header → subcomponents}/DateDisplay/__tests__/DateDisplay.weekPicker.test.d.ts +0 -0
  232. /package/dist/components/Calendar/{panels/DayPanel → subcomponents/DayView}/__tests__/CalendarDay.dayFilter.test.d.ts +0 -0
  233. /package/dist/components/Calendar/{shared → subcomponents}/EventCard/__tests__/EventCard.tooltip.test.d.ts +0 -0
  234. /package/dist/components/Calendar/{shared → subcomponents}/EventCard/index.d.ts +0 -0
  235. /package/dist/components/Calendar/{panels/MonthPanel → subcomponents}/MonthCell/MonthCell.d.ts +0 -0
  236. /package/dist/components/Calendar/{panels/MonthPanel → subcomponents}/MonthHeader/MonthHeader.d.ts +0 -0
  237. /package/dist/components/Calendar/{Header → subcomponents}/NavButton/NavButton.d.ts +0 -0
  238. /package/dist/components/Calendar/{shared → subcomponents}/TimeAxis/TimeAxis.d.ts +0 -0
  239. /package/dist/components/Calendar/{shared → subcomponents}/TimeAxis/index.d.ts +0 -0
  240. /package/dist/components/Calendar/{shared → subcomponents}/TimeGrid/TimeGrid.d.ts +0 -0
  241. /package/dist/components/Calendar/{shared → subcomponents}/TimeGrid/index.d.ts +0 -0
  242. /package/dist/components/Calendar/{Header → subcomponents}/TodayButton/TodayButton.d.ts +0 -0
  243. /package/dist/components/Calendar/{panels/WeekPanel → subcomponents}/WeekHeader/WeekHeader.d.ts +0 -0
  244. /package/dist/components/Calendar/{internalTypes.d.ts → types.internal.d.ts} +0 -0
  245. /package/dist/components/Calendar/{adapters → utils/theme}/__tests__/platformTheme.test.d.ts +0 -0
  246. /package/dist/components/Calendar/{style → utils/theme}/__tests__/resolveCalendarThemeVars.test.d.ts +0 -0
  247. /package/dist/components/Calendar/{style → utils/theme}/__tests__/resolveScheduleColorVars.test.d.ts +0 -0
  248. /package/dist/components/Calendar/{style → utils/theme}/__tests__/resolveSubcomponentThemes.test.d.ts +0 -0
  249. /package/dist/components/Calendar/{style → utils/theme}/resolveScheduleColorVars.d.ts +0 -0
@@ -0,0 +1,13 @@
1
+ import { GanttColumn, GanttDataItem } from '../../interface';
2
+ type MappedTableColumn = {
3
+ key: string;
4
+ title: string;
5
+ width: number;
6
+ align?: GanttColumn['align'];
7
+ className?: string;
8
+ fixed?: GanttColumn['fixed'];
9
+ render: (value: unknown, record: GanttDataItem, rowIndex: number) => unknown;
10
+ children?: MappedTableColumn[];
11
+ };
12
+ export declare function mapGanttColumns<T extends GanttDataItem>(columns?: GanttColumn<T>[]): MappedTableColumn[];
13
+ export {};
@@ -0,0 +1,3 @@
1
+ import { GanttToolBarProps } from '../types.internal';
2
+ declare const GanttToolBar: ({ viewMode, availableModes, onViewModeChange, onTodayClick, onScrollPrev, onScrollNext, className, }: GanttToolBarProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default GanttToolBar;
@@ -0,0 +1 @@
1
+ export { default } from './GanttToolBar';
@@ -0,0 +1 @@
1
+ export declare const installGanttDomMocks: () => void;
@@ -0,0 +1,7 @@
1
+ import { GanttDataItem, GanttMode } from '../../interface';
2
+ import { GanttTimelineContextValue, NormalizedGanttItem } from '../../types.internal';
3
+ export declare const makeGanttTask: (overrides?: Partial<GanttDataItem>) => GanttDataItem;
4
+ export declare const makeGanttSummary: (overrides?: Partial<GanttDataItem>) => GanttDataItem;
5
+ export declare const makeNormalizedGanttItem: (overrides?: Partial<NormalizedGanttItem>) => NormalizedGanttItem;
6
+ export declare const makeTimelineContextValue: (overrides?: Partial<GanttTimelineContextValue>) => GanttTimelineContextValue;
7
+ export declare const SUB_DAY_CELL_WIDTH_PX: Record<Extract<GanttMode, 'halfDay' | 'sixHour' | 'hour' | 'halfHour' | 'tenMinute' | 'oneMinute'>, number>;
@@ -0,0 +1,8 @@
1
+ export declare let mockSize: {
2
+ width: number;
3
+ height: number;
4
+ };
5
+ export declare const setMockSize: (size: {
6
+ width: number;
7
+ height: number;
8
+ }) => void;
@@ -0,0 +1,3 @@
1
+ import { RenderOptions, RenderResult } from '@testing-library/react';
2
+ import { ReactElement } from 'react';
3
+ export declare const renderWithLocale: (ui: ReactElement, options?: RenderOptions) => RenderResult;
@@ -0,0 +1,2 @@
1
+ import { GanttFormatMessage } from '../../types.internal';
2
+ export declare const testFormatMessage: GanttFormatMessage;
@@ -0,0 +1,6 @@
1
+ import { UseGanttCollapseStateOptions } from '../types.internal';
2
+ export declare function useGanttCollapseState({ collapsedKeys, onToggleCollapse, }?: UseGanttCollapseStateOptions): {
3
+ collapsedKeys: import('..').GanttCollapsedKeys | null;
4
+ onToggleCollapse: (groupKey: string) => void;
5
+ isControlled: boolean;
6
+ };
@@ -0,0 +1,10 @@
1
+ import { HighlightTarget } from '../interface';
2
+ import { GanttHighlightContextValue } from '../types.internal';
3
+ export declare function useGanttHighlight(): {
4
+ highlightContextValue: GanttHighlightContextValue;
5
+ setHighlightTarget: (target: HighlightTarget, options?: {
6
+ source?: string;
7
+ }) => void;
8
+ setTableHighlightTarget: (target: HighlightTarget) => void;
9
+ notifyScrollActivity: () => void;
10
+ };
@@ -0,0 +1,7 @@
1
+ import { UseGanttLayoutOptions } from '../types.internal';
2
+ export declare function useGanttLayout({ id }?: UseGanttLayoutOptions): {
3
+ containerRef: import('react').RefObject<HTMLDivElement>;
4
+ resolvedTableWidth: number;
5
+ handleTableWidthChange: (nextWidth: number) => void;
6
+ handleResizeEnd: (nextWidth: number) => void;
7
+ };
@@ -0,0 +1,6 @@
1
+ import { VerticalScrollController } from '../types.internal';
2
+ interface UseLinkedVerticalScrollOptions {
3
+ onScrollActivity?: () => void;
4
+ }
5
+ export declare function useLinkedVerticalScroll(options?: UseLinkedVerticalScrollOptions): VerticalScrollController;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ export { default } from './Gantt';
2
+ export type { GanttProps, GanttDataItem, GanttTaskItem, GanttSummaryItem, GanttColumn, GanttMode, GanttCalendarMode, GanttSubDayMode, GanttTimeInput, GanttDragPermission, GanttTaskTimeChangePayload, GanttCalendarTaskTimeChangePayload, GanttSubDayTaskTimeChangePayload, GanttChangeType, GanttTableSlotContext, GanttCollapseProps, GanttCollapsedKeys, HighlightTarget, HighlightTargetType, } from './interface';
3
+ export { ALL_GANTT_MODES, CALENDAR_TIER_MODES, DEFAULT_GANTT_MODE } from './interface';
4
+ export { GANTT_DEFAULT_ROW_HEIGHT, GANTT_TABLE_HEADER_ROW_SPAN, DRAG_MODE_MOVE, DRAG_MODE_RESIZE_START, DRAG_MODE_RESIZE_END, EMPTY_GROUP_VALUE, } from './GanttChart/utils/constants';
5
+ export { isGroupCollapsed } from './utils/collapseKeys';
6
+ export { isHighlightMatch } from './utils/highlightTarget';
7
+ export { useGanttTableColumnResize } from './utils/columnResize';
8
+ export { normalizeTaskDateRange } from './GanttChart/utils/dateRangeNormalizer';
9
+ export { isSubDayViewMode } from './GanttChart/utils/timelineViewConfig';
@@ -0,0 +1,140 @@
1
+ import { CSSProperties, MouseEvent, ReactNode } from 'react';
2
+ /** 日历档 viewMode(粗)——单一来源 */
3
+ export declare const CALENDAR_TIER_MODES: readonly ["day", "week", "month", "quarter", "quarterMonth", "year"];
4
+ /** 亚日档 viewMode(细)——单一来源 */
5
+ export declare const SUB_DAY_MODES: readonly ["halfDay", "sixHour", "hour", "halfHour", "tenMinute", "oneMinute"];
6
+ /** 12 档全集;GanttMode 由此推导,禁止另写字面量联合 */
7
+ export declare const ALL_GANTT_MODES: readonly ["day", "week", "month", "quarter", "quarterMonth", "year", "halfDay", "sixHour", "hour", "halfHour", "tenMinute", "oneMinute"];
8
+ export type GanttMode = (typeof ALL_GANTT_MODES)[number];
9
+ export type GanttCalendarMode = (typeof CALENDAR_TIER_MODES)[number];
10
+ export type GanttSubDayMode = (typeof SUB_DAY_MODES)[number];
11
+ /** 工具栏展示顺序:亚日(细)→ 年(粗) */
12
+ export declare const GANTT_MODE_DISPLAY_ORDER: readonly [...("oneMinute" | "tenMinute" | "halfHour" | "hour" | "sixHour" | "halfDay")[], "day", "week", "month", "quarter", "quarterMonth", "year"];
13
+ export declare const DEFAULT_GANTT_MODE: GanttMode;
14
+ export declare function isGanttMode(mode: string): mode is GanttMode;
15
+ export declare function isCalendarViewMode(mode: GanttMode): mode is GanttCalendarMode;
16
+ export declare function isSubDayMode(mode: GanttMode): mode is GanttSubDayMode;
17
+ export type GanttTimeInput = string | number | Date | null;
18
+ export interface GanttDragPermission {
19
+ canMove?: boolean;
20
+ canResizeStart?: boolean;
21
+ canResizeEnd?: boolean;
22
+ }
23
+ /** 任务 / 汇总共用字段;meta 仅透传,Gantt 禁止读取 */
24
+ interface GanttDataItemBase {
25
+ id?: string | number;
26
+ start: GanttTimeInput;
27
+ end: GanttTimeInput;
28
+ label?: ReactNode;
29
+ progress?: number | null;
30
+ color?: string;
31
+ parentId?: string | number;
32
+ recordId?: string | number;
33
+ groupKey?: string | number;
34
+ depth?: number;
35
+ meta?: unknown;
36
+ }
37
+ /** 可拖拽任务行 */
38
+ export interface GanttTaskItem extends GanttDataItemBase {
39
+ type: 'task';
40
+ draggable?: boolean;
41
+ dragPermission?: GanttDragPermission;
42
+ }
43
+ /** 分组汇总行(不可拖) */
44
+ export interface GanttSummaryItem extends GanttDataItemBase {
45
+ type: 'summary';
46
+ }
47
+ /** 消费方传入的原始行(可辨识联合) */
48
+ export type GanttDataItem = GanttTaskItem | GanttSummaryItem;
49
+ export type GanttChangeType = 'move' | 'resize-start' | 'resize-end';
50
+ interface GanttTaskTimeChangePayloadBase {
51
+ taskId: string;
52
+ newStart: number;
53
+ newEnd: number;
54
+ changeType: GanttChangeType;
55
+ /** 拖拽 snap 步长(ms) */
56
+ snapUnitMs: number;
57
+ /** 相对原点的毫秒位移 */
58
+ deltaMs: number;
59
+ }
60
+ /** 日历档改期载荷:viewMode 与 deltaDays 成对出现 */
61
+ export interface GanttCalendarTaskTimeChangePayload extends GanttTaskTimeChangePayloadBase {
62
+ viewMode: GanttCalendarMode;
63
+ deltaDays: number;
64
+ }
65
+ /** 亚日档改期载荷:不含 deltaDays */
66
+ export interface GanttSubDayTaskTimeChangePayload extends GanttTaskTimeChangePayloadBase {
67
+ viewMode: GanttSubDayMode;
68
+ }
69
+ /** 改期回调载荷(按 viewMode 可辨识联合) */
70
+ export type GanttTaskTimeChangePayload = GanttCalendarTaskTimeChangePayload | GanttSubDayTaskTimeChangePayload;
71
+ export interface GanttColumn<T extends GanttDataItem = GanttDataItem> {
72
+ key: string;
73
+ title?: ReactNode;
74
+ dataIndex?: string;
75
+ width?: number;
76
+ minWidth?: number;
77
+ maxWidth?: number;
78
+ align?: 'left' | 'center' | 'right';
79
+ className?: string;
80
+ fixed?: 'left' | 'right';
81
+ children?: GanttColumn<T>[];
82
+ render?: (ctx: {
83
+ item: T;
84
+ rowIndex: number;
85
+ column: GanttColumn<T>;
86
+ value: unknown;
87
+ }) => ReactNode;
88
+ }
89
+ export type HighlightTargetType = 'record' | 'group';
90
+ export type HighlightTarget = {
91
+ type: HighlightTargetType;
92
+ id: string;
93
+ } | null;
94
+ export type GanttCollapsedKeys = ReadonlySet<string> | string[];
95
+ export interface GanttTableSlotContext<T extends GanttDataItem = GanttDataItem> {
96
+ columns?: GanttColumn<T>[];
97
+ tableData: unknown[];
98
+ setHighlightTarget: (target: HighlightTarget) => void;
99
+ rowHeight: number;
100
+ collapsedKeys?: GanttCollapsedKeys;
101
+ onToggleCollapse?: (groupKey: string) => void | Promise<void>;
102
+ }
103
+ type GanttPropsBase<T extends GanttDataItem = GanttDataItem> = {
104
+ data: T[];
105
+ columns?: GanttColumn<T>[];
106
+ mode?: GanttMode;
107
+ availableModes?: GanttMode[];
108
+ onModeChange?: (mode: GanttMode) => void;
109
+ id?: string;
110
+ onRowClick?: (item: T, rowIndex: number, event: MouseEvent) => void;
111
+ onTaskTimeChange?: (payload: GanttTaskTimeChangePayload) => void | Promise<void>;
112
+ tooltip?: (item: T) => ReactNode;
113
+ className?: string;
114
+ style?: CSSProperties;
115
+ tableData?: unknown[];
116
+ renderTable?: (ctx: GanttTableSlotContext<T>) => ReactNode;
117
+ emptyOverlay?: ReactNode;
118
+ };
119
+ /** 受控折叠:必须同时提供 keys 与 toggle,否则点击后无法回写 */
120
+ type GanttCollapseControlled = {
121
+ collapsedKeys: GanttCollapsedKeys;
122
+ onToggleCollapse: (groupKey: string) => void | Promise<void>;
123
+ };
124
+ /** 非受控折叠:不传 collapsedKeys;onToggleCollapse 仅作通知(可选) */
125
+ type GanttCollapseUncontrolled = {
126
+ collapsedKeys?: undefined;
127
+ onToggleCollapse?: (groupKey: string) => void | Promise<void>;
128
+ };
129
+ export type GanttCollapseProps = GanttCollapseControlled | GanttCollapseUncontrolled;
130
+ /** 公开组件契约:基础 props + 折叠状态机 */
131
+ export type GanttProps<T extends GanttDataItem = GanttDataItem> = GanttPropsBase<T> & GanttCollapseProps;
132
+ /**
133
+ * 内部编排层 props:折叠字段解构后会丢失联合相关性,故用宽松形态。
134
+ * 运行时仍以 `collapsedKeys !== undefined` 判定受控。
135
+ */
136
+ export type GanttLayoutInputProps<T extends GanttDataItem = GanttDataItem> = GanttPropsBase<T> & {
137
+ collapsedKeys?: GanttCollapsedKeys;
138
+ onToggleCollapse?: (groupKey: string) => void | Promise<void>;
139
+ };
140
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ForwardedRef, Ref } from 'react';
2
+ import { GanttDataItem } from '../interface';
3
+ import { GanttLayoutProps } from '../types.internal';
4
+ declare function GanttLayoutInner<T extends GanttDataItem>({ data, tableData, columns, mode: modeProp, availableModes, onModeChange, id, onRowClick, onTaskTimeChange, tooltip, className, style, renderTable, collapsedKeys, onToggleCollapse, emptyOverlay, }: GanttLayoutProps<T>, ref: ForwardedRef<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
5
+ declare const GanttLayout: <T extends GanttDataItem = GanttDataItem>(props: GanttLayoutProps<T> & {
6
+ ref?: Ref<HTMLDivElement>;
7
+ }) => ReturnType<typeof GanttLayoutInner>;
8
+ export default GanttLayout;
@@ -0,0 +1,3 @@
1
+ import { GanttTableShellProps } from '../types.internal';
2
+ declare const GanttTableShell: import('react').ForwardRefExoticComponent<GanttTableShellProps & import('react').RefAttributes<HTMLDivElement>>;
3
+ export default GanttTableShell;
@@ -0,0 +1,313 @@
1
+ import { MouseEvent, MutableRefObject, ReactNode, RefObject } from 'react';
2
+ import { VirtualItem } from '@tanstack/react-virtual';
3
+ import { LocaleParams } from '../../locale/formatLocaleMessage';
4
+ import { GanttChangeType, GanttCollapsedKeys, GanttColumn, GanttDataItem, GanttLayoutInputProps, GanttMode, GanttProps, HighlightTarget } from './interface';
5
+ /** 运行时允许 null/undefined;公开受控契约见 GanttCollapsedKeys */
6
+ export type CollapsedKeys = GanttCollapsedKeys | undefined | null;
7
+ export type GanttFormatMessage = (key: string, params?: LocaleParams) => string;
8
+ export interface ResolvedDragPermission {
9
+ canMove: boolean;
10
+ canResizeStart: boolean;
11
+ canResizeEnd: boolean;
12
+ }
13
+ export interface TimelineCoords {
14
+ toX: (ms: number) => number;
15
+ toWidth: (startMs: number, endMs: number) => number;
16
+ timeAtX: (x: number) => number;
17
+ }
18
+ export interface TimelineViewConfig {
19
+ tier: 'calendar' | 'subDay';
20
+ headerLayout: 'flat' | 'quarterNested' | 'dayNested' | 'hourNested';
21
+ topGroup: string;
22
+ bottomCellMs: number;
23
+ snapUnitMs: number;
24
+ bottomCellWidthPx?: number;
25
+ }
26
+ export interface TimeRangeConfig {
27
+ bufferDaysBefore?: number;
28
+ bufferDaysAfter?: number;
29
+ }
30
+ export type PixelsPerDayConfig = Partial<Record<GanttMode, number>>;
31
+ export interface TimelineSegment {
32
+ id: string;
33
+ startMs: number;
34
+ endMs: number;
35
+ left: number;
36
+ width: number;
37
+ label: string;
38
+ }
39
+ export type LowerSegment = TimelineSegment;
40
+ export interface TopSegment {
41
+ id: string;
42
+ left: number;
43
+ width: number;
44
+ label: string;
45
+ }
46
+ export interface WeekendSegment {
47
+ id: string;
48
+ left: number;
49
+ width: number;
50
+ }
51
+ export interface CommittedRange {
52
+ startMs: number;
53
+ endMs: number;
54
+ }
55
+ /**
56
+ * Chart 内部行:保留消费方扩展字段 T,收紧 id/进度/时间毫秒。
57
+ * 输入侧 dragPermission 经 spread 保留;已解析权限见 dragPermissionById。
58
+ */
59
+ export type NormalizedGanttItem<T extends GanttDataItem = GanttDataItem> = Omit<T, 'id' | 'progress'> & {
60
+ id: string;
61
+ rowIndex: number;
62
+ rawStartMs: number | null;
63
+ rawEndMs: number | null;
64
+ baseStartMs: number | null;
65
+ baseEndMs: number | null;
66
+ startMs: number | null;
67
+ endMs: number | null;
68
+ invalid: boolean;
69
+ progress: number | null;
70
+ };
71
+ export interface InternalDragState {
72
+ taskId: string;
73
+ item: NormalizedGanttItem;
74
+ startClientX: number;
75
+ originLeftPx: number;
76
+ originStartMs: number;
77
+ originEndMs: number;
78
+ deltaUnits: number;
79
+ dragMode: GanttChangeType;
80
+ previewLeftPx: number;
81
+ previewStartMs: number;
82
+ previewEndMs: number;
83
+ }
84
+ /** @deprecated Use InternalDragState — kept for external references */
85
+ export interface DragState extends InternalDragState {
86
+ }
87
+ export type CommittedRangeById = Record<string, CommittedRange>;
88
+ export interface PendingDragOp {
89
+ opId: number;
90
+ startedAt: number;
91
+ timeoutId: ReturnType<typeof setTimeout>;
92
+ }
93
+ export interface VirtualColumnIndex {
94
+ index: number;
95
+ }
96
+ export interface OffscreenIndicator {
97
+ rowKey: string;
98
+ rowTop: number;
99
+ rowHeight: number;
100
+ showLeft: boolean;
101
+ showRight: boolean;
102
+ targetStartMs: number | null;
103
+ targetScrollLeft: number;
104
+ }
105
+ export interface OffscreenJumpTarget {
106
+ targetScrollLeft: number;
107
+ targetStartMs: number | null;
108
+ }
109
+ export interface BarTooltipHoverState {
110
+ x: number;
111
+ y: number;
112
+ top: number;
113
+ bottom: number;
114
+ height: number;
115
+ }
116
+ export interface ScrollScrollerApi {
117
+ setScrollTop: (top: number) => void;
118
+ }
119
+ export type VerticalScrollSource = 'timeline' | 'table';
120
+ export interface VerticalScrollController {
121
+ registerTimelineScroller: (api: ScrollScrollerApi) => () => void;
122
+ registerTableScroller: (api: ScrollScrollerApi) => () => void;
123
+ sync: (source: VerticalScrollSource, top: number) => void;
124
+ }
125
+ export type HighlightListener = (target: HighlightTarget, payload?: {
126
+ source?: string;
127
+ }) => void;
128
+ export interface GanttHighlightContextValue {
129
+ getHighlightTarget: () => HighlightTarget;
130
+ setHighlightTarget: (target: HighlightTarget, options?: {
131
+ source?: string;
132
+ }) => void;
133
+ setTableHighlightTarget: (target: HighlightTarget) => void;
134
+ subscribeHighlight: (listener: HighlightListener) => () => void;
135
+ notifyScrollActivity: () => void;
136
+ getIsScrollActive: () => boolean;
137
+ }
138
+ export interface GanttTimelineContextValue {
139
+ pixelsPerDay: number;
140
+ timelineStartMs: number;
141
+ timelineCoords: TimelineCoords;
142
+ scrollLeft: number;
143
+ viewportWidth: number;
144
+ timelineWidth: number;
145
+ isInitialLayoutReady: boolean;
146
+ }
147
+ export interface GanttInteractionContextValue {
148
+ tooltip: ((item: NormalizedGanttItem) => ReactNode) | null;
149
+ isScrolling: boolean;
150
+ collapsedKeys: CollapsedKeys;
151
+ onBarClick: (event: MouseEvent, item: NormalizedGanttItem) => void;
152
+ onTaskMouseDown: (event: MouseEvent, item: NormalizedGanttItem, left: number) => void;
153
+ onResizeMouseDown: (event: MouseEvent, item: NormalizedGanttItem, left: number, edge: 'start' | 'end') => void;
154
+ }
155
+ export interface GanttChartProps<T extends GanttDataItem = GanttDataItem> {
156
+ items?: T[];
157
+ viewMode?: GanttMode;
158
+ availableModes?: GanttMode[];
159
+ onViewModeChange?: (mode: GanttMode) => void;
160
+ timeRangeConfig?: TimeRangeConfig;
161
+ pixelsPerDayConfig?: PixelsPerDayConfig;
162
+ onTaskTimeChange?: GanttProps<T>['onTaskTimeChange'];
163
+ onRowClick?: GanttProps<T>['onRowClick'];
164
+ tooltip?: GanttProps<T>['tooltip'];
165
+ verticalScrollController?: VerticalScrollController;
166
+ showWeekendHighlight?: boolean;
167
+ showTodayLine?: boolean;
168
+ collapsedKeys?: CollapsedKeys;
169
+ onToggleCollapse?: GanttProps<T>['onToggleCollapse'];
170
+ }
171
+ export interface GanttChartHandle {
172
+ scrollToToday: () => void;
173
+ scrollPrev: () => void;
174
+ scrollNext: () => void;
175
+ }
176
+ export interface GanttTableShellProps {
177
+ width?: number;
178
+ verticalScrollController?: VerticalScrollController;
179
+ dataLength?: number;
180
+ emptyOverlay?: ReactNode;
181
+ children?: ReactNode;
182
+ }
183
+ export type GanttLayoutProps<T extends GanttDataItem = GanttDataItem> = GanttLayoutInputProps<T>;
184
+ export type ElementRef<T extends HTMLElement = HTMLDivElement> = RefObject<T | null> | MutableRefObject<T | null>;
185
+ export interface GanttToolBarProps {
186
+ viewMode?: GanttMode;
187
+ availableModes?: GanttMode[];
188
+ onViewModeChange?: (mode: GanttMode) => void;
189
+ onTodayClick?: () => void;
190
+ onScrollPrev?: () => void;
191
+ onScrollNext?: () => void;
192
+ className?: string;
193
+ }
194
+ export interface GanttTimelineHeaderProps {
195
+ timelineWidth: number;
196
+ viewportWidth?: number;
197
+ scrollLeft: number;
198
+ trackRef: ElementRef<HTMLDivElement>;
199
+ virtualColumns: VirtualColumnIndex[];
200
+ lowerSegments: LowerSegment[];
201
+ todayLineLeft: number | null;
202
+ todayCenterMs: number | null;
203
+ showTodayLine?: boolean;
204
+ viewMode: GanttMode;
205
+ availableModes?: GanttMode[];
206
+ formatMessage: GanttFormatMessage;
207
+ onViewModeChange?: (mode: GanttMode) => void;
208
+ onTodayClick?: () => void;
209
+ onScrollPrev?: () => void;
210
+ onScrollNext?: () => void;
211
+ }
212
+ export interface GanttChartCanvasBackgroundProps {
213
+ canvasHeight: number;
214
+ weekendSegments: WeekendSegment[];
215
+ virtualColumns: VirtualColumnIndex[];
216
+ lowerSegments: LowerSegment[];
217
+ shouldShowTodayMarker: boolean;
218
+ todayLineLeft: number | null;
219
+ }
220
+ export interface GanttChartCanvasRowsProps {
221
+ virtualRows: VirtualItem[];
222
+ normalizedItems: NormalizedGanttItem[];
223
+ dragState: InternalDragState | null;
224
+ dragPermissionById: Record<string, ResolvedDragPermission>;
225
+ handleOffscreenJump: (target: OffscreenJumpTarget) => void;
226
+ hoverBgRef: RefObject<HTMLDivElement | null>;
227
+ }
228
+ export interface GanttChartCanvasProps {
229
+ contentRef: ElementRef<HTMLDivElement>;
230
+ normalizedItems: NormalizedGanttItem[];
231
+ safeRowHeight: number;
232
+ viewportHeight: number;
233
+ lowerSegments: LowerSegment[];
234
+ virtualColumns: VirtualColumnIndex[];
235
+ weekendSegments: WeekendSegment[];
236
+ dragState: InternalDragState | null;
237
+ dragPermissionById: Record<string, ResolvedDragPermission>;
238
+ tooltip?: ((item: NormalizedGanttItem) => ReactNode) | null;
239
+ handleTaskMouseDown: (event: MouseEvent, item: NormalizedGanttItem, left: number) => void;
240
+ handleResizeMouseDown: (event: MouseEvent, item: NormalizedGanttItem, left: number, edge: 'start' | 'end') => void;
241
+ handleBarClick: (event: MouseEvent, item: NormalizedGanttItem) => void;
242
+ collapsedKeys?: CollapsedKeys;
243
+ handleOffscreenJump: (target: OffscreenJumpTarget) => void;
244
+ todayLineLeft: number | null;
245
+ shouldShowTodayMarker: boolean;
246
+ }
247
+ export interface GanttTaskBarProps {
248
+ item: NormalizedGanttItem;
249
+ barTop: number;
250
+ dragTaskId: string | null;
251
+ dragPreview: InternalDragState | null;
252
+ dragPermission?: ResolvedDragPermission;
253
+ }
254
+ export interface GanttSummaryBarProps {
255
+ item: NormalizedGanttItem;
256
+ barTop: number;
257
+ }
258
+ export interface GanttBarTooltipProps {
259
+ item: NormalizedGanttItem;
260
+ tooltip?: ((item: NormalizedGanttItem) => ReactNode) | null;
261
+ disabled?: boolean;
262
+ children: (handlers: {
263
+ onMouseMove: (e: MouseEvent<HTMLDivElement>) => void;
264
+ onMouseLeave: () => void;
265
+ }) => ReactNode;
266
+ }
267
+ export interface GanttTableProps<T extends GanttDataItem = GanttDataItem> {
268
+ data?: T[];
269
+ columns?: GanttColumn<T>[];
270
+ onRowClick?: GanttProps<T>['onRowClick'];
271
+ rowHeight?: number;
272
+ }
273
+ export interface GanttResizeIndicatorProps {
274
+ tableWidth: number;
275
+ onWidthChange: (width: number) => void;
276
+ onResizeEnd: (width: number) => void;
277
+ containerRef: ElementRef<HTMLDivElement>;
278
+ }
279
+ export interface UseGanttDragOptions {
280
+ pixelsPerDay: number;
281
+ viewMode: GanttMode;
282
+ timelineCoords: TimelineCoords;
283
+ onTaskTimeChange?: GanttProps['onTaskTimeChange'];
284
+ containerRef?: ElementRef<HTMLDivElement>;
285
+ }
286
+ export interface UseTimelineViewportControllerOptions {
287
+ timeRangeConfig?: TimeRangeConfig;
288
+ pixelsPerDayConfig?: PixelsPerDayConfig;
289
+ viewMode: GanttMode;
290
+ contentRef: ElementRef<HTMLDivElement>;
291
+ contentSize?: {
292
+ width?: number;
293
+ height?: number;
294
+ };
295
+ headerTrackRef: ElementRef<HTMLDivElement>;
296
+ formatMessage: GanttFormatMessage;
297
+ }
298
+ export interface UseGanttCollapseStateOptions {
299
+ collapsedKeys?: CollapsedKeys;
300
+ onToggleCollapse?: GanttProps['onToggleCollapse'];
301
+ }
302
+ export interface UseGanttLayoutOptions {
303
+ id?: string;
304
+ }
305
+ export interface TodayIndicatorProps {
306
+ left: number;
307
+ height: number;
308
+ className?: string;
309
+ }
310
+ export interface OffscreenTaskIndicatorsProps {
311
+ indicators: OffscreenIndicator[];
312
+ onJump: (target: OffscreenJumpTarget) => void;
313
+ }
@@ -0,0 +1,4 @@
1
+ import { GanttCollapsedKeys } from '../interface';
2
+ export type CollapsedKeys = GanttCollapsedKeys | undefined | null;
3
+ export declare function isGroupCollapsed(collapsedKeys: CollapsedKeys, groupKey: string | number | undefined | null): boolean;
4
+ export declare function toggleCollapsedKey(collapsedKeys: CollapsedKeys, groupKey: string | number): Set<string>;
@@ -0,0 +1,19 @@
1
+ export declare const GANTT_TABLE_DISABLED_RESIZE_COLUMNS: string[];
2
+ type ColumnChild = {
3
+ key: string;
4
+ width?: number;
5
+ };
6
+ type GanttColumn = {
7
+ key: string;
8
+ width?: number;
9
+ children?: ColumnChild[];
10
+ };
11
+ export declare function mergeColumnWidths(columns: GanttColumn[] | undefined, columnWidths: Record<string, number>): GanttColumn[] | undefined;
12
+ /** 会话内列宽记忆(白名单导出给分组表) */
13
+ export declare function useGanttTableColumnResize(columns: GanttColumn[]): {
14
+ columns: GanttColumn[];
15
+ onColumnResizeEnd: (columnKey: string, newWidth: number) => void;
16
+ resizable: boolean;
17
+ disabledResizeColumns: string[];
18
+ };
19
+ export {};
@@ -0,0 +1,4 @@
1
+ export { GANTT_DEFAULT_ROW_HEIGHT, GANTT_TABLE_HEADER_ROW_SPAN, MIN_TABLE_WIDTH, HEADER_TOP_HEIGHT, HEADER_BOTTOM_HEIGHT, } from '../GanttChart/utils/constants';
2
+ export declare const DEFAULT_TABLE_WIDTH_FALLBACK = 333;
3
+ export declare const TABLE_WIDTH_PLACEHOLDER = 300;
4
+ export declare const MIN_CHART_WIDTH = 300;
@@ -0,0 +1,9 @@
1
+ import { CollapsedKeys } from './collapseKeys';
2
+ type CollapsibleGanttItem = {
3
+ type?: string;
4
+ depth?: number;
5
+ groupKey?: string | number;
6
+ };
7
+ /** 非受控折叠:按 summary.depth 掩蔽子行 */
8
+ export declare function filterItemsByCollapse<T extends CollapsibleGanttItem>(items: T[] | null | undefined, collapsedKeys: CollapsedKeys): T[];
9
+ export {};
@@ -0,0 +1,13 @@
1
+ import { HighlightTarget } from '../interface';
2
+ export type { HighlightTarget, HighlightTargetType } from '../interface';
3
+ export declare function isSameHighlightTarget(prev: HighlightTarget | undefined, next: HighlightTarget | undefined): boolean;
4
+ export declare function isHighlightMatch(target: HighlightTarget | undefined, current: HighlightTarget | undefined): boolean;
5
+ type ChartHighlightItem = {
6
+ type?: string;
7
+ groupKey?: string | number;
8
+ parentId?: string | number;
9
+ recordId?: string | number;
10
+ id?: string | number;
11
+ };
12
+ /** Chart / 平坦 Table 行 → 跨容器高亮目标(仅读一级字段,不读 meta)。 */
13
+ export declare function resolveChartHighlightTarget(item: ChartHighlightItem | null | undefined): HighlightTarget;