@pisell/materials 6.11.17 → 6.11.19
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/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 +32 -32
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +25 -25
- package/es/components/PisellCards/index.d.ts +1 -0
- package/es/components/PisellFields/index.d.ts +1 -0
- package/es/components/PisellLayouts/index.d.ts +11 -5
- package/es/components/PisellLayouts/index.js +8 -4
- package/es/components/PisellMetrics/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.d.ts +13 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.js +274 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +544 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/types.d.ts +117 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/types.js +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.d.ts +9 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +61 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +176 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +12 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.js +11 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +87 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Tabs/ReadPretty.d.ts +9 -0
- package/es/components/dataSourceComponents/fields/Tabs/ReadPretty.js +16 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.d.ts +23 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.js +93 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.less +64 -0
- package/es/components/dataSourceComponents/fields/Tabs/WithMode.d.ts +6 -0
- package/es/components/dataSourceComponents/fields/Tabs/WithMode.js +9 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +13 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.js +18 -0
- package/es/components/dataSourceComponents/fields/Tabs/type.d.ts +38 -0
- package/es/components/dataSourceComponents/fields/Tabs/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +50 -11
- package/es/components/dataSourceComponents/fields/index.js +5 -1
- package/es/components/dataSourceComponents/fields/utils.js +3 -0
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/pisellFilter/type.d.ts +4 -2
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +12 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +611 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.less +92 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +55 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +1667 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -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 +43 -0
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.js +436 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +21 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.js +133 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.less +7 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +543 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +162 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +36 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +135 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +150 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +9 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.js +71 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +369 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +239 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.js +195 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.less +19 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.js +85 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.less +7 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +33 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.js +90 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.less +101 -0
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +16 -0
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +29 -0
- package/es/components/pisellFloorMapLayout/components/index.d.ts +21 -0
- package/es/components/pisellFloorMapLayout/components/index.js +13 -0
- 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 +28 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +63 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +562 -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 +399 -0
- package/es/components/pisellFloorMapLayout/index.d.ts +15 -0
- package/es/components/pisellFloorMapLayout/index.js +12 -0
- package/es/components/pisellFloorMapLayout/locales-ja.d.ts +104 -0
- package/es/components/pisellFloorMapLayout/locales-ja.js +103 -0
- package/es/components/pisellFloorMapLayout/locales-pt.d.ts +104 -0
- package/es/components/pisellFloorMapLayout/locales-pt.js +103 -0
- package/es/components/pisellFloorMapLayout/locales.d.ts +506 -0
- package/es/components/pisellFloorMapLayout/locales.js +310 -0
- package/es/components/pisellFloorMapLayout/types.d.ts +586 -0
- package/es/components/pisellFloorMapLayout/types.js +152 -0
- 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/floorMapDataRecordLabel.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +15 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +56 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +22 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +156 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +89 -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.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.js +1 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/index.js +1 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.js +34 -0
- package/es/components/pisellHierarchicalSummaryList/index.js +5 -0
- package/es/components/pisellHierarchicalSummaryList/types.js +1 -0
- package/es/components/pisellModal/components/index.d.ts +1 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +2 -1
- package/es/components/pisellRecordBoard/PisellRecordBoard.js +98 -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 +8 -2
- package/es/components/pisellRecordBoard/index.js +4 -2
- 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 +61 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +69 -11
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
- package/es/components/pisellRecordBoard/shellFrame/index.d.ts +6 -10
- package/es/components/pisellRecordBoard/shellFrame/index.js +111 -20
- package/es/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
- package/es/components/pisellRecordBoard/types.d.ts +68 -2
- package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
- package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +57 -0
- package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +3 -2
- 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 +94 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +66 -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 +49 -0
- package/es/components/pisellReservationScheduleBand/types.js +1 -0
- package/es/components/pisellShellFrame/PisellShellFrame.less +11 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +787 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +461 -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.js +30 -0
- package/es/components/pisellTimeNavigator/components/CursorLayer.d.ts +25 -0
- package/es/components/pisellTimeNavigator/components/CursorLayer.js +77 -0
- package/es/components/pisellTimeNavigator/components/GestureLayer.d.ts +33 -0
- package/es/components/pisellTimeNavigator/components/GestureLayer.js +91 -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 +22 -0
- package/es/components/pisellTimeNavigator/components/ScaleLayer.js +73 -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.js +109 -0
- package/es/components/pisellTimeNavigator/hooks/useRealtime.js +16 -0
- package/es/components/pisellTimeNavigator/hooks/useTimeAxis.js +76 -0
- package/es/components/pisellTimeNavigator/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/index.js +4 -0
- package/es/components/pisellTimeNavigator/locales.d.ts +22 -0
- package/es/components/pisellTimeNavigator/locales.js +21 -0
- package/es/components/pisellTimeNavigator/types.js +1 -0
- package/es/components/pisellTimeNavigator/utils/index.js +116 -0
- package/es/components/pisellWalletPassCard/index.js +1 -1
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/table/Table/fields/date/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/link/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/index.js +1 -1
- package/es/hooks/useResponsive.d.ts +1 -1
- package/es/index.d.ts +49 -33
- package/es/index.js +47 -27
- package/es/locales/en-US.d.ts +3 -0
- package/es/locales/en-US.js +3 -0
- package/es/locales/ja.d.ts +8 -0
- package/es/locales/ja.js +25 -7
- package/es/locales/pt.d.ts +8 -0
- package/es/locales/pt.js +21 -3
- package/es/locales/zh-CN.d.ts +3 -0
- package/es/locales/zh-CN.js +3 -0
- package/es/locales/zh-TW.d.ts +3 -0
- package/es/locales/zh-TW.js +3 -0
- package/lib/components/PisellCards/index.d.ts +1 -0
- package/lib/components/PisellFields/index.d.ts +1 -0
- package/lib/components/PisellLayouts/index.d.ts +11 -5
- package/lib/components/PisellLayouts/index.js +15 -1
- package/lib/components/PisellMetrics/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.d.ts +13 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.js +229 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +544 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/types.d.ts +117 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/types.js +17 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.d.ts +9 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +64 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +157 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +12 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.js +40 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +87 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Tabs/ReadPretty.d.ts +9 -0
- package/lib/components/dataSourceComponents/fields/Tabs/ReadPretty.js +45 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.d.ts +23 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.js +95 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.less +64 -0
- package/lib/components/dataSourceComponents/fields/Tabs/WithMode.d.ts +6 -0
- package/lib/components/dataSourceComponents/fields/Tabs/WithMode.js +39 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +13 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.js +40 -0
- package/lib/components/dataSourceComponents/fields/Tabs/type.d.ts +38 -0
- package/lib/components/dataSourceComponents/fields/Tabs/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +50 -11
- package/lib/components/dataSourceComponents/fields/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/utils.js +3 -0
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/pisellFilter/type.d.ts +4 -2
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +12 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +709 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.less +92 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +55 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +1353 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -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 +43 -0
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.js +486 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +21 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.js +119 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.less +7 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +556 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +162 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +36 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +199 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +150 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +9 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.js +96 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +348 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +239 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.js +219 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.less +19 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.js +110 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.less +7 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +33 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.js +127 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.less +101 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +16 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +65 -0
- package/lib/components/pisellFloorMapLayout/components/index.d.ts +21 -0
- package/lib/components/pisellFloorMapLayout/components/index.js +56 -0
- 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 +47 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +63 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +546 -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 +382 -0
- package/lib/components/pisellFloorMapLayout/index.d.ts +15 -0
- package/lib/components/pisellFloorMapLayout/index.js +64 -0
- package/lib/components/pisellFloorMapLayout/locales-ja.d.ts +104 -0
- package/lib/components/pisellFloorMapLayout/locales-ja.js +124 -0
- package/lib/components/pisellFloorMapLayout/locales-pt.d.ts +104 -0
- package/lib/components/pisellFloorMapLayout/locales-pt.js +124 -0
- package/lib/components/pisellFloorMapLayout/locales.d.ts +506 -0
- package/lib/components/pisellFloorMapLayout/locales.js +340 -0
- package/lib/components/pisellFloorMapLayout/types.d.ts +586 -0
- package/lib/components/pisellFloorMapLayout/types.js +32 -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/floorMapDataRecordLabel.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +38 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +67 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +22 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +142 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +136 -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.js +185 -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.js +29 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/index.js +29 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.js +49 -0
- package/lib/components/pisellHierarchicalSummaryList/index.js +31 -0
- package/lib/components/pisellHierarchicalSummaryList/types.js +17 -0
- package/lib/components/pisellModal/components/index.d.ts +1 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +2 -1
- package/lib/components/pisellRecordBoard/PisellRecordBoard.js +86 -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 +8 -2
- package/lib/components/pisellRecordBoard/index.js +6 -2
- 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 +61 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +60 -8
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
- package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +6 -10
- package/lib/components/pisellRecordBoard/shellFrame/index.js +101 -9
- package/lib/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
- package/lib/components/pisellRecordBoard/types.d.ts +68 -2
- package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
- package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +88 -0
- package/lib/components/pisellRecordBoard/utils/recordBoardColumns.js +11 -1
- 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 +128 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +66 -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 +49 -0
- package/lib/components/pisellReservationScheduleBand/types.js +17 -0
- package/lib/components/pisellShellFrame/PisellShellFrame.less +11 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +901 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +461 -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.js +78 -0
- package/lib/components/pisellTimeNavigator/components/CursorLayer.d.ts +25 -0
- package/lib/components/pisellTimeNavigator/components/CursorLayer.js +111 -0
- package/lib/components/pisellTimeNavigator/components/GestureLayer.d.ts +33 -0
- package/lib/components/pisellTimeNavigator/components/GestureLayer.js +170 -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 +22 -0
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.js +116 -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.js +136 -0
- package/lib/components/pisellTimeNavigator/hooks/useRealtime.js +49 -0
- package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.js +87 -0
- package/lib/components/pisellTimeNavigator/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/index.js +47 -0
- package/lib/components/pisellTimeNavigator/locales.d.ts +22 -0
- package/lib/components/pisellTimeNavigator/locales.js +41 -0
- package/lib/components/pisellTimeNavigator/types.js +17 -0
- package/lib/components/pisellTimeNavigator/utils/index.js +107 -0
- package/lib/components/pisellWalletPassCard/index.js +1 -1
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/table/Table/fields/date/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/link/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/index.js +2 -2
- package/lib/hooks/useResponsive.d.ts +1 -1
- package/lib/index.d.ts +49 -33
- package/lib/index.js +93 -27
- package/lib/locales/en-US.d.ts +3 -0
- package/lib/locales/en-US.js +3 -0
- package/lib/locales/ja.d.ts +8 -0
- package/lib/locales/ja.js +22 -1
- package/lib/locales/pt.d.ts +8 -0
- package/lib/locales/pt.js +22 -1
- package/lib/locales/zh-CN.d.ts +3 -0
- package/lib/locales/zh-CN.js +3 -0
- package/lib/locales/zh-TW.d.ts +3 -0
- package/lib/locales/zh-TW.js +3 -0
- package/lowcode/data-source-form/constants.ts +3 -0
- package/lowcode/data-source-form/utils.ts +31 -5
- package/lowcode/data-source-sub-form/meta.ts +259 -0
- package/lowcode/data-source-sub-form/snippets.ts +21 -0
- package/lowcode/floor-map-image-element/meta.ts +113 -0
- package/lowcode/floor-map-layout-provider/meta.ts +65 -0
- package/lowcode/form-item-record-list-wrapper/meta.ts +180 -0
- package/lowcode/form-item-record-list-wrapper/snippets.ts +18 -0
- package/lowcode/form-item-tabs/meta.ts +172 -0
- package/lowcode/pisell-floor-map-layout/meta.ts +5599 -0
- package/lowcode/pisell-hierarchical-summary-list/meta.ts +240 -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 -3
- package/es/components/PisellCards/components/GraphicTextCard/types.d.ts +0 -290
- package/es/components/PisellCards/components/TextCard/TextCard.d.ts +0 -8
- package/es/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +0 -26
- package/es/components/PisellCards/components/TextCard/components/TextContent.d.ts +0 -21
- package/es/components/PisellCards/components/TextCard/types.d.ts +0 -270
- package/es/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -4
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/es/components/drag-sort-tree/index.d.ts +0 -5
- package/es/components/iconfont/index.d.ts +0 -8
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/pisell-config-provider/index.d.ts +0 -13
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/pisellGridPro/index.d.ts +0 -4
- package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/Gift/types.d.ts +0 -29
- package/es/components/productCard/cartSkuCard/components/Promotion/index.d.ts +0 -7
- package/es/components/productCard/cartSkuCard/locales.d.ts +0 -178
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/es/components/productCard/status.d.ts +0 -32
- package/es/components/productCard/types.d.ts +0 -95
- package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -9
- package/es/components/table/types.d.ts +0 -268
- package/es/components/versionModal/index.d.ts +0 -23
- package/lib/components/PisellCards/components/GraphicTextCard/types.d.ts +0 -290
- package/lib/components/PisellCards/components/TextCard/TextCard.d.ts +0 -8
- package/lib/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +0 -26
- package/lib/components/PisellCards/components/TextCard/components/TextContent.d.ts +0 -21
- package/lib/components/PisellCards/components/TextCard/types.d.ts +0 -270
- package/lib/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -4
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/lib/components/drag-sort-tree/index.d.ts +0 -5
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/pisell-config-provider/index.d.ts +0 -13
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/pisellGridPro/index.d.ts +0 -4
- package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/Gift/types.d.ts +0 -29
- package/lib/components/productCard/cartSkuCard/components/Promotion/index.d.ts +0 -7
- package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -178
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/lib/components/productCard/status.d.ts +0 -32
- package/lib/components/productCard/types.d.ts +0 -95
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -9
- package/lib/components/table/types.d.ts +0 -268
- package/lib/components/versionModal/index.d.ts +0 -23
|
@@ -0,0 +1,901 @@
|
|
|
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/PisellTimeNavigator.tsx
|
|
30
|
+
var PisellTimeNavigator_exports = {};
|
|
31
|
+
__export(PisellTimeNavigator_exports, {
|
|
32
|
+
PisellTimeNavigator: () => PisellTimeNavigator
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(PisellTimeNavigator_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_PisellScrollView = __toESM(require("../PisellScrollView"));
|
|
39
|
+
var import_utils = require("./utils");
|
|
40
|
+
var import_hooks = require("./hooks");
|
|
41
|
+
var import_components = require("./components");
|
|
42
|
+
var import_utils2 = require("@pisell/utils");
|
|
43
|
+
var import_locales = __toESM(require("./locales"));
|
|
44
|
+
var import_PisellTimeNavigator = require("./PisellTimeNavigator.less");
|
|
45
|
+
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
46
|
+
var CELL_SIZE_H = 82;
|
|
47
|
+
var CURRENT_TIME_GRADIENT_WIDTH_H_PX = Math.round(CELL_SIZE_H * 1.7);
|
|
48
|
+
var CELL_SIZE_V = 20;
|
|
49
|
+
var CURSOR_MOVES_NOW_RESERVE_PX = 56;
|
|
50
|
+
var CURSOR_MOVES_H_PADDING_PX = 8;
|
|
51
|
+
var CURSOR_MOVES_MIN_CELL_PX = 8;
|
|
52
|
+
var DENSITY_LAYER_HEIGHT = 46;
|
|
53
|
+
function PisellTimeNavigator(props) {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
const {
|
|
56
|
+
value: valueProp,
|
|
57
|
+
onChange,
|
|
58
|
+
defaultValue,
|
|
59
|
+
referenceDate: referenceDateProp,
|
|
60
|
+
realtime = false,
|
|
61
|
+
range,
|
|
62
|
+
stepMinutes = 15,
|
|
63
|
+
majorStepMinutes = 60,
|
|
64
|
+
cursorMode = "axis-moves",
|
|
65
|
+
orientation = "horizontal",
|
|
66
|
+
disabledRanges,
|
|
67
|
+
showNowButton = true,
|
|
68
|
+
userInteractionLocked = false,
|
|
69
|
+
snapToStep = false,
|
|
70
|
+
inertia = false,
|
|
71
|
+
businessHours,
|
|
72
|
+
pastTimeFade,
|
|
73
|
+
containerStyle,
|
|
74
|
+
scaleStyle,
|
|
75
|
+
cursorStyle,
|
|
76
|
+
nowButtonStyle,
|
|
77
|
+
className,
|
|
78
|
+
style,
|
|
79
|
+
locale,
|
|
80
|
+
timeFormat = "HH:mm",
|
|
81
|
+
renderNowButton,
|
|
82
|
+
onUserInteraction,
|
|
83
|
+
densitySeries: densitySeriesProp,
|
|
84
|
+
loadDensity: loadDensityProp
|
|
85
|
+
} = props;
|
|
86
|
+
const context = (0, import_useEngineContext.default)();
|
|
87
|
+
import_utils2.locales.init(
|
|
88
|
+
import_locales.default,
|
|
89
|
+
((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "en"
|
|
90
|
+
);
|
|
91
|
+
const referenceDateFromProp = (0, import_react.useMemo)(() => {
|
|
92
|
+
if (referenceDateProp == null) return void 0;
|
|
93
|
+
const d = (0, import_utils.parseValue)(referenceDateProp, (0, import_dayjs.default)());
|
|
94
|
+
return (d ?? (0, import_dayjs.default)()).startOf("day");
|
|
95
|
+
}, [referenceDateProp]);
|
|
96
|
+
const referenceDate = referenceDateFromProp ?? (0, import_dayjs.default)().startOf("day");
|
|
97
|
+
const isHorizontal = orientation === "horizontal";
|
|
98
|
+
const referenceDayKey = referenceDateFromProp != null ? referenceDateFromProp.format("YYYY-MM-DD") : (0, import_dayjs.default)().format("YYYY-MM-DD");
|
|
99
|
+
const [densityLoaded, setDensityLoaded] = (0, import_react.useState)();
|
|
100
|
+
const densityReqId = (0, import_react.useRef)(0);
|
|
101
|
+
const densityGradientId = (0, import_react.useMemo)(
|
|
102
|
+
() => `pisell-time-density-fill-${Math.random().toString(36).slice(2, 8)}`,
|
|
103
|
+
[]
|
|
104
|
+
);
|
|
105
|
+
(0, import_react.useEffect)(() => {
|
|
106
|
+
if (densitySeriesProp !== void 0) {
|
|
107
|
+
setDensityLoaded(void 0);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
if (!loadDensityProp) {
|
|
111
|
+
setDensityLoaded(void 0);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const req = ++densityReqId.current;
|
|
115
|
+
let cancelled = false;
|
|
116
|
+
setDensityLoaded(void 0);
|
|
117
|
+
const refDay = (0, import_dayjs.default)(referenceDayKey).startOf("day");
|
|
118
|
+
void loadDensityProp({ referenceDate: refDay, stepMinutes }).then((arr) => {
|
|
119
|
+
if (cancelled || req !== densityReqId.current) return;
|
|
120
|
+
setDensityLoaded(Array.isArray(arr) ? arr : []);
|
|
121
|
+
}).catch(() => {
|
|
122
|
+
if (cancelled || req !== densityReqId.current) return;
|
|
123
|
+
setDensityLoaded(void 0);
|
|
124
|
+
});
|
|
125
|
+
return () => {
|
|
126
|
+
cancelled = true;
|
|
127
|
+
};
|
|
128
|
+
}, [referenceDayKey, stepMinutes, loadDensityProp, densitySeriesProp]);
|
|
129
|
+
const resolvedDensity = densitySeriesProp !== void 0 ? densitySeriesProp : densityLoaded;
|
|
130
|
+
const isAxisMoves = cursorMode === "axis-moves";
|
|
131
|
+
const [viewportSize, setViewportSize] = (0, import_react.useState)({ w: 0, h: 0 });
|
|
132
|
+
const viewportWrapRef = (0, import_react.useRef)(null);
|
|
133
|
+
(0, import_react.useEffect)(() => {
|
|
134
|
+
const el = viewportWrapRef.current;
|
|
135
|
+
if (!el) return;
|
|
136
|
+
const setSize = () => {
|
|
137
|
+
const w = el.clientWidth;
|
|
138
|
+
const h = el.clientHeight;
|
|
139
|
+
setViewportSize(
|
|
140
|
+
(prev) => prev.w === w && prev.h === h ? prev : { w, h }
|
|
141
|
+
);
|
|
142
|
+
};
|
|
143
|
+
setSize();
|
|
144
|
+
const ro = new ResizeObserver(setSize);
|
|
145
|
+
ro.observe(el);
|
|
146
|
+
return () => ro.disconnect();
|
|
147
|
+
}, []);
|
|
148
|
+
const horizontalSlotCount = (0, import_react.useMemo)(
|
|
149
|
+
() => isHorizontal ? (0, import_utils.getHorizontalAxisSlotCount)(range, referenceDate, stepMinutes) : 0,
|
|
150
|
+
[isHorizontal, range == null ? void 0 : range.start, range == null ? void 0 : range.end, referenceDate, stepMinutes]
|
|
151
|
+
);
|
|
152
|
+
const cellSizePx = (0, import_react.useMemo)(() => {
|
|
153
|
+
if (!isHorizontal) return CELL_SIZE_V;
|
|
154
|
+
if (isAxisMoves) return CELL_SIZE_H;
|
|
155
|
+
const n = horizontalSlotCount;
|
|
156
|
+
if (n <= 0) return CELL_SIZE_H;
|
|
157
|
+
const vpW = Math.max(1, viewportSize.w || 400);
|
|
158
|
+
const reserve = showNowButton ? CURSOR_MOVES_NOW_RESERVE_PX : 0;
|
|
159
|
+
const usable = Math.max(40, vpW - reserve - CURSOR_MOVES_H_PADDING_PX * 2);
|
|
160
|
+
const raw = Math.floor(usable / n);
|
|
161
|
+
return Math.max(CURSOR_MOVES_MIN_CELL_PX, Math.min(CELL_SIZE_H, raw));
|
|
162
|
+
}, [
|
|
163
|
+
isHorizontal,
|
|
164
|
+
isAxisMoves,
|
|
165
|
+
horizontalSlotCount,
|
|
166
|
+
viewportSize.w,
|
|
167
|
+
showNowButton
|
|
168
|
+
]);
|
|
169
|
+
const axis = (0, import_hooks.useTimeAxis)({
|
|
170
|
+
range,
|
|
171
|
+
stepMinutes,
|
|
172
|
+
referenceDate,
|
|
173
|
+
orientation,
|
|
174
|
+
cellSizePx
|
|
175
|
+
});
|
|
176
|
+
const horizontalDensityCurve = (0, import_react.useMemo)(() => {
|
|
177
|
+
if (!isHorizontal || !(resolvedDensity == null ? void 0 : resolvedDensity.length)) return null;
|
|
178
|
+
const ticksN = axis.ticks.length;
|
|
179
|
+
const n = Math.min(resolvedDensity.length, ticksN);
|
|
180
|
+
if (n < 2) return null;
|
|
181
|
+
const slice = resolvedDensity.slice(0, n);
|
|
182
|
+
const maxV = Math.max(...slice, 0);
|
|
183
|
+
const minV = Math.min(...slice, 0);
|
|
184
|
+
const span = Math.max(1, maxV - minV);
|
|
185
|
+
const h = DENSITY_LAYER_HEIGHT;
|
|
186
|
+
const points = slice.map((v, i) => {
|
|
187
|
+
const x = i * cellSizePx + cellSizePx / 2;
|
|
188
|
+
const t = (v - minV) / span;
|
|
189
|
+
const y = h - 1 - t * (h - 3);
|
|
190
|
+
return { x, y };
|
|
191
|
+
});
|
|
192
|
+
const first = points[0];
|
|
193
|
+
const last = points[points.length - 1];
|
|
194
|
+
let linePath = `M ${first.x} ${first.y}`;
|
|
195
|
+
for (let i = 0; i < points.length - 1; i += 1) {
|
|
196
|
+
const p0 = points[i];
|
|
197
|
+
const p1 = points[i + 1];
|
|
198
|
+
const cx = (p0.x + p1.x) / 2;
|
|
199
|
+
const cy = (p0.y + p1.y) / 2;
|
|
200
|
+
linePath += ` Q ${p0.x} ${p0.y} ${cx} ${cy}`;
|
|
201
|
+
}
|
|
202
|
+
linePath += ` T ${last.x} ${last.y}`;
|
|
203
|
+
const areaPath = `${linePath} L ${last.x} ${h} L ${first.x} ${h} Z`;
|
|
204
|
+
return {
|
|
205
|
+
points,
|
|
206
|
+
linePath,
|
|
207
|
+
areaPath,
|
|
208
|
+
h,
|
|
209
|
+
w: axis.totalLengthPx
|
|
210
|
+
};
|
|
211
|
+
}, [
|
|
212
|
+
isHorizontal,
|
|
213
|
+
resolvedDensity,
|
|
214
|
+
axis.ticks,
|
|
215
|
+
axis.totalLengthPx,
|
|
216
|
+
cellSizePx
|
|
217
|
+
]);
|
|
218
|
+
const isControlled = valueProp !== void 0;
|
|
219
|
+
const [internalValue, setInternalValue] = (0, import_react.useState)(() => {
|
|
220
|
+
const v = valueProp ?? defaultValue;
|
|
221
|
+
return (0, import_utils.parseValue)(v, referenceDate);
|
|
222
|
+
});
|
|
223
|
+
const value = isControlled ? valueProp != null ? (0, import_utils.parseValue)(valueProp, referenceDate) : null : internalValue;
|
|
224
|
+
const effectiveValue = value ?? axis.rangeStart;
|
|
225
|
+
const scrollRef = (0, import_react.useRef)(null);
|
|
226
|
+
const scrollToCenterInProgressRef = (0, import_react.useRef)(false);
|
|
227
|
+
const valueUpdatedByScrollRef = (0, import_react.useRef)(false);
|
|
228
|
+
const isPointerDownRef = (0, import_react.useRef)(false);
|
|
229
|
+
const [scrollPosition, setScrollPosition] = (0, import_react.useState)({
|
|
230
|
+
scrollLeft: 0,
|
|
231
|
+
scrollTop: 0
|
|
232
|
+
});
|
|
233
|
+
const [, setNowTick] = (0, import_react.useState)(0);
|
|
234
|
+
(0, import_react.useEffect)(() => {
|
|
235
|
+
const id = setInterval(() => setNowTick((n) => n + 1), 60 * 1e3);
|
|
236
|
+
return () => clearInterval(id);
|
|
237
|
+
}, []);
|
|
238
|
+
const cursorDragActiveRef = (0, import_react.useRef)(false);
|
|
239
|
+
const cursorDragBaseRef = (0, import_react.useRef)({ startClient: 0, startOffset: 0 });
|
|
240
|
+
const getScrollContainer = (0, import_react.useCallback)(
|
|
241
|
+
() => {
|
|
242
|
+
var _a2, _b2;
|
|
243
|
+
return ((_b2 = (_a2 = scrollRef.current) == null ? void 0 : _a2.getScrollContainer) == null ? void 0 : _b2.call(_a2)) ?? null;
|
|
244
|
+
},
|
|
245
|
+
[]
|
|
246
|
+
);
|
|
247
|
+
const inertiaHandlers = (0, import_hooks.useDragInertia)({
|
|
248
|
+
enabled: inertia && !userInteractionLocked,
|
|
249
|
+
orientation,
|
|
250
|
+
getScrollContainer
|
|
251
|
+
});
|
|
252
|
+
const effectiveViewportW = viewportSize.w || 400;
|
|
253
|
+
const effectiveViewportH = viewportSize.h || 300;
|
|
254
|
+
const halfViewportW = effectiveViewportW / 2;
|
|
255
|
+
const halfViewportH = effectiveViewportH / 2;
|
|
256
|
+
const dotOffsetPx = isHorizontal ? cellSizePx / 2 : 0;
|
|
257
|
+
const axisStartMarginW = isHorizontal && !isAxisMoves ? CURSOR_MOVES_H_PADDING_PX : Math.max(0, halfViewportW - dotOffsetPx);
|
|
258
|
+
const axisStartMarginH = Math.max(0, halfViewportH - dotOffsetPx);
|
|
259
|
+
const horizontalAxisWrapStyle = (0, import_react.useMemo)(() => {
|
|
260
|
+
if (!isHorizontal) return null;
|
|
261
|
+
const minHeight = 48;
|
|
262
|
+
if (isAxisMoves) {
|
|
263
|
+
const natural2 = axis.totalLengthPx + (effectiveViewportW - cellSizePx);
|
|
264
|
+
if (!showNowButton) {
|
|
265
|
+
return {
|
|
266
|
+
width: "100%",
|
|
267
|
+
minWidth: natural2,
|
|
268
|
+
minHeight,
|
|
269
|
+
boxSizing: "border-box"
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
return { width: natural2, minHeight };
|
|
273
|
+
}
|
|
274
|
+
const natural = CURSOR_MOVES_H_PADDING_PX + axis.totalLengthPx + CURSOR_MOVES_H_PADDING_PX;
|
|
275
|
+
if (!showNowButton) {
|
|
276
|
+
return {
|
|
277
|
+
width: "100%",
|
|
278
|
+
minWidth: natural,
|
|
279
|
+
minHeight,
|
|
280
|
+
boxSizing: "border-box"
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
return { width: natural, minHeight };
|
|
284
|
+
}, [
|
|
285
|
+
isHorizontal,
|
|
286
|
+
isAxisMoves,
|
|
287
|
+
axis.totalLengthPx,
|
|
288
|
+
effectiveViewportW,
|
|
289
|
+
cellSizePx,
|
|
290
|
+
showNowButton
|
|
291
|
+
]);
|
|
292
|
+
const handleScroll = (0, import_react.useCallback)(
|
|
293
|
+
(data) => {
|
|
294
|
+
if (scrollToCenterInProgressRef.current) return;
|
|
295
|
+
setScrollPosition({
|
|
296
|
+
scrollLeft: data.scrollLeft,
|
|
297
|
+
scrollTop: data.scrollTop
|
|
298
|
+
});
|
|
299
|
+
setViewportSize({ w: data.clientWidth, h: data.clientHeight });
|
|
300
|
+
if (userInteractionLocked) return;
|
|
301
|
+
if (!isAxisMoves || data.clientWidth <= 0 && data.clientHeight <= 0)
|
|
302
|
+
return;
|
|
303
|
+
const halfW = data.clientWidth / 2;
|
|
304
|
+
const halfH = data.clientHeight / 2;
|
|
305
|
+
const hasPadding = isHorizontal ? effectiveViewportW > 0 : effectiveViewportH > 0;
|
|
306
|
+
const centerOffset = isHorizontal ? hasPadding ? data.scrollLeft + dotOffsetPx : data.scrollLeft + halfW : hasPadding ? data.scrollTop + dotOffsetPx : data.scrollTop + halfH;
|
|
307
|
+
const t = axis.offsetToTimeContinuous(centerOffset);
|
|
308
|
+
if (!t) return;
|
|
309
|
+
const tMinute = t.startOf("minute");
|
|
310
|
+
if ((0, import_utils.isInDisabledRanges)(tMinute, disabledRanges)) return;
|
|
311
|
+
valueUpdatedByScrollRef.current = true;
|
|
312
|
+
if (!isControlled) setInternalValue(tMinute);
|
|
313
|
+
onChange == null ? void 0 : onChange(tMinute);
|
|
314
|
+
},
|
|
315
|
+
[
|
|
316
|
+
isAxisMoves,
|
|
317
|
+
isHorizontal,
|
|
318
|
+
isControlled,
|
|
319
|
+
axis.offsetToTimeContinuous,
|
|
320
|
+
disabledRanges,
|
|
321
|
+
onChange,
|
|
322
|
+
effectiveViewportW,
|
|
323
|
+
effectiveViewportH,
|
|
324
|
+
dotOffsetPx,
|
|
325
|
+
userInteractionLocked
|
|
326
|
+
]
|
|
327
|
+
);
|
|
328
|
+
const performSnapFromScrollPosition = (0, import_react.useCallback)(
|
|
329
|
+
(scrollLeft, scrollTop, clientWidth, clientHeight) => {
|
|
330
|
+
if (!isAxisMoves || clientWidth <= 0 && clientHeight <= 0) return;
|
|
331
|
+
valueUpdatedByScrollRef.current = false;
|
|
332
|
+
const hasPadding = isHorizontal ? effectiveViewportW > 0 : effectiveViewportH > 0;
|
|
333
|
+
const centerOffset = isHorizontal ? hasPadding ? scrollLeft + dotOffsetPx : scrollLeft + clientWidth / 2 : hasPadding ? scrollTop + dotOffsetPx : scrollTop + clientHeight / 2;
|
|
334
|
+
const t = axis.offsetToTimeContinuous(centerOffset);
|
|
335
|
+
if (!t) return;
|
|
336
|
+
const snapped = snapToStep ? (0, import_utils.snapToStepMinutes)(t, stepMinutes) : t;
|
|
337
|
+
if ((0, import_utils.isInDisabledRanges)(snapped, disabledRanges)) return;
|
|
338
|
+
if (!isControlled) setInternalValue(snapped);
|
|
339
|
+
onChange == null ? void 0 : onChange(snapped);
|
|
340
|
+
},
|
|
341
|
+
[
|
|
342
|
+
isAxisMoves,
|
|
343
|
+
isHorizontal,
|
|
344
|
+
isControlled,
|
|
345
|
+
axis.offsetToTimeContinuous,
|
|
346
|
+
snapToStep,
|
|
347
|
+
stepMinutes,
|
|
348
|
+
disabledRanges,
|
|
349
|
+
onChange,
|
|
350
|
+
effectiveViewportW,
|
|
351
|
+
effectiveViewportH,
|
|
352
|
+
dotOffsetPx
|
|
353
|
+
]
|
|
354
|
+
);
|
|
355
|
+
const scrollEndClearTimeoutRef = (0, import_react.useRef)(
|
|
356
|
+
null
|
|
357
|
+
);
|
|
358
|
+
const handleScrollEnd = (0, import_react.useCallback)(
|
|
359
|
+
(data) => {
|
|
360
|
+
if (userInteractionLocked) return;
|
|
361
|
+
if (scrollToCenterInProgressRef.current) {
|
|
362
|
+
if (scrollEndClearTimeoutRef.current)
|
|
363
|
+
clearTimeout(scrollEndClearTimeoutRef.current);
|
|
364
|
+
scrollEndClearTimeoutRef.current = setTimeout(() => {
|
|
365
|
+
scrollToCenterInProgressRef.current = false;
|
|
366
|
+
scrollEndClearTimeoutRef.current = null;
|
|
367
|
+
}, 500);
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
if (isPointerDownRef.current) return;
|
|
371
|
+
performSnapFromScrollPosition(
|
|
372
|
+
data.scrollLeft,
|
|
373
|
+
data.scrollTop,
|
|
374
|
+
data.clientWidth,
|
|
375
|
+
data.clientHeight
|
|
376
|
+
);
|
|
377
|
+
},
|
|
378
|
+
[performSnapFromScrollPosition, userInteractionLocked]
|
|
379
|
+
);
|
|
380
|
+
const handlePointerUp = (0, import_react.useCallback)(
|
|
381
|
+
(e) => {
|
|
382
|
+
var _a2, _b2, _c, _d;
|
|
383
|
+
isPointerDownRef.current = false;
|
|
384
|
+
if (userInteractionLocked) return;
|
|
385
|
+
if ((_b2 = (_a2 = e.target) == null ? void 0 : _a2.closest) == null ? void 0 : _b2.call(_a2, ".pisell-time-navigator-now"))
|
|
386
|
+
return;
|
|
387
|
+
if (!isAxisMoves) return;
|
|
388
|
+
const container = (_d = (_c = scrollRef.current) == null ? void 0 : _c.getScrollContainer) == null ? void 0 : _d.call(_c);
|
|
389
|
+
if (!container) return;
|
|
390
|
+
performSnapFromScrollPosition(
|
|
391
|
+
container.scrollLeft,
|
|
392
|
+
container.scrollTop,
|
|
393
|
+
container.clientWidth,
|
|
394
|
+
container.clientHeight
|
|
395
|
+
);
|
|
396
|
+
},
|
|
397
|
+
[isAxisMoves, performSnapFromScrollPosition, userInteractionLocked]
|
|
398
|
+
);
|
|
399
|
+
const snapFn = (0, import_react.useCallback)(
|
|
400
|
+
(t) => (0, import_utils.snapToStepMinutes)(t, stepMinutes),
|
|
401
|
+
[stepMinutes]
|
|
402
|
+
);
|
|
403
|
+
const isInDisabled = (0, import_react.useCallback)(
|
|
404
|
+
(t) => (0, import_utils.isInDisabledRanges)(t, disabledRanges),
|
|
405
|
+
[disabledRanges]
|
|
406
|
+
);
|
|
407
|
+
const handleChange = (0, import_react.useCallback)(
|
|
408
|
+
(next) => {
|
|
409
|
+
if (isInDisabled(next)) return;
|
|
410
|
+
if (!isControlled) setInternalValue(next);
|
|
411
|
+
onChange == null ? void 0 : onChange(next);
|
|
412
|
+
},
|
|
413
|
+
[isControlled, onChange, isInDisabled]
|
|
414
|
+
);
|
|
415
|
+
(0, import_hooks.useRealtime)(realtime, () => {
|
|
416
|
+
const wall = (0, import_dayjs.default)().startOf("minute");
|
|
417
|
+
const [rangeStart, rangeEnd] = (0, import_utils.getRangeBounds)(range, referenceDate);
|
|
418
|
+
const clamped = wall.isBefore(rangeStart) ? rangeStart : wall.isAfter(rangeEnd) ? rangeEnd : wall;
|
|
419
|
+
const snapped = snapToStep ? snapFn(clamped) : clamped;
|
|
420
|
+
if (!isInDisabled(snapped)) handleChange(snapped);
|
|
421
|
+
});
|
|
422
|
+
(0, import_react.useEffect)(() => {
|
|
423
|
+
if (!isControlled && valueProp !== void 0) {
|
|
424
|
+
setInternalValue((0, import_utils.parseValue)(valueProp, referenceDate));
|
|
425
|
+
}
|
|
426
|
+
}, [isControlled, valueProp, referenceDate]);
|
|
427
|
+
const referenceDayMs = referenceDate.valueOf();
|
|
428
|
+
(0, import_react.useEffect)(() => {
|
|
429
|
+
if (isControlled) return;
|
|
430
|
+
setInternalValue((prev) => {
|
|
431
|
+
if (!prev) {
|
|
432
|
+
return (0, import_utils.parseValue)(defaultValue, referenceDate);
|
|
433
|
+
}
|
|
434
|
+
return referenceDate.hour(prev.hour()).minute(prev.minute()).second(0).millisecond(0);
|
|
435
|
+
});
|
|
436
|
+
}, [referenceDayMs, isControlled, defaultValue]);
|
|
437
|
+
const cursorOffsetPx = axis.timeToOffset(effectiveValue);
|
|
438
|
+
const wallAligned = (0, import_dayjs.default)().startOf("minute");
|
|
439
|
+
const currentTimeInRange = !wallAligned.isBefore(axis.rangeStart) && !wallAligned.isAfter(axis.rangeEnd);
|
|
440
|
+
const currentTimeOffsetPx = currentTimeInRange ? axis.timeToOffset(wallAligned) : void 0;
|
|
441
|
+
const horizontalCurrentTimeHighlightStyle = (0, import_react.useMemo)(() => {
|
|
442
|
+
if (!isHorizontal || currentTimeOffsetPx == null || currentTimeOffsetPx < 0) {
|
|
443
|
+
return null;
|
|
444
|
+
}
|
|
445
|
+
const w = Math.min(CURRENT_TIME_GRADIENT_WIDTH_H_PX, currentTimeOffsetPx);
|
|
446
|
+
return {
|
|
447
|
+
left: axisStartMarginW + Math.max(0, currentTimeOffsetPx - w),
|
|
448
|
+
top: 0,
|
|
449
|
+
width: w,
|
|
450
|
+
height: 48
|
|
451
|
+
};
|
|
452
|
+
}, [isHorizontal, currentTimeOffsetPx, axisStartMarginW]);
|
|
453
|
+
const SCROLL_SYNC_THRESHOLD_PX = 2;
|
|
454
|
+
const hasScrollPadding = isHorizontal ? effectiveViewportW > 0 : effectiveViewportH > 0;
|
|
455
|
+
const verticalTailPx = effectiveViewportH / 2;
|
|
456
|
+
const verticalWrapHeight = axisStartMarginH + axis.totalLengthPx + verticalTailPx;
|
|
457
|
+
const maxScrollPx = isHorizontal ? Math.max(0, axis.totalLengthPx - cellSizePx) : Math.max(0, verticalWrapHeight - effectiveViewportH);
|
|
458
|
+
(0, import_react.useEffect)(() => {
|
|
459
|
+
var _a2, _b2, _c, _d;
|
|
460
|
+
if (!isAxisMoves && isHorizontal) {
|
|
461
|
+
const container2 = (_b2 = (_a2 = scrollRef.current) == null ? void 0 : _a2.getScrollContainer) == null ? void 0 : _b2.call(_a2);
|
|
462
|
+
if (container2 && container2.scrollLeft !== 0) {
|
|
463
|
+
container2.scrollTo({ left: 0, behavior: "auto" });
|
|
464
|
+
}
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
if (!isAxisMoves && cursorDragActiveRef.current) return;
|
|
468
|
+
if (valueUpdatedByScrollRef.current) {
|
|
469
|
+
valueUpdatedByScrollRef.current = false;
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
const container = (_d = (_c = scrollRef.current) == null ? void 0 : _c.getScrollContainer) == null ? void 0 : _d.call(_c);
|
|
473
|
+
if (!container) return;
|
|
474
|
+
const viewportPx = isHorizontal ? container.clientWidth : container.clientHeight;
|
|
475
|
+
const targetScroll = hasScrollPadding ? Math.max(0, Math.min(cursorOffsetPx - dotOffsetPx, maxScrollPx)) : Math.max(
|
|
476
|
+
0,
|
|
477
|
+
Math.min(
|
|
478
|
+
cursorOffsetPx - viewportPx / 2,
|
|
479
|
+
Math.max(0, axis.totalLengthPx - viewportPx)
|
|
480
|
+
)
|
|
481
|
+
);
|
|
482
|
+
const currentScroll = isHorizontal ? container.scrollLeft : container.scrollTop;
|
|
483
|
+
if (Math.abs(currentScroll - targetScroll) <= SCROLL_SYNC_THRESHOLD_PX)
|
|
484
|
+
return;
|
|
485
|
+
scrollToCenterInProgressRef.current = true;
|
|
486
|
+
if (isHorizontal) {
|
|
487
|
+
container.scrollTo({ left: targetScroll, behavior: "smooth" });
|
|
488
|
+
} else {
|
|
489
|
+
container.scrollTo({ top: targetScroll, behavior: "smooth" });
|
|
490
|
+
}
|
|
491
|
+
}, [
|
|
492
|
+
effectiveValue.valueOf(),
|
|
493
|
+
isHorizontal,
|
|
494
|
+
cursorOffsetPx,
|
|
495
|
+
maxScrollPx,
|
|
496
|
+
hasScrollPadding,
|
|
497
|
+
dotOffsetPx,
|
|
498
|
+
cellSizePx,
|
|
499
|
+
axis.totalLengthPx,
|
|
500
|
+
isAxisMoves
|
|
501
|
+
]);
|
|
502
|
+
const scrollToCenterTime = (0, import_react.useCallback)(
|
|
503
|
+
(t) => {
|
|
504
|
+
const container = getScrollContainer();
|
|
505
|
+
if (!container) return;
|
|
506
|
+
const offset = axis.timeToOffset(t);
|
|
507
|
+
const viewportPx = isHorizontal ? container.clientWidth : container.clientHeight;
|
|
508
|
+
const maxScroll = hasScrollPadding ? maxScrollPx : Math.max(0, axis.totalLengthPx - viewportPx);
|
|
509
|
+
const target = hasScrollPadding ? Math.max(0, Math.min(offset - dotOffsetPx, maxScrollPx)) : Math.max(0, Math.min(offset - viewportPx / 2, maxScroll));
|
|
510
|
+
scrollToCenterInProgressRef.current = true;
|
|
511
|
+
container.scrollTo({
|
|
512
|
+
left: isHorizontal ? target : 0,
|
|
513
|
+
top: isHorizontal ? 0 : target,
|
|
514
|
+
behavior: "smooth"
|
|
515
|
+
});
|
|
516
|
+
},
|
|
517
|
+
[
|
|
518
|
+
getScrollContainer,
|
|
519
|
+
axis.timeToOffset,
|
|
520
|
+
axis.totalLengthPx,
|
|
521
|
+
isHorizontal,
|
|
522
|
+
hasScrollPadding,
|
|
523
|
+
dotOffsetPx,
|
|
524
|
+
maxScrollPx
|
|
525
|
+
]
|
|
526
|
+
);
|
|
527
|
+
const handleSelectTime = (0, import_react.useCallback)(
|
|
528
|
+
(t) => {
|
|
529
|
+
handleChange(t);
|
|
530
|
+
if (isAxisMoves) scrollToCenterTime(t);
|
|
531
|
+
},
|
|
532
|
+
[handleChange, isAxisMoves, scrollToCenterTime]
|
|
533
|
+
);
|
|
534
|
+
const handleNow = (0, import_react.useCallback)(() => {
|
|
535
|
+
valueUpdatedByScrollRef.current = false;
|
|
536
|
+
const wall = (0, import_dayjs.default)().startOf("minute");
|
|
537
|
+
const [rangeStart, rangeEnd] = (0, import_utils.getRangeBounds)(range, referenceDate);
|
|
538
|
+
const clamped = wall.isBefore(rangeStart) ? rangeStart : wall.isAfter(rangeEnd) ? rangeEnd : wall;
|
|
539
|
+
handleChange(clamped);
|
|
540
|
+
}, [range, referenceDate, handleChange]);
|
|
541
|
+
const applyOffsetToNavigatorValue = (0, import_react.useCallback)(
|
|
542
|
+
(offsetPx, snap) => {
|
|
543
|
+
const maxO = Math.max(0, axis.totalLengthPx - 1e-3);
|
|
544
|
+
const nextOff = Math.max(0, Math.min(offsetPx, maxO));
|
|
545
|
+
const t = axis.offsetToTimeContinuous(nextOff);
|
|
546
|
+
if (!t) return;
|
|
547
|
+
const out = snapToStep ? snap ? (0, import_utils.snapToStepMinutes)(t, stepMinutes) : t.startOf("minute") : t;
|
|
548
|
+
if ((0, import_utils.isInDisabledRanges)(out, disabledRanges)) return;
|
|
549
|
+
if (!isControlled) setInternalValue(out);
|
|
550
|
+
onChange == null ? void 0 : onChange(out);
|
|
551
|
+
},
|
|
552
|
+
[
|
|
553
|
+
axis.totalLengthPx,
|
|
554
|
+
axis.offsetToTimeContinuous,
|
|
555
|
+
snapToStep,
|
|
556
|
+
stepMinutes,
|
|
557
|
+
disabledRanges,
|
|
558
|
+
isControlled,
|
|
559
|
+
onChange
|
|
560
|
+
]
|
|
561
|
+
);
|
|
562
|
+
const handleCursorDragPointerDown = (0, import_react.useCallback)(
|
|
563
|
+
(e) => {
|
|
564
|
+
if (userInteractionLocked || isAxisMoves) return;
|
|
565
|
+
e.preventDefault();
|
|
566
|
+
e.stopPropagation();
|
|
567
|
+
onUserInteraction == null ? void 0 : onUserInteraction();
|
|
568
|
+
cursorDragActiveRef.current = true;
|
|
569
|
+
cursorDragBaseRef.current = {
|
|
570
|
+
startClient: isHorizontal ? e.clientX : e.clientY,
|
|
571
|
+
startOffset: cursorOffsetPx
|
|
572
|
+
};
|
|
573
|
+
valueUpdatedByScrollRef.current = true;
|
|
574
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
575
|
+
},
|
|
576
|
+
[
|
|
577
|
+
userInteractionLocked,
|
|
578
|
+
isAxisMoves,
|
|
579
|
+
isHorizontal,
|
|
580
|
+
cursorOffsetPx,
|
|
581
|
+
onUserInteraction
|
|
582
|
+
]
|
|
583
|
+
);
|
|
584
|
+
const handleCursorDragPointerMove = (0, import_react.useCallback)(
|
|
585
|
+
(e) => {
|
|
586
|
+
if (!cursorDragActiveRef.current) return;
|
|
587
|
+
const client = isHorizontal ? e.clientX : e.clientY;
|
|
588
|
+
const delta = client - cursorDragBaseRef.current.startClient;
|
|
589
|
+
const nextOff = cursorDragBaseRef.current.startOffset + delta;
|
|
590
|
+
applyOffsetToNavigatorValue(nextOff, false);
|
|
591
|
+
},
|
|
592
|
+
[isHorizontal, applyOffsetToNavigatorValue]
|
|
593
|
+
);
|
|
594
|
+
const handleCursorDragPointerUp = (0, import_react.useCallback)(
|
|
595
|
+
(e) => {
|
|
596
|
+
if (!cursorDragActiveRef.current) return;
|
|
597
|
+
cursorDragActiveRef.current = false;
|
|
598
|
+
try {
|
|
599
|
+
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
600
|
+
} catch {
|
|
601
|
+
}
|
|
602
|
+
const client = isHorizontal ? e.clientX : e.clientY;
|
|
603
|
+
const delta = client - cursorDragBaseRef.current.startClient;
|
|
604
|
+
const nextOff = cursorDragBaseRef.current.startOffset + delta;
|
|
605
|
+
valueUpdatedByScrollRef.current = false;
|
|
606
|
+
applyOffsetToNavigatorValue(nextOff, true);
|
|
607
|
+
},
|
|
608
|
+
[isHorizontal, applyOffsetToNavigatorValue]
|
|
609
|
+
);
|
|
610
|
+
const businessHoursPx = (0, import_react.useMemo)(() => {
|
|
611
|
+
if (!businessHours) return void 0;
|
|
612
|
+
const [s, e] = (0, import_utils.getRangeBounds)(businessHours, referenceDate);
|
|
613
|
+
return [axis.timeToOffset(s), axis.timeToOffset(e)];
|
|
614
|
+
}, [businessHours, referenceDate, axis.timeToOffset]);
|
|
615
|
+
const scrollConfig = (0, import_react.useMemo)(
|
|
616
|
+
() => ({
|
|
617
|
+
show: false,
|
|
618
|
+
type: isHorizontal ? "lrArrows" : "tbArrows",
|
|
619
|
+
scrollDistance: cellSizePx
|
|
620
|
+
}),
|
|
621
|
+
[isHorizontal, cellSizePx]
|
|
622
|
+
);
|
|
623
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
624
|
+
"div",
|
|
625
|
+
{
|
|
626
|
+
className: (0, import_classnames.default)(
|
|
627
|
+
"pisell-time-navigator",
|
|
628
|
+
`pisell-time-navigator--${orientation}`,
|
|
629
|
+
userInteractionLocked && "pisell-time-navigator--interaction-locked",
|
|
630
|
+
className
|
|
631
|
+
),
|
|
632
|
+
style: isHorizontal ? style : { height: "100%", minHeight: 200, ...style }
|
|
633
|
+
},
|
|
634
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
635
|
+
"div",
|
|
636
|
+
{
|
|
637
|
+
ref: viewportWrapRef,
|
|
638
|
+
className: "pisell-time-navigator-viewport-wrap",
|
|
639
|
+
style: isHorizontal ? void 0 : { height: "100%", minHeight: 200, maxHeight: 800 },
|
|
640
|
+
onPointerDownCapture: () => {
|
|
641
|
+
isPointerDownRef.current = true;
|
|
642
|
+
},
|
|
643
|
+
onPointerUpCapture: handlePointerUp,
|
|
644
|
+
onPointerLeaveCapture: handlePointerUp
|
|
645
|
+
},
|
|
646
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
647
|
+
"div",
|
|
648
|
+
{
|
|
649
|
+
className: (0, import_classnames.default)(
|
|
650
|
+
"pisell-time-navigator-scroll-host",
|
|
651
|
+
userInteractionLocked && "pisell-time-navigator-scroll-host--interaction-locked"
|
|
652
|
+
)
|
|
653
|
+
},
|
|
654
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
655
|
+
import_PisellScrollView.default,
|
|
656
|
+
{
|
|
657
|
+
ref: scrollRef,
|
|
658
|
+
width: "100%",
|
|
659
|
+
height: "100%",
|
|
660
|
+
overflow: isHorizontal ? "x" : "y",
|
|
661
|
+
showScrollButtons: false,
|
|
662
|
+
scrollbarStyle: "none",
|
|
663
|
+
scrollActionsConfig: scrollConfig,
|
|
664
|
+
onScroll: handleScroll,
|
|
665
|
+
onScrollEnd: handleScrollEnd,
|
|
666
|
+
style: {
|
|
667
|
+
...isHorizontal ? { height: 48 } : {
|
|
668
|
+
width: 54,
|
|
669
|
+
minHeight: 200,
|
|
670
|
+
height: "100%",
|
|
671
|
+
maxHeight: 800
|
|
672
|
+
},
|
|
673
|
+
...containerStyle
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
677
|
+
import_components.GestureLayer,
|
|
678
|
+
{
|
|
679
|
+
orientation,
|
|
680
|
+
cellSizePx,
|
|
681
|
+
axisStartMarginPx: isHorizontal ? axisStartMarginW : axisStartMarginH,
|
|
682
|
+
offsetToTime: axis.offsetToTime,
|
|
683
|
+
onSelectTime: handleSelectTime,
|
|
684
|
+
isInDisabledRanges: isInDisabled,
|
|
685
|
+
snapToStep,
|
|
686
|
+
stepMinutes,
|
|
687
|
+
snapFn,
|
|
688
|
+
scrollPosition,
|
|
689
|
+
viewportSize,
|
|
690
|
+
onUserInteraction,
|
|
691
|
+
onPointerDown: inertiaHandlers.onPointerDown,
|
|
692
|
+
onPointerMove: inertiaHandlers.onPointerMove,
|
|
693
|
+
onPointerUp: inertiaHandlers.onPointerUp,
|
|
694
|
+
onPointerLeave: inertiaHandlers.onPointerUp
|
|
695
|
+
},
|
|
696
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
697
|
+
"div",
|
|
698
|
+
{
|
|
699
|
+
className: "pisell-time-navigator-axis-wrap",
|
|
700
|
+
style: isHorizontal ? horizontalAxisWrapStyle ?? { minHeight: 48 } : {
|
|
701
|
+
width: "100%"
|
|
702
|
+
/* 不设 height,由轴(marginTop + 内容 + marginBottom)自然撑开,避免固定高度与 margin 的 CSS 盒模型歧义 */
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
horizontalCurrentTimeHighlightStyle && /* @__PURE__ */ import_react.default.createElement(
|
|
706
|
+
"div",
|
|
707
|
+
{
|
|
708
|
+
className: "pisell-time-navigator-current-gradient pisell-time-navigator-current-gradient--horizontal",
|
|
709
|
+
style: horizontalCurrentTimeHighlightStyle,
|
|
710
|
+
"aria-hidden": true
|
|
711
|
+
}
|
|
712
|
+
),
|
|
713
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
714
|
+
"div",
|
|
715
|
+
{
|
|
716
|
+
className: (0, import_classnames.default)(
|
|
717
|
+
"pisell-time-navigator-axis",
|
|
718
|
+
`pisell-time-navigator-axis--${orientation}`
|
|
719
|
+
),
|
|
720
|
+
"data-time-navigator-axis": true,
|
|
721
|
+
style: isHorizontal ? {
|
|
722
|
+
width: axis.totalLengthPx,
|
|
723
|
+
height: 48,
|
|
724
|
+
marginLeft: axisStartMarginW
|
|
725
|
+
} : {
|
|
726
|
+
height: axis.totalLengthPx,
|
|
727
|
+
width: "100%",
|
|
728
|
+
marginTop: axisStartMarginH,
|
|
729
|
+
marginBottom: verticalTailPx
|
|
730
|
+
}
|
|
731
|
+
},
|
|
732
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
733
|
+
import_components.BackgroundLayer,
|
|
734
|
+
{
|
|
735
|
+
orientation,
|
|
736
|
+
pastTimeFade,
|
|
737
|
+
businessHoursPx
|
|
738
|
+
}
|
|
739
|
+
),
|
|
740
|
+
horizontalDensityCurve ? /* @__PURE__ */ import_react.default.createElement(
|
|
741
|
+
"svg",
|
|
742
|
+
{
|
|
743
|
+
className: "pisell-time-navigator-density-layer",
|
|
744
|
+
width: horizontalDensityCurve.w,
|
|
745
|
+
height: horizontalDensityCurve.h,
|
|
746
|
+
viewBox: `0 0 ${horizontalDensityCurve.w} ${horizontalDensityCurve.h}`,
|
|
747
|
+
preserveAspectRatio: "none",
|
|
748
|
+
"aria-hidden": true
|
|
749
|
+
},
|
|
750
|
+
/* @__PURE__ */ import_react.default.createElement("defs", null, /* @__PURE__ */ import_react.default.createElement(
|
|
751
|
+
"linearGradient",
|
|
752
|
+
{
|
|
753
|
+
id: densityGradientId,
|
|
754
|
+
x1: "0",
|
|
755
|
+
y1: "0",
|
|
756
|
+
x2: "0",
|
|
757
|
+
y2: "1"
|
|
758
|
+
},
|
|
759
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
760
|
+
"stop",
|
|
761
|
+
{
|
|
762
|
+
offset: "0%",
|
|
763
|
+
stopColor: "#ff9c66",
|
|
764
|
+
stopOpacity: "0.32"
|
|
765
|
+
}
|
|
766
|
+
),
|
|
767
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
768
|
+
"stop",
|
|
769
|
+
{
|
|
770
|
+
offset: "100%",
|
|
771
|
+
stopColor: "#ff9c66",
|
|
772
|
+
stopOpacity: "0.02"
|
|
773
|
+
}
|
|
774
|
+
)
|
|
775
|
+
)),
|
|
776
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
777
|
+
"path",
|
|
778
|
+
{
|
|
779
|
+
d: horizontalDensityCurve.areaPath,
|
|
780
|
+
fill: `url(#${densityGradientId})`
|
|
781
|
+
}
|
|
782
|
+
),
|
|
783
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
784
|
+
"path",
|
|
785
|
+
{
|
|
786
|
+
d: horizontalDensityCurve.linePath,
|
|
787
|
+
fill: "none",
|
|
788
|
+
stroke: "#ff8a4a",
|
|
789
|
+
strokeWidth: 1.8,
|
|
790
|
+
vectorEffect: "non-scaling-stroke"
|
|
791
|
+
}
|
|
792
|
+
),
|
|
793
|
+
horizontalDensityCurve.points.map((p, i) => /* @__PURE__ */ import_react.default.createElement(
|
|
794
|
+
"circle",
|
|
795
|
+
{
|
|
796
|
+
key: i,
|
|
797
|
+
cx: p.x,
|
|
798
|
+
cy: p.y,
|
|
799
|
+
r: 1.4,
|
|
800
|
+
fill: "#ff8a4a"
|
|
801
|
+
}
|
|
802
|
+
))
|
|
803
|
+
) : null,
|
|
804
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
805
|
+
import_components.ScaleLayer,
|
|
806
|
+
{
|
|
807
|
+
orientation,
|
|
808
|
+
ticks: axis.ticks,
|
|
809
|
+
stepMinutes,
|
|
810
|
+
majorStepMinutes,
|
|
811
|
+
timeFormat,
|
|
812
|
+
locale,
|
|
813
|
+
style: scaleStyle,
|
|
814
|
+
horizontalCellSizePx: isHorizontal ? cellSizePx : void 0
|
|
815
|
+
}
|
|
816
|
+
),
|
|
817
|
+
isHorizontal && currentTimeOffsetPx != null && currentTimeOffsetPx >= 0 && /* @__PURE__ */ import_react.default.createElement(
|
|
818
|
+
"span",
|
|
819
|
+
{
|
|
820
|
+
className: "pisell-time-navigator-current-time-bubble",
|
|
821
|
+
style: { left: currentTimeOffsetPx },
|
|
822
|
+
"aria-hidden": true
|
|
823
|
+
},
|
|
824
|
+
locale ? wallAligned.locale(locale).format(timeFormat) : wallAligned.format(timeFormat)
|
|
825
|
+
),
|
|
826
|
+
!isHorizontal && currentTimeOffsetPx != null && currentTimeOffsetPx >= 0 && /* @__PURE__ */ import_react.default.createElement(
|
|
827
|
+
"div",
|
|
828
|
+
{
|
|
829
|
+
className: "pisell-time-navigator-current-line",
|
|
830
|
+
style: {
|
|
831
|
+
left: 0,
|
|
832
|
+
top: currentTimeOffsetPx - 1,
|
|
833
|
+
width: "100%",
|
|
834
|
+
height: 2,
|
|
835
|
+
background: "#FF692E"
|
|
836
|
+
},
|
|
837
|
+
"aria-hidden": true
|
|
838
|
+
}
|
|
839
|
+
),
|
|
840
|
+
!isAxisMoves && /* @__PURE__ */ import_react.default.createElement(
|
|
841
|
+
import_components.CursorLayer,
|
|
842
|
+
{
|
|
843
|
+
orientation,
|
|
844
|
+
value: effectiveValue,
|
|
845
|
+
timeFormat,
|
|
846
|
+
locale,
|
|
847
|
+
isRealtime: realtime,
|
|
848
|
+
offsetPx: cursorOffsetPx,
|
|
849
|
+
style: cursorStyle,
|
|
850
|
+
dragInteractive: !userInteractionLocked,
|
|
851
|
+
onDragPointerDown: handleCursorDragPointerDown,
|
|
852
|
+
onDragPointerMove: handleCursorDragPointerMove,
|
|
853
|
+
onDragPointerUp: handleCursorDragPointerUp,
|
|
854
|
+
onDragPointerCancel: handleCursorDragPointerUp
|
|
855
|
+
}
|
|
856
|
+
)
|
|
857
|
+
)
|
|
858
|
+
)
|
|
859
|
+
)
|
|
860
|
+
)
|
|
861
|
+
),
|
|
862
|
+
isAxisMoves && /* @__PURE__ */ import_react.default.createElement(
|
|
863
|
+
"div",
|
|
864
|
+
{
|
|
865
|
+
className: (0, import_classnames.default)(
|
|
866
|
+
"pisell-time-navigator-cursor-fixed",
|
|
867
|
+
`pisell-time-navigator-cursor-fixed--${orientation}`
|
|
868
|
+
),
|
|
869
|
+
"aria-hidden": true
|
|
870
|
+
},
|
|
871
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
872
|
+
import_components.CursorLayer,
|
|
873
|
+
{
|
|
874
|
+
orientation,
|
|
875
|
+
value: effectiveValue,
|
|
876
|
+
timeFormat,
|
|
877
|
+
locale,
|
|
878
|
+
isRealtime: realtime,
|
|
879
|
+
offsetPx: 0,
|
|
880
|
+
fixedCenter: true,
|
|
881
|
+
style: cursorStyle
|
|
882
|
+
}
|
|
883
|
+
)
|
|
884
|
+
),
|
|
885
|
+
showNowButton && /* @__PURE__ */ import_react.default.createElement(
|
|
886
|
+
import_components.NowButton,
|
|
887
|
+
{
|
|
888
|
+
orientation,
|
|
889
|
+
onClick: handleNow,
|
|
890
|
+
style: nowButtonStyle,
|
|
891
|
+
renderCustom: renderNowButton
|
|
892
|
+
}
|
|
893
|
+
)
|
|
894
|
+
)
|
|
895
|
+
);
|
|
896
|
+
}
|
|
897
|
+
PisellTimeNavigator.displayName = "PisellTimeNavigator";
|
|
898
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
899
|
+
0 && (module.exports = {
|
|
900
|
+
PisellTimeNavigator
|
|
901
|
+
});
|