@pisell/materials 1.0.1059 → 1.0.1060
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/README.md +285 -285
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +27 -27
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +26 -26
- package/es/components/PisellLayouts/index.d.ts +2 -1
- package/es/components/PisellLayouts/index.js +3 -1
- package/es/components/cardMetricItem/index.js +2 -2
- package/es/components/pisellFilter/type.d.ts +4 -2
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +1 -1
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +468 -201
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.less +70 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +13 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +494 -63
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +22 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.js +203 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.less +189 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +37 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.js +341 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.less +89 -0
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +39 -0
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.js +432 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +17 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.js +131 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.less +7 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +11 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +444 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +153 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +34 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +130 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +131 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +6 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.js +69 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +361 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +237 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.d.ts +7 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.js +32 -6
- package/es/components/pisellFloorMapLayout/components/MapLayer.d.ts +4 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.js +11 -3
- package/es/components/pisellFloorMapLayout/components/ViewControls.js +2 -2
- package/es/components/pisellFloorMapLayout/components/ViewControls.less +3 -2
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +11 -0
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +27 -0
- package/es/components/pisellFloorMapLayout/components/index.d.ts +14 -0
- package/es/components/pisellFloorMapLayout/components/index.js +8 -1
- package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +16 -0
- package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.js +21 -0
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +27 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +60 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +436 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.d.ts +21 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.js +122 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +67 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +281 -0
- package/es/components/pisellFloorMapLayout/index.d.ts +9 -2
- package/es/components/pisellFloorMapLayout/index.js +7 -2
- package/es/components/pisellFloorMapLayout/locales.d.ts +186 -0
- package/es/components/pisellFloorMapLayout/locales.js +185 -0
- package/es/components/pisellFloorMapLayout/types.d.ts +346 -1
- package/es/components/pisellFloorMapLayout/types.js +148 -1
- package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +20 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.js +129 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +87 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +26 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +47 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +11 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +69 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +88 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapStageDefaults.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapStageDefaults.js +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +108 -0
- package/es/components/pisellFloorMapLayout/utils/layoutMeasurements.d.ts +30 -0
- package/es/components/pisellFloorMapLayout/utils/layoutMeasurements.js +125 -0
- package/es/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.d.ts +7 -0
- package/es/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.js +29 -0
- package/es/components/pisellFloorMapLayout/utils/snap.d.ts +10 -0
- package/es/components/pisellFloorMapLayout/utils/snap.js +21 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.js +175 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.less +129 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +10 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.js +237 -0
- package/es/components/pisellHierarchicalSummaryList/components/Row.d.ts +35 -0
- package/es/components/pisellHierarchicalSummaryList/components/Row.js +313 -0
- package/es/components/pisellHierarchicalSummaryList/components/index.d.ts +1 -0
- package/es/components/pisellHierarchicalSummaryList/components/index.js +1 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/index.d.ts +2 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/index.js +1 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +15 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.js +34 -0
- package/es/components/pisellHierarchicalSummaryList/index.d.ts +5 -0
- package/es/components/pisellHierarchicalSummaryList/index.js +5 -0
- package/es/components/pisellHierarchicalSummaryList/types.d.ts +248 -0
- package/es/components/pisellHierarchicalSummaryList/types.js +1 -0
- package/es/components/pisellLookup/PisellLookup.js +82 -82
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +34 -34
- package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +2 -1
- package/es/components/pisellRecordBoard/PisellRecordBoard.js +70 -18
- package/es/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +4 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.stories.js +1276 -344
- package/es/components/pisellRecordBoard/index.d.ts +7 -2
- package/es/components/pisellRecordBoard/index.js +2 -1
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +1 -3
- package/es/components/pisellRecordBoard/shellFrame/FloorMap.d.ts +14 -0
- package/es/components/pisellRecordBoard/shellFrame/FloorMap.js +15 -0
- package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +16 -0
- package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.js +11 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +47 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +53 -6
- package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +3 -3
- package/es/components/pisellRecordBoard/shellFrame/index.d.ts +4 -10
- package/es/components/pisellRecordBoard/shellFrame/index.js +99 -19
- package/es/components/pisellRecordBoard/types.d.ts +55 -1
- package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
- package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +57 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +10 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.js +156 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.less +88 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.stories.d.ts +12 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.stories.js +105 -0
- package/es/components/pisellReservationSchedule/index.d.ts +2 -0
- package/es/components/pisellReservationSchedule/index.js +1 -0
- package/es/components/pisellReservationSchedule/locales.d.ts +25 -0
- package/es/components/pisellReservationSchedule/locales.js +24 -0
- package/es/components/pisellReservationSchedule/types.d.ts +42 -0
- package/es/components/pisellReservationSchedule/types.js +1 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +91 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +49 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.js +197 -0
- package/es/components/pisellReservationScheduleBand/index.d.ts +2 -0
- package/es/components/pisellReservationScheduleBand/index.js +1 -0
- package/es/components/pisellReservationScheduleBand/types.d.ts +45 -0
- package/es/components/pisellReservationScheduleBand/types.js +1 -0
- package/es/components/pisellRow/index.js +7 -7
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +512 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +378 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.stories.js +290 -0
- package/es/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +14 -0
- package/es/components/pisellTimeNavigator/components/BackgroundLayer.js +30 -0
- package/es/components/pisellTimeNavigator/components/CursorLayer.d.ts +20 -0
- package/es/components/pisellTimeNavigator/components/CursorLayer.js +46 -0
- package/es/components/pisellTimeNavigator/components/GestureLayer.d.ts +31 -0
- package/es/components/pisellTimeNavigator/components/GestureLayer.js +82 -0
- package/es/components/pisellTimeNavigator/components/NowButton.d.ts +14 -0
- package/es/components/pisellTimeNavigator/components/NowButton.js +38 -0
- package/es/components/pisellTimeNavigator/components/ScaleLayer.d.ts +17 -0
- package/es/components/pisellTimeNavigator/components/ScaleLayer.js +51 -0
- package/es/components/pisellTimeNavigator/components/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/components/index.js +5 -0
- package/es/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/hooks/index.js +3 -0
- package/es/components/pisellTimeNavigator/hooks/useDragInertia.d.ts +14 -0
- package/es/components/pisellTimeNavigator/hooks/useDragInertia.js +109 -0
- package/es/components/pisellTimeNavigator/hooks/useRealtime.d.ts +5 -0
- package/es/components/pisellTimeNavigator/hooks/useRealtime.js +16 -0
- package/es/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +27 -0
- package/es/components/pisellTimeNavigator/hooks/useTimeAxis.js +76 -0
- package/es/components/pisellTimeNavigator/index.d.ts +4 -0
- package/es/components/pisellTimeNavigator/index.js +3 -0
- package/es/components/pisellTimeNavigator/locales.d.ts +22 -0
- package/es/components/pisellTimeNavigator/locales.js +21 -0
- package/es/components/pisellTimeNavigator/types.d.ts +145 -0
- package/es/components/pisellTimeNavigator/types.js +1 -0
- package/es/components/pisellTimeNavigator/utils/index.d.ts +26 -0
- package/es/components/pisellTimeNavigator/utils/index.js +102 -0
- package/es/index.d.ts +15 -5
- package/es/index.js +23 -17
- package/es/locales/en-US.d.ts +2 -0
- package/es/locales/en-US.js +6 -4
- package/es/locales/zh-CN.d.ts +2 -0
- package/es/locales/zh-CN.js +6 -4
- package/es/locales/zh-TW.d.ts +2 -0
- package/es/locales/zh-TW.js +6 -4
- package/lib/components/PisellLayouts/index.d.ts +2 -1
- package/lib/components/PisellLayouts/index.js +13 -1
- package/lib/components/pisellFilter/type.d.ts +4 -2
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +1 -1
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +562 -180
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.less +70 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +13 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +682 -84
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +22 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.js +237 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.less +189 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +37 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.js +358 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.less +89 -0
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +39 -0
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.js +482 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +17 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.js +117 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.less +7 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +11 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +434 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +153 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +34 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +188 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +131 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +6 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.js +94 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +333 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +237 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.d.ts +7 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.js +26 -5
- package/lib/components/pisellFloorMapLayout/components/MapLayer.d.ts +4 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.js +7 -2
- package/lib/components/pisellFloorMapLayout/components/ViewControls.less +3 -2
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +11 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +63 -0
- package/lib/components/pisellFloorMapLayout/components/index.d.ts +14 -0
- package/lib/components/pisellFloorMapLayout/components/index.js +23 -2
- package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +16 -0
- package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.js +54 -0
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +46 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +60 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +429 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.d.ts +21 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.js +146 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +67 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +263 -0
- package/lib/components/pisellFloorMapLayout/index.d.ts +9 -2
- package/lib/components/pisellFloorMapLayout/index.js +31 -2
- package/lib/components/pisellFloorMapLayout/locales.d.ts +186 -0
- package/lib/components/pisellFloorMapLayout/locales.js +206 -0
- package/lib/components/pisellFloorMapLayout/types.d.ts +346 -1
- package/lib/components/pisellFloorMapLayout/types.js +15 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +20 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.js +126 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +66 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +26 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +61 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +11 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +70 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +135 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapStageDefaults.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapStageDefaults.js +33 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +128 -0
- package/lib/components/pisellFloorMapLayout/utils/layoutMeasurements.d.ts +30 -0
- package/lib/components/pisellFloorMapLayout/utils/layoutMeasurements.js +96 -0
- package/lib/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.d.ts +7 -0
- package/lib/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.js +41 -0
- package/lib/components/pisellFloorMapLayout/utils/snap.d.ts +10 -0
- package/lib/components/pisellFloorMapLayout/utils/snap.js +43 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.js +179 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.less +129 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +10 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.js +218 -0
- package/lib/components/pisellHierarchicalSummaryList/components/Row.d.ts +35 -0
- package/lib/components/pisellHierarchicalSummaryList/components/Row.js +343 -0
- package/lib/components/pisellHierarchicalSummaryList/components/index.d.ts +1 -0
- package/lib/components/pisellHierarchicalSummaryList/components/index.js +29 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/index.d.ts +2 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/index.js +29 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +15 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.js +51 -0
- package/lib/components/pisellHierarchicalSummaryList/index.d.ts +5 -0
- package/lib/components/pisellHierarchicalSummaryList/index.js +31 -0
- package/lib/components/pisellHierarchicalSummaryList/types.d.ts +248 -0
- package/lib/components/pisellHierarchicalSummaryList/types.js +17 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +2 -1
- package/lib/components/pisellRecordBoard/PisellRecordBoard.js +54 -8
- package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +4 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.js +915 -25
- package/lib/components/pisellRecordBoard/index.d.ts +7 -2
- package/lib/components/pisellRecordBoard/index.js +1 -0
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +8 -2
- package/lib/components/pisellRecordBoard/shellFrame/FloorMap.d.ts +14 -0
- package/lib/components/pisellRecordBoard/shellFrame/FloorMap.js +27 -0
- package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +16 -0
- package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.js +45 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +47 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +48 -4
- package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +4 -10
- package/lib/components/pisellRecordBoard/shellFrame/index.js +87 -6
- package/lib/components/pisellRecordBoard/types.d.ts +55 -1
- package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
- package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +88 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +10 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.js +200 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.less +88 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.stories.d.ts +12 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.stories.js +116 -0
- package/lib/components/pisellReservationSchedule/index.d.ts +2 -0
- package/lib/components/pisellReservationSchedule/index.js +29 -0
- package/lib/components/pisellReservationSchedule/locales.d.ts +25 -0
- package/lib/components/pisellReservationSchedule/locales.js +47 -0
- package/lib/components/pisellReservationSchedule/types.d.ts +42 -0
- package/lib/components/pisellReservationSchedule/types.js +17 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +127 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +49 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.js +181 -0
- package/lib/components/pisellReservationScheduleBand/index.d.ts +2 -0
- package/lib/components/pisellReservationScheduleBand/index.js +29 -0
- package/lib/components/pisellReservationScheduleBand/types.d.ts +45 -0
- package/lib/components/pisellReservationScheduleBand/types.js +17 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +602 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +378 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.stories.js +273 -0
- package/lib/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +14 -0
- package/lib/components/pisellTimeNavigator/components/BackgroundLayer.js +81 -0
- package/lib/components/pisellTimeNavigator/components/CursorLayer.d.ts +20 -0
- package/lib/components/pisellTimeNavigator/components/CursorLayer.js +74 -0
- package/lib/components/pisellTimeNavigator/components/GestureLayer.d.ts +31 -0
- package/lib/components/pisellTimeNavigator/components/GestureLayer.js +159 -0
- package/lib/components/pisellTimeNavigator/components/NowButton.d.ts +14 -0
- package/lib/components/pisellTimeNavigator/components/NowButton.js +81 -0
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.d.ts +17 -0
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.js +95 -0
- package/lib/components/pisellTimeNavigator/components/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/components/index.js +41 -0
- package/lib/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/hooks/index.js +35 -0
- package/lib/components/pisellTimeNavigator/hooks/useDragInertia.d.ts +14 -0
- package/lib/components/pisellTimeNavigator/hooks/useDragInertia.js +136 -0
- package/lib/components/pisellTimeNavigator/hooks/useRealtime.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/hooks/useRealtime.js +49 -0
- package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +27 -0
- package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.js +81 -0
- package/lib/components/pisellTimeNavigator/index.d.ts +4 -0
- package/lib/components/pisellTimeNavigator/index.js +42 -0
- package/lib/components/pisellTimeNavigator/locales.d.ts +22 -0
- package/lib/components/pisellTimeNavigator/locales.js +41 -0
- package/lib/components/pisellTimeNavigator/types.d.ts +145 -0
- package/lib/components/pisellTimeNavigator/types.js +17 -0
- package/lib/components/pisellTimeNavigator/utils/index.d.ts +26 -0
- package/lib/components/pisellTimeNavigator/utils/index.js +98 -0
- package/lib/index.d.ts +15 -5
- package/lib/index.js +35 -0
- package/lib/locales/en-US.d.ts +2 -0
- package/lib/locales/en-US.js +2 -0
- package/lib/locales/zh-CN.d.ts +2 -0
- package/lib/locales/zh-CN.js +2 -0
- package/lib/locales/zh-TW.d.ts +2 -0
- package/lib/locales/zh-TW.js +2 -0
- package/lowcode/floor-map-layout-provider/meta.ts +65 -0
- package/lowcode/pisell-floor-map-layout/meta.ts +3820 -1
- package/lowcode/pisell-hierarchical-summary-list/meta.ts +244 -0
- package/lowcode/pisell-reservation-schedule/index.ts +3 -0
- package/lowcode/pisell-reservation-schedule/meta.ts +69 -0
- package/lowcode/pisell-reservation-schedule/snippets.ts +1 -0
- package/lowcode/pisell-reservation-schedule-band/index.ts +3 -0
- package/lowcode/pisell-reservation-schedule-band/meta.ts +96 -0
- package/lowcode/pisell-reservation-schedule-band/snippets.ts +1 -0
- package/lowcode/pisell-time-navigator/index.ts +3 -0
- package/lowcode/pisell-time-navigator/meta.ts +298 -0
- package/lowcode/pisell-time-navigator/snippets.ts +1 -0
- package/lowcode/render-figma-style-round-table-card/meta.ts +589 -0
- package/lowcode/render-figma-style-table-card/meta.ts +589 -0
- package/package.json +4 -4
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellTimeNavigator/components/NowButton.tsx
|
|
30
|
+
var NowButton_exports = {};
|
|
31
|
+
__export(NowButton_exports, {
|
|
32
|
+
NowButton: () => NowButton
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(NowButton_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var I18N_NOW = "pisell-time-navigator.now";
|
|
39
|
+
function NowButton({
|
|
40
|
+
orientation,
|
|
41
|
+
onClick,
|
|
42
|
+
style,
|
|
43
|
+
className,
|
|
44
|
+
renderCustom
|
|
45
|
+
}) {
|
|
46
|
+
const raw = import_utils.locales.getText(I18N_NOW);
|
|
47
|
+
const label = raw && raw !== I18N_NOW ? raw : "Now";
|
|
48
|
+
if (renderCustom) {
|
|
49
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
50
|
+
"button",
|
|
51
|
+
{
|
|
52
|
+
type: "button",
|
|
53
|
+
className: (0, import_classnames.default)("pisell-time-navigator-now", className),
|
|
54
|
+
onClick,
|
|
55
|
+
style,
|
|
56
|
+
"aria-label": label
|
|
57
|
+
},
|
|
58
|
+
renderCustom()
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
62
|
+
"button",
|
|
63
|
+
{
|
|
64
|
+
type: "button",
|
|
65
|
+
className: (0, import_classnames.default)(
|
|
66
|
+
"pisell-time-navigator-now",
|
|
67
|
+
`pisell-time-navigator-now--${orientation}`,
|
|
68
|
+
className
|
|
69
|
+
),
|
|
70
|
+
onClick,
|
|
71
|
+
style,
|
|
72
|
+
"aria-label": label
|
|
73
|
+
},
|
|
74
|
+
/* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-time-navigator-now-icon", "aria-hidden": true }),
|
|
75
|
+
/* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-time-navigator-now-label" }, label)
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
79
|
+
0 && (module.exports = {
|
|
80
|
+
NowButton
|
|
81
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Dayjs } from 'dayjs';
|
|
3
|
+
export interface ScaleLayerProps {
|
|
4
|
+
orientation: 'horizontal' | 'vertical';
|
|
5
|
+
ticks: Dayjs[];
|
|
6
|
+
stepMinutes: number;
|
|
7
|
+
majorStepMinutes: number;
|
|
8
|
+
timeFormat: string;
|
|
9
|
+
locale?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 刻度层:渲染时间刻度与标签
|
|
15
|
+
* 横向:整点数字 + 小圆点;竖向:整点/半点数字 + 分割线
|
|
16
|
+
*/
|
|
17
|
+
export declare function ScaleLayer({ orientation, ticks, stepMinutes, majorStepMinutes, timeFormat, locale, style, className, }: ScaleLayerProps): JSX.Element;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellTimeNavigator/components/ScaleLayer.tsx
|
|
30
|
+
var ScaleLayer_exports = {};
|
|
31
|
+
__export(ScaleLayer_exports, {
|
|
32
|
+
ScaleLayer: () => ScaleLayer
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ScaleLayer_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
function ScaleLayer({
|
|
38
|
+
orientation,
|
|
39
|
+
ticks,
|
|
40
|
+
stepMinutes,
|
|
41
|
+
majorStepMinutes,
|
|
42
|
+
timeFormat,
|
|
43
|
+
locale,
|
|
44
|
+
style,
|
|
45
|
+
className
|
|
46
|
+
}) {
|
|
47
|
+
const isHorizontal = orientation === "horizontal";
|
|
48
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
className: (0, import_classnames.default)(
|
|
52
|
+
"pisell-time-navigator-scale",
|
|
53
|
+
`pisell-time-navigator-scale--${orientation}`,
|
|
54
|
+
className
|
|
55
|
+
),
|
|
56
|
+
style
|
|
57
|
+
},
|
|
58
|
+
ticks.map((tick, i) => {
|
|
59
|
+
const isMajor = tick.minute() % majorStepMinutes === 0;
|
|
60
|
+
const label = isHorizontal && isMajor ? locale ? tick.locale(locale).format("H") : tick.format("H") : locale ? tick.locale(locale).format(timeFormat) : tick.format(timeFormat);
|
|
61
|
+
if (isHorizontal) {
|
|
62
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
key: i,
|
|
66
|
+
className: (0, import_classnames.default)(
|
|
67
|
+
"pisell-time-navigator-scale-cell",
|
|
68
|
+
"pisell-time-navigator-scale-cell--h",
|
|
69
|
+
{ "pisell-time-navigator-scale-cell--major": isMajor }
|
|
70
|
+
)
|
|
71
|
+
},
|
|
72
|
+
isMajor && /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-time-navigator-scale-label" }, label),
|
|
73
|
+
!isMajor && /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-time-navigator-scale-dot", "aria-hidden": true })
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
key: i,
|
|
80
|
+
className: (0, import_classnames.default)(
|
|
81
|
+
"pisell-time-navigator-scale-cell",
|
|
82
|
+
"pisell-time-navigator-scale-cell--v",
|
|
83
|
+
{ "pisell-time-navigator-scale-cell--major": isMajor }
|
|
84
|
+
)
|
|
85
|
+
},
|
|
86
|
+
/* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-time-navigator-scale-divider", "aria-hidden": true }),
|
|
87
|
+
isMajor && /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-time-navigator-scale-label" }, label)
|
|
88
|
+
);
|
|
89
|
+
})
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
93
|
+
0 && (module.exports = {
|
|
94
|
+
ScaleLayer
|
|
95
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellTimeNavigator/components/index.tsx
|
|
20
|
+
var components_exports = {};
|
|
21
|
+
__export(components_exports, {
|
|
22
|
+
BackgroundLayer: () => import_BackgroundLayer.BackgroundLayer,
|
|
23
|
+
CursorLayer: () => import_CursorLayer.CursorLayer,
|
|
24
|
+
GestureLayer: () => import_GestureLayer.GestureLayer,
|
|
25
|
+
NowButton: () => import_NowButton.NowButton,
|
|
26
|
+
ScaleLayer: () => import_ScaleLayer.ScaleLayer
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(components_exports);
|
|
29
|
+
var import_BackgroundLayer = require("./BackgroundLayer");
|
|
30
|
+
var import_CursorLayer = require("./CursorLayer");
|
|
31
|
+
var import_GestureLayer = require("./GestureLayer");
|
|
32
|
+
var import_NowButton = require("./NowButton");
|
|
33
|
+
var import_ScaleLayer = require("./ScaleLayer");
|
|
34
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
BackgroundLayer,
|
|
37
|
+
CursorLayer,
|
|
38
|
+
GestureLayer,
|
|
39
|
+
NowButton,
|
|
40
|
+
ScaleLayer
|
|
41
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { useTimeAxis } from './useTimeAxis';
|
|
2
|
+
export type { UseTimeAxisOptions, TimeAxisState } from './useTimeAxis';
|
|
3
|
+
export { useRealtime } from './useRealtime';
|
|
4
|
+
export { useDragInertia } from './useDragInertia';
|
|
5
|
+
export type { UseDragInertiaOptions } from './useDragInertia';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellTimeNavigator/hooks/index.ts
|
|
20
|
+
var hooks_exports = {};
|
|
21
|
+
__export(hooks_exports, {
|
|
22
|
+
useDragInertia: () => import_useDragInertia.useDragInertia,
|
|
23
|
+
useRealtime: () => import_useRealtime.useRealtime,
|
|
24
|
+
useTimeAxis: () => import_useTimeAxis.useTimeAxis
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(hooks_exports);
|
|
27
|
+
var import_useTimeAxis = require("./useTimeAxis");
|
|
28
|
+
var import_useRealtime = require("./useRealtime");
|
|
29
|
+
var import_useDragInertia = require("./useDragInertia");
|
|
30
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
+
0 && (module.exports = {
|
|
32
|
+
useDragInertia,
|
|
33
|
+
useRealtime,
|
|
34
|
+
useTimeAxis
|
|
35
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface UseDragInertiaOptions {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
orientation: 'horizontal' | 'vertical';
|
|
4
|
+
getScrollContainer: () => HTMLElement | null;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* 惯性滚动:根据拖动末段速度在松手后继续滚动并衰减
|
|
8
|
+
*/
|
|
9
|
+
export declare function useDragInertia(options: UseDragInertiaOptions): {
|
|
10
|
+
onPointerDown: (e: React.PointerEvent) => void;
|
|
11
|
+
onPointerMove: (e: React.PointerEvent) => void;
|
|
12
|
+
onPointerUp: (e: React.PointerEvent) => void;
|
|
13
|
+
stopInertia: () => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellTimeNavigator/hooks/useDragInertia.ts
|
|
20
|
+
var useDragInertia_exports = {};
|
|
21
|
+
__export(useDragInertia_exports, {
|
|
22
|
+
useDragInertia: () => useDragInertia
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(useDragInertia_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var DECAY = 0.95;
|
|
27
|
+
var MIN_VELOCITY = 0.5;
|
|
28
|
+
var SAMPLE_MS = 50;
|
|
29
|
+
function useDragInertia(options) {
|
|
30
|
+
const { enabled, orientation, getScrollContainer } = options;
|
|
31
|
+
const rafId = (0, import_react.useRef)(null);
|
|
32
|
+
const lastPos = (0, import_react.useRef)(0);
|
|
33
|
+
const lastTime = (0, import_react.useRef)(0);
|
|
34
|
+
const velocity = (0, import_react.useRef)(0);
|
|
35
|
+
const samples = (0, import_react.useRef)([]);
|
|
36
|
+
const applyScroll = (0, import_react.useCallback)(
|
|
37
|
+
(delta) => {
|
|
38
|
+
const el = getScrollContainer();
|
|
39
|
+
if (!el) return;
|
|
40
|
+
if (orientation === "horizontal") {
|
|
41
|
+
el.scrollLeft = Math.max(0, el.scrollLeft + delta);
|
|
42
|
+
} else {
|
|
43
|
+
el.scrollTop = Math.max(0, el.scrollTop + delta);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
[getScrollContainer, orientation]
|
|
47
|
+
);
|
|
48
|
+
const lastTickTime = (0, import_react.useRef)(0);
|
|
49
|
+
const tick = (0, import_react.useCallback)(
|
|
50
|
+
(now) => {
|
|
51
|
+
const t = now ?? performance.now();
|
|
52
|
+
const dt = lastTickTime.current ? (t - lastTickTime.current) / 1e3 : 0.016;
|
|
53
|
+
lastTickTime.current = t;
|
|
54
|
+
const v = velocity.current;
|
|
55
|
+
if (Math.abs(v) < MIN_VELOCITY) {
|
|
56
|
+
velocity.current = 0;
|
|
57
|
+
lastTickTime.current = 0;
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
applyScroll(v * dt);
|
|
61
|
+
velocity.current = v * DECAY;
|
|
62
|
+
rafId.current = requestAnimationFrame(tick);
|
|
63
|
+
},
|
|
64
|
+
[applyScroll]
|
|
65
|
+
);
|
|
66
|
+
const stopInertia = (0, import_react.useCallback)(() => {
|
|
67
|
+
if (rafId.current != null) {
|
|
68
|
+
cancelAnimationFrame(rafId.current);
|
|
69
|
+
rafId.current = null;
|
|
70
|
+
}
|
|
71
|
+
velocity.current = 0;
|
|
72
|
+
samples.current = [];
|
|
73
|
+
}, []);
|
|
74
|
+
const onPointerDown = (0, import_react.useCallback)(
|
|
75
|
+
(e) => {
|
|
76
|
+
if (!enabled) return;
|
|
77
|
+
stopInertia();
|
|
78
|
+
const pos = orientation === "horizontal" ? e.clientX : e.clientY;
|
|
79
|
+
lastPos.current = pos;
|
|
80
|
+
lastTime.current = Date.now();
|
|
81
|
+
samples.current = [{ pos, t: lastTime.current }];
|
|
82
|
+
},
|
|
83
|
+
[enabled, orientation, stopInertia]
|
|
84
|
+
);
|
|
85
|
+
const onPointerMove = (0, import_react.useCallback)(
|
|
86
|
+
(e) => {
|
|
87
|
+
if (!enabled) return;
|
|
88
|
+
const pos = orientation === "horizontal" ? e.clientX : e.clientY;
|
|
89
|
+
const t = Date.now();
|
|
90
|
+
const el = getScrollContainer();
|
|
91
|
+
if (el) {
|
|
92
|
+
const scroll = orientation === "horizontal" ? el.scrollLeft : el.scrollTop;
|
|
93
|
+
const delta = pos - lastPos.current;
|
|
94
|
+
const maxScroll = orientation === "horizontal" ? el.scrollWidth - el.clientWidth : el.scrollHeight - el.clientHeight;
|
|
95
|
+
const next = Math.max(0, Math.min(maxScroll, scroll + delta));
|
|
96
|
+
if (orientation === "horizontal") {
|
|
97
|
+
el.scrollLeft = next;
|
|
98
|
+
} else {
|
|
99
|
+
el.scrollTop = next;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
lastPos.current = pos;
|
|
103
|
+
lastTime.current = t;
|
|
104
|
+
samples.current.push({ pos, t });
|
|
105
|
+
const cutoff = t - SAMPLE_MS;
|
|
106
|
+
while (samples.current.length > 1 && samples.current[0].t < cutoff) {
|
|
107
|
+
samples.current.shift();
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
[enabled, orientation, getScrollContainer]
|
|
111
|
+
);
|
|
112
|
+
const onPointerUp = (0, import_react.useCallback)(
|
|
113
|
+
(e) => {
|
|
114
|
+
if (!enabled) return;
|
|
115
|
+
const arr = samples.current;
|
|
116
|
+
if (arr.length < 2) return;
|
|
117
|
+
const first = arr[0];
|
|
118
|
+
const last = arr[arr.length - 1];
|
|
119
|
+
const dt = (last.t - first.t) / 1e3;
|
|
120
|
+
if (dt <= 0) return;
|
|
121
|
+
const scrollEl = getScrollContainer();
|
|
122
|
+
if (!scrollEl) return;
|
|
123
|
+
const scroll = orientation === "horizontal" ? scrollEl.scrollLeft : scrollEl.scrollTop;
|
|
124
|
+
const totalDelta = last.pos - first.pos;
|
|
125
|
+
velocity.current = totalDelta / dt;
|
|
126
|
+
stopInertia();
|
|
127
|
+
rafId.current = requestAnimationFrame(tick);
|
|
128
|
+
},
|
|
129
|
+
[enabled, orientation, getScrollContainer, stopInertia, tick]
|
|
130
|
+
);
|
|
131
|
+
return { onPointerDown, onPointerMove, onPointerUp, stopInertia };
|
|
132
|
+
}
|
|
133
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
134
|
+
0 && (module.exports = {
|
|
135
|
+
useDragInertia
|
|
136
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellTimeNavigator/hooks/useRealtime.ts
|
|
30
|
+
var useRealtime_exports = {};
|
|
31
|
+
__export(useRealtime_exports, {
|
|
32
|
+
useRealtime: () => useRealtime
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(useRealtime_exports);
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
37
|
+
function useRealtime(enabled, onTick) {
|
|
38
|
+
(0, import_react.useEffect)(() => {
|
|
39
|
+
if (!enabled) return;
|
|
40
|
+
const id = setInterval(() => {
|
|
41
|
+
onTick((0, import_dayjs.default)());
|
|
42
|
+
}, 1e3);
|
|
43
|
+
return () => clearInterval(id);
|
|
44
|
+
}, [enabled, onTick]);
|
|
45
|
+
}
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
useRealtime
|
|
49
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Dayjs } from 'dayjs';
|
|
2
|
+
import type { TimeRangeOption } from '../types';
|
|
3
|
+
export interface UseTimeAxisOptions {
|
|
4
|
+
range?: TimeRangeOption;
|
|
5
|
+
stepMinutes: number;
|
|
6
|
+
referenceDate: Dayjs;
|
|
7
|
+
orientation: 'horizontal' | 'vertical';
|
|
8
|
+
/** 横向时每格宽度(px),竖向时每格高度(px) */
|
|
9
|
+
cellSizePx: number;
|
|
10
|
+
}
|
|
11
|
+
export interface TimeAxisState {
|
|
12
|
+
rangeStart: Dayjs;
|
|
13
|
+
rangeEnd: Dayjs;
|
|
14
|
+
ticks: Dayjs[];
|
|
15
|
+
/** 时间转主轴偏移(px) */
|
|
16
|
+
timeToOffset: (t: Dayjs) => number;
|
|
17
|
+
/** 主轴偏移(px)转时间(最近刻度,用于刻度对齐) */
|
|
18
|
+
offsetToTime: (offset: number) => Dayjs | null;
|
|
19
|
+
/** 主轴偏移(px)转时间(连续插值,用于拖动时按分钟步长显示) */
|
|
20
|
+
offsetToTimeContinuous: (offset: number) => Dayjs | null;
|
|
21
|
+
/** 主轴总长度(px) */
|
|
22
|
+
totalLengthPx: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 时间轴刻度与时间↔像素换算
|
|
26
|
+
*/
|
|
27
|
+
export declare function useTimeAxis(options: UseTimeAxisOptions): TimeAxisState;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellTimeNavigator/hooks/useTimeAxis.ts
|
|
20
|
+
var useTimeAxis_exports = {};
|
|
21
|
+
__export(useTimeAxis_exports, {
|
|
22
|
+
useTimeAxis: () => useTimeAxis
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(useTimeAxis_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var import_utils = require("../utils");
|
|
27
|
+
function useTimeAxis(options) {
|
|
28
|
+
const { range, stepMinutes, referenceDate, orientation, cellSizePx } = options;
|
|
29
|
+
return (0, import_react.useMemo)(() => {
|
|
30
|
+
const [rangeStart, rangeEnd] = (0, import_utils.getRangeBounds)(range, referenceDate);
|
|
31
|
+
const ticks = (0, import_utils.getTicks)(rangeStart, rangeEnd, stepMinutes);
|
|
32
|
+
const lastTick = ticks.length > 0 ? ticks[ticks.length - 1] : null;
|
|
33
|
+
const needTailCell = orientation === "horizontal" && lastTick != null && rangeEnd.isAfter(lastTick);
|
|
34
|
+
const noTailVertical = orientation === "vertical" && lastTick != null && !rangeEnd.isAfter(lastTick);
|
|
35
|
+
const effectiveTicks = noTailVertical && ticks.length > 0 ? ticks.slice(0, -1) : ticks;
|
|
36
|
+
const rawTotalPx = orientation === "vertical" ? effectiveTicks.length * cellSizePx : (ticks.length + (needTailCell ? 1 : 0)) * cellSizePx;
|
|
37
|
+
const totalLengthPx = Math.min(rawTotalPx, 5e5);
|
|
38
|
+
const dotOffsetPx = orientation === "vertical" ? 0 : cellSizePx / 2;
|
|
39
|
+
const maxOffsetPx = orientation === "vertical" ? totalLengthPx : dotOffsetPx + (needTailCell ? ticks.length : Math.max(0, ticks.length - 1)) * cellSizePx;
|
|
40
|
+
const timeToOffset = (t) => {
|
|
41
|
+
const diffMs = t.diff(rangeStart);
|
|
42
|
+
const diffMin = diffMs / (60 * 1e3);
|
|
43
|
+
const index = diffMin / stepMinutes;
|
|
44
|
+
const px = dotOffsetPx + index * cellSizePx;
|
|
45
|
+
return Math.max(dotOffsetPx, Math.min(px, maxOffsetPx));
|
|
46
|
+
};
|
|
47
|
+
const offsetToTime = (offset) => {
|
|
48
|
+
const index = Math.round((offset - dotOffsetPx) / cellSizePx);
|
|
49
|
+
const tick = effectiveTicks[index];
|
|
50
|
+
return tick ?? null;
|
|
51
|
+
};
|
|
52
|
+
const offsetToTimeContinuous = (offset) => {
|
|
53
|
+
const index = (offset - dotOffsetPx) / cellSizePx;
|
|
54
|
+
const minutesFromStart = index * stepMinutes;
|
|
55
|
+
let t = rangeStart.add(minutesFromStart, "minute");
|
|
56
|
+
if (t.isBefore(rangeStart)) return rangeStart;
|
|
57
|
+
if (t.isAfter(rangeEnd)) return rangeEnd;
|
|
58
|
+
return t;
|
|
59
|
+
};
|
|
60
|
+
return {
|
|
61
|
+
rangeStart,
|
|
62
|
+
rangeEnd,
|
|
63
|
+
ticks: effectiveTicks,
|
|
64
|
+
timeToOffset,
|
|
65
|
+
offsetToTime,
|
|
66
|
+
offsetToTimeContinuous,
|
|
67
|
+
totalLengthPx
|
|
68
|
+
};
|
|
69
|
+
}, [
|
|
70
|
+
range == null ? void 0 : range.start,
|
|
71
|
+
range == null ? void 0 : range.end,
|
|
72
|
+
stepMinutes,
|
|
73
|
+
referenceDate.valueOf(),
|
|
74
|
+
orientation,
|
|
75
|
+
cellSizePx
|
|
76
|
+
]);
|
|
77
|
+
}
|
|
78
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
79
|
+
0 && (module.exports = {
|
|
80
|
+
useTimeAxis
|
|
81
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { PisellTimeNavigator } from './PisellTimeNavigator';
|
|
2
|
+
export type { PisellTimeNavigatorProps, TimeNavigatorValue, TimeRangeOption, CursorMode, TimeNavigatorOrientation, } from './types';
|
|
3
|
+
/** 多语言文案(en / zh-CN / zh-HK / ja / pt),使用前请在应用内通过 locales.init(pisellTimeNavigatorLocales, lang) 合并 */
|
|
4
|
+
export { default as pisellTimeNavigatorLocales } from './locales';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellTimeNavigator/index.tsx
|
|
30
|
+
var pisellTimeNavigator_exports = {};
|
|
31
|
+
__export(pisellTimeNavigator_exports, {
|
|
32
|
+
PisellTimeNavigator: () => import_PisellTimeNavigator.PisellTimeNavigator,
|
|
33
|
+
pisellTimeNavigatorLocales: () => import_locales.default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(pisellTimeNavigator_exports);
|
|
36
|
+
var import_PisellTimeNavigator = require("./PisellTimeNavigator");
|
|
37
|
+
var import_locales = __toESM(require("./locales"));
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
PisellTimeNavigator,
|
|
41
|
+
pisellTimeNavigatorLocales
|
|
42
|
+
});
|