@baishuyun/ui-base 6.3.2 → 6.4.1
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.
- package/dist/Amap/AmapProvider/index.js +3 -3
- package/dist/Amap/{AmapProvider-CTn2CH8s.js → AmapProvider-CwKdpmCg.js} +1 -1
- package/dist/Amap/index.js +3 -3
- package/dist/Calendar/{AllDaySection-DS0Frx1p.js → AllDaySection-CseF1DuB.js} +3 -3
- package/dist/Calendar/{Calendar-BIjk9zys.js → Calendar-Yu2HfA5D.js} +85 -95
- package/dist/Calendar/{CurrentTimeIndicator-DaIywtIA.js → CurrentTimeIndicator-CUeblc9r.js} +2 -2
- package/dist/Calendar/{EventCard-D_VeOVDQ.js → EventCard-L6jaKgEw.js} +3 -2
- package/dist/Calendar/{TimeAxis-gKb8dTwY.js → TimeAxis-cK2_3FeM.js} +1 -1
- package/dist/Calendar/{TimeGrid-D8Du5vFP.js → TimeGrid-B8lvUb1W.js} +2 -2
- package/dist/Calendar/index.js +15 -16
- package/dist/Calendar/{layout-DvWx_7gn.js → layout-CaPxiRd-.js} +94 -96
- package/dist/Calendar/subcomponents/AllDaySection/index.js +8 -0
- package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +5 -0
- package/dist/Calendar/subcomponents/EventCard/index.js +6 -0
- package/dist/Calendar/subcomponents/TimeAxis/index.js +4 -0
- package/dist/Calendar/subcomponents/TimeGrid/index.js +4 -0
- package/dist/Calendar/{style-hCRKx3m1.js → theme-BzNDRi0U.js} +19 -3
- package/dist/Calendar/utils/index.js +37 -41
- package/dist/Calendar/utils/layout/index.js +2 -2
- package/dist/Calendar/utils/theme/index.js +2 -0
- package/dist/ColorPicker/{ColorPicker-BNPxmfw_.js → ColorPicker-By-Y8Tyz.js} +3 -3
- package/dist/ColorPicker/index.js +4 -4
- package/dist/ConfigProvider/index.js +2 -2
- package/dist/DatePicker/DatePicker-PCdNachD.js +115 -0
- package/dist/DatePicker/{DatePickerPanel-BaVC1tq2.js → DatePickerPanel-HoxXteK0.js} +13 -12
- package/dist/DatePicker/{ensureDayjsPlugins-DZjJnZgo.js → ensureDayjsPlugins-C3aqki6i.js} +3 -4
- package/dist/DatePicker/index.js +5 -5
- package/dist/DropDown/{DropDown-m3HT_eex.js → DropDown-CvQAbsEo.js} +11 -11
- package/dist/DropDown/index.js +4 -4
- package/dist/Editor/{Buttons-BB3xV8ku.js → Buttons-DmSUkHWl.js} +4 -4
- package/dist/Editor/ToolbarPlugin/Buttons/index.js +8 -8
- package/dist/Editor/index.js +8 -8
- package/dist/Gantt/GanttChart/index.js +15 -0
- package/dist/Gantt/GanttChart-DJA8pG9U.js +2139 -0
- package/dist/Gantt/GanttHighlightContext-AIpN3-af.js +12 -0
- package/dist/Gantt/GanttTable/index.js +10 -0
- package/dist/Gantt/GanttTable-Di_p-0M1.js +83 -0
- package/dist/Gantt/GanttToolBar/index.js +11 -0
- package/dist/Gantt/GanttToolBar-D5pQdrzv.js +105 -0
- package/dist/Gantt/collapseKeys-C8139wvy.js +160 -0
- package/dist/Gantt/columnResize-By_1E48E.js +46 -0
- package/dist/Gantt/constants-D4ur8WRs.js +39 -0
- package/dist/Gantt/highlightTarget-DmzCIiQb.js +25 -0
- package/dist/Gantt/index.js +374 -0
- package/dist/Gantt/timelineViewConfig-BXl2UkN8.js +118 -0
- package/dist/Gantt/utils/index.js +6 -0
- package/dist/Modal/{Modal-CrK8gFOn.js → Modal-D3LFqIV4.js} +3 -3
- package/dist/Modal/index.js +1 -1
- package/dist/Select/{Select-Dz_xr4my.js → Select-OjCjCogR.js} +144 -138
- package/dist/Select/{SelectInputSearch-GHYAmQ3A.js → SelectInputSearch-DXPTGSc2.js} +1 -1
- package/dist/Select/index.js +5 -5
- package/dist/Table/Table-3-kFIm5v.js +543 -0
- package/dist/Table/constants-CKqc9Os_.js +25 -0
- package/dist/Table/hooks/index.js +2 -0
- package/dist/Table/hooks-CJ2CnSep.js +108 -0
- package/dist/Table/index.js +7 -0
- package/dist/Table/processRowspan-BCzfI5un.js +144 -0
- package/dist/Table/utils/index.js +2 -0
- package/dist/Tabs/{Tabs-CPRNkfMo.js → Tabs-DVQcB3YG.js} +1 -1
- package/dist/Tabs/index.js +1 -1
- package/dist/Tooltip/Tooltip-DW_XP13m.js +171 -0
- package/dist/Tooltip/index.js +1 -1
- package/dist/Tree/index.js +1 -1
- package/dist/animations/index.d.ts +2 -2
- package/dist/components/Amap/__tests__/helpers.d.ts +6 -0
- package/dist/components/Calendar/__tests__/helpers/testFormatMessage.d.ts +1 -1
- package/dist/components/Calendar/context/CalendarContext.d.ts +2 -1
- package/dist/components/Calendar/index.d.ts +2 -2
- package/dist/components/Calendar/{shared → subcomponents}/AllDaySection/AllDaySection.d.ts +1 -1
- package/dist/components/Calendar/subcomponents/DayView/DayView.d.ts +3 -0
- package/dist/components/Calendar/{shared → subcomponents}/EventCard/EventCard.d.ts +1 -1
- package/dist/components/Calendar/{panels/MonthPanel → subcomponents}/MonthCell/MonthCellPopover/MonthCellPopover.d.ts +1 -1
- package/dist/components/Calendar/subcomponents/MonthView/MonthView.d.ts +3 -0
- package/dist/components/Calendar/{panels/WeekPanel → subcomponents}/WeekAllDaySection/WeekAllDaySection.d.ts +1 -1
- package/dist/components/Calendar/{panels/MonthPanel → subcomponents}/WeekEventLayer/MoreButton.d.ts +1 -1
- package/dist/components/Calendar/{panels/MonthPanel → subcomponents}/WeekEventLayer/WeekEventLayer.d.ts +1 -1
- package/dist/components/Calendar/subcomponents/WeekView/WeekView.d.ts +3 -0
- package/dist/components/Calendar/utils/dateUtils.d.ts +2 -1
- package/dist/components/Calendar/utils/eventUtils.d.ts +1 -1
- package/dist/components/Calendar/utils/layout/dayLayoutAlgorithm.d.ts +1 -1
- package/dist/components/Calendar/utils/localeKey.d.ts +2 -0
- package/dist/components/Calendar/utils/normalizeData.d.ts +1 -1
- package/dist/components/Calendar/{style → utils/theme}/index.d.ts +1 -0
- package/dist/components/Calendar/{adapters → utils/theme}/platformTheme.d.ts +1 -1
- package/dist/components/Calendar/{style → utils/theme}/resolveCalendarThemeVars.d.ts +1 -1
- package/dist/components/Calendar/{style → utils/theme}/resolveSubcomponentThemes.d.ts +3 -3
- package/dist/components/Calendar/utils/weekTimedLayout.d.ts +1 -1
- package/dist/components/DatePicker/__tests__/DatePicker.getPopupContainer.test.d.ts +1 -0
- package/dist/components/DatePicker/__tests__/DatePicker.triggerActiveClassName.test.d.ts +1 -0
- package/dist/components/DatePicker/interface.d.ts +7 -0
- package/dist/components/Gantt/Gantt.d.ts +11 -0
- package/dist/components/Gantt/GanttChart/GanttBarTooltip/GanttBarTooltip.d.ts +3 -0
- package/dist/components/Gantt/GanttChart/GanttChart.d.ts +8 -0
- package/dist/components/Gantt/GanttChart/GanttChartCanvas.d.ts +4 -0
- package/dist/components/Gantt/GanttChart/GanttChartCanvasBackground.d.ts +4 -0
- package/dist/components/Gantt/GanttChart/GanttInteractionContext.d.ts +4 -0
- package/dist/components/Gantt/GanttChart/GanttSummaryBar/GanttSummaryBar.d.ts +4 -0
- package/dist/components/Gantt/GanttChart/GanttTaskBar/GanttTaskBar.d.ts +4 -0
- package/dist/components/Gantt/GanttChart/GanttTaskBar/useTaskBarPointer.d.ts +9 -0
- package/dist/components/Gantt/GanttChart/GanttTimelineContext.d.ts +4 -0
- package/dist/components/Gantt/GanttChart/GanttTimelineHeader/GanttTimelineHeader.d.ts +4 -0
- package/dist/components/Gantt/GanttChart/OffscreenTaskIndicators/OffscreenTaskIndicators.d.ts +4 -0
- package/dist/components/Gantt/GanttChart/OffscreenTaskIndicators/__tests__/OffscreenTaskIndicators.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/TodayIndicator/TodayIndicator.d.ts +3 -0
- package/dist/components/Gantt/GanttChart/hooks/__tests__/timelineFocus.contract.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/hooks/__tests__/useGanttColumnVirtual.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/hooks/__tests__/useGanttDrag.clippedQuarterMonth.test.d.ts +0 -0
- package/dist/components/Gantt/GanttChart/hooks/__tests__/useOffscreenIndicators.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/hooks/__tests__/useTimelineViewportController.test.d.ts +0 -0
- package/dist/components/Gantt/GanttChart/hooks/useBarTooltipHover.d.ts +19 -0
- package/dist/components/Gantt/GanttChart/hooks/useEdgeScroll.d.ts +6 -0
- package/dist/components/Gantt/GanttChart/hooks/useGanttColumnVirtual.d.ts +21 -0
- package/dist/components/Gantt/GanttChart/hooks/useGanttDrag.d.ts +15 -0
- package/dist/components/Gantt/GanttChart/hooks/useGanttRowVirtualScroll.d.ts +12 -0
- package/dist/components/Gantt/GanttChart/hooks/useGanttScrollbars.d.ts +2 -0
- package/dist/components/Gantt/GanttChart/hooks/useNormalizedItems.d.ts +11 -0
- package/dist/components/Gantt/GanttChart/hooks/useOffscreenIndicators.d.ts +11 -0
- package/dist/components/Gantt/GanttChart/hooks/useRowHoverHighlight.d.ts +10 -0
- package/dist/components/Gantt/GanttChart/hooks/useTimelineViewportController.d.ts +26 -0
- package/dist/components/Gantt/GanttChart/hooks/useTodayMs.d.ts +4 -0
- package/dist/components/Gantt/GanttChart/index.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/__tests__/dateRangeNormalizer.subday.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/__tests__/dragEngine.quarterMonth.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/__tests__/dragEngine.subday.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/__tests__/headerBuilder.quarterMonth.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/__tests__/headerBuilder.subday.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/__tests__/quarterMonthScale.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/__tests__/subdayScale.contract.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/__tests__/timelineMarkers.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/__tests__/timelineRange.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/__tests__/timelineViewConfig.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/__tests__/timelineViewportEngine.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/buildSummaryBarTooltipContent.d.ts +6 -0
- package/dist/components/Gantt/GanttChart/utils/constants.d.ts +102 -0
- package/dist/components/Gantt/GanttChart/utils/dateRangeNormalizer.d.ts +18 -0
- package/dist/components/Gantt/GanttChart/utils/dragEngine.d.ts +62 -0
- package/dist/components/Gantt/GanttChart/utils/headerBuilder.d.ts +14 -0
- package/dist/components/Gantt/GanttChart/utils/quarterMonthScale.d.ts +9 -0
- package/dist/components/Gantt/GanttChart/utils/taskBarUtils.d.ts +3 -0
- package/dist/components/Gantt/GanttChart/utils/timeScale.d.ts +35 -0
- package/dist/components/Gantt/GanttChart/utils/timelineFocus.d.ts +8 -0
- package/dist/components/Gantt/GanttChart/utils/timelineMarkers.d.ts +2 -0
- package/dist/components/Gantt/GanttChart/utils/timelineRange.d.ts +8 -0
- package/dist/components/Gantt/GanttChart/utils/timelineViewConfig.d.ts +106 -0
- package/dist/components/Gantt/GanttChart/utils/timelineViewportEngine.d.ts +44 -0
- package/dist/components/Gantt/GanttChart/utils/timezoneUtils.d.ts +11 -0
- package/dist/components/Gantt/GanttHighlightContext.d.ts +3 -0
- package/dist/components/Gantt/GanttResizeIndicator.d.ts +3 -0
- package/dist/components/Gantt/GanttTable/GanttTable.d.ts +7 -0
- package/dist/components/Gantt/GanttTable/hooks/useGanttTableHighlightDomSync.d.ts +2 -0
- package/dist/components/Gantt/GanttTable/hooks/useGanttTableLinkedScroll.d.ts +7 -0
- package/dist/components/Gantt/GanttTable/index.d.ts +1 -0
- package/dist/components/Gantt/GanttTable/utils/mapGanttColumns.d.ts +13 -0
- package/dist/components/Gantt/GanttToolBar/GanttToolBar.d.ts +3 -0
- package/dist/components/Gantt/GanttToolBar/index.d.ts +1 -0
- package/dist/components/Gantt/__tests__/Gantt.contract.test.d.ts +0 -0
- package/dist/components/Gantt/__tests__/Gantt.grouped.contract.test.d.ts +0 -0
- package/dist/components/Gantt/__tests__/GanttBars.renderWindow.test.d.ts +1 -0
- package/dist/components/Gantt/__tests__/GanttChart.contract.test.d.ts +0 -0
- package/dist/components/Gantt/__tests__/GanttSummaryBar.tooltip.test.d.ts +1 -0
- package/dist/components/Gantt/__tests__/GanttToolBar.test.d.ts +1 -0
- package/dist/components/Gantt/__tests__/filterItemsByCollapse.test.d.ts +1 -0
- package/dist/components/Gantt/__tests__/helpers/ganttDomSetup.d.ts +1 -0
- package/dist/components/Gantt/__tests__/helpers/ganttTestFixtures.d.ts +7 -0
- package/dist/components/Gantt/__tests__/helpers/ganttTestMocks.d.ts +8 -0
- package/dist/components/Gantt/__tests__/helpers/renderWithLocale.d.ts +3 -0
- package/dist/components/Gantt/__tests__/helpers/testFormatMessage.d.ts +2 -0
- package/dist/components/Gantt/__tests__/interface.contract.types.test.d.ts +1 -0
- package/dist/components/Gantt/__tests__/timezoneUtils.test.d.ts +1 -0
- package/dist/components/Gantt/__tests__/useBarTooltipHover.test.d.ts +1 -0
- package/dist/components/Gantt/__tests__/useGanttHighlight.test.d.ts +1 -0
- package/dist/components/Gantt/__tests__/useTaskBarPointer.test.d.ts +1 -0
- package/dist/components/Gantt/hooks/useGanttCollapseState.d.ts +6 -0
- package/dist/components/Gantt/hooks/useGanttHighlight.d.ts +10 -0
- package/dist/components/Gantt/hooks/useGanttLayout.d.ts +7 -0
- package/dist/components/Gantt/hooks/useLinkedVerticalScroll.d.ts +6 -0
- package/dist/components/Gantt/index.d.ts +9 -0
- package/dist/components/Gantt/interface.d.ts +140 -0
- package/dist/components/Gantt/internal/GanttLayout.d.ts +8 -0
- package/dist/components/Gantt/internal/GanttTableShell.d.ts +3 -0
- package/dist/components/Gantt/types.internal.d.ts +327 -0
- package/dist/components/Gantt/utils/collapseKeys.d.ts +4 -0
- package/dist/components/Gantt/utils/columnResize.d.ts +19 -0
- package/dist/components/Gantt/utils/constants.d.ts +4 -0
- package/dist/components/Gantt/utils/filterItemsByCollapse.d.ts +9 -0
- package/dist/components/Gantt/utils/highlightTarget.d.ts +13 -0
- package/dist/components/Gantt/utils/index.d.ts +8 -0
- package/dist/components/Gantt/utils/localeKey.d.ts +2 -0
- package/dist/components/Gantt/utils/tableWidthStorage.d.ts +3 -0
- package/dist/components/Select/__tests__/Select.getPopupContainer.test.d.ts +1 -0
- package/dist/components/Select/interface.d.ts +4 -0
- package/dist/components/Table/Table.d.ts +4 -0
- package/dist/components/Table/__tests__/HeaderCell.test.d.ts +1 -0
- package/dist/components/Table/__tests__/TableBody.test.d.ts +1 -0
- package/dist/components/Table/__tests__/processRowspan.test.d.ts +1 -0
- package/dist/components/Table/components/HeaderCell.d.ts +16 -0
- package/dist/components/Table/components/TableBody.d.ts +45 -0
- package/dist/components/Table/components/TableFooter.d.ts +18 -0
- package/dist/components/Table/components/TableHeader.d.ts +14 -0
- package/dist/components/Table/constants.d.ts +29 -0
- package/dist/components/Table/hooks/index.d.ts +2 -0
- package/dist/components/Table/hooks/useColumnResize.d.ts +11 -0
- package/dist/components/Table/hooks/useTableVirtual.d.ts +19 -0
- package/dist/components/Table/index.d.ts +9 -0
- package/dist/components/Table/interface.d.ts +114 -0
- package/dist/components/Table/utils/flattenColumns.d.ts +17 -0
- package/dist/components/Table/utils/index.d.ts +3 -0
- package/dist/components/Table/utils/processRowspan.d.ts +16 -0
- package/dist/components/Table/utils/tableUtils.d.ts +22 -0
- package/dist/components/Tooltip/Tooltip.type.d.ts +2 -0
- package/dist/components/index.d.ts +4 -2
- package/dist/hooks/useLatchedPopupPortalRoot.d.ts +11 -0
- package/dist/index.js +26 -25
- package/dist/locale/lang/en-US.json.d.ts +63 -0
- package/dist/locale/lang/zh-CN.json.d.ts +63 -0
- package/dist/locale/lang/zh-TW.json.d.ts +63 -0
- package/dist/style.css +1 -1
- package/dist/vendors/{ConfigProvider-DCm-93oJ.js → ConfigProvider-DwmA94S2.js} +128 -1
- package/dist/vendors/{LocaleContext-CRlzP8UO.js → LocaleContext-BJdHS0sH.js} +61 -0
- package/dist/vendors/{Tree-DJpkMB5u.js → Tree-C7BgkjCQ.js} +1 -1
- package/dist/vendors/{animations-BmT0HT5q.js → animations-BeI8JZp1.js} +7 -3
- package/dist/vendors/{useFloatingOverlay-uxlI1G-V.js → useFloatingOverlay-3KB88hpZ.js} +1 -0
- package/dist/vendors/{useLocale-D9kAzQlB.js → useLocale-BTz4slNW.js} +1 -1
- package/dist/vitest-matchers.d.ts +1 -0
- package/package.json +3 -2
- package/dist/Calendar/adapters/index.js +0 -2
- package/dist/Calendar/adapters-zYR7CgzD.js +0 -20
- package/dist/Calendar/shared/AllDaySection/index.js +0 -8
- package/dist/Calendar/shared/CurrentTimeIndicator/index.js +0 -5
- package/dist/Calendar/shared/EventCard/index.js +0 -6
- package/dist/Calendar/shared/TimeAxis/index.js +0 -4
- package/dist/Calendar/shared/TimeGrid/index.js +0 -4
- package/dist/Calendar/style/index.js +0 -2
- package/dist/DatePicker/DatePicker-B2skjsiQ.js +0 -91
- package/dist/Tooltip/Tooltip-RkD8fs0B.js +0 -169
- package/dist/components/Calendar/adapters/index.d.ts +0 -1
- package/dist/components/Calendar/panels/DayPanel/DayPanel.d.ts +0 -3
- package/dist/components/Calendar/panels/MonthPanel/MonthPanel.d.ts +0 -3
- package/dist/components/Calendar/panels/WeekPanel/WeekPanel.d.ts +0 -3
- /package/dist/components/Calendar/{shared → subcomponents}/AllDaySection/index.d.ts +0 -0
- /package/dist/components/Calendar/{Header → subcomponents}/CalendarHeader/CalendarHeader.d.ts +0 -0
- /package/dist/components/Calendar/{Header → subcomponents}/CalendarHeaderLeft/CalendarHeaderLeft.d.ts +0 -0
- /package/dist/components/Calendar/{shared → subcomponents}/CurrentTimeIndicator/CurrentTimeIndicator.d.ts +0 -0
- /package/dist/components/Calendar/{shared → subcomponents}/CurrentTimeIndicator/index.d.ts +0 -0
- /package/dist/components/Calendar/{Header → subcomponents}/DateDisplay/DateDisplay.d.ts +0 -0
- /package/dist/components/Calendar/{Header → subcomponents}/DateDisplay/__tests__/DateDisplay.weekPicker.test.d.ts +0 -0
- /package/dist/components/Calendar/{panels/DayPanel → subcomponents/DayView}/__tests__/CalendarDay.dayFilter.test.d.ts +0 -0
- /package/dist/components/Calendar/{shared → subcomponents}/EventCard/__tests__/EventCard.tooltip.test.d.ts +0 -0
- /package/dist/components/Calendar/{shared → subcomponents}/EventCard/index.d.ts +0 -0
- /package/dist/components/Calendar/{panels/MonthPanel → subcomponents}/MonthCell/MonthCell.d.ts +0 -0
- /package/dist/components/Calendar/{panels/MonthPanel → subcomponents}/MonthHeader/MonthHeader.d.ts +0 -0
- /package/dist/components/Calendar/{Header → subcomponents}/NavButton/NavButton.d.ts +0 -0
- /package/dist/components/Calendar/{shared → subcomponents}/TimeAxis/TimeAxis.d.ts +0 -0
- /package/dist/components/Calendar/{shared → subcomponents}/TimeAxis/index.d.ts +0 -0
- /package/dist/components/Calendar/{shared → subcomponents}/TimeGrid/TimeGrid.d.ts +0 -0
- /package/dist/components/Calendar/{shared → subcomponents}/TimeGrid/index.d.ts +0 -0
- /package/dist/components/Calendar/{Header → subcomponents}/TodayButton/TodayButton.d.ts +0 -0
- /package/dist/components/Calendar/{panels/WeekPanel → subcomponents}/WeekHeader/WeekHeader.d.ts +0 -0
- /package/dist/components/Calendar/{internalTypes.d.ts → types.internal.d.ts} +0 -0
- /package/dist/components/Calendar/{adapters → utils/theme}/__tests__/platformTheme.test.d.ts +0 -0
- /package/dist/components/Calendar/{style → utils/theme}/__tests__/resolveCalendarThemeVars.test.d.ts +0 -0
- /package/dist/components/Calendar/{style → utils/theme}/__tests__/resolveScheduleColorVars.test.d.ts +0 -0
- /package/dist/components/Calendar/{style → utils/theme}/__tests__/resolveSubcomponentThemes.test.d.ts +0 -0
- /package/dist/components/Calendar/{style → utils/theme}/resolveScheduleColorVars.d.ts +0 -0
|
@@ -0,0 +1,327 @@
|
|
|
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
|
+
/** Pointer X relative to the active visual anchor at mousedown, in screen px. */
|
|
76
|
+
grabOffsetInBar: number;
|
|
77
|
+
originLeftPx: number;
|
|
78
|
+
/** Clipped width rendered inside the current timeline window. */
|
|
79
|
+
originWidthPx: number;
|
|
80
|
+
/** Window-valid visual anchor X and timestamp captured at drag start. */
|
|
81
|
+
originAnchorPx: number;
|
|
82
|
+
originAnchorMs: number;
|
|
83
|
+
originStartMs: number;
|
|
84
|
+
originEndMs: number;
|
|
85
|
+
deltaUnits: number;
|
|
86
|
+
dragMode: GanttChangeType;
|
|
87
|
+
previewLeftPx: number;
|
|
88
|
+
previewStartMs: number;
|
|
89
|
+
previewEndMs: number;
|
|
90
|
+
}
|
|
91
|
+
/** @deprecated Use InternalDragState — kept for external references */
|
|
92
|
+
export interface DragState extends InternalDragState {
|
|
93
|
+
}
|
|
94
|
+
export type CommittedRangeById = Record<string, CommittedRange>;
|
|
95
|
+
export interface PendingDragOp {
|
|
96
|
+
opId: number;
|
|
97
|
+
startedAt: number;
|
|
98
|
+
timeoutId: ReturnType<typeof setTimeout>;
|
|
99
|
+
}
|
|
100
|
+
export interface VirtualColumnIndex {
|
|
101
|
+
index: number;
|
|
102
|
+
}
|
|
103
|
+
export interface OffscreenIndicator {
|
|
104
|
+
rowKey: string;
|
|
105
|
+
rowTop: number;
|
|
106
|
+
rowHeight: number;
|
|
107
|
+
showLeft: boolean;
|
|
108
|
+
showRight: boolean;
|
|
109
|
+
targetMs: number;
|
|
110
|
+
taskId: string;
|
|
111
|
+
}
|
|
112
|
+
export interface OffscreenJumpTarget {
|
|
113
|
+
targetMs: number;
|
|
114
|
+
taskId: string;
|
|
115
|
+
}
|
|
116
|
+
export interface BarTooltipHoverState {
|
|
117
|
+
x: number;
|
|
118
|
+
y: number;
|
|
119
|
+
top: number;
|
|
120
|
+
bottom: number;
|
|
121
|
+
height: number;
|
|
122
|
+
}
|
|
123
|
+
export interface ScrollScrollerApi {
|
|
124
|
+
setScrollTop: (top: number) => void;
|
|
125
|
+
}
|
|
126
|
+
export type VerticalScrollSource = 'timeline' | 'table';
|
|
127
|
+
export interface VerticalScrollController {
|
|
128
|
+
registerTimelineScroller: (api: ScrollScrollerApi) => () => void;
|
|
129
|
+
registerTableScroller: (api: ScrollScrollerApi) => () => void;
|
|
130
|
+
sync: (source: VerticalScrollSource, top: number) => void;
|
|
131
|
+
}
|
|
132
|
+
export type HighlightListener = (target: HighlightTarget, payload?: {
|
|
133
|
+
source?: string;
|
|
134
|
+
}) => void;
|
|
135
|
+
export interface GanttHighlightContextValue {
|
|
136
|
+
getHighlightTarget: () => HighlightTarget;
|
|
137
|
+
setHighlightTarget: (target: HighlightTarget, options?: {
|
|
138
|
+
source?: string;
|
|
139
|
+
}) => void;
|
|
140
|
+
setTableHighlightTarget: (target: HighlightTarget) => void;
|
|
141
|
+
subscribeHighlight: (listener: HighlightListener) => () => void;
|
|
142
|
+
notifyScrollActivity: () => void;
|
|
143
|
+
getIsScrollActive: () => boolean;
|
|
144
|
+
}
|
|
145
|
+
export interface GanttTimelineContextValue {
|
|
146
|
+
viewMode: GanttMode;
|
|
147
|
+
pixelsPerDay: number;
|
|
148
|
+
timelineStartMs: number;
|
|
149
|
+
timelineEndMs: number;
|
|
150
|
+
visibleStartMs: number;
|
|
151
|
+
visibleEndMs: number;
|
|
152
|
+
timelineCoords: TimelineCoords;
|
|
153
|
+
scrollLeft: number;
|
|
154
|
+
viewportWidth: number;
|
|
155
|
+
timelineWidth: number;
|
|
156
|
+
isInitialLayoutReady: boolean;
|
|
157
|
+
}
|
|
158
|
+
export interface GanttInteractionContextValue {
|
|
159
|
+
tooltip: ((item: NormalizedGanttItem) => ReactNode) | null;
|
|
160
|
+
isScrolling: boolean;
|
|
161
|
+
collapsedKeys: CollapsedKeys;
|
|
162
|
+
onBarClick: (event: MouseEvent, item: NormalizedGanttItem) => void;
|
|
163
|
+
onTaskMouseDown: (event: MouseEvent, item: NormalizedGanttItem, left: number, width?: number) => void;
|
|
164
|
+
onResizeMouseDown: (event: MouseEvent, item: NormalizedGanttItem, left: number, edge: 'start' | 'end', width?: number) => void;
|
|
165
|
+
}
|
|
166
|
+
export interface GanttChartProps<T extends GanttDataItem = GanttDataItem> {
|
|
167
|
+
items?: T[];
|
|
168
|
+
viewMode?: GanttMode;
|
|
169
|
+
availableModes?: GanttMode[];
|
|
170
|
+
onViewModeChange?: (mode: GanttMode) => void;
|
|
171
|
+
timeRangeConfig?: TimeRangeConfig;
|
|
172
|
+
pixelsPerDayConfig?: PixelsPerDayConfig;
|
|
173
|
+
onTaskTimeChange?: GanttProps<T>['onTaskTimeChange'];
|
|
174
|
+
onRowClick?: GanttProps<T>['onRowClick'];
|
|
175
|
+
tooltip?: GanttProps<T>['tooltip'];
|
|
176
|
+
verticalScrollController?: VerticalScrollController;
|
|
177
|
+
showWeekendHighlight?: boolean;
|
|
178
|
+
showTodayLine?: boolean;
|
|
179
|
+
collapsedKeys?: CollapsedKeys;
|
|
180
|
+
onToggleCollapse?: GanttProps<T>['onToggleCollapse'];
|
|
181
|
+
}
|
|
182
|
+
export interface GanttChartHandle {
|
|
183
|
+
scrollToToday: () => void;
|
|
184
|
+
scrollPrev: () => void;
|
|
185
|
+
scrollNext: () => void;
|
|
186
|
+
}
|
|
187
|
+
export interface GanttTableShellProps {
|
|
188
|
+
width?: number;
|
|
189
|
+
verticalScrollController?: VerticalScrollController;
|
|
190
|
+
dataLength?: number;
|
|
191
|
+
emptyOverlay?: ReactNode;
|
|
192
|
+
children?: ReactNode;
|
|
193
|
+
}
|
|
194
|
+
export type GanttLayoutProps<T extends GanttDataItem = GanttDataItem> = GanttLayoutInputProps<T>;
|
|
195
|
+
export type ElementRef<T extends HTMLElement = HTMLDivElement> = RefObject<T | null> | MutableRefObject<T | null>;
|
|
196
|
+
export interface GanttToolBarProps {
|
|
197
|
+
viewMode?: GanttMode;
|
|
198
|
+
availableModes?: GanttMode[];
|
|
199
|
+
onViewModeChange?: (mode: GanttMode) => void;
|
|
200
|
+
onTodayClick?: () => void;
|
|
201
|
+
onScrollPrev?: () => void;
|
|
202
|
+
onScrollNext?: () => void;
|
|
203
|
+
className?: string;
|
|
204
|
+
}
|
|
205
|
+
export interface GanttTimelineHeaderProps {
|
|
206
|
+
timelineWidth: number;
|
|
207
|
+
viewportWidth?: number;
|
|
208
|
+
scrollLeft: number;
|
|
209
|
+
trackRef: ElementRef<HTMLDivElement>;
|
|
210
|
+
virtualColumns: VirtualColumnIndex[];
|
|
211
|
+
lowerSegments: LowerSegment[];
|
|
212
|
+
todayLineLeft: number | null;
|
|
213
|
+
todayCenterMs: number | null;
|
|
214
|
+
showTodayLine?: boolean;
|
|
215
|
+
viewMode: GanttMode;
|
|
216
|
+
availableModes?: GanttMode[];
|
|
217
|
+
formatMessage: GanttFormatMessage;
|
|
218
|
+
onViewModeChange?: (mode: GanttMode) => void;
|
|
219
|
+
onTodayClick?: () => void;
|
|
220
|
+
onScrollPrev?: () => void;
|
|
221
|
+
onScrollNext?: () => void;
|
|
222
|
+
}
|
|
223
|
+
export interface GanttChartCanvasBackgroundProps {
|
|
224
|
+
canvasHeight: number;
|
|
225
|
+
weekendSegments: WeekendSegment[];
|
|
226
|
+
virtualColumns: VirtualColumnIndex[];
|
|
227
|
+
lowerSegments: LowerSegment[];
|
|
228
|
+
shouldShowTodayMarker: boolean;
|
|
229
|
+
todayLineLeft: number | null;
|
|
230
|
+
}
|
|
231
|
+
export interface GanttChartCanvasRowsProps {
|
|
232
|
+
virtualRows: VirtualItem[];
|
|
233
|
+
normalizedItems: NormalizedGanttItem[];
|
|
234
|
+
dragState: InternalDragState | null;
|
|
235
|
+
dragPermissionById: Record<string, ResolvedDragPermission>;
|
|
236
|
+
handleOffscreenJump: (target: OffscreenJumpTarget) => void;
|
|
237
|
+
hoverBgRef: RefObject<HTMLDivElement | null>;
|
|
238
|
+
}
|
|
239
|
+
export interface GanttChartCanvasProps {
|
|
240
|
+
contentRef: ElementRef<HTMLDivElement>;
|
|
241
|
+
normalizedItems: NormalizedGanttItem[];
|
|
242
|
+
safeRowHeight: number;
|
|
243
|
+
viewportHeight: number;
|
|
244
|
+
lowerSegments: LowerSegment[];
|
|
245
|
+
virtualColumns: VirtualColumnIndex[];
|
|
246
|
+
weekendSegments: WeekendSegment[];
|
|
247
|
+
dragState: InternalDragState | null;
|
|
248
|
+
dragPermissionById: Record<string, ResolvedDragPermission>;
|
|
249
|
+
tooltip?: ((item: NormalizedGanttItem) => ReactNode) | null;
|
|
250
|
+
handleTaskMouseDown: (event: MouseEvent, item: NormalizedGanttItem, left: number, width?: number) => void;
|
|
251
|
+
handleResizeMouseDown: (event: MouseEvent, item: NormalizedGanttItem, left: number, edge: 'start' | 'end', width?: number) => void;
|
|
252
|
+
handleBarClick: (event: MouseEvent, item: NormalizedGanttItem) => void;
|
|
253
|
+
collapsedKeys?: CollapsedKeys;
|
|
254
|
+
handleOffscreenJump: (target: OffscreenJumpTarget) => void;
|
|
255
|
+
todayLineLeft: number | null;
|
|
256
|
+
shouldShowTodayMarker: boolean;
|
|
257
|
+
}
|
|
258
|
+
export interface GanttTaskBarProps {
|
|
259
|
+
item: NormalizedGanttItem;
|
|
260
|
+
barTop: number;
|
|
261
|
+
dragTaskId: string | null;
|
|
262
|
+
dragPreview: InternalDragState | null;
|
|
263
|
+
dragPermission?: ResolvedDragPermission;
|
|
264
|
+
}
|
|
265
|
+
export interface GanttSummaryBarProps {
|
|
266
|
+
item: NormalizedGanttItem;
|
|
267
|
+
barTop: number;
|
|
268
|
+
}
|
|
269
|
+
export interface GanttBarTooltipProps {
|
|
270
|
+
item: NormalizedGanttItem;
|
|
271
|
+
tooltip?: ((item: NormalizedGanttItem) => ReactNode) | null;
|
|
272
|
+
disabled?: boolean;
|
|
273
|
+
children: (handlers: {
|
|
274
|
+
onMouseMove: (e: MouseEvent<HTMLDivElement>) => void;
|
|
275
|
+
onMouseLeave: () => void;
|
|
276
|
+
}) => ReactNode;
|
|
277
|
+
}
|
|
278
|
+
export interface GanttTableProps<T extends GanttDataItem = GanttDataItem> {
|
|
279
|
+
data?: T[];
|
|
280
|
+
columns?: GanttColumn<T>[];
|
|
281
|
+
onRowClick?: GanttProps<T>['onRowClick'];
|
|
282
|
+
rowHeight?: number;
|
|
283
|
+
}
|
|
284
|
+
export interface GanttResizeIndicatorProps {
|
|
285
|
+
tableWidth: number;
|
|
286
|
+
onWidthChange: (width: number) => void;
|
|
287
|
+
onResizeEnd: (width: number) => void;
|
|
288
|
+
containerRef: ElementRef<HTMLDivElement>;
|
|
289
|
+
}
|
|
290
|
+
export interface UseGanttDragOptions {
|
|
291
|
+
pixelsPerDay: number;
|
|
292
|
+
viewMode: GanttMode;
|
|
293
|
+
timelineCoords: TimelineCoords;
|
|
294
|
+
onTaskTimeChange?: GanttProps['onTaskTimeChange'];
|
|
295
|
+
containerRef?: ElementRef<HTMLDivElement>;
|
|
296
|
+
onDragInteractionChange?: (interacting: boolean) => void;
|
|
297
|
+
}
|
|
298
|
+
export interface UseTimelineViewportControllerOptions {
|
|
299
|
+
timeRangeConfig?: TimeRangeConfig;
|
|
300
|
+
pixelsPerDayConfig?: PixelsPerDayConfig;
|
|
301
|
+
viewMode: GanttMode;
|
|
302
|
+
contentRef: ElementRef<HTMLDivElement>;
|
|
303
|
+
contentSize?: {
|
|
304
|
+
width?: number;
|
|
305
|
+
height?: number;
|
|
306
|
+
};
|
|
307
|
+
headerTrackRef: ElementRef<HTMLDivElement>;
|
|
308
|
+
formatMessage: GanttFormatMessage;
|
|
309
|
+
isHorizontalScrollbarInteracting: boolean;
|
|
310
|
+
isTaskBarInteracting?: boolean;
|
|
311
|
+
}
|
|
312
|
+
export interface UseGanttCollapseStateOptions {
|
|
313
|
+
collapsedKeys?: CollapsedKeys;
|
|
314
|
+
onToggleCollapse?: GanttProps['onToggleCollapse'];
|
|
315
|
+
}
|
|
316
|
+
export interface UseGanttLayoutOptions {
|
|
317
|
+
id?: string;
|
|
318
|
+
}
|
|
319
|
+
export interface TodayIndicatorProps {
|
|
320
|
+
left: number;
|
|
321
|
+
height: number;
|
|
322
|
+
className?: string;
|
|
323
|
+
}
|
|
324
|
+
export interface OffscreenTaskIndicatorsProps {
|
|
325
|
+
indicators: OffscreenIndicator[];
|
|
326
|
+
onJump: (target: OffscreenJumpTarget) => void;
|
|
327
|
+
}
|
|
@@ -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;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** 内部 barrel;公开 API 请从 `@baishuyun/ui-base/Gantt` 导入 */
|
|
2
|
+
export { GANTT_DEFAULT_ROW_HEIGHT, GANTT_TABLE_HEADER_ROW_SPAN, MIN_TABLE_WIDTH, HEADER_TOP_HEIGHT, HEADER_BOTTOM_HEIGHT, DRAG_MODE_MOVE, DRAG_MODE_RESIZE_START, DRAG_MODE_RESIZE_END, EMPTY_GROUP_VALUE, } from '../GanttChart/utils/constants';
|
|
3
|
+
export { DEFAULT_TABLE_WIDTH_FALLBACK, TABLE_WIDTH_PLACEHOLDER, MIN_CHART_WIDTH, } from './constants';
|
|
4
|
+
export { isGroupCollapsed, toggleCollapsedKey } from './collapseKeys';
|
|
5
|
+
export { isSameHighlightTarget, isHighlightMatch, resolveChartHighlightTarget, } from './highlightTarget';
|
|
6
|
+
export { GANTT_TABLE_DISABLED_RESIZE_COLUMNS, mergeColumnWidths, useGanttTableColumnResize, } from './columnResize';
|
|
7
|
+
export { normalizeTaskDateRange } from '../GanttChart/utils/dateRangeNormalizer';
|
|
8
|
+
export { isSubDayViewMode, ALL_GANTT_MODES, CALENDAR_TIER_MODES, DEFAULT_GANTT_MODE, } from '../GanttChart/utils/timelineViewConfig';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -179,6 +179,10 @@ export interface SelectProps<ValueType = any, OptionType extends DefaultOptionTy
|
|
|
179
179
|
* @description 自定义浮层的最小宽度
|
|
180
180
|
*/
|
|
181
181
|
popupMinWidth?: string;
|
|
182
|
+
/**
|
|
183
|
+
* @description 指定下拉浮层渲染的父级 DOM 节点;未传、返回空值或非元素节点时回退到 body
|
|
184
|
+
*/
|
|
185
|
+
getPopupContainer?: () => HTMLElement;
|
|
182
186
|
}
|
|
183
187
|
export interface SelectRef {
|
|
184
188
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { ColumnConfig } from '../interface';
|
|
3
|
+
export interface HeaderCellProps {
|
|
4
|
+
column: ColumnConfig & {
|
|
5
|
+
index?: number;
|
|
6
|
+
};
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
className?: string;
|
|
9
|
+
onResizeStart?: (columnKey: string, startWidth: number, startX: number) => void;
|
|
10
|
+
isResizing?: boolean;
|
|
11
|
+
resizable?: boolean;
|
|
12
|
+
colSpan?: number;
|
|
13
|
+
rowSpan?: number;
|
|
14
|
+
}
|
|
15
|
+
declare const HeaderCell: import('react').MemoExoticComponent<({ column, style, className, onResizeStart, isResizing, resizable, colSpan, rowSpan, }: HeaderCellProps) => import("react/jsx-runtime").JSX.Element>;
|
|
16
|
+
export default HeaderCell;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CSSProperties, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { ColumnConfig } from '../interface';
|
|
3
|
+
export interface TableBodyProps {
|
|
4
|
+
leftFixedColumns?: ColumnConfig[];
|
|
5
|
+
normalColumns?: ColumnConfig[];
|
|
6
|
+
rightFixedColumns?: ColumnConfig[];
|
|
7
|
+
dataSource?: Record<string, unknown>[];
|
|
8
|
+
rowKey?: string;
|
|
9
|
+
rowHeight?: number | string;
|
|
10
|
+
emptyText?: ReactNode;
|
|
11
|
+
onRowClick?: (record: Record<string, unknown>, index: number, e: MouseEvent) => void;
|
|
12
|
+
onRow?: (record: Record<string, unknown>, index: number, defaults: {
|
|
13
|
+
className: string;
|
|
14
|
+
style: CSSProperties;
|
|
15
|
+
}) => Record<string, unknown>;
|
|
16
|
+
onCell?: (value: unknown, record: Record<string, unknown>, column: ColumnConfig, rowIndex: number, cellProps: {
|
|
17
|
+
className: string;
|
|
18
|
+
style: CSSProperties;
|
|
19
|
+
}) => Record<string, unknown>;
|
|
20
|
+
totalColumnsWidth?: number;
|
|
21
|
+
needSpacer?: boolean;
|
|
22
|
+
rowRefCallback?: (element: HTMLElement) => void;
|
|
23
|
+
isDynamicHeight?: boolean;
|
|
24
|
+
emptyRowContent?: ReactNode;
|
|
25
|
+
showEmptyRow?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 分组数据块在全局虚拟列表中的起始下标。
|
|
28
|
+
* 传入(含 0)时强制 data-index = startVirtualIndex + rowIndex,不与 record.dataIndex 混用。
|
|
29
|
+
*/
|
|
30
|
+
startVirtualIndex?: number;
|
|
31
|
+
/** 无数据时返回 null(分组块常用);优先于 showEmptyRow */
|
|
32
|
+
hideWhenEmpty?: boolean;
|
|
33
|
+
/** 追加到 .custom-table-body */
|
|
34
|
+
wrapperClassName?: string;
|
|
35
|
+
/**
|
|
36
|
+
* 为 true 时即使 isDynamicHeight 也使用 rowHeight(对齐 Gantt 分组块现状)。
|
|
37
|
+
* 默认 false:平坦路径保持 isDynamicHeight ? 'auto' : rowHeight。
|
|
38
|
+
*/
|
|
39
|
+
forceRowHeight?: boolean;
|
|
40
|
+
}
|
|
41
|
+
declare const _default: import('react').MemoExoticComponent<{
|
|
42
|
+
({ leftFixedColumns, normalColumns, rightFixedColumns, dataSource, rowKey, rowHeight, emptyText, onRowClick, onRow, onCell, totalColumnsWidth, needSpacer, rowRefCallback, isDynamicHeight, emptyRowContent, showEmptyRow, startVirtualIndex, hideWhenEmpty, wrapperClassName, forceRowHeight, }: TableBodyProps): import("react/jsx-runtime").JSX.Element | null;
|
|
43
|
+
displayName: string;
|
|
44
|
+
}>;
|
|
45
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ColumnConfig } from '../interface';
|
|
3
|
+
export interface TableFooterProps {
|
|
4
|
+
leftFixedColumns?: ColumnConfig[];
|
|
5
|
+
normalColumns?: ColumnConfig[];
|
|
6
|
+
rightFixedColumns?: ColumnConfig[];
|
|
7
|
+
footerData?: Record<string, unknown>;
|
|
8
|
+
summary?: Record<string, ReactNode>;
|
|
9
|
+
render?: (value: unknown, column: ColumnConfig) => ReactNode;
|
|
10
|
+
enableFixed?: boolean;
|
|
11
|
+
totalColumnsWidth?: number;
|
|
12
|
+
needSpacer?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: import('react').MemoExoticComponent<{
|
|
15
|
+
({ leftFixedColumns, normalColumns, rightFixedColumns, footerData, summary, render, enableFixed, totalColumnsWidth, needSpacer, }: TableFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
}>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ColumnConfig } from '../interface';
|
|
2
|
+
export interface TableHeaderProps {
|
|
3
|
+
columns?: ColumnConfig[];
|
|
4
|
+
enableFixed?: boolean;
|
|
5
|
+
height?: number;
|
|
6
|
+
resizingColumn?: string | null;
|
|
7
|
+
onResizeStart?: (columnKey: string, startWidth: number, startX: number) => void;
|
|
8
|
+
disabledResizeColumns?: string[];
|
|
9
|
+
totalColumnsWidth?: number;
|
|
10
|
+
needSpacer?: boolean;
|
|
11
|
+
headerRowSpan?: number;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<TableHeaderProps & import('react').RefAttributes<HTMLDivElement>>>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const DEFAULT_CONFIG: {
|
|
2
|
+
ROW_HEIGHT: number;
|
|
3
|
+
HEADER_HEIGHT: number;
|
|
4
|
+
EMPTY_TEXT_KEY: "table.empty";
|
|
5
|
+
};
|
|
6
|
+
export declare const ROW_DEFAULTS: {
|
|
7
|
+
MIN_HEIGHT: number;
|
|
8
|
+
MAX_HEIGHT: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const VIRTUALIZATION_DEFAULTS: {
|
|
11
|
+
DEFAULT_OVERSCAN: number;
|
|
12
|
+
ENABLE_AUTO_SIZE: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const COLUMN_DEFAULTS: {
|
|
15
|
+
DEFAULT_WIDTH: number;
|
|
16
|
+
MIN_WIDTH: number;
|
|
17
|
+
MAX_WIDTH: number;
|
|
18
|
+
};
|
|
19
|
+
export declare const SORT_DIRECTION: {
|
|
20
|
+
readonly ASC: "asc";
|
|
21
|
+
readonly DESC: "desc";
|
|
22
|
+
readonly NONE: null;
|
|
23
|
+
};
|
|
24
|
+
/** 集成方应依赖这些 class,而非 DOM 层级假设(联动滚动、行高测量等) */
|
|
25
|
+
export declare const TABLE_DOM: {
|
|
26
|
+
readonly wrapper: "custom-table-wrapper";
|
|
27
|
+
readonly body: "custom-table-body";
|
|
28
|
+
};
|
|
29
|
+
export default DEFAULT_CONFIG;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface UseColumnResizeOptions {
|
|
2
|
+
minColumnWidth?: number;
|
|
3
|
+
maxColumnWidth?: number;
|
|
4
|
+
onColumnResize?: (event: MouseEvent, columnKey: string, newWidth: number) => void;
|
|
5
|
+
onColumnResizeEnd?: (columnKey: string, newWidth: number) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function useColumnResize(options?: UseColumnResizeOptions): {
|
|
8
|
+
isResizing: boolean;
|
|
9
|
+
resizingColumn: string | undefined;
|
|
10
|
+
startResize: (this: unknown, columnKey: string, startWidth: number, startX: number) => void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface UseTableVirtualOptions {
|
|
2
|
+
rowHeight?: number | string | ((index: number) => number);
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
overscan?: number;
|
|
5
|
+
estimateSize?: (index: number, row?: Record<string, unknown>) => number;
|
|
6
|
+
minRowHeight?: number;
|
|
7
|
+
maxRowHeight?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function useTableVirtual(rows: Record<string, unknown>[], options: UseTableVirtualOptions, containerRef: React.RefObject<HTMLElement | null>): {
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
virtualRows: any;
|
|
12
|
+
rowRefCallback: any;
|
|
13
|
+
totalHeight: any;
|
|
14
|
+
paddingTop: any;
|
|
15
|
+
paddingBottom: number;
|
|
16
|
+
remeasure: (this: unknown) => void;
|
|
17
|
+
clearRowHeightCache: (this: unknown, rowIds?: string | number | (string | number)[] | undefined) => void;
|
|
18
|
+
isDynamicHeight: boolean;
|
|
19
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as Table } from './Table';
|
|
2
|
+
export { default } from './Table';
|
|
3
|
+
export { default as TableBody } from './components/TableBody';
|
|
4
|
+
export type { TableBodyProps } from './components/TableBody';
|
|
5
|
+
export type { TableProps, ColumnConfig, HeaderRenderApi, TableRenderBodyContext, } from './interface';
|
|
6
|
+
export { processRowspan, shouldRenderCell, getCellRowspan } from './utils/processRowspan';
|
|
7
|
+
export { getRowKey, calculateFixedOffset, splitFixedColumns, getColumnsWidth, expandLeafColumns, sortData, } from './utils/tableUtils';
|
|
8
|
+
export { useTableVirtual, useColumnResize } from './hooks';
|
|
9
|
+
export { TABLE_DOM, DEFAULT_CONFIG, COLUMN_DEFAULTS } from './constants';
|