@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,88 @@
|
|
|
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/pisellRecordBoard/utils/partitionShellFrameChildren.tsx
|
|
30
|
+
var partitionShellFrameChildren_exports = {};
|
|
31
|
+
__export(partitionShellFrameChildren_exports, {
|
|
32
|
+
RECORD_BOARD_FLOOR_MAP_DISPLAY_NAME: () => RECORD_BOARD_FLOOR_MAP_DISPLAY_NAME,
|
|
33
|
+
partitionShellFrameChildren: () => partitionShellFrameChildren
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(partitionShellFrameChildren_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_FloorMap = __toESM(require("../shellFrame/FloorMap"));
|
|
38
|
+
var RECORD_BOARD_FLOOR_MAP_DISPLAY_NAME = "RecordBoard.FloorMap";
|
|
39
|
+
function isRecordBoardFloorMapElementType(type) {
|
|
40
|
+
if (type === import_FloorMap.default) return true;
|
|
41
|
+
const dn = type == null ? void 0 : type.displayName;
|
|
42
|
+
return dn === RECORD_BOARD_FLOOR_MAP_DISPLAY_NAME;
|
|
43
|
+
}
|
|
44
|
+
function partitionShellFrameChildren(children) {
|
|
45
|
+
let foundFloorMap = false;
|
|
46
|
+
let floorProps;
|
|
47
|
+
const gridChunks = [];
|
|
48
|
+
const walk = (node) => {
|
|
49
|
+
import_react.default.Children.forEach(node, (child) => {
|
|
50
|
+
if (child == null || child === false) return;
|
|
51
|
+
if (!import_react.default.isValidElement(child)) {
|
|
52
|
+
gridChunks.push(child);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (child.type === import_react.default.Fragment) {
|
|
56
|
+
walk(child.props.children);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (isRecordBoardFloorMapElementType(child.type)) {
|
|
60
|
+
foundFloorMap = true;
|
|
61
|
+
floorProps = child.props;
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
gridChunks.push(child);
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
walk(children);
|
|
68
|
+
const hasGridContent = gridChunks.length > 0;
|
|
69
|
+
let gridChildren;
|
|
70
|
+
if (!hasGridContent) {
|
|
71
|
+
gridChildren = null;
|
|
72
|
+
} else if (gridChunks.length === 1) {
|
|
73
|
+
gridChildren = gridChunks[0];
|
|
74
|
+
} else {
|
|
75
|
+
gridChildren = /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, gridChunks);
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
gridChildren,
|
|
79
|
+
hasFloorMapChild: foundFloorMap,
|
|
80
|
+
floorMapPropsFromChild: floorProps,
|
|
81
|
+
hasGridContent
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
85
|
+
0 && (module.exports = {
|
|
86
|
+
RECORD_BOARD_FLOOR_MAP_DISPLAY_NAME,
|
|
87
|
+
partitionShellFrameChildren
|
|
88
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { PisellReservationScheduleProps } from './types';
|
|
3
|
+
import './PisellReservationSchedule.less';
|
|
4
|
+
/**
|
|
5
|
+
* 营业日导航条:上一日、中间日期文案、下一日(深色条样式,适配预约顶栏)
|
|
6
|
+
*/
|
|
7
|
+
export declare function PisellReservationSchedule(props: PisellReservationScheduleProps): JSX.Element;
|
|
8
|
+
export declare namespace PisellReservationSchedule {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,200 @@
|
|
|
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/pisellReservationSchedule/PisellReservationSchedule.tsx
|
|
30
|
+
var PisellReservationSchedule_exports = {};
|
|
31
|
+
__export(PisellReservationSchedule_exports, {
|
|
32
|
+
PisellReservationSchedule: () => PisellReservationSchedule
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(PisellReservationSchedule_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_antd = require("antd");
|
|
39
|
+
var import_date_picker = require("@pisell/date-picker");
|
|
40
|
+
var import_ChevronLeft = __toESM(require("@pisell/icon/es/ChevronLeft"));
|
|
41
|
+
var import_ChevronRight = __toESM(require("@pisell/icon/es/ChevronRight"));
|
|
42
|
+
var import_utils = require("@pisell/utils");
|
|
43
|
+
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
44
|
+
var import_locales = __toESM(require("./locales"));
|
|
45
|
+
var import_PisellReservationSchedule = require("./PisellReservationSchedule.less");
|
|
46
|
+
var I18N_TODAY = "pisell-reservation-schedule.today";
|
|
47
|
+
var I18N_PREV = "pisell-reservation-schedule.prev";
|
|
48
|
+
var I18N_NEXT = "pisell-reservation-schedule.next";
|
|
49
|
+
var I18N_PICK_DATE = "pisell-reservation-schedule.pick-date";
|
|
50
|
+
var I18N_PICK_DATE_TITLE = "pisell-reservation-schedule.pick-date-title";
|
|
51
|
+
function parseDay(input, fallback) {
|
|
52
|
+
if (input == null) return fallback.startOf("day");
|
|
53
|
+
const d = (0, import_dayjs.default)(input);
|
|
54
|
+
return (d.isValid() ? d : fallback).startOf("day");
|
|
55
|
+
}
|
|
56
|
+
function toDayjsLocale(engineLocale) {
|
|
57
|
+
if (!engineLocale || engineLocale === "en") return "en";
|
|
58
|
+
if (engineLocale === "zh-HK") return "zh-hk";
|
|
59
|
+
return "zh-cn";
|
|
60
|
+
}
|
|
61
|
+
function PisellReservationSchedule(props) {
|
|
62
|
+
var _a, _b;
|
|
63
|
+
const {
|
|
64
|
+
value: valueProp,
|
|
65
|
+
onChange,
|
|
66
|
+
defaultValue,
|
|
67
|
+
minDate: minDateProp,
|
|
68
|
+
maxDate: maxDateProp,
|
|
69
|
+
navigationLocked = false,
|
|
70
|
+
className,
|
|
71
|
+
style
|
|
72
|
+
} = props;
|
|
73
|
+
const context = (0, import_useEngineContext.default)();
|
|
74
|
+
const engineLocale = ((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "en";
|
|
75
|
+
import_utils.locales.init(import_locales.default, engineLocale);
|
|
76
|
+
const today = (0, import_react.useMemo)(() => (0, import_dayjs.default)().startOf("day"), []);
|
|
77
|
+
const isControlled = valueProp !== void 0;
|
|
78
|
+
const [internal, setInternal] = (0, import_react.useState)(
|
|
79
|
+
() => parseDay(valueProp ?? defaultValue, today)
|
|
80
|
+
);
|
|
81
|
+
const value = isControlled ? parseDay(valueProp, today) : internal;
|
|
82
|
+
const minDate = (0, import_react.useMemo)(
|
|
83
|
+
() => minDateProp != null ? parseDay(minDateProp, today) : void 0,
|
|
84
|
+
[minDateProp, today]
|
|
85
|
+
);
|
|
86
|
+
const maxDate = (0, import_react.useMemo)(
|
|
87
|
+
() => maxDateProp != null ? parseDay(maxDateProp, today) : void 0,
|
|
88
|
+
[maxDateProp, today]
|
|
89
|
+
);
|
|
90
|
+
const emit = (0, import_react.useCallback)(
|
|
91
|
+
(next) => {
|
|
92
|
+
let d = next.startOf("day");
|
|
93
|
+
if (minDate && d.isBefore(minDate)) d = minDate;
|
|
94
|
+
if (maxDate && d.isAfter(maxDate)) d = maxDate;
|
|
95
|
+
if (!isControlled) setInternal(d);
|
|
96
|
+
onChange == null ? void 0 : onChange(d);
|
|
97
|
+
},
|
|
98
|
+
[isControlled, onChange, minDate, maxDate]
|
|
99
|
+
);
|
|
100
|
+
const prevDisabled = navigationLocked || (minDate ? value.isSame(minDate, "day") : false);
|
|
101
|
+
const nextDisabled = navigationLocked || (maxDate ? value.isSame(maxDate, "day") : false);
|
|
102
|
+
const [calendarOpen, setCalendarOpen] = (0, import_react.useState)(false);
|
|
103
|
+
const centerLabel = (0, import_react.useMemo)(() => {
|
|
104
|
+
const djLoc = toDayjsLocale(engineLocale);
|
|
105
|
+
const dl = value.locale(djLoc);
|
|
106
|
+
const isToday = value.isSame(today, "day");
|
|
107
|
+
const todayText = import_utils.locales.getText(I18N_TODAY);
|
|
108
|
+
const dateStr = djLoc === "en" ? dl.format("MMM D") : dl.format("M月D日");
|
|
109
|
+
const weekStr = dl.format("ddd");
|
|
110
|
+
const parts = [];
|
|
111
|
+
if (isToday && todayText) parts.push(todayText);
|
|
112
|
+
parts.push(dateStr);
|
|
113
|
+
parts.push(weekStr);
|
|
114
|
+
return parts.join(djLoc === "en" ? " · " : " · ");
|
|
115
|
+
}, [value, today, engineLocale]);
|
|
116
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
117
|
+
"div",
|
|
118
|
+
{
|
|
119
|
+
className: (0, import_classnames.default)("pisell-reservation-schedule", className),
|
|
120
|
+
style
|
|
121
|
+
},
|
|
122
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-reservation-schedule-inner" }, /* @__PURE__ */ import_react.default.createElement(
|
|
123
|
+
"button",
|
|
124
|
+
{
|
|
125
|
+
type: "button",
|
|
126
|
+
className: "pisell-reservation-schedule-btn",
|
|
127
|
+
"aria-label": import_utils.locales.getText(I18N_PREV),
|
|
128
|
+
disabled: prevDisabled,
|
|
129
|
+
onClick: () => {
|
|
130
|
+
if (navigationLocked) return;
|
|
131
|
+
emit(value.subtract(1, "day"));
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
/* @__PURE__ */ import_react.default.createElement(import_ChevronLeft.default, { className: "pisell-reservation-schedule-btn-icon" })
|
|
135
|
+
), navigationLocked ? /* @__PURE__ */ import_react.default.createElement(
|
|
136
|
+
"span",
|
|
137
|
+
{
|
|
138
|
+
className: "pisell-reservation-schedule-label pisell-reservation-schedule-label--static",
|
|
139
|
+
"aria-label": centerLabel
|
|
140
|
+
},
|
|
141
|
+
centerLabel
|
|
142
|
+
) : /* @__PURE__ */ import_react.default.createElement(
|
|
143
|
+
"button",
|
|
144
|
+
{
|
|
145
|
+
type: "button",
|
|
146
|
+
className: "pisell-reservation-schedule-label pisell-reservation-schedule-label-trigger",
|
|
147
|
+
"aria-label": import_utils.locales.getText(I18N_PICK_DATE),
|
|
148
|
+
"aria-haspopup": "dialog",
|
|
149
|
+
"aria-expanded": calendarOpen,
|
|
150
|
+
onClick: () => setCalendarOpen(true)
|
|
151
|
+
},
|
|
152
|
+
centerLabel
|
|
153
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
154
|
+
"button",
|
|
155
|
+
{
|
|
156
|
+
type: "button",
|
|
157
|
+
className: "pisell-reservation-schedule-btn",
|
|
158
|
+
"aria-label": import_utils.locales.getText(I18N_NEXT),
|
|
159
|
+
disabled: nextDisabled,
|
|
160
|
+
onClick: () => {
|
|
161
|
+
if (navigationLocked) return;
|
|
162
|
+
emit(value.add(1, "day"));
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
/* @__PURE__ */ import_react.default.createElement(import_ChevronRight.default, { className: "pisell-reservation-schedule-btn-icon" })
|
|
166
|
+
)),
|
|
167
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
168
|
+
import_antd.Modal,
|
|
169
|
+
{
|
|
170
|
+
title: import_utils.locales.getText(I18N_PICK_DATE_TITLE),
|
|
171
|
+
open: !navigationLocked && calendarOpen,
|
|
172
|
+
onCancel: () => setCalendarOpen(false),
|
|
173
|
+
footer: null,
|
|
174
|
+
width: "auto",
|
|
175
|
+
centered: true,
|
|
176
|
+
destroyOnClose: true,
|
|
177
|
+
wrapClassName: "pisell-reservation-schedule-date-modal"
|
|
178
|
+
},
|
|
179
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
180
|
+
import_date_picker.DateCalendar,
|
|
181
|
+
{
|
|
182
|
+
value,
|
|
183
|
+
minDate,
|
|
184
|
+
maxDate,
|
|
185
|
+
onChange: (d) => {
|
|
186
|
+
if (d) {
|
|
187
|
+
emit((0, import_dayjs.default)(d));
|
|
188
|
+
setCalendarOpen(false);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
)
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
PisellReservationSchedule.displayName = "PisellReservationSchedule";
|
|
197
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
198
|
+
0 && (module.exports = {
|
|
199
|
+
PisellReservationSchedule
|
|
200
|
+
});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
.pisell-reservation-schedule {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
width: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.pisell-reservation-schedule-inner {
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 4px;
|
|
12
|
+
max-width: 100%;
|
|
13
|
+
padding: 6px 10px;
|
|
14
|
+
border-radius: 8px;
|
|
15
|
+
background: rgba(255, 255, 255, 0.1);
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.pisell-reservation-schedule-btn {
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
width: 32px;
|
|
24
|
+
height: 32px;
|
|
25
|
+
padding: 0;
|
|
26
|
+
margin: 0;
|
|
27
|
+
border: none;
|
|
28
|
+
border-radius: 8px;
|
|
29
|
+
background: rgba(255, 255, 255, 0.08);
|
|
30
|
+
color: rgba(255, 255, 255, 0.85);
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
flex-shrink: 0;
|
|
33
|
+
|
|
34
|
+
&:hover:not(:disabled) {
|
|
35
|
+
background: rgba(255, 255, 255, 0.14);
|
|
36
|
+
color: #fff;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:disabled {
|
|
40
|
+
opacity: 0.35;
|
|
41
|
+
cursor: not-allowed;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.pisell-reservation-schedule-btn-icon {
|
|
46
|
+
width: 16px;
|
|
47
|
+
height: 16px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.pisell-reservation-schedule-label {
|
|
51
|
+
flex: 1;
|
|
52
|
+
min-width: 0;
|
|
53
|
+
padding: 0 12px;
|
|
54
|
+
font-size: 15px;
|
|
55
|
+
font-weight: 500;
|
|
56
|
+
line-height: 1.35;
|
|
57
|
+
color: rgba(255, 255, 255, 0.92);
|
|
58
|
+
text-align: center;
|
|
59
|
+
white-space: nowrap;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
text-overflow: ellipsis;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.pisell-reservation-schedule-label--static {
|
|
65
|
+
cursor: default;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.pisell-reservation-schedule-label-trigger {
|
|
69
|
+
margin: 0;
|
|
70
|
+
border: none;
|
|
71
|
+
background: transparent;
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
font-size: inherit;
|
|
74
|
+
font-weight: inherit;
|
|
75
|
+
line-height: inherit;
|
|
76
|
+
color: rgba(255, 255, 255, 0.92);
|
|
77
|
+
width: 100%;
|
|
78
|
+
|
|
79
|
+
&:hover {
|
|
80
|
+
color: #fff;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&:focus-visible {
|
|
84
|
+
outline: 2px solid rgba(255, 255, 255, 0.45);
|
|
85
|
+
outline-offset: 2px;
|
|
86
|
+
border-radius: 4px;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { PisellReservationSchedule } from './PisellReservationSchedule';
|
|
3
|
+
/**
|
|
4
|
+
* PisellReservationSchedule:预约营业日导航(上一天 / 日期文案 / 下一天)。
|
|
5
|
+
* 多语言与日期格式依赖 LowCode 引擎 locale。详见组件目录下 docs/PisellReservationSchedule.md。
|
|
6
|
+
*/
|
|
7
|
+
declare const meta: Meta<typeof PisellReservationSchedule>;
|
|
8
|
+
export default meta;
|
|
9
|
+
declare type Story = StoryObj<typeof PisellReservationSchedule>;
|
|
10
|
+
export declare const Default: Story;
|
|
11
|
+
export declare const WithMinMax: Story;
|
|
12
|
+
export declare const Controlled: Story;
|
|
@@ -0,0 +1,116 @@
|
|
|
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/pisellReservationSchedule/PisellReservationSchedule.stories.tsx
|
|
30
|
+
var PisellReservationSchedule_stories_exports = {};
|
|
31
|
+
__export(PisellReservationSchedule_stories_exports, {
|
|
32
|
+
Controlled: () => Controlled,
|
|
33
|
+
Default: () => Default,
|
|
34
|
+
WithMinMax: () => WithMinMax,
|
|
35
|
+
default: () => PisellReservationSchedule_stories_default
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(PisellReservationSchedule_stories_exports);
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
40
|
+
var import_PisellReservationSchedule = require("./PisellReservationSchedule");
|
|
41
|
+
var meta = {
|
|
42
|
+
title: "Data Entry/PisellReservationSchedule",
|
|
43
|
+
component: import_PisellReservationSchedule.PisellReservationSchedule,
|
|
44
|
+
tags: ["autodocs"],
|
|
45
|
+
parameters: {
|
|
46
|
+
layout: "padded",
|
|
47
|
+
docs: {
|
|
48
|
+
description: {
|
|
49
|
+
component: "深色圆角营业日条:左右切换日历日,中间展示「今天(若当日)· 日期 · 星期」。可与 PisellTimeNavigator 组合为 PisellReservationScheduleBand。支持受控 `value` / `onChange(dayjs)`,以及 `minDate` / `maxDate`。"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
argTypes: {
|
|
54
|
+
value: {
|
|
55
|
+
description: "当前选中日(受控),dayjs 或可解析字符串",
|
|
56
|
+
control: "text"
|
|
57
|
+
},
|
|
58
|
+
defaultValue: {
|
|
59
|
+
description: "非受控初始日",
|
|
60
|
+
control: "text"
|
|
61
|
+
},
|
|
62
|
+
minDate: {
|
|
63
|
+
description: "不可早于该日(含)",
|
|
64
|
+
control: "text"
|
|
65
|
+
},
|
|
66
|
+
maxDate: {
|
|
67
|
+
description: "不可晚于该日(含)",
|
|
68
|
+
control: "text"
|
|
69
|
+
},
|
|
70
|
+
onChange: {
|
|
71
|
+
action: "onChange",
|
|
72
|
+
description: "选中日变更,参数为 Dayjs(当日 0 点)"
|
|
73
|
+
},
|
|
74
|
+
className: { control: "text" }
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var PisellReservationSchedule_stories_default = meta;
|
|
78
|
+
var Default = {
|
|
79
|
+
args: {
|
|
80
|
+
defaultValue: (0, import_dayjs.default)().format("YYYY-MM-DD")
|
|
81
|
+
},
|
|
82
|
+
decorators: [
|
|
83
|
+
(StoryComp) => /* @__PURE__ */ import_react.default.createElement("div", { style: { maxWidth: 440 } }, /* @__PURE__ */ import_react.default.createElement(StoryComp, null))
|
|
84
|
+
]
|
|
85
|
+
};
|
|
86
|
+
var WithMinMax = {
|
|
87
|
+
args: {
|
|
88
|
+
defaultValue: (0, import_dayjs.default)().format("YYYY-MM-DD"),
|
|
89
|
+
minDate: (0, import_dayjs.default)().startOf("day"),
|
|
90
|
+
maxDate: (0, import_dayjs.default)().add(14, "day").endOf("day")
|
|
91
|
+
},
|
|
92
|
+
decorators: [
|
|
93
|
+
(StoryComp) => /* @__PURE__ */ import_react.default.createElement("div", { style: { maxWidth: 440 } }, /* @__PURE__ */ import_react.default.createElement(StoryComp, null))
|
|
94
|
+
]
|
|
95
|
+
};
|
|
96
|
+
var Controlled = {
|
|
97
|
+
render: function ControlledRender() {
|
|
98
|
+
const [value, setValue] = (0, import_react.useState)((0, import_dayjs.default)().startOf("day"));
|
|
99
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style: { maxWidth: 440 } }, /* @__PURE__ */ import_react.default.createElement(
|
|
100
|
+
import_PisellReservationSchedule.PisellReservationSchedule,
|
|
101
|
+
{
|
|
102
|
+
value,
|
|
103
|
+
onChange: (d) => {
|
|
104
|
+
setValue(d);
|
|
105
|
+
console.log("onChange", d.format("YYYY-MM-DD"));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
), /* @__PURE__ */ import_react.default.createElement("p", { style: { marginTop: 12, fontSize: 12, color: "#666" } }, "当前:", value.format("YYYY-MM-DD dddd")));
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
112
|
+
0 && (module.exports = {
|
|
113
|
+
Controlled,
|
|
114
|
+
Default,
|
|
115
|
+
WithMinMax
|
|
116
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellReservationSchedule/index.tsx
|
|
20
|
+
var pisellReservationSchedule_exports = {};
|
|
21
|
+
__export(pisellReservationSchedule_exports, {
|
|
22
|
+
PisellReservationSchedule: () => import_PisellReservationSchedule.PisellReservationSchedule
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(pisellReservationSchedule_exports);
|
|
25
|
+
var import_PisellReservationSchedule = require("./PisellReservationSchedule");
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {
|
|
28
|
+
PisellReservationSchedule
|
|
29
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** PisellReservationSchedule 多语言;使用前 locales.init 合并 */
|
|
2
|
+
declare const _default: {
|
|
3
|
+
en: {
|
|
4
|
+
'pisell-reservation-schedule.today': string;
|
|
5
|
+
'pisell-reservation-schedule.prev': string;
|
|
6
|
+
'pisell-reservation-schedule.next': string;
|
|
7
|
+
'pisell-reservation-schedule.pick-date': string;
|
|
8
|
+
'pisell-reservation-schedule.pick-date-title': string;
|
|
9
|
+
};
|
|
10
|
+
'zh-CN': {
|
|
11
|
+
'pisell-reservation-schedule.today': string;
|
|
12
|
+
'pisell-reservation-schedule.prev': string;
|
|
13
|
+
'pisell-reservation-schedule.next': string;
|
|
14
|
+
'pisell-reservation-schedule.pick-date': string;
|
|
15
|
+
'pisell-reservation-schedule.pick-date-title': string;
|
|
16
|
+
};
|
|
17
|
+
'zh-HK': {
|
|
18
|
+
'pisell-reservation-schedule.today': string;
|
|
19
|
+
'pisell-reservation-schedule.prev': string;
|
|
20
|
+
'pisell-reservation-schedule.next': string;
|
|
21
|
+
'pisell-reservation-schedule.pick-date': string;
|
|
22
|
+
'pisell-reservation-schedule.pick-date-title': string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellReservationSchedule/locales.ts
|
|
20
|
+
var locales_exports = {};
|
|
21
|
+
__export(locales_exports, {
|
|
22
|
+
default: () => locales_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(locales_exports);
|
|
25
|
+
var locales_default = {
|
|
26
|
+
en: {
|
|
27
|
+
"pisell-reservation-schedule.today": "Today",
|
|
28
|
+
"pisell-reservation-schedule.prev": "Previous day",
|
|
29
|
+
"pisell-reservation-schedule.next": "Next day",
|
|
30
|
+
"pisell-reservation-schedule.pick-date": "Pick a date",
|
|
31
|
+
"pisell-reservation-schedule.pick-date-title": "Pick a date"
|
|
32
|
+
},
|
|
33
|
+
"zh-CN": {
|
|
34
|
+
"pisell-reservation-schedule.today": "今天",
|
|
35
|
+
"pisell-reservation-schedule.prev": "上一天",
|
|
36
|
+
"pisell-reservation-schedule.next": "下一天",
|
|
37
|
+
"pisell-reservation-schedule.pick-date": "选择日期",
|
|
38
|
+
"pisell-reservation-schedule.pick-date-title": "选择日期"
|
|
39
|
+
},
|
|
40
|
+
"zh-HK": {
|
|
41
|
+
"pisell-reservation-schedule.today": "今天",
|
|
42
|
+
"pisell-reservation-schedule.prev": "上一日",
|
|
43
|
+
"pisell-reservation-schedule.next": "下一日",
|
|
44
|
+
"pisell-reservation-schedule.pick-date": "選擇日期",
|
|
45
|
+
"pisell-reservation-schedule.pick-date-title": "選擇日期"
|
|
46
|
+
}
|
|
47
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { Dayjs } from 'dayjs';
|
|
3
|
+
/** 与 PisellTimeNavigator 一致:dayjs 或可解析字符串 */
|
|
4
|
+
export declare type ReservationScheduleValue = Dayjs | string | null | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* PisellReservationSchedule:营业日切换条(上一日 / 文案 / 下一日)
|
|
7
|
+
*/
|
|
8
|
+
export interface PisellReservationScheduleProps {
|
|
9
|
+
/**
|
|
10
|
+
* 当前选中日(受控),日历日语义,建议使用 startOf('day') 对齐
|
|
11
|
+
*/
|
|
12
|
+
value?: ReservationScheduleValue;
|
|
13
|
+
/**
|
|
14
|
+
* 选中日变更
|
|
15
|
+
*/
|
|
16
|
+
onChange?: (date: Dayjs) => void;
|
|
17
|
+
/**
|
|
18
|
+
* 非受控初始日
|
|
19
|
+
*/
|
|
20
|
+
defaultValue?: ReservationScheduleValue;
|
|
21
|
+
/**
|
|
22
|
+
* 不可早于该日(含)
|
|
23
|
+
*/
|
|
24
|
+
minDate?: ReservationScheduleValue;
|
|
25
|
+
/**
|
|
26
|
+
* 不可晚于该日(含)
|
|
27
|
+
*/
|
|
28
|
+
maxDate?: ReservationScheduleValue;
|
|
29
|
+
/**
|
|
30
|
+
* 自定义类名
|
|
31
|
+
*/
|
|
32
|
+
className?: string;
|
|
33
|
+
/**
|
|
34
|
+
* 根节点样式
|
|
35
|
+
*/
|
|
36
|
+
style?: CSSProperties;
|
|
37
|
+
/**
|
|
38
|
+
* 为 true 时禁用上一日/下一日、日期点选(弹日历);用于「跟随当前时刻」等只读日期条
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
navigationLocked?: boolean;
|
|
42
|
+
}
|