@pisell/materials 1.0.1059 → 1.0.1062
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 +27 -27
- package/es/components/PisellLayouts/index.d.ts +2 -1
- package/es/components/PisellLayouts/index.js +17 -15
- 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 +474 -202
- 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 +469 -38
- 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 +497 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +154 -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 +37 -11
- 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 +28 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +62 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +438 -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 +322 -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 +362 -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 +95 -18
- package/es/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +4 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.stories.js +1315 -383
- 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 +57 -10
- 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 +101 -19
- package/es/components/pisellRecordBoard/types.d.ts +62 -2
- 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 +609 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +412 -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 +149 -0
- package/es/components/pisellTimeNavigator/types.js +1 -0
- package/es/components/pisellTimeNavigator/utils/index.d.ts +30 -0
- package/es/components/pisellTimeNavigator/utils/index.js +116 -0
- package/es/index.d.ts +15 -5
- package/es/index.js +7 -1
- 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 +566 -181
- 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 +508 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +154 -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 +47 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +62 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +431 -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 +309 -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 +362 -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 +82 -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 +88 -6
- package/lib/components/pisellRecordBoard/types.d.ts +62 -2
- 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 +716 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +412 -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 +149 -0
- package/lib/components/pisellTimeNavigator/types.js +17 -0
- package/lib/components/pisellTimeNavigator/utils/index.d.ts +30 -0
- package/lib/components/pisellTimeNavigator/utils/index.js +107 -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 +3894 -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 +3 -3
|
@@ -0,0 +1,188 @@
|
|
|
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/pisellFloorMapLayout/components/FloorMapEditTopBar.tsx
|
|
30
|
+
var FloorMapEditTopBar_exports = {};
|
|
31
|
+
__export(FloorMapEditTopBar_exports, {
|
|
32
|
+
FloorMapEditTopBar: () => FloorMapEditTopBar,
|
|
33
|
+
default: () => FloorMapEditTopBar_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(FloorMapEditTopBar_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_icons = require("@ant-design/icons");
|
|
39
|
+
var import_utils = require("@pisell/utils");
|
|
40
|
+
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
41
|
+
var import_floorMapCanvasDisplay = require("../utils/floorMapCanvasDisplay");
|
|
42
|
+
var import_CanvasTabs = require("./CanvasTabs");
|
|
43
|
+
var import_FloorMapEditTopBar = require("./FloorMapEditTopBar.less");
|
|
44
|
+
var PREFIX = "pisell-floor-map-layout";
|
|
45
|
+
var I18N_TB = "pisell-floor-map-layout.edit-top-bar";
|
|
46
|
+
function FloorMapEditTopBar(props) {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
const {
|
|
49
|
+
mode = "full",
|
|
50
|
+
config,
|
|
51
|
+
canvases,
|
|
52
|
+
currentCanvasId,
|
|
53
|
+
onTabChange,
|
|
54
|
+
canEditTabs = false,
|
|
55
|
+
onAddCanvas,
|
|
56
|
+
onRemoveCanvas,
|
|
57
|
+
onRenameCanvas,
|
|
58
|
+
onSave,
|
|
59
|
+
saving,
|
|
60
|
+
saveError,
|
|
61
|
+
layoutDirty,
|
|
62
|
+
toggleFullscreen,
|
|
63
|
+
isFullscreen = false,
|
|
64
|
+
controls = {},
|
|
65
|
+
extraActions,
|
|
66
|
+
className
|
|
67
|
+
} = props;
|
|
68
|
+
const engineCtx = (0, import_useEngineContext.default)();
|
|
69
|
+
const engineLocale = ((_b = (_a = engineCtx == null ? void 0 : engineCtx.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "zh-CN";
|
|
70
|
+
const topBarLabels = (0, import_react.useMemo)(() => {
|
|
71
|
+
(0, import_floorMapCanvasDisplay.initFloorMapLayoutLocales)(engineLocale);
|
|
72
|
+
return {
|
|
73
|
+
aria: import_utils.locales.getText(`${I18N_TB}.aria`),
|
|
74
|
+
fsEnterAria: import_utils.locales.getText(`${I18N_TB}.fullscreen-enter-aria`),
|
|
75
|
+
fsEnterTitle: import_utils.locales.getText(`${I18N_TB}.fullscreen-enter-title`),
|
|
76
|
+
fsExitAria: import_utils.locales.getText(`${I18N_TB}.fullscreen-exit-aria`),
|
|
77
|
+
fsExitTitle: import_utils.locales.getText(`${I18N_TB}.fullscreen-exit-title`),
|
|
78
|
+
unsaved: import_utils.locales.getText(`${I18N_TB}.unsaved`),
|
|
79
|
+
save: import_utils.locales.getText(`${I18N_TB}.save`),
|
|
80
|
+
saving: import_utils.locales.getText(`${I18N_TB}.saving`)
|
|
81
|
+
};
|
|
82
|
+
}, [engineLocale]);
|
|
83
|
+
const showSave = Boolean(onSave && config.canvasUi.canEdit);
|
|
84
|
+
const showFullscreenEnter = mode === "compact" && Boolean(toggleFullscreen);
|
|
85
|
+
const showFullscreenExit = mode === "full" && isFullscreen && Boolean(toggleFullscreen);
|
|
86
|
+
const hasFullActions = showSave || showFullscreenExit || Boolean(saveError) || extraActions != null && extraActions !== false;
|
|
87
|
+
if (mode === "compact") {
|
|
88
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
89
|
+
"div",
|
|
90
|
+
{
|
|
91
|
+
className: (0, import_classnames.default)(`${PREFIX}-edit-top-bar`, className),
|
|
92
|
+
role: "toolbar",
|
|
93
|
+
"aria-label": topBarLabels.aria
|
|
94
|
+
},
|
|
95
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}-edit-top-bar-tabs` }, /* @__PURE__ */ import_react.default.createElement(
|
|
96
|
+
import_CanvasTabs.CanvasTabs,
|
|
97
|
+
{
|
|
98
|
+
canvases,
|
|
99
|
+
currentCanvasId,
|
|
100
|
+
onTabChange,
|
|
101
|
+
canEdit: canEditTabs,
|
|
102
|
+
onAddCanvas,
|
|
103
|
+
onRemoveCanvas,
|
|
104
|
+
onRenameCanvas,
|
|
105
|
+
className: `${PREFIX}-edit-top-bar-canvas-tabs`
|
|
106
|
+
}
|
|
107
|
+
)),
|
|
108
|
+
showFullscreenEnter ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}-edit-top-bar-actions` }, /* @__PURE__ */ import_react.default.createElement(
|
|
109
|
+
"button",
|
|
110
|
+
{
|
|
111
|
+
type: "button",
|
|
112
|
+
className: (0, import_classnames.default)(
|
|
113
|
+
`${PREFIX}-edit-top-bar-btn`,
|
|
114
|
+
`${PREFIX}-edit-top-bar-btn-ghost`
|
|
115
|
+
),
|
|
116
|
+
onClick: () => toggleFullscreen == null ? void 0 : toggleFullscreen(),
|
|
117
|
+
"aria-label": topBarLabels.fsEnterAria,
|
|
118
|
+
title: topBarLabels.fsEnterTitle
|
|
119
|
+
},
|
|
120
|
+
/* @__PURE__ */ import_react.default.createElement(import_icons.FullscreenOutlined, null)
|
|
121
|
+
)) : null
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
className: (0, import_classnames.default)(`${PREFIX}-edit-top-bar`, className),
|
|
128
|
+
role: "toolbar",
|
|
129
|
+
"aria-label": topBarLabels.aria
|
|
130
|
+
},
|
|
131
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}-edit-top-bar-tabs` }, /* @__PURE__ */ import_react.default.createElement(
|
|
132
|
+
import_CanvasTabs.CanvasTabs,
|
|
133
|
+
{
|
|
134
|
+
canvases,
|
|
135
|
+
currentCanvasId,
|
|
136
|
+
onTabChange,
|
|
137
|
+
canEdit: canEditTabs,
|
|
138
|
+
onAddCanvas,
|
|
139
|
+
onRemoveCanvas,
|
|
140
|
+
onRenameCanvas,
|
|
141
|
+
className: `${PREFIX}-edit-top-bar-canvas-tabs`
|
|
142
|
+
}
|
|
143
|
+
)),
|
|
144
|
+
hasFullActions ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}-edit-top-bar-actions` }, saveError ? /* @__PURE__ */ import_react.default.createElement(
|
|
145
|
+
"span",
|
|
146
|
+
{
|
|
147
|
+
className: `${PREFIX}-edit-top-bar-error`,
|
|
148
|
+
title: typeof saveError === "string" ? saveError : saveError == null ? void 0 : saveError.message
|
|
149
|
+
},
|
|
150
|
+
typeof saveError === "string" ? saveError : saveError == null ? void 0 : saveError.message
|
|
151
|
+
) : null, extraActions, showFullscreenExit ? /* @__PURE__ */ import_react.default.createElement(
|
|
152
|
+
"button",
|
|
153
|
+
{
|
|
154
|
+
type: "button",
|
|
155
|
+
className: (0, import_classnames.default)(
|
|
156
|
+
`${PREFIX}-edit-top-bar-btn`,
|
|
157
|
+
`${PREFIX}-edit-top-bar-btn-ghost`
|
|
158
|
+
),
|
|
159
|
+
onClick: () => toggleFullscreen == null ? void 0 : toggleFullscreen(),
|
|
160
|
+
"aria-label": topBarLabels.fsExitAria,
|
|
161
|
+
title: topBarLabels.fsExitTitle
|
|
162
|
+
},
|
|
163
|
+
/* @__PURE__ */ import_react.default.createElement(import_icons.FullscreenExitOutlined, null)
|
|
164
|
+
) : null, showSave ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}-edit-top-bar-save-group` }, layoutDirty ? /* @__PURE__ */ import_react.default.createElement(
|
|
165
|
+
"span",
|
|
166
|
+
{
|
|
167
|
+
className: `${PREFIX}-edit-top-bar-dirty-badge`,
|
|
168
|
+
role: "status",
|
|
169
|
+
"aria-live": "polite"
|
|
170
|
+
},
|
|
171
|
+
topBarLabels.unsaved
|
|
172
|
+
) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
173
|
+
"button",
|
|
174
|
+
{
|
|
175
|
+
type: "button",
|
|
176
|
+
className: (0, import_classnames.default)(`${PREFIX}-edit-top-bar-btn`, "primary"),
|
|
177
|
+
disabled: saving,
|
|
178
|
+
onClick: onSave
|
|
179
|
+
},
|
|
180
|
+
saving ? topBarLabels.saving : topBarLabels.save
|
|
181
|
+
)) : null) : null
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
var FloorMapEditTopBar_default = FloorMapEditTopBar;
|
|
185
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
186
|
+
0 && (module.exports = {
|
|
187
|
+
FloorMapEditTopBar
|
|
188
|
+
});
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/* 编辑态单行顶栏:画布 Tab + 保存 / 全屏 */
|
|
2
|
+
.pisell-floor-map-layout-edit-top-bar {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: row;
|
|
5
|
+
align-items: stretch;
|
|
6
|
+
flex-shrink: 0;
|
|
7
|
+
min-height: 48px;
|
|
8
|
+
background: #fff;
|
|
9
|
+
border-bottom: 1px solid #f0f0f0;
|
|
10
|
+
z-index: 3;
|
|
11
|
+
|
|
12
|
+
&-tabs {
|
|
13
|
+
flex: 1;
|
|
14
|
+
min-width: 0;
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: stretch;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* 嵌入顶栏时去掉 CanvasTabs 自身底边,避免双线 */
|
|
21
|
+
|
|
22
|
+
&-canvas-tabs.pisell-floor-map-layout-canvas-tabs {
|
|
23
|
+
flex: 1;
|
|
24
|
+
min-width: 0;
|
|
25
|
+
overflow-x: auto;
|
|
26
|
+
overflow-y: hidden;
|
|
27
|
+
border-bottom: none;
|
|
28
|
+
flex-wrap: nowrap;
|
|
29
|
+
align-items: center;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-actions {
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: row;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: 8px;
|
|
38
|
+
padding: 0 12px;
|
|
39
|
+
border-left: 1px solid #f0f0f0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&-error {
|
|
43
|
+
max-width: 160px;
|
|
44
|
+
font-size: 12px;
|
|
45
|
+
color: #ff4d4f;
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
text-overflow: ellipsis;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* 全屏顶栏:未保存标签在保存按钮左侧,单行对齐 */
|
|
52
|
+
|
|
53
|
+
&-save-group {
|
|
54
|
+
display: inline-flex;
|
|
55
|
+
flex-direction: row;
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: 10px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&-dirty-badge {
|
|
61
|
+
display: inline-flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 6px;
|
|
64
|
+
padding: 4px 10px 4px 8px;
|
|
65
|
+
font-size: 12px;
|
|
66
|
+
font-weight: 500;
|
|
67
|
+
line-height: 1;
|
|
68
|
+
color: #ad6800;
|
|
69
|
+
white-space: nowrap;
|
|
70
|
+
background: linear-gradient(180deg, #fffef7 0%, #fff7e6 100%);
|
|
71
|
+
border: 1px solid #ffe7a3;
|
|
72
|
+
border-radius: 999px;
|
|
73
|
+
box-shadow: 0 1px 2px rgba(173, 104, 0, 0.06);
|
|
74
|
+
|
|
75
|
+
&::before {
|
|
76
|
+
content: '';
|
|
77
|
+
width: 6px;
|
|
78
|
+
height: 6px;
|
|
79
|
+
flex-shrink: 0;
|
|
80
|
+
border-radius: 50%;
|
|
81
|
+
background: #faad14;
|
|
82
|
+
box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.25);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&-btn {
|
|
87
|
+
display: inline-flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
justify-content: center;
|
|
90
|
+
min-width: 36px;
|
|
91
|
+
height: 32px;
|
|
92
|
+
padding: 0 14px;
|
|
93
|
+
font-size: 14px;
|
|
94
|
+
line-height: 1;
|
|
95
|
+
border-radius: 6px;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
border: 1px solid #d9d9d9;
|
|
98
|
+
background: #fff;
|
|
99
|
+
color: rgba(0, 0, 0, 0.88);
|
|
100
|
+
transition: border-color 0.2s, background 0.2s;
|
|
101
|
+
|
|
102
|
+
&:hover:not(:disabled) {
|
|
103
|
+
border-color: #1677ff;
|
|
104
|
+
color: #1677ff;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:disabled {
|
|
108
|
+
opacity: 0.6;
|
|
109
|
+
cursor: not-allowed;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&.primary {
|
|
113
|
+
color: #fff;
|
|
114
|
+
background: #1677ff;
|
|
115
|
+
border-color: #1677ff;
|
|
116
|
+
|
|
117
|
+
&:hover:not(:disabled) {
|
|
118
|
+
background: #4096ff;
|
|
119
|
+
border-color: #4096ff;
|
|
120
|
+
color: #fff;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&-btn-ghost {
|
|
126
|
+
min-width: 32px;
|
|
127
|
+
padding: 0 8px;
|
|
128
|
+
font-size: 16px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
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/pisellFloorMapLayout/components/FloorMapImageElement.tsx
|
|
30
|
+
var FloorMapImageElement_exports = {};
|
|
31
|
+
__export(FloorMapImageElement_exports, {
|
|
32
|
+
FloorMapImageElement: () => FloorMapImageElement
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(FloorMapImageElement_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var PREFIX = "pisell-floor-map-layout";
|
|
37
|
+
function FloorMapImageElement(props) {
|
|
38
|
+
const { imageUrl, name } = props;
|
|
39
|
+
const [broken, setBroken] = (0, import_react.useState)(false);
|
|
40
|
+
const trimmed = imageUrl != null ? String(imageUrl).trim() : "";
|
|
41
|
+
(0, import_react.useEffect)(() => {
|
|
42
|
+
setBroken(false);
|
|
43
|
+
}, [trimmed]);
|
|
44
|
+
const label = name != null && String(name).trim() ? String(name).trim() : "图片图元";
|
|
45
|
+
if (!trimmed || broken) {
|
|
46
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
className: `${PREFIX}-image-element-placeholder`,
|
|
50
|
+
style: {
|
|
51
|
+
width: "100%",
|
|
52
|
+
height: "100%",
|
|
53
|
+
boxSizing: "border-box",
|
|
54
|
+
display: "flex",
|
|
55
|
+
flexDirection: "column",
|
|
56
|
+
alignItems: "center",
|
|
57
|
+
justifyContent: "center",
|
|
58
|
+
padding: 8,
|
|
59
|
+
background: "#fafafa",
|
|
60
|
+
border: "2px dashed #bfbfbf",
|
|
61
|
+
borderRadius: 4,
|
|
62
|
+
fontSize: 11,
|
|
63
|
+
color: "#8c8c8c",
|
|
64
|
+
textAlign: "center",
|
|
65
|
+
lineHeight: 1.4,
|
|
66
|
+
overflow: "hidden"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
/* @__PURE__ */ import_react.default.createElement("span", { style: { fontWeight: 600, color: "#595959", marginBottom: 4 } }, label),
|
|
70
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, !trimmed ? "在侧栏填写图片地址;可调层级置于桌位下方作底图" : "图片加载失败,请检查地址")
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
74
|
+
"img",
|
|
75
|
+
{
|
|
76
|
+
src: trimmed,
|
|
77
|
+
alt: label,
|
|
78
|
+
draggable: false,
|
|
79
|
+
onError: () => setBroken(true),
|
|
80
|
+
style: {
|
|
81
|
+
width: "100%",
|
|
82
|
+
height: "100%",
|
|
83
|
+
objectFit: "cover",
|
|
84
|
+
display: "block",
|
|
85
|
+
pointerEvents: "none",
|
|
86
|
+
userSelect: "none"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
92
|
+
0 && (module.exports = {
|
|
93
|
+
FloorMapImageElement
|
|
94
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FloorMapToolbar - 编辑态左侧侧边栏:按分类添加图元、绑定数据源与行;保存可选(默认用顶栏)
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import type { FloorMapViewConfig, FloorMapDataSources, FloorMapMergedItem, FloorMapSceneElement, FloorMapPlaceMode } from '../types';
|
|
6
|
+
import { type FloorMapPaletteDragPayload } from '../utils/floorMapDropUtils';
|
|
7
|
+
import './FloorMapToolbar.less';
|
|
8
|
+
export type { FloorMapPlaceMode as PlaceMode };
|
|
9
|
+
export interface FloorMapToolbarProps {
|
|
10
|
+
config: FloorMapViewConfig;
|
|
11
|
+
dataSources: FloorMapDataSources;
|
|
12
|
+
dataSourceLabels?: Record<string, string>;
|
|
13
|
+
canCreate: boolean;
|
|
14
|
+
placeMode: FloorMapPlaceMode;
|
|
15
|
+
onPlaceModeChange: (mode: FloorMapPlaceMode) => void;
|
|
16
|
+
renderPreviewItem?: (item: FloorMapMergedItem) => React.ReactNode;
|
|
17
|
+
placementPreviewSize?: {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
};
|
|
21
|
+
decorationPreviewSize?: number;
|
|
22
|
+
sceneElements?: FloorMapSceneElement[];
|
|
23
|
+
onSave?: () => void;
|
|
24
|
+
saving?: boolean;
|
|
25
|
+
saveError?: Error | string;
|
|
26
|
+
/** 布局草稿已相对持久化配置变更,提示用户点击本栏「保存」 */
|
|
27
|
+
layoutDirty?: boolean;
|
|
28
|
+
className?: string;
|
|
29
|
+
/** 触摸/笔:Pointer 拖拽落点(mouse 仍用 HTML5 DnD) */
|
|
30
|
+
onPaletteCardPointerDown?: (payload: FloorMapPaletteDragPayload, e: React.PointerEvent<HTMLButtonElement>) => void;
|
|
31
|
+
/** 触摸拖放结束后吞掉按钮 click,避免误触切换落点模式 */
|
|
32
|
+
consumeToolbarClickIfTouchDrag?: () => boolean;
|
|
33
|
+
}
|
|
34
|
+
export declare function FloorMapToolbar(props: FloorMapToolbarProps): JSX.Element;
|
|
35
|
+
export default FloorMapToolbar;
|