@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
package/dist/Select/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../Icon/Icon-BQ3Whub2.js";
|
|
2
|
-
import "../vendors/LocaleContext-
|
|
3
|
-
import "../vendors/useLocale-
|
|
4
|
-
import { n as e, r as t, t as n } from "./Select-
|
|
5
|
-
import "./SelectInputSearch-
|
|
6
|
-
import "../vendors/Tree-
|
|
2
|
+
import "../vendors/LocaleContext-BJdHS0sH.js";
|
|
3
|
+
import "../vendors/useLocale-BTz4slNW.js";
|
|
4
|
+
import { n as e, r as t, t as n } from "./Select-OjCjCogR.js";
|
|
5
|
+
import "./SelectInputSearch-DXPTGSc2.js";
|
|
6
|
+
import "../vendors/Tree-C7BgkjCQ.js";
|
|
7
7
|
import "../CheckBox/CheckBox-CkVe5Boq.js";
|
|
8
8
|
import "../CheckBox/CheckBox-DIunYcfS.js";
|
|
9
9
|
import "../Radio/Radio-DkrZHoG1.js";
|
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
import { t as e } from "../vendors/useLocale-BTz4slNW.js";
|
|
2
|
+
import { n as t, o as n, t as r } from "./constants-CKqc9Os_.js";
|
|
3
|
+
import { c as i, f as a, i as o, l as s, o as c, r as l, s as u, t as d, u as f } from "./processRowspan-BCzfI5un.js";
|
|
4
|
+
import { n as p, t as m } from "./hooks-CJ2CnSep.js";
|
|
5
|
+
import { sumBy as h } from "lodash-es";
|
|
6
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
7
|
+
import v, { forwardRef as y, memo as b, useCallback as x, useEffect as S, useImperativeHandle as ee, useLayoutEffect as C, useMemo as w, useRef as T, useState as E } from "react";
|
|
8
|
+
import D from "clsx";
|
|
9
|
+
import { useMemoizedFn as O, useSize as te } from "ahooks";
|
|
10
|
+
import { useOverlayScrollbars as k } from "overlayscrollbars-react";
|
|
11
|
+
//#region src/components/Table/components/HeaderCell.tsx
|
|
12
|
+
var A = b(({ column: e, style: t = {}, className: n = "", onResizeStart: i, isResizing: a = !1, resizable: o = !0, colSpan: s = 1, rowSpan: c = 1 }) => {
|
|
13
|
+
let l = T(null), u = x((e) => {
|
|
14
|
+
l.current?.triggerClick?.(e);
|
|
15
|
+
}, []), d = x((t) => {
|
|
16
|
+
if (!o || !i) return;
|
|
17
|
+
t.preventDefault(), t.stopPropagation();
|
|
18
|
+
let n = (e) => {
|
|
19
|
+
e.preventDefault(), e.stopPropagation();
|
|
20
|
+
};
|
|
21
|
+
document.addEventListener("click", n, !0), document.addEventListener("mouseup", () => {
|
|
22
|
+
setTimeout(() => document.removeEventListener("click", n, !0), 0);
|
|
23
|
+
}, { once: !0 }), i(e.key, e.width || r.DEFAULT_WIDTH, t.clientX);
|
|
24
|
+
}, [
|
|
25
|
+
e.key,
|
|
26
|
+
e.width,
|
|
27
|
+
o,
|
|
28
|
+
i
|
|
29
|
+
]), f = typeof e.header == "function" ? e.header(e, { menuRef: l }) : e.title;
|
|
30
|
+
return /* @__PURE__ */ _("th", {
|
|
31
|
+
className: `custom-table-header-cell ${n} `,
|
|
32
|
+
style: t,
|
|
33
|
+
colSpan: s > 1 ? s : void 0,
|
|
34
|
+
rowSpan: c > 1 ? c : void 0,
|
|
35
|
+
onClick: u,
|
|
36
|
+
children: [/* @__PURE__ */ g("div", {
|
|
37
|
+
className: "header-cell-content",
|
|
38
|
+
children: f
|
|
39
|
+
}), o ? /* @__PURE__ */ g("div", {
|
|
40
|
+
className: `resize-handle ${a ? "resizing" : ""}`,
|
|
41
|
+
onMouseDown: d
|
|
42
|
+
}) : null]
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
A.displayName = "HeaderCell";
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/components/Table/components/TableHeader.tsx
|
|
48
|
+
var j = y(({ columns: e = [], enableFixed: n = !1, height: i = t.HEADER_HEIGHT, resizingColumn: a = null, onResizeStart: c, disabledResizeColumns: l = [], totalColumnsWidth: d = 0, needSpacer: f = !1, headerRowSpan: p = 1 }, m) => {
|
|
49
|
+
let h = w(() => e.some((e) => e.children && e.children.length > 0), [e]), { flatColumns: v, headerRows: y } = w(() => {
|
|
50
|
+
if (h) return o(e);
|
|
51
|
+
let t = Math.max(1, p || 1);
|
|
52
|
+
if (t > 1) {
|
|
53
|
+
let n = [e.map((e) => ({
|
|
54
|
+
...e,
|
|
55
|
+
colSpan: 1,
|
|
56
|
+
rowSpan: t,
|
|
57
|
+
isLeaf: !0
|
|
58
|
+
}))];
|
|
59
|
+
for (let e = 1; e < t; e++) n.push([]);
|
|
60
|
+
return {
|
|
61
|
+
flatColumns: e,
|
|
62
|
+
headerRows: n
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
flatColumns: e,
|
|
67
|
+
headerRows: [e]
|
|
68
|
+
};
|
|
69
|
+
}, [
|
|
70
|
+
e,
|
|
71
|
+
h,
|
|
72
|
+
p
|
|
73
|
+
]), b = (e) => {
|
|
74
|
+
let t = u(e, v), n = e.align || "left", r = l.includes(e.key), i = {
|
|
75
|
+
textAlign: n,
|
|
76
|
+
...s(t, v, e.fixed)
|
|
77
|
+
}, o = `custom-table-header-cell ${e.className || ""}`.trim();
|
|
78
|
+
return e.fixed === "left" && (o += " fixed-left"), e.fixed === "right" && (o += " fixed-right"), t === 0 && (o += " first"), t === v.length - 1 && (o += " last"), /* @__PURE__ */ g(A, {
|
|
79
|
+
column: {
|
|
80
|
+
...e,
|
|
81
|
+
index: t
|
|
82
|
+
},
|
|
83
|
+
style: i,
|
|
84
|
+
className: o,
|
|
85
|
+
onResizeStart: c,
|
|
86
|
+
isResizing: a === e.key,
|
|
87
|
+
resizable: !e.children && !r,
|
|
88
|
+
colSpan: e.colSpan,
|
|
89
|
+
rowSpan: e.rowSpan
|
|
90
|
+
}, e.key);
|
|
91
|
+
};
|
|
92
|
+
return /* @__PURE__ */ g("div", {
|
|
93
|
+
ref: m,
|
|
94
|
+
className: "custom-table-header",
|
|
95
|
+
style: w(() => {
|
|
96
|
+
let e = { minWidth: d };
|
|
97
|
+
return n && (e.position = "sticky", e.top = 0, e.zIndex = 11), e;
|
|
98
|
+
}, [n, d]),
|
|
99
|
+
children: /* @__PURE__ */ _("table", {
|
|
100
|
+
style: {
|
|
101
|
+
tableLayout: "fixed",
|
|
102
|
+
minWidth: d
|
|
103
|
+
},
|
|
104
|
+
children: [/* @__PURE__ */ _("colgroup", { children: [v.map((e) => /* @__PURE__ */ g("col", { style: { width: e.width || r.DEFAULT_WIDTH } }, e.key)), f ? /* @__PURE__ */ g("col", {
|
|
105
|
+
className: "spacer-col",
|
|
106
|
+
style: { width: "auto" }
|
|
107
|
+
}) : null] }), /* @__PURE__ */ g("thead", { children: y.map((e, t) => e.length === 0 ? /* @__PURE__ */ g("tr", { style: { height: i } }, t) : /* @__PURE__ */ _("tr", {
|
|
108
|
+
style: { height: h || p > 1 ? i : "auto" },
|
|
109
|
+
children: [e.map((e) => b(e)), f && t === 0 ? /* @__PURE__ */ g("th", {
|
|
110
|
+
className: "custom-table-header-cell",
|
|
111
|
+
rowSpan: y.length
|
|
112
|
+
}) : null]
|
|
113
|
+
}, t)) })]
|
|
114
|
+
})
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
j.displayName = "TableHeader";
|
|
118
|
+
var M = b(j), N = (e, t, n) => {
|
|
119
|
+
let r = u(e, t), i = e.align || "left", a = s(r, t, n);
|
|
120
|
+
return {
|
|
121
|
+
column: e,
|
|
122
|
+
className: D("custom-table-cell", {
|
|
123
|
+
first: r === 0,
|
|
124
|
+
fixed: !!n
|
|
125
|
+
}, e.className, e?.type || "", e?.colorEnable ? "color-enable" : "", e?.regex === "barcode" ? "bar-code" : "", e?.regex === "qrcode" ? "qr-code" : ""),
|
|
126
|
+
style: {
|
|
127
|
+
textAlign: i,
|
|
128
|
+
...a
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
}, P = ({ leftFixedColumns: e = [], normalColumns: n = [], rightFixedColumns: i = [], dataSource: a = [], rowKey: o = "id", rowHeight: s = t.ROW_HEIGHT, emptyText: u, onRowClick: p, onRow: m, onCell: h, totalColumnsWidth: v = 0, needSpacer: y = !1, rowRefCallback: b, isDynamicHeight: S = !1, emptyRowContent: ee, showEmptyRow: C = !0, startVirtualIndex: T, hideWhenEmpty: E = !1, wrapperClassName: O, forceRowHeight: te = !1 }) => {
|
|
132
|
+
let k = w(() => c(e), [e]), A = w(() => c(n), [n]), j = w(() => c(i), [i]), M = w(() => [
|
|
133
|
+
...k,
|
|
134
|
+
...A,
|
|
135
|
+
...j
|
|
136
|
+
], [
|
|
137
|
+
k,
|
|
138
|
+
A,
|
|
139
|
+
j
|
|
140
|
+
]), P = w(() => {
|
|
141
|
+
let e = k.map((e) => N(e, M, "left")), t = A.map((e) => N(e, M, void 0)), n = j.map((e) => N(e, M, "right"));
|
|
142
|
+
return [
|
|
143
|
+
...e,
|
|
144
|
+
...t,
|
|
145
|
+
...n
|
|
146
|
+
];
|
|
147
|
+
}, [
|
|
148
|
+
M,
|
|
149
|
+
k,
|
|
150
|
+
A,
|
|
151
|
+
j
|
|
152
|
+
]), F = x((e) => {
|
|
153
|
+
e && b && b(e);
|
|
154
|
+
}, [b]), I = (e, t, n) => {
|
|
155
|
+
let { column: r, className: i, style: a } = e;
|
|
156
|
+
if (!l(t, r)) return null;
|
|
157
|
+
let o = d(t, r), s = r.dataIndex ? t[r.dataIndex] : void 0, c = r.render && typeof r.render == "function" ? r.render(s, t, n) : s, u = {
|
|
158
|
+
className: i,
|
|
159
|
+
style: a
|
|
160
|
+
};
|
|
161
|
+
return h && typeof h == "function" && (u = h(s, t, r, n, {
|
|
162
|
+
className: i,
|
|
163
|
+
style: a
|
|
164
|
+
}) || {}), /* @__PURE__ */ g("td", {
|
|
165
|
+
className: `${i} ${u.className || ""}`.trim(),
|
|
166
|
+
style: { ...a },
|
|
167
|
+
rowSpan: o > 1 ? o : void 0,
|
|
168
|
+
...u,
|
|
169
|
+
children: /* @__PURE__ */ g("div", {
|
|
170
|
+
className: D("cell-content", r.align),
|
|
171
|
+
children: c
|
|
172
|
+
})
|
|
173
|
+
}, r.key);
|
|
174
|
+
};
|
|
175
|
+
if (E && a.length === 0) return null;
|
|
176
|
+
let ne = () => ee ?? /* @__PURE__ */ g("tr", {
|
|
177
|
+
className: "custom-table-empty-row",
|
|
178
|
+
children: /* @__PURE__ */ g("td", {
|
|
179
|
+
colSpan: M.length + (y ? 1 : 0),
|
|
180
|
+
style: {
|
|
181
|
+
textAlign: "center",
|
|
182
|
+
padding: "20px",
|
|
183
|
+
color: "#999"
|
|
184
|
+
},
|
|
185
|
+
children: u
|
|
186
|
+
})
|
|
187
|
+
}), re = te || !S;
|
|
188
|
+
return /* @__PURE__ */ g("div", {
|
|
189
|
+
className: D("custom-table-body", O),
|
|
190
|
+
style: { minWidth: v },
|
|
191
|
+
children: /* @__PURE__ */ _("table", {
|
|
192
|
+
style: {
|
|
193
|
+
tableLayout: "fixed",
|
|
194
|
+
minWidth: v
|
|
195
|
+
},
|
|
196
|
+
children: [/* @__PURE__ */ _("colgroup", { children: [M.map((e) => /* @__PURE__ */ g("col", { style: { width: e.width || r.DEFAULT_WIDTH } }, e.key)), y ? /* @__PURE__ */ g("col", {
|
|
197
|
+
className: "spacer-col",
|
|
198
|
+
style: { width: "auto" }
|
|
199
|
+
}) : null] }), /* @__PURE__ */ g("tbody", { children: a.length === 0 ? C ? ne() : null : a.map((e, t) => {
|
|
200
|
+
let n = {};
|
|
201
|
+
if (m && typeof m == "function") {
|
|
202
|
+
let r = m(e, t, {
|
|
203
|
+
className: "",
|
|
204
|
+
style: {}
|
|
205
|
+
}) || {};
|
|
206
|
+
n = {
|
|
207
|
+
className: r.className,
|
|
208
|
+
style: r.style,
|
|
209
|
+
...r
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
let r = typeof T == "number" ? T + t : typeof e.dataIndex == "number" ? e.dataIndex : t;
|
|
213
|
+
return /* @__PURE__ */ _("tr", {
|
|
214
|
+
ref: S ? F : void 0,
|
|
215
|
+
style: {
|
|
216
|
+
height: re ? s : "auto",
|
|
217
|
+
...n.style
|
|
218
|
+
},
|
|
219
|
+
className: D("custom-table-row", n.className),
|
|
220
|
+
onClick: (n) => p?.(e, t, n),
|
|
221
|
+
"data-index": S ? r : void 0,
|
|
222
|
+
...n,
|
|
223
|
+
children: [P.map((n) => I(n, e, t)), y ? /* @__PURE__ */ g("td", { className: "spacer-cell" }) : null]
|
|
224
|
+
}, f(e, o, t));
|
|
225
|
+
}) })]
|
|
226
|
+
})
|
|
227
|
+
});
|
|
228
|
+
};
|
|
229
|
+
P.displayName = "TableBody";
|
|
230
|
+
var F = b(P), I = ({ leftFixedColumns: e = [], normalColumns: t = [], rightFixedColumns: n = [], footerData: i = {}, summary: a, render: o, enableFixed: l = !0, totalColumnsWidth: d = 0, needSpacer: f = !1 }) => {
|
|
231
|
+
let p = w(() => c(e), [e]), m = w(() => c(t), [t]), h = w(() => c(n), [n]), v = w(() => [
|
|
232
|
+
...p,
|
|
233
|
+
...m,
|
|
234
|
+
...h
|
|
235
|
+
], [
|
|
236
|
+
p,
|
|
237
|
+
m,
|
|
238
|
+
h
|
|
239
|
+
]), y = (e) => {
|
|
240
|
+
let t = (e.dataIndex ? i?.[e.dataIndex] : void 0) ?? a?.[e.key], { renderFooter: n } = e, r = n && typeof n == "function" ? n(t, e) : o && typeof o == "function" ? o(t, e) : t, c = { textAlign: e.align || "left" }, d = "custom-table-footer-cell";
|
|
241
|
+
if (l && e.fixed) {
|
|
242
|
+
let t = s(u(e, v), v, e.fixed);
|
|
243
|
+
t && (c = {
|
|
244
|
+
...c,
|
|
245
|
+
...t
|
|
246
|
+
}, d += e.fixed === "left" ? " fixed-left" : " fixed-right");
|
|
247
|
+
}
|
|
248
|
+
return /* @__PURE__ */ g("td", {
|
|
249
|
+
className: d,
|
|
250
|
+
style: c,
|
|
251
|
+
children: /* @__PURE__ */ g("div", {
|
|
252
|
+
className: "cell-content",
|
|
253
|
+
children: r
|
|
254
|
+
})
|
|
255
|
+
}, e.key);
|
|
256
|
+
};
|
|
257
|
+
return /* @__PURE__ */ g("div", {
|
|
258
|
+
className: "custom-table-footer",
|
|
259
|
+
style: w(() => {
|
|
260
|
+
let e = { minWidth: d };
|
|
261
|
+
return l && (e.position = "sticky", e.bottom = 0, e.zIndex = 10), e;
|
|
262
|
+
}, [l, d]),
|
|
263
|
+
children: /* @__PURE__ */ _("table", {
|
|
264
|
+
style: {
|
|
265
|
+
tableLayout: "fixed",
|
|
266
|
+
minWidth: d
|
|
267
|
+
},
|
|
268
|
+
children: [/* @__PURE__ */ _("colgroup", { children: [v.map((e) => /* @__PURE__ */ g("col", { style: { width: e.width || r.DEFAULT_WIDTH } }, e.key)), f ? /* @__PURE__ */ g("col", {
|
|
269
|
+
className: "spacer-col",
|
|
270
|
+
style: { width: "auto" }
|
|
271
|
+
}) : null] }), /* @__PURE__ */ g("tfoot", { children: /* @__PURE__ */ _("tr", { children: [
|
|
272
|
+
p.map((e) => y(e)),
|
|
273
|
+
m.map((e) => y(e)),
|
|
274
|
+
h.map((e) => y(e)),
|
|
275
|
+
f ? /* @__PURE__ */ g("td", { className: "spacer-cell" }) : null
|
|
276
|
+
] }) })]
|
|
277
|
+
})
|
|
278
|
+
});
|
|
279
|
+
};
|
|
280
|
+
I.displayName = "TableFooter";
|
|
281
|
+
var ne = b(I), re = [], ie = {
|
|
282
|
+
left: !0,
|
|
283
|
+
right: !0
|
|
284
|
+
}, ae = {
|
|
285
|
+
low: {
|
|
286
|
+
className: "bsy-row-height-low",
|
|
287
|
+
height: 34
|
|
288
|
+
},
|
|
289
|
+
middle: {
|
|
290
|
+
className: "bsy-row-height-middle",
|
|
291
|
+
height: 68
|
|
292
|
+
},
|
|
293
|
+
high: {
|
|
294
|
+
className: "bsy-row-height-high",
|
|
295
|
+
height: 106
|
|
296
|
+
},
|
|
297
|
+
auto: {
|
|
298
|
+
className: "bsy-row-height-auto",
|
|
299
|
+
height: "auto"
|
|
300
|
+
}
|
|
301
|
+
}, L = y(({ columns: o = [], dataSource: s = [], rowKey: l = "id", height: u, bordered: d = !0, emptyText: f, onRowClick: y, scroll: b, footerData: x, footerSummary: D, renderFooter: A, hasFooter: j = !1, onRow: N, onCell: P, rowHeightStyle: I = "low", resizable: L = !0, disabledResizeColumns: oe = re, minColumnWidth: se, maxColumnWidth: ce, onColumnResize: le, onColumnResizeEnd: ue, renderBody: de, estimateSize: fe, virtualEnabled: R, dataProcessor: z, headerRowSpan: pe, fixedShadowMask: me = ie, onRenderEmpty: he, overlayScrollbarOptions: B, wrapperStyle: ge }, _e) => {
|
|
302
|
+
let { t: ve } = e(), V = T(null), ye = T(null), H = T(null), U = T(/* @__PURE__ */ new Map()), W = te(V), G = W?.width ?? 0, be = W?.height ?? 0, [xe, Se] = E(0), [Ce, we] = E(!1), [Te, Ee] = E({
|
|
303
|
+
left: 0,
|
|
304
|
+
top: 0
|
|
305
|
+
}), [De, Oe] = E(t.HEADER_HEIGHT), K = w(() => c(o), [o]);
|
|
306
|
+
S(() => {
|
|
307
|
+
K.forEach((e) => {
|
|
308
|
+
U.current.set(e.key, e.width || r.DEFAULT_WIDTH);
|
|
309
|
+
});
|
|
310
|
+
}, [K]);
|
|
311
|
+
let ke = O((e) => U.current.get(e.key) || e.width || r.DEFAULT_WIDTH), Ae = O((e) => {
|
|
312
|
+
let t = K.findIndex((t) => t.key === e);
|
|
313
|
+
if (t === -1) return 0;
|
|
314
|
+
let n = K[t], r = h(K.slice(0, t + 1), (e) => ke(e));
|
|
315
|
+
return n.fixed === "left" ? r : r - (V.current?.scrollLeft || 0);
|
|
316
|
+
}), je = O((e) => {
|
|
317
|
+
H.current && (H.current.style.display = "block", H.current.style.left = `${Ae(e)}px`);
|
|
318
|
+
}), { isResizing: Me, resizingColumn: Ne, startResize: Pe } = m({
|
|
319
|
+
minColumnWidth: se || r.MIN_WIDTH,
|
|
320
|
+
maxColumnWidth: ce || r.MAX_WIDTH,
|
|
321
|
+
onColumnResizeEnd: O((e, t) => {
|
|
322
|
+
U.current.set(e, t), ue?.(e, t, U.current), H.current && (H.current.style.display = "none");
|
|
323
|
+
}),
|
|
324
|
+
onColumnResize: O((e, t, n) => {
|
|
325
|
+
U.current.set(t, n), le?.(t, n, U.current), je(t);
|
|
326
|
+
})
|
|
327
|
+
}), Fe = O((e, t, n) => {
|
|
328
|
+
je(e), Pe(e, t, n);
|
|
329
|
+
}), { className: Ie, height: q } = ae[I] || ae.auto, { virtualRows: Le, totalHeight: Re, paddingTop: ze, paddingBottom: Be, remeasure: J, rowRefCallback: Ve, isDynamicHeight: He, clearRowHeightCache: Ue, enabled: We } = p(s, w(() => ({
|
|
330
|
+
rowHeight: q,
|
|
331
|
+
overscan: n.DEFAULT_OVERSCAN,
|
|
332
|
+
estimateSize: fe,
|
|
333
|
+
...R === void 0 ? {} : { enabled: R }
|
|
334
|
+
}), [
|
|
335
|
+
q,
|
|
336
|
+
fe,
|
|
337
|
+
R
|
|
338
|
+
]), V);
|
|
339
|
+
ee(_e, () => ({
|
|
340
|
+
clearRowHeightCache: Ue,
|
|
341
|
+
remeasure: J
|
|
342
|
+
}), [Ue, J]);
|
|
343
|
+
let Ge = f || ve(t.EMPTY_TEXT_KEY);
|
|
344
|
+
S(() => {
|
|
345
|
+
J?.();
|
|
346
|
+
}, [q, J]);
|
|
347
|
+
let { leftFixedColumns: Y, normalColumns: Ke, rightFixedColumns: X } = w(() => a(o), [o]), qe = w(() => i(Y), [Y]), Je = w(() => i(X), [X]), { totalColumnsWidth: Z, needSpacer: Q } = w(() => {
|
|
348
|
+
let e = i(o);
|
|
349
|
+
return {
|
|
350
|
+
totalColumnsWidth: e,
|
|
351
|
+
needSpacer: e < G
|
|
352
|
+
};
|
|
353
|
+
}, [o, G]), [Ye] = k({ options: {
|
|
354
|
+
overflow: {
|
|
355
|
+
x: B?.overflowX ?? "scroll",
|
|
356
|
+
y: B?.overflowY ?? "scroll"
|
|
357
|
+
},
|
|
358
|
+
scrollbars: {
|
|
359
|
+
theme: B?.theme ?? "os-theme-bsy",
|
|
360
|
+
autoHide: B?.autoHide ?? "move",
|
|
361
|
+
autoHideDelay: 400
|
|
362
|
+
}
|
|
363
|
+
} });
|
|
364
|
+
C(() => {
|
|
365
|
+
if (!V.current) return;
|
|
366
|
+
let e = V.current, t = e.parentElement;
|
|
367
|
+
t && Ye({
|
|
368
|
+
target: t,
|
|
369
|
+
elements: { viewport: e }
|
|
370
|
+
});
|
|
371
|
+
}, [Ye]);
|
|
372
|
+
let Xe = w(() => {
|
|
373
|
+
let e = We ? Le.map((e) => {
|
|
374
|
+
let t = s[e.index];
|
|
375
|
+
return t && {
|
|
376
|
+
...t,
|
|
377
|
+
dataIndex: e.index
|
|
378
|
+
};
|
|
379
|
+
}) : s.map((e, t) => ({
|
|
380
|
+
...e,
|
|
381
|
+
dataIndex: t
|
|
382
|
+
}));
|
|
383
|
+
return z ? z(e) : e;
|
|
384
|
+
}, [
|
|
385
|
+
We,
|
|
386
|
+
Le,
|
|
387
|
+
s,
|
|
388
|
+
z
|
|
389
|
+
]), Ze = w(() => {
|
|
390
|
+
let e = {};
|
|
391
|
+
return d ? e.border = "1px solid #e0e0e0" : e.border = "none", (u || b?.y) && (e.maxHeight = u || b?.y), e;
|
|
392
|
+
}, [
|
|
393
|
+
d,
|
|
394
|
+
u,
|
|
395
|
+
b
|
|
396
|
+
]);
|
|
397
|
+
C(() => {
|
|
398
|
+
let e = V.current;
|
|
399
|
+
e && (Se(e.clientHeight), Ee({
|
|
400
|
+
left: e.offsetLeft,
|
|
401
|
+
top: e.offsetTop
|
|
402
|
+
}), Oe(ye.current?.clientHeight || t.HEADER_HEIGHT), we(e.scrollHeight > e.clientHeight));
|
|
403
|
+
}, [
|
|
404
|
+
W?.width,
|
|
405
|
+
W?.height,
|
|
406
|
+
s.length,
|
|
407
|
+
j,
|
|
408
|
+
pe
|
|
409
|
+
]);
|
|
410
|
+
let Qe = w(() => {
|
|
411
|
+
if (!be || !xe) return;
|
|
412
|
+
let e = d ? 2 : 0, n = xe - De - (j ? t.HEADER_HEIGHT : 0) - e;
|
|
413
|
+
return Math.max(0, n);
|
|
414
|
+
}, [
|
|
415
|
+
be,
|
|
416
|
+
xe,
|
|
417
|
+
De,
|
|
418
|
+
j,
|
|
419
|
+
d
|
|
420
|
+
]), $e = !!(u || b?.y), et, $, tt = !0;
|
|
421
|
+
if (!de && s.length === 0 && typeof he == "function") {
|
|
422
|
+
let e = he();
|
|
423
|
+
v.isValidElement(e) && e.type === "tr" ? et = e : e && ($ = e, tt = !1);
|
|
424
|
+
}
|
|
425
|
+
return /* @__PURE__ */ _("div", {
|
|
426
|
+
className: `custom-table ${Ce ? "has-y-scroll" : ""}`,
|
|
427
|
+
style: {
|
|
428
|
+
position: "relative",
|
|
429
|
+
height: "100%"
|
|
430
|
+
},
|
|
431
|
+
"data-overlayscrollbars-initialize": "",
|
|
432
|
+
children: [
|
|
433
|
+
/* @__PURE__ */ _("div", {
|
|
434
|
+
ref: V,
|
|
435
|
+
className: `custom-table-wrapper ${Me ? "resizing" : ""} ${Ie} os-enabled`,
|
|
436
|
+
style: {
|
|
437
|
+
...Ze,
|
|
438
|
+
...ge
|
|
439
|
+
},
|
|
440
|
+
children: [
|
|
441
|
+
/* @__PURE__ */ g(M, {
|
|
442
|
+
ref: ye,
|
|
443
|
+
columns: o,
|
|
444
|
+
enableFixed: $e,
|
|
445
|
+
height: t.HEADER_HEIGHT,
|
|
446
|
+
resizingColumn: Ne,
|
|
447
|
+
onResizeStart: L ? Fe : void 0,
|
|
448
|
+
disabledResizeColumns: oe,
|
|
449
|
+
totalColumnsWidth: Z,
|
|
450
|
+
needSpacer: Q,
|
|
451
|
+
headerRowSpan: pe
|
|
452
|
+
}),
|
|
453
|
+
/* @__PURE__ */ g("div", {
|
|
454
|
+
className: "custom-table-body-wrapper",
|
|
455
|
+
style: { position: "relative" },
|
|
456
|
+
children: /* @__PURE__ */ g("div", {
|
|
457
|
+
style: {
|
|
458
|
+
minHeight: Qe,
|
|
459
|
+
height: Re,
|
|
460
|
+
paddingBottom: Be > 0 ? `${Be}px` : void 0,
|
|
461
|
+
paddingTop: ze > 0 ? `${ze}px` : void 0,
|
|
462
|
+
position: "relative"
|
|
463
|
+
},
|
|
464
|
+
children: de ? de({
|
|
465
|
+
columns: o,
|
|
466
|
+
flatColumns: K,
|
|
467
|
+
leftFixedColumns: Y,
|
|
468
|
+
normalColumns: Ke,
|
|
469
|
+
rightFixedColumns: X,
|
|
470
|
+
totalColumnsWidth: Z,
|
|
471
|
+
needSpacer: Q,
|
|
472
|
+
rowRefCallback: Ve,
|
|
473
|
+
isDynamicHeight: He,
|
|
474
|
+
rowHeight: q,
|
|
475
|
+
onRowClick: y,
|
|
476
|
+
scrollRef: V,
|
|
477
|
+
virtualRows: Le,
|
|
478
|
+
virtualEnabled: We
|
|
479
|
+
}) : /* @__PURE__ */ g(F, {
|
|
480
|
+
leftFixedColumns: Y,
|
|
481
|
+
normalColumns: Ke,
|
|
482
|
+
rightFixedColumns: X,
|
|
483
|
+
dataSource: Xe,
|
|
484
|
+
rowKey: l,
|
|
485
|
+
rowHeight: q,
|
|
486
|
+
emptyText: Ge,
|
|
487
|
+
emptyRowContent: et,
|
|
488
|
+
showEmptyRow: tt,
|
|
489
|
+
onRowClick: y,
|
|
490
|
+
onRow: N,
|
|
491
|
+
onCell: P,
|
|
492
|
+
totalColumnsWidth: Z,
|
|
493
|
+
needSpacer: Q,
|
|
494
|
+
rowRefCallback: Ve,
|
|
495
|
+
isDynamicHeight: He
|
|
496
|
+
})
|
|
497
|
+
})
|
|
498
|
+
}),
|
|
499
|
+
j && (x || D || A) ? /* @__PURE__ */ g(ne, {
|
|
500
|
+
leftFixedColumns: Y,
|
|
501
|
+
normalColumns: Ke,
|
|
502
|
+
rightFixedColumns: X,
|
|
503
|
+
footerData: x,
|
|
504
|
+
summary: D,
|
|
505
|
+
render: A,
|
|
506
|
+
enableFixed: $e,
|
|
507
|
+
totalColumnsWidth: Z,
|
|
508
|
+
needSpacer: Q
|
|
509
|
+
}) : null
|
|
510
|
+
]
|
|
511
|
+
}),
|
|
512
|
+
$ ? /* @__PURE__ */ g("div", {
|
|
513
|
+
className: "custom-table-empty-overlay",
|
|
514
|
+
style: {
|
|
515
|
+
height: Qe,
|
|
516
|
+
left: Te.left,
|
|
517
|
+
top: Te.top + De + (d ? 1 : 0),
|
|
518
|
+
width: G || void 0
|
|
519
|
+
},
|
|
520
|
+
children: /* @__PURE__ */ g("div", {
|
|
521
|
+
className: "custom-table-empty-overlay-inner",
|
|
522
|
+
children: $
|
|
523
|
+
})
|
|
524
|
+
}) : null,
|
|
525
|
+
L ? /* @__PURE__ */ g("div", {
|
|
526
|
+
className: "custom-table-resize-handle",
|
|
527
|
+
ref: H
|
|
528
|
+
}) : null,
|
|
529
|
+
me.left !== !1 && qe > 0 ? /* @__PURE__ */ g("div", {
|
|
530
|
+
className: "fixed-shadow-mask left",
|
|
531
|
+
style: { width: qe }
|
|
532
|
+
}) : null,
|
|
533
|
+
!Q && me.right !== !1 && Je > 0 ? /* @__PURE__ */ g("div", {
|
|
534
|
+
className: "fixed-shadow-mask right",
|
|
535
|
+
style: { width: Je }
|
|
536
|
+
}) : null
|
|
537
|
+
]
|
|
538
|
+
});
|
|
539
|
+
});
|
|
540
|
+
L.displayName = "Table";
|
|
541
|
+
var oe = v.memo(L);
|
|
542
|
+
//#endregion
|
|
543
|
+
export { F as n, oe as t };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/components/Table/constants.ts
|
|
2
|
+
var e = {
|
|
3
|
+
ROW_HEIGHT: 34,
|
|
4
|
+
HEADER_HEIGHT: 34,
|
|
5
|
+
EMPTY_TEXT_KEY: "table.empty"
|
|
6
|
+
}, t = {
|
|
7
|
+
MIN_HEIGHT: 34,
|
|
8
|
+
MAX_HEIGHT: 200
|
|
9
|
+
}, n = {
|
|
10
|
+
DEFAULT_OVERSCAN: 10,
|
|
11
|
+
ENABLE_AUTO_SIZE: 40
|
|
12
|
+
}, r = {
|
|
13
|
+
DEFAULT_WIDTH: 120,
|
|
14
|
+
MIN_WIDTH: 60,
|
|
15
|
+
MAX_WIDTH: 1e3
|
|
16
|
+
}, i = {
|
|
17
|
+
ASC: "asc",
|
|
18
|
+
DESC: "desc",
|
|
19
|
+
NONE: null
|
|
20
|
+
}, a = {
|
|
21
|
+
wrapper: "custom-table-wrapper",
|
|
22
|
+
body: "custom-table-body"
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { a, i, e as n, n as o, t as r, r as t };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { o as e, r as t, t as n } from "./constants-CKqc9Os_.js";
|
|
2
|
+
import { clamp as r } from "lodash-es";
|
|
3
|
+
import { useCallback as i, useEffect as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
4
|
+
import { useEventListener as l, useLatest as u, useMemoizedFn as d } from "ahooks";
|
|
5
|
+
import { useVirtualizer as f } from "@tanstack/react-virtual";
|
|
6
|
+
//#region src/components/Table/hooks/useTableVirtual.ts
|
|
7
|
+
var p = [];
|
|
8
|
+
function m(n, c, l) {
|
|
9
|
+
let m = u(n), h = u(c.estimateSize), g = c.rowHeight, _ = c.minRowHeight || t.MIN_HEIGHT, v = c.maxRowHeight || t.MAX_HEIGHT, y = i((e) => {
|
|
10
|
+
let n = m.current ?? [], i = h.current;
|
|
11
|
+
if (typeof i == "function") return i(e, n[e]);
|
|
12
|
+
let a = n[e];
|
|
13
|
+
return a && typeof a.rowHeight == "number" ? r(a.rowHeight, _, v) : typeof g == "string" ? t.MIN_HEIGHT : r(typeof g == "function" ? g(e) : g || t.MIN_HEIGHT, _, v);
|
|
14
|
+
}, [
|
|
15
|
+
g,
|
|
16
|
+
_,
|
|
17
|
+
v,
|
|
18
|
+
h,
|
|
19
|
+
m
|
|
20
|
+
]), b = o(() => c.enabled === !0 ? !0 : c.enabled === !1 ? !1 : n.length > e.ENABLE_AUTO_SIZE, [c.enabled, n.length]), x = typeof g == "string", S = s(/* @__PURE__ */ new Map()), C = s(null), w = o(() => {
|
|
21
|
+
if (n.length === 0) return null;
|
|
22
|
+
let e = n[0]?.uniqueId || n[0]?._id || n[0]?.id, t = n[n.length - 1]?.uniqueId || n[n.length - 1]?._id || n[n.length - 1]?.id;
|
|
23
|
+
return `${String(e)}-${String(t)}-${n.length}`;
|
|
24
|
+
}, [n]);
|
|
25
|
+
a(() => {
|
|
26
|
+
C.current !== null && C.current !== w && S.current.clear(), C.current = w;
|
|
27
|
+
}, [w]), a(() => {
|
|
28
|
+
let e = S.current;
|
|
29
|
+
return () => {
|
|
30
|
+
e.clear();
|
|
31
|
+
};
|
|
32
|
+
}, []);
|
|
33
|
+
let T = i((e) => {
|
|
34
|
+
let t = m.current ?? [];
|
|
35
|
+
return t[e]?.uniqueId || t[e]?._id || t[e]?.id || `table-row-${e}`;
|
|
36
|
+
}, [m]), E = f({
|
|
37
|
+
count: b ? n.length : 0,
|
|
38
|
+
getScrollElement: () => l.current,
|
|
39
|
+
estimateSize: y,
|
|
40
|
+
overscan: c.overscan ?? e.DEFAULT_OVERSCAN,
|
|
41
|
+
enabled: b,
|
|
42
|
+
measureElement: x ? (e) => {
|
|
43
|
+
let n = e.getAttribute("data-index");
|
|
44
|
+
if (!n) return t.MIN_HEIGHT;
|
|
45
|
+
let r = S.current, i = r.get(n);
|
|
46
|
+
if (i !== void 0) return i;
|
|
47
|
+
let a = e.getBoundingClientRect().height, o = Math.max(t.MIN_HEIGHT, a);
|
|
48
|
+
return r.set(n, o), o;
|
|
49
|
+
} : void 0,
|
|
50
|
+
getItemKey: T
|
|
51
|
+
}), D = b ? E.getTotalSize() : 0, O = b ? E.getVirtualItems() : p, k = b && O.length > 0 && O[0].start || 0, A = b && O.length > 0 ? D - (O[O.length - 1].end || 0) : 0, j = d(() => {
|
|
52
|
+
S.current.clear(), typeof E.measure == "function" && E.measure();
|
|
53
|
+
}), M = d((e) => {
|
|
54
|
+
if (e === void 0) {
|
|
55
|
+
S.current.clear();
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
let t = Array.isArray(e) ? e : [e], n = S.current, r = m.current ?? [];
|
|
59
|
+
t.forEach((e) => {
|
|
60
|
+
if (typeof e == "number") n.delete(String(e));
|
|
61
|
+
else {
|
|
62
|
+
let t = r.findIndex((t) => t.uniqueId === e || t._id === e || t.id === e);
|
|
63
|
+
t !== -1 && n.delete(String(t));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
return {
|
|
68
|
+
enabled: b,
|
|
69
|
+
virtualRows: O,
|
|
70
|
+
rowRefCallback: E.measureElement,
|
|
71
|
+
totalHeight: D,
|
|
72
|
+
paddingTop: k,
|
|
73
|
+
paddingBottom: A,
|
|
74
|
+
remeasure: j,
|
|
75
|
+
clearRowHeightCache: M,
|
|
76
|
+
isDynamicHeight: x
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/components/Table/hooks/useColumnResize.ts
|
|
81
|
+
function h(e = {}) {
|
|
82
|
+
let { minColumnWidth: t = n.MIN_WIDTH, maxColumnWidth: i = n.MAX_WIDTH, onColumnResize: a, onColumnResizeEnd: o } = e, [s, f] = c(null), p = u(s), m = u(a), h = u(o), g = d((e, t, n) => {
|
|
83
|
+
f({
|
|
84
|
+
columnKey: e,
|
|
85
|
+
startWidth: t,
|
|
86
|
+
startX: n
|
|
87
|
+
});
|
|
88
|
+
}), _ = (e, n) => r(n.startWidth + e - n.startX, t, i);
|
|
89
|
+
return l("mousemove", (e) => {
|
|
90
|
+
let t = p.current;
|
|
91
|
+
t && m.current?.(e, t.columnKey, _(e.clientX, t));
|
|
92
|
+
}, {
|
|
93
|
+
target: document,
|
|
94
|
+
enable: !!s
|
|
95
|
+
}), l("mouseup", (e) => {
|
|
96
|
+
let t = p.current;
|
|
97
|
+
t && (h.current?.(t.columnKey, _(e.clientX, t)), f(null));
|
|
98
|
+
}, {
|
|
99
|
+
target: document,
|
|
100
|
+
enable: !!s
|
|
101
|
+
}), {
|
|
102
|
+
isResizing: !!s,
|
|
103
|
+
resizingColumn: s?.columnKey,
|
|
104
|
+
startResize: g
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { m as n, h as t };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../vendors/LocaleContext-BJdHS0sH.js";
|
|
2
|
+
import "../vendors/useLocale-BTz4slNW.js";
|
|
3
|
+
import { a as e, n as t, t as n } from "./constants-CKqc9Os_.js";
|
|
4
|
+
import { a as r, c as i, d as a, f as o, n as s, o as c, r as l, t as u, u as d } from "./processRowspan-BCzfI5un.js";
|
|
5
|
+
import { n as f, t as p } from "./Table-3-kFIm5v.js";
|
|
6
|
+
import { n as m, t as h } from "./hooks-CJ2CnSep.js";
|
|
7
|
+
export { n as COLUMN_DEFAULTS, t as DEFAULT_CONFIG, e as TABLE_DOM, p as Table, p as default, f as TableBody, r as calculateFixedOffset, c as expandLeafColumns, u as getCellRowspan, i as getColumnsWidth, d as getRowKey, s as processRowspan, l as shouldRenderCell, a as sortData, o as splitFixedColumns, h as useColumnResize, m as useTableVirtual };
|