@pisell/materials 6.11.17 → 6.11.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +32 -32
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +25 -25
- package/es/components/PisellLayouts/index.d.ts +10 -5
- package/es/components/PisellLayouts/index.js +8 -4
- package/es/components/dataSourceComponents/dataSourceSubForm/index.d.ts +13 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.js +274 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +544 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/types.d.ts +117 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/types.js +1 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.d.ts +9 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +61 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +176 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +12 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.js +11 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +87 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Tabs/ReadPretty.d.ts +9 -0
- package/es/components/dataSourceComponents/fields/Tabs/ReadPretty.js +16 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.d.ts +23 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.js +93 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.less +64 -0
- package/es/components/dataSourceComponents/fields/Tabs/WithMode.d.ts +6 -0
- package/es/components/dataSourceComponents/fields/Tabs/WithMode.js +9 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +12 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.js +18 -0
- package/es/components/dataSourceComponents/fields/Tabs/type.d.ts +38 -0
- package/es/components/dataSourceComponents/fields/Tabs/type.js +1 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +39 -1
- package/es/components/dataSourceComponents/fields/index.js +5 -1
- package/es/components/dataSourceComponents/fields/utils.js +3 -0
- package/es/components/pisellFilter/type.d.ts +4 -2
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +12 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +611 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.less +92 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +55 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +1667 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.js +203 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.less +189 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +37 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.js +341 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.less +89 -0
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +43 -0
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.js +432 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +21 -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 +14 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +543 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +162 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +36 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +135 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +149 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +9 -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 +366 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +239 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.d.ts +48 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.js +195 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.less +19 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.js +85 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.less +7 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +33 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.js +88 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.less +101 -0
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +16 -0
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +29 -0
- package/es/components/pisellFloorMapLayout/components/index.d.ts +21 -0
- package/es/components/pisellFloorMapLayout/components/index.js +13 -0
- package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +16 -0
- package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.js +21 -0
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +28 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +63 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +561 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.d.ts +21 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.js +122 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +67 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +399 -0
- package/es/components/pisellFloorMapLayout/index.d.ts +15 -0
- package/es/components/pisellFloorMapLayout/index.js +12 -0
- package/es/components/pisellFloorMapLayout/locales.d.ts +192 -0
- package/es/components/pisellFloorMapLayout/locales.js +191 -0
- package/es/components/pisellFloorMapLayout/types.d.ts +586 -0
- package/es/components/pisellFloorMapLayout/types.js +152 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +20 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.js +129 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +87 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.d.ts +9 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +24 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +56 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +22 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +155 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +89 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapStageDefaults.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapStageDefaults.js +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +108 -0
- package/es/components/pisellFloorMapLayout/utils/layoutMeasurements.d.ts +30 -0
- package/es/components/pisellFloorMapLayout/utils/layoutMeasurements.js +125 -0
- package/es/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.d.ts +7 -0
- package/es/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.js +29 -0
- package/es/components/pisellFloorMapLayout/utils/snap.d.ts +10 -0
- package/es/components/pisellFloorMapLayout/utils/snap.js +21 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.js +175 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.less +129 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.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/pisellRecordBoard/PisellRecordBoard.d.ts +2 -1
- package/es/components/pisellRecordBoard/PisellRecordBoard.js +98 -18
- package/es/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +4 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.stories.js +1276 -344
- package/es/components/pisellRecordBoard/index.d.ts +8 -2
- package/es/components/pisellRecordBoard/index.js +4 -2
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +1 -3
- package/es/components/pisellRecordBoard/shellFrame/FloorMap.d.ts +14 -0
- package/es/components/pisellRecordBoard/shellFrame/FloorMap.js +15 -0
- package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +16 -0
- package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.js +11 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +61 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +69 -11
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
- package/es/components/pisellRecordBoard/shellFrame/index.d.ts +6 -10
- package/es/components/pisellRecordBoard/shellFrame/index.js +111 -20
- package/es/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
- package/es/components/pisellRecordBoard/types.d.ts +68 -2
- package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
- package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +57 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +10 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.js +156 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.less +88 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.stories.d.ts +12 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.stories.js +105 -0
- package/es/components/pisellReservationSchedule/index.d.ts +2 -0
- package/es/components/pisellReservationSchedule/index.js +1 -0
- package/es/components/pisellReservationSchedule/locales.d.ts +25 -0
- package/es/components/pisellReservationSchedule/locales.js +24 -0
- package/es/components/pisellReservationSchedule/types.d.ts +42 -0
- package/es/components/pisellReservationSchedule/types.js +1 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +94 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +66 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.js +197 -0
- package/es/components/pisellReservationScheduleBand/index.d.ts +2 -0
- package/es/components/pisellReservationScheduleBand/index.js +1 -0
- package/es/components/pisellReservationScheduleBand/types.d.ts +49 -0
- package/es/components/pisellReservationScheduleBand/types.js +1 -0
- package/es/components/pisellShellFrame/PisellShellFrame.less +11 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +787 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +461 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.stories.js +290 -0
- package/es/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +14 -0
- package/es/components/pisellTimeNavigator/components/BackgroundLayer.js +30 -0
- package/es/components/pisellTimeNavigator/components/CursorLayer.d.ts +25 -0
- package/es/components/pisellTimeNavigator/components/CursorLayer.js +77 -0
- package/es/components/pisellTimeNavigator/components/GestureLayer.d.ts +33 -0
- package/es/components/pisellTimeNavigator/components/GestureLayer.js +91 -0
- package/es/components/pisellTimeNavigator/components/NowButton.d.ts +14 -0
- package/es/components/pisellTimeNavigator/components/NowButton.js +38 -0
- package/es/components/pisellTimeNavigator/components/ScaleLayer.d.ts +22 -0
- package/es/components/pisellTimeNavigator/components/ScaleLayer.js +73 -0
- package/es/components/pisellTimeNavigator/components/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/components/index.js +5 -0
- package/es/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/hooks/index.js +3 -0
- package/es/components/pisellTimeNavigator/hooks/useDragInertia.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 +5 -0
- package/es/components/pisellTimeNavigator/index.js +4 -0
- package/es/components/pisellTimeNavigator/locales.d.ts +22 -0
- package/es/components/pisellTimeNavigator/locales.js +21 -0
- package/es/components/pisellTimeNavigator/types.d.ts +160 -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/components/pisellWalletPassCard/index.js +1 -1
- package/es/components/table/index.js +1 -1
- package/es/index.d.ts +49 -33
- package/es/index.js +47 -27
- package/es/locales/en-US.d.ts +2 -0
- package/es/locales/en-US.js +2 -0
- package/es/locales/zh-CN.d.ts +2 -0
- package/es/locales/zh-CN.js +2 -0
- package/es/locales/zh-TW.d.ts +2 -0
- package/es/locales/zh-TW.js +2 -0
- package/lib/components/PisellLayouts/index.d.ts +10 -5
- package/lib/components/PisellLayouts/index.js +15 -1
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.d.ts +13 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.js +229 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +544 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/types.d.ts +117 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/types.js +17 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.d.ts +9 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +64 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +157 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +12 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.js +40 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +87 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Tabs/ReadPretty.d.ts +9 -0
- package/lib/components/dataSourceComponents/fields/Tabs/ReadPretty.js +45 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.d.ts +23 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.js +95 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.less +64 -0
- package/lib/components/dataSourceComponents/fields/Tabs/WithMode.d.ts +6 -0
- package/lib/components/dataSourceComponents/fields/Tabs/WithMode.js +39 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +12 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.js +40 -0
- package/lib/components/dataSourceComponents/fields/Tabs/type.d.ts +38 -0
- package/lib/components/dataSourceComponents/fields/Tabs/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +39 -1
- package/lib/components/dataSourceComponents/fields/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/utils.js +3 -0
- package/lib/components/pisellFilter/type.d.ts +4 -2
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +12 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +709 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.less +92 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +55 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +1353 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.js +237 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.less +189 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +37 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.js +358 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.less +89 -0
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +43 -0
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.js +482 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +21 -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 +14 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +556 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +162 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +36 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +195 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +149 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +9 -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 +337 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +239 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.d.ts +48 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.js +219 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.less +19 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.js +110 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.less +7 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +33 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.js +121 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.less +101 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +16 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +65 -0
- package/lib/components/pisellFloorMapLayout/components/index.d.ts +21 -0
- package/lib/components/pisellFloorMapLayout/components/index.js +56 -0
- package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +16 -0
- package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.js +54 -0
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +47 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +63 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +545 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.d.ts +21 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.js +146 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +67 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +382 -0
- package/lib/components/pisellFloorMapLayout/index.d.ts +15 -0
- package/lib/components/pisellFloorMapLayout/index.js +64 -0
- package/lib/components/pisellFloorMapLayout/locales.d.ts +192 -0
- package/lib/components/pisellFloorMapLayout/locales.js +212 -0
- package/lib/components/pisellFloorMapLayout/types.d.ts +586 -0
- package/lib/components/pisellFloorMapLayout/types.js +32 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +20 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.js +126 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +66 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.d.ts +9 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +44 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +67 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +22 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +139 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +136 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapStageDefaults.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapStageDefaults.js +33 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +128 -0
- package/lib/components/pisellFloorMapLayout/utils/layoutMeasurements.d.ts +30 -0
- package/lib/components/pisellFloorMapLayout/utils/layoutMeasurements.js +96 -0
- package/lib/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.d.ts +7 -0
- package/lib/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.js +41 -0
- package/lib/components/pisellFloorMapLayout/utils/snap.d.ts +10 -0
- package/lib/components/pisellFloorMapLayout/utils/snap.js +43 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.js +179 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.less +129 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +10 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.js +185 -0
- package/lib/components/pisellHierarchicalSummaryList/components/Row.d.ts +35 -0
- package/lib/components/pisellHierarchicalSummaryList/components/Row.js +343 -0
- package/lib/components/pisellHierarchicalSummaryList/components/index.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 +49 -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 +86 -8
- package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +4 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.js +915 -25
- package/lib/components/pisellRecordBoard/index.d.ts +8 -2
- package/lib/components/pisellRecordBoard/index.js +6 -2
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +8 -2
- package/lib/components/pisellRecordBoard/shellFrame/FloorMap.d.ts +14 -0
- package/lib/components/pisellRecordBoard/shellFrame/FloorMap.js +27 -0
- package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +16 -0
- package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.js +45 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +61 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +60 -8
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
- package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +6 -10
- package/lib/components/pisellRecordBoard/shellFrame/index.js +101 -9
- package/lib/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
- package/lib/components/pisellRecordBoard/types.d.ts +68 -2
- package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
- package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +88 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +10 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.js +200 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.less +88 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.stories.d.ts +12 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.stories.js +116 -0
- package/lib/components/pisellReservationSchedule/index.d.ts +2 -0
- package/lib/components/pisellReservationSchedule/index.js +29 -0
- package/lib/components/pisellReservationSchedule/locales.d.ts +25 -0
- package/lib/components/pisellReservationSchedule/locales.js +47 -0
- package/lib/components/pisellReservationSchedule/types.d.ts +42 -0
- package/lib/components/pisellReservationSchedule/types.js +17 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +128 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +66 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.js +181 -0
- package/lib/components/pisellReservationScheduleBand/index.d.ts +2 -0
- package/lib/components/pisellReservationScheduleBand/index.js +29 -0
- package/lib/components/pisellReservationScheduleBand/types.d.ts +49 -0
- package/lib/components/pisellReservationScheduleBand/types.js +17 -0
- package/lib/components/pisellShellFrame/PisellShellFrame.less +11 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +901 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +461 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.stories.js +273 -0
- package/lib/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +14 -0
- package/lib/components/pisellTimeNavigator/components/BackgroundLayer.js +78 -0
- package/lib/components/pisellTimeNavigator/components/CursorLayer.d.ts +25 -0
- package/lib/components/pisellTimeNavigator/components/CursorLayer.js +111 -0
- package/lib/components/pisellTimeNavigator/components/GestureLayer.d.ts +33 -0
- package/lib/components/pisellTimeNavigator/components/GestureLayer.js +170 -0
- package/lib/components/pisellTimeNavigator/components/NowButton.d.ts +14 -0
- package/lib/components/pisellTimeNavigator/components/NowButton.js +81 -0
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.d.ts +22 -0
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.js +116 -0
- package/lib/components/pisellTimeNavigator/components/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/components/index.js +41 -0
- package/lib/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/hooks/index.js +35 -0
- package/lib/components/pisellTimeNavigator/hooks/useDragInertia.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 +87 -0
- package/lib/components/pisellTimeNavigator/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/index.js +47 -0
- package/lib/components/pisellTimeNavigator/locales.d.ts +22 -0
- package/lib/components/pisellTimeNavigator/locales.js +41 -0
- package/lib/components/pisellTimeNavigator/types.d.ts +160 -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/components/pisellWalletPassCard/index.js +1 -1
- package/lib/components/table/index.js +2 -2
- package/lib/index.d.ts +49 -33
- package/lib/index.js +93 -27
- 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/data-source-form/constants.ts +3 -0
- package/lowcode/data-source-form/utils.ts +31 -5
- package/lowcode/data-source-sub-form/meta.ts +259 -0
- package/lowcode/data-source-sub-form/snippets.ts +21 -0
- package/lowcode/floor-map-image-element/meta.ts +113 -0
- package/lowcode/floor-map-layout-provider/meta.ts +65 -0
- package/lowcode/form-item-record-list-wrapper/meta.ts +180 -0
- package/lowcode/form-item-record-list-wrapper/snippets.ts +18 -0
- package/lowcode/form-item-tabs/meta.ts +172 -0
- package/lowcode/pisell-floor-map-layout/meta.ts +5599 -0
- package/lowcode/pisell-hierarchical-summary-list/meta.ts +240 -0
- package/lowcode/pisell-reservation-schedule/index.ts +3 -0
- package/lowcode/pisell-reservation-schedule/meta.ts +69 -0
- package/lowcode/pisell-reservation-schedule/snippets.ts +1 -0
- package/lowcode/pisell-reservation-schedule-band/index.ts +3 -0
- package/lowcode/pisell-reservation-schedule-band/meta.ts +96 -0
- package/lowcode/pisell-reservation-schedule-band/snippets.ts +1 -0
- package/lowcode/pisell-time-navigator/index.ts +3 -0
- package/lowcode/pisell-time-navigator/meta.ts +298 -0
- package/lowcode/pisell-time-navigator/snippets.ts +1 -0
- package/lowcode/render-figma-style-round-table-card/meta.ts +589 -0
- package/lowcode/render-figma-style-table-card/meta.ts +589 -0
- package/package.json +3 -2
|
@@ -33,6 +33,7 @@ __export(PisellRecordBoard_stories_exports, {
|
|
|
33
33
|
CustomComposition: () => CustomComposition,
|
|
34
34
|
CustomFilterSortRender: () => CustomFilterSortRender,
|
|
35
35
|
CustomQuickFilterAndColumnsRender: () => CustomQuickFilterAndColumnsRender,
|
|
36
|
+
Default: () => Default,
|
|
36
37
|
GridLayoutFull: () => GridLayoutFull,
|
|
37
38
|
GridLayoutToolBarSearchInput: () => GridLayoutToolBarSearchInput,
|
|
38
39
|
GridLayoutToolBarSortAndFilter: () => GridLayoutToolBarSortAndFilter,
|
|
@@ -51,6 +52,9 @@ __export(PisellRecordBoard_stories_exports, {
|
|
|
51
52
|
});
|
|
52
53
|
module.exports = __toCommonJS(PisellRecordBoard_stories_exports);
|
|
53
54
|
var import_react = __toESM(require("react"));
|
|
55
|
+
var import_antd = require("antd");
|
|
56
|
+
var import_types = require("../pisellFloorMapLayout/types");
|
|
57
|
+
var import_FigmaTableCard = require("../pisellFloorMapLayout/components/FigmaTableCard");
|
|
54
58
|
var import_index = __toESM(require("./index"));
|
|
55
59
|
var meta = {
|
|
56
60
|
title: "Pro Components/PisellRecordBoard",
|
|
@@ -59,7 +63,7 @@ var meta = {
|
|
|
59
63
|
layout: "padded",
|
|
60
64
|
docs: {
|
|
61
65
|
description: {
|
|
62
|
-
component: "记录看板容器,提供统一的 data / 分页 / 搜索 /
|
|
66
|
+
component: "记录看板容器,提供统一的 data / 分页 / 搜索 / 多选上下文。可选根级 **dataSources** + **gridDataSourceKey**:不传 **data** 时由容器从 `dataSources[key]` 客户端分页推导表格;平面图在 ShellFrame 内合并根级与 `FloorMap` 的 `dataSources` 后传入 PisellFloorMapLayout。ToolBar 左侧可放搜索(PisellFind)与内联快速筛选(toolBar.quickFilter);右侧为 Sort、PisellFilter、ToolBarReset。多选通过 grid.selectedKeys / grid.selectedRows / grid.onSelectionChange 传入。grid 支持 antd Table 透传(onRow、expandable 等)。**平面图**:`ShellFrame` 内与 `GridLayout` 并列声明 `PisellRecordBoard.FloorMap`。根级 `floorMap` 仍兼容。**平面图模式下底部分页隐藏**。详见 **Default** Story。"
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
69
|
},
|
|
@@ -77,7 +81,13 @@ var meta = {
|
|
|
77
81
|
}
|
|
78
82
|
};
|
|
79
83
|
var PisellRecordBoard_stories_default = meta;
|
|
80
|
-
var orderStatusList = [
|
|
84
|
+
var orderStatusList = [
|
|
85
|
+
"pending_pay",
|
|
86
|
+
"paid",
|
|
87
|
+
"shipped",
|
|
88
|
+
"completed",
|
|
89
|
+
"cancelled"
|
|
90
|
+
];
|
|
81
91
|
var payStatusList = ["unpaid", "paid", "refunded"];
|
|
82
92
|
var mockData = Array.from({ length: 30 }, (_, i) => ({
|
|
83
93
|
id: `order-${i + 1}`,
|
|
@@ -85,7 +95,9 @@ var mockData = Array.from({ length: 30 }, (_, i) => ({
|
|
|
85
95
|
orderStatus: orderStatusList[i % orderStatusList.length],
|
|
86
96
|
payStatus: payStatusList[i % payStatusList.length],
|
|
87
97
|
amount: 99.9 + i % 15 * 88.5,
|
|
88
|
-
createTime: `2024-01-${String(15 + i % 14).padStart(2, "0")} 10:${String(
|
|
98
|
+
createTime: `2024-01-${String(15 + i % 14).padStart(2, "0")} 10:${String(
|
|
99
|
+
i % 60
|
|
100
|
+
).padStart(2, "0")}`,
|
|
89
101
|
buyerName: ["张三", "李四", "王五", "赵六", "钱七"][i % 5],
|
|
90
102
|
buyerPhone: `138${String(1e7 + i).padStart(8, "0")}`,
|
|
91
103
|
shipTo: ["北京市朝阳区", "上海市浦东新区", "广州市天河区", "深圳市南山区"][i % 4]
|
|
@@ -96,14 +108,21 @@ var mockDataMultiplePages = Array.from({ length: 250 }, (_, i) => ({
|
|
|
96
108
|
orderStatus: orderStatusList[i % orderStatusList.length],
|
|
97
109
|
payStatus: payStatusList[i % payStatusList.length],
|
|
98
110
|
amount: 99.9 + i % 15 * 88.5,
|
|
99
|
-
createTime: `2024-02-${String(1 + i % 28).padStart(2, "0")} 10:${String(
|
|
111
|
+
createTime: `2024-02-${String(1 + i % 28).padStart(2, "0")} 10:${String(
|
|
112
|
+
i % 60
|
|
113
|
+
).padStart(2, "0")}`,
|
|
100
114
|
buyerName: ["张三", "李四", "王五", "赵六", "钱七"][i % 5],
|
|
101
115
|
buyerPhone: `139${String(1e7 + i).padStart(8, "0")}`,
|
|
102
116
|
shipTo: ["北京市朝阳区", "上海市浦东新区", "广州市天河区", "深圳市南山区"][i % 4]
|
|
103
117
|
}));
|
|
104
118
|
var columns = [
|
|
105
119
|
{ title: "订单号", dataIndex: "orderNo", key: "orderNo", width: 160 },
|
|
106
|
-
{
|
|
120
|
+
{
|
|
121
|
+
title: "订单状态",
|
|
122
|
+
dataIndex: "orderStatus",
|
|
123
|
+
key: "orderStatus",
|
|
124
|
+
width: 140
|
|
125
|
+
},
|
|
107
126
|
{ title: "支付状态", dataIndex: "payStatus", key: "payStatus", width: 140 },
|
|
108
127
|
{ title: "订单金额", dataIndex: "amount", key: "amount", width: 110 },
|
|
109
128
|
{
|
|
@@ -121,7 +140,13 @@ var columns = [
|
|
|
121
140
|
{ title: "收货地址", dataIndex: "shipTo", key: "shipTo", width: 200 }
|
|
122
141
|
];
|
|
123
142
|
var columnsWithType = [
|
|
124
|
-
{
|
|
143
|
+
{
|
|
144
|
+
title: "订单号",
|
|
145
|
+
dataIndex: "orderNo",
|
|
146
|
+
key: "orderNo",
|
|
147
|
+
width: 160,
|
|
148
|
+
type: "singleLineText"
|
|
149
|
+
},
|
|
125
150
|
{
|
|
126
151
|
title: "订单状态",
|
|
127
152
|
dataIndex: "orderStatus",
|
|
@@ -178,9 +203,30 @@ var columnsWithType = [
|
|
|
178
203
|
filterable: true,
|
|
179
204
|
filter: { quickFilter: true }
|
|
180
205
|
},
|
|
181
|
-
{
|
|
182
|
-
|
|
183
|
-
|
|
206
|
+
{
|
|
207
|
+
title: "买家",
|
|
208
|
+
dataIndex: "buyerName",
|
|
209
|
+
key: "buyerName",
|
|
210
|
+
width: 100,
|
|
211
|
+
type: "singleLineText",
|
|
212
|
+
fieldProps: { placeholder: "买家" },
|
|
213
|
+
filterable: true,
|
|
214
|
+
filter: { quickFilter: false }
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
title: "手机号",
|
|
218
|
+
dataIndex: "buyerPhone",
|
|
219
|
+
key: "buyerPhone",
|
|
220
|
+
width: 200,
|
|
221
|
+
type: "phone"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
title: "收货地址",
|
|
225
|
+
dataIndex: "shipTo",
|
|
226
|
+
key: "shipTo",
|
|
227
|
+
width: 200,
|
|
228
|
+
type: "singleLineText"
|
|
229
|
+
}
|
|
184
230
|
];
|
|
185
231
|
var customQuickFilterList = [
|
|
186
232
|
{
|
|
@@ -251,7 +297,14 @@ var columnsWithCustomRender = [
|
|
|
251
297
|
payStatusLabel[val] ?? val
|
|
252
298
|
)
|
|
253
299
|
},
|
|
254
|
-
{
|
|
300
|
+
{
|
|
301
|
+
title: "订单金额",
|
|
302
|
+
dataIndex: "amount",
|
|
303
|
+
key: "amount",
|
|
304
|
+
width: 110,
|
|
305
|
+
type: "currency",
|
|
306
|
+
fieldProps: { precision: 2, currencySymbol: "¥" }
|
|
307
|
+
},
|
|
255
308
|
{
|
|
256
309
|
title: "下单时间",
|
|
257
310
|
dataIndex: "createTime",
|
|
@@ -361,7 +414,8 @@ var columnsWithCustomFilterSortRender = [
|
|
|
361
414
|
function toTimestamp(v) {
|
|
362
415
|
if (v == null) return null;
|
|
363
416
|
if (typeof v === "number" && !Number.isNaN(v)) return v;
|
|
364
|
-
if (v && typeof v.toDate === "function")
|
|
417
|
+
if (v && typeof v.toDate === "function")
|
|
418
|
+
return v.toDate().getTime();
|
|
365
419
|
const s = String(v).trim();
|
|
366
420
|
if (!s) return null;
|
|
367
421
|
const t = Date.parse(s);
|
|
@@ -380,7 +434,8 @@ function filterDataByCriteria(list, filterValues) {
|
|
|
380
434
|
if (rowTime == null) return false;
|
|
381
435
|
const start = toTimestamp(val[0]);
|
|
382
436
|
const end = toTimestamp(val[1]);
|
|
383
|
-
if (start != null && end != null)
|
|
437
|
+
if (start != null && end != null)
|
|
438
|
+
return rowTime >= start && rowTime <= end;
|
|
384
439
|
if (start != null) return rowTime >= start;
|
|
385
440
|
if (end != null) return rowTime <= end;
|
|
386
441
|
return true;
|
|
@@ -400,6 +455,23 @@ function filterDataByCriteria(list, filterValues) {
|
|
|
400
455
|
});
|
|
401
456
|
});
|
|
402
457
|
}
|
|
458
|
+
var FLOOR_MAP_DIM_OPACITY = 0.2;
|
|
459
|
+
function recordBoardStoryRowMatchesToolbar(row, searchParams) {
|
|
460
|
+
var _a;
|
|
461
|
+
if (!searchParams) return true;
|
|
462
|
+
const filterValues = (_a = searchParams.filter) == null ? void 0 : _a.values;
|
|
463
|
+
const afterFilter = filterDataByCriteria(
|
|
464
|
+
[row],
|
|
465
|
+
filterValues
|
|
466
|
+
);
|
|
467
|
+
if (afterFilter.length === 0) return false;
|
|
468
|
+
const kw = String(searchParams.keyword ?? "").trim().toLowerCase();
|
|
469
|
+
if (!kw) return true;
|
|
470
|
+
const parts = Object.values(row).filter(
|
|
471
|
+
(v) => v != null && typeof v !== "object"
|
|
472
|
+
);
|
|
473
|
+
return parts.some((v) => String(v).toLowerCase().includes(kw));
|
|
474
|
+
}
|
|
403
475
|
function sortDataBySortKey(list, sortKey) {
|
|
404
476
|
if (!sortKey || typeof sortKey !== "string") return list;
|
|
405
477
|
const match = sortKey.match(/^([^:]+):(asc|desc)/);
|
|
@@ -412,9 +484,788 @@ function sortDataBySortKey(list, sortKey) {
|
|
|
412
484
|
return order === "asc" ? cmp : -cmp;
|
|
413
485
|
});
|
|
414
486
|
}
|
|
487
|
+
var RESTAURANT_DS_KEY = "tables";
|
|
488
|
+
var CONDIMENT_STATION_DS_KEY = "condimentStations";
|
|
489
|
+
function createInitialCondimentStations() {
|
|
490
|
+
return [
|
|
491
|
+
{
|
|
492
|
+
id: "cs1",
|
|
493
|
+
name: "大厅·自助蘸料区",
|
|
494
|
+
status: "正常",
|
|
495
|
+
flavorCount: 12,
|
|
496
|
+
area: "大厅"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
id: "cs2",
|
|
500
|
+
name: "包厢走道补料台",
|
|
501
|
+
status: "需补货",
|
|
502
|
+
flavorCount: 6,
|
|
503
|
+
area: "包厢A",
|
|
504
|
+
note: "辣椒油低于 30%"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
id: "cs3",
|
|
508
|
+
name: "露台·酱料小推位",
|
|
509
|
+
status: "正常",
|
|
510
|
+
flavorCount: 8,
|
|
511
|
+
area: "露台"
|
|
512
|
+
},
|
|
513
|
+
/**
|
|
514
|
+
* 以下记录在初始平面图**无落位**,用于编辑态「蘸料摆台」新建时可选绑定;
|
|
515
|
+
* 若列表与落位一一占满是,工具栏会提示「均已落位,或列表为空」。
|
|
516
|
+
*/
|
|
517
|
+
{
|
|
518
|
+
id: "cs4",
|
|
519
|
+
name: "后厨·备用蘸料车",
|
|
520
|
+
status: "正常",
|
|
521
|
+
flavorCount: 4,
|
|
522
|
+
area: "后厨",
|
|
523
|
+
note: "待摆到平面图"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
id: "cs5",
|
|
527
|
+
name: "入口处试味台(筹建)",
|
|
528
|
+
status: "维护中",
|
|
529
|
+
flavorCount: 0,
|
|
530
|
+
area: "门厅"
|
|
531
|
+
}
|
|
532
|
+
];
|
|
533
|
+
}
|
|
534
|
+
function getRenderItemByKindCondimentStation(dataSources) {
|
|
535
|
+
return (item) => {
|
|
536
|
+
const merged = item;
|
|
537
|
+
const el = merged._sceneElement;
|
|
538
|
+
const b = el == null ? void 0 : el.dataBinding;
|
|
539
|
+
const titleFromElement = (el == null ? void 0 : el.name) != null && String(el.name).trim() ? String(el.name).trim() : "蘸料摆台";
|
|
540
|
+
const hasCondimentDs = (b == null ? void 0 : b.dataSourceKey) === CONDIMENT_STATION_DS_KEY;
|
|
541
|
+
const condimentRid = (b == null ? void 0 : b.recordId) != null ? String(b.recordId).trim() : "";
|
|
542
|
+
const boundToCondiment = hasCondimentDs && Boolean(condimentRid);
|
|
543
|
+
const list = dataSources[CONDIMENT_STATION_DS_KEY];
|
|
544
|
+
const row = boundToCondiment && list ? list.find((r) => r.id === condimentRid) : void 0;
|
|
545
|
+
const hasLiveRow = Boolean(row);
|
|
546
|
+
const borderColor = hasLiveRow ? row.status === "需补货" ? "#fa8c16" : row.status === "维护中" ? "#8c8c8c" : "#52c41a" : "#bfbfbf";
|
|
547
|
+
const isPlaceholder = !boundToCondiment || !hasLiveRow;
|
|
548
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
549
|
+
"div",
|
|
550
|
+
{
|
|
551
|
+
style: {
|
|
552
|
+
width: "100%",
|
|
553
|
+
height: "100%",
|
|
554
|
+
boxSizing: "border-box",
|
|
555
|
+
padding: "8px 10px",
|
|
556
|
+
display: "flex",
|
|
557
|
+
flexDirection: "column",
|
|
558
|
+
justifyContent: "center",
|
|
559
|
+
minHeight: 0,
|
|
560
|
+
fontSize: 11,
|
|
561
|
+
lineHeight: 1.35,
|
|
562
|
+
background: isPlaceholder ? "#fafafa" : "#fff",
|
|
563
|
+
borderRadius: 8,
|
|
564
|
+
border: isPlaceholder ? `2px dashed ${borderColor}` : `2px solid ${borderColor}`,
|
|
565
|
+
boxShadow: isPlaceholder ? "none" : "0 2px 8px rgba(0,0,0,.08)",
|
|
566
|
+
overflow: "hidden"
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
570
|
+
"div",
|
|
571
|
+
{
|
|
572
|
+
style: {
|
|
573
|
+
fontWeight: 600,
|
|
574
|
+
color: isPlaceholder ? "#595959" : "#262626",
|
|
575
|
+
overflow: "hidden",
|
|
576
|
+
textOverflow: "ellipsis",
|
|
577
|
+
whiteSpace: "nowrap"
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
hasLiveRow ? row.name : titleFromElement
|
|
581
|
+
),
|
|
582
|
+
hasLiveRow ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { style: { color: "#595959", marginTop: 4, flexShrink: 0 } }, row.status), /* @__PURE__ */ import_react.default.createElement("div", { style: { color: "#8c8c8c", marginTop: 4, flexShrink: 0 } }, row.flavorCount ?? "—", " 种蘸料")) : /* @__PURE__ */ import_react.default.createElement(
|
|
583
|
+
"div",
|
|
584
|
+
{
|
|
585
|
+
style: {
|
|
586
|
+
color: "#8c8c8c",
|
|
587
|
+
marginTop: 6,
|
|
588
|
+
flexShrink: 0,
|
|
589
|
+
fontSize: 10
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
!hasCondimentDs || !condimentRid ? hasCondimentDs && !condimentRid ? "已选择数据源,请在侧栏选择数据行" : "未绑定数据行:请在侧栏选择数据源与记录" : condimentRid.startsWith("new_") ? "新摆台占位,可在侧栏绑定具体记录" : "未找到对应记录:请检查绑定或数据列表"
|
|
593
|
+
)
|
|
594
|
+
);
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
function createInitialRestaurantTables() {
|
|
598
|
+
return [
|
|
599
|
+
{ id: "t1", name: "1号桌", status: "空闲", capacity: 4, area: "大厅" },
|
|
600
|
+
{
|
|
601
|
+
id: "t2",
|
|
602
|
+
name: "2号桌",
|
|
603
|
+
status: "用餐中",
|
|
604
|
+
capacity: 4,
|
|
605
|
+
area: "大厅",
|
|
606
|
+
guests: 3,
|
|
607
|
+
customerName: "王女士"
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
id: "t3",
|
|
611
|
+
name: "3号桌",
|
|
612
|
+
status: "已预订",
|
|
613
|
+
capacity: 6,
|
|
614
|
+
area: "大厅",
|
|
615
|
+
reserveTime: "18:30"
|
|
616
|
+
},
|
|
617
|
+
{ id: "t4", name: "4号桌", status: "空闲", capacity: 2, area: "露台" },
|
|
618
|
+
{
|
|
619
|
+
id: "t5",
|
|
620
|
+
name: "5号桌",
|
|
621
|
+
status: "用餐中",
|
|
622
|
+
capacity: 8,
|
|
623
|
+
area: "包厢A",
|
|
624
|
+
guests: 6
|
|
625
|
+
},
|
|
626
|
+
{ id: "t6", name: "6号桌", status: "空闲", capacity: 4, area: "大厅" },
|
|
627
|
+
{ id: "t7", name: "7号桌", status: "已预订", capacity: 2, area: "大厅" },
|
|
628
|
+
{ id: "t8", name: "8号桌", status: "空闲", capacity: 4, area: "露台" },
|
|
629
|
+
{ id: "r1", name: "圆桌1", status: "空闲", capacity: 6, area: "大厅" }
|
|
630
|
+
];
|
|
631
|
+
}
|
|
632
|
+
function createInitialRestaurantFloorMapConfig() {
|
|
633
|
+
return {
|
|
634
|
+
canvases: [{ id: "main", name: "大厅平面图", order: 0, enabled: true }],
|
|
635
|
+
canvasUi: { canCreate: true, canEdit: true },
|
|
636
|
+
elementKindCategories: [
|
|
637
|
+
{ id: "background", label: "底图", order: 0 },
|
|
638
|
+
{ id: "dining", label: "餐桌", order: 1 },
|
|
639
|
+
{ id: "station", label: "摆台", order: 2 },
|
|
640
|
+
{ id: "area", label: "区域", order: 3 }
|
|
641
|
+
],
|
|
642
|
+
elementKinds: [
|
|
643
|
+
{
|
|
644
|
+
value: import_types.FLOOR_MAP_IMAGE_ELEMENT_KIND,
|
|
645
|
+
label: "图片(底图)",
|
|
646
|
+
categoryId: "background",
|
|
647
|
+
dataBindingPolicy: "none",
|
|
648
|
+
showInPalette: true
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
value: "table",
|
|
652
|
+
label: "方桌",
|
|
653
|
+
categoryId: "dining",
|
|
654
|
+
dataBindingPolicy: "optional",
|
|
655
|
+
showInPalette: true
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
value: "roundTable",
|
|
659
|
+
label: "圆桌",
|
|
660
|
+
categoryId: "dining",
|
|
661
|
+
dataBindingPolicy: "optional",
|
|
662
|
+
defaultShape: "circle",
|
|
663
|
+
showInPalette: true
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
value: "condimentStation",
|
|
667
|
+
label: "蘸料摆台",
|
|
668
|
+
categoryId: "station",
|
|
669
|
+
dataBindingPolicy: "optional",
|
|
670
|
+
showInPalette: true
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
value: "stage",
|
|
674
|
+
label: "舞台/区域",
|
|
675
|
+
categoryId: "area",
|
|
676
|
+
dataBindingPolicy: "none",
|
|
677
|
+
showInPalette: true
|
|
678
|
+
}
|
|
679
|
+
],
|
|
680
|
+
/**
|
|
681
|
+
* 四列栅格(同原 dataSourcePlacements 布局),现统一为 sceneElements + dataBinding
|
|
682
|
+
*/
|
|
683
|
+
sceneElements: [
|
|
684
|
+
{
|
|
685
|
+
instanceId: "elm_t1",
|
|
686
|
+
canvasId: "main",
|
|
687
|
+
x: 80,
|
|
688
|
+
y: 80,
|
|
689
|
+
name: "1号桌",
|
|
690
|
+
width: 180,
|
|
691
|
+
height: 120,
|
|
692
|
+
zIndex: 0,
|
|
693
|
+
elementKind: "table",
|
|
694
|
+
dataBinding: {
|
|
695
|
+
dataSourceKey: RESTAURANT_DS_KEY,
|
|
696
|
+
recordId: "t1"
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
instanceId: "elm_t2",
|
|
701
|
+
canvasId: "main",
|
|
702
|
+
x: 280,
|
|
703
|
+
y: 80,
|
|
704
|
+
name: "2号桌",
|
|
705
|
+
width: 180,
|
|
706
|
+
height: 160,
|
|
707
|
+
zIndex: 0,
|
|
708
|
+
elementKind: "table",
|
|
709
|
+
dataBinding: {
|
|
710
|
+
dataSourceKey: RESTAURANT_DS_KEY,
|
|
711
|
+
recordId: "t2"
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
instanceId: "elm_t3",
|
|
716
|
+
canvasId: "main",
|
|
717
|
+
x: 480,
|
|
718
|
+
y: 80,
|
|
719
|
+
name: "3号桌",
|
|
720
|
+
width: 180,
|
|
721
|
+
height: 160,
|
|
722
|
+
zIndex: 0,
|
|
723
|
+
elementKind: "table",
|
|
724
|
+
dataBinding: {
|
|
725
|
+
dataSourceKey: RESTAURANT_DS_KEY,
|
|
726
|
+
recordId: "t3"
|
|
727
|
+
}
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
instanceId: "elm_cs1",
|
|
731
|
+
canvasId: "main",
|
|
732
|
+
x: 680,
|
|
733
|
+
y: 80,
|
|
734
|
+
name: "大厅·自助蘸料区",
|
|
735
|
+
width: 108,
|
|
736
|
+
height: 88,
|
|
737
|
+
zIndex: 0,
|
|
738
|
+
elementKind: "condimentStation",
|
|
739
|
+
dataBinding: {
|
|
740
|
+
dataSourceKey: CONDIMENT_STATION_DS_KEY,
|
|
741
|
+
recordId: "cs1"
|
|
742
|
+
}
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
instanceId: "elm_cs2",
|
|
746
|
+
canvasId: "main",
|
|
747
|
+
x: 80,
|
|
748
|
+
y: 264,
|
|
749
|
+
name: "包厢走道补料台",
|
|
750
|
+
width: 108,
|
|
751
|
+
height: 88,
|
|
752
|
+
zIndex: 0,
|
|
753
|
+
elementKind: "condimentStation",
|
|
754
|
+
dataBinding: {
|
|
755
|
+
dataSourceKey: CONDIMENT_STATION_DS_KEY,
|
|
756
|
+
recordId: "cs2"
|
|
757
|
+
}
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
instanceId: "elm_t4",
|
|
761
|
+
canvasId: "main",
|
|
762
|
+
x: 280,
|
|
763
|
+
y: 264,
|
|
764
|
+
name: "4号桌",
|
|
765
|
+
width: 180,
|
|
766
|
+
height: 120,
|
|
767
|
+
zIndex: 0,
|
|
768
|
+
elementKind: "table",
|
|
769
|
+
dataBinding: {
|
|
770
|
+
dataSourceKey: RESTAURANT_DS_KEY,
|
|
771
|
+
recordId: "t4"
|
|
772
|
+
}
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
instanceId: "elm_t5",
|
|
776
|
+
canvasId: "main",
|
|
777
|
+
x: 480,
|
|
778
|
+
y: 264,
|
|
779
|
+
name: "5号桌",
|
|
780
|
+
width: 180,
|
|
781
|
+
height: 160,
|
|
782
|
+
zIndex: 0,
|
|
783
|
+
elementKind: "table",
|
|
784
|
+
dataBinding: {
|
|
785
|
+
dataSourceKey: RESTAURANT_DS_KEY,
|
|
786
|
+
recordId: "t5"
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
instanceId: "elm_t6",
|
|
791
|
+
canvasId: "main",
|
|
792
|
+
x: 680,
|
|
793
|
+
y: 264,
|
|
794
|
+
name: "6号桌",
|
|
795
|
+
width: 180,
|
|
796
|
+
height: 120,
|
|
797
|
+
zIndex: 0,
|
|
798
|
+
elementKind: "table",
|
|
799
|
+
dataBinding: {
|
|
800
|
+
dataSourceKey: RESTAURANT_DS_KEY,
|
|
801
|
+
recordId: "t6"
|
|
802
|
+
}
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
instanceId: "elm_r1",
|
|
806
|
+
canvasId: "main",
|
|
807
|
+
x: 80,
|
|
808
|
+
y: 448,
|
|
809
|
+
name: "圆桌1",
|
|
810
|
+
width: 120,
|
|
811
|
+
height: 120,
|
|
812
|
+
zIndex: 0,
|
|
813
|
+
elementKind: "roundTable",
|
|
814
|
+
dataBinding: {
|
|
815
|
+
dataSourceKey: RESTAURANT_DS_KEY,
|
|
816
|
+
recordId: "r1"
|
|
817
|
+
}
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
instanceId: "elm_cs3",
|
|
821
|
+
canvasId: "main",
|
|
822
|
+
x: 220,
|
|
823
|
+
y: 448,
|
|
824
|
+
name: "露台·酱料小推位",
|
|
825
|
+
width: 108,
|
|
826
|
+
height: 88,
|
|
827
|
+
zIndex: 0,
|
|
828
|
+
elementKind: "condimentStation",
|
|
829
|
+
dataBinding: {
|
|
830
|
+
dataSourceKey: CONDIMENT_STATION_DS_KEY,
|
|
831
|
+
recordId: "cs3"
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
instanceId: "elm_t7",
|
|
836
|
+
canvasId: "main",
|
|
837
|
+
x: 480,
|
|
838
|
+
y: 448,
|
|
839
|
+
name: "7号桌",
|
|
840
|
+
width: 180,
|
|
841
|
+
height: 120,
|
|
842
|
+
zIndex: 0,
|
|
843
|
+
elementKind: "table",
|
|
844
|
+
dataBinding: {
|
|
845
|
+
dataSourceKey: RESTAURANT_DS_KEY,
|
|
846
|
+
recordId: "t7"
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
instanceId: "elm_t8",
|
|
851
|
+
canvasId: "main",
|
|
852
|
+
x: 680,
|
|
853
|
+
y: 448,
|
|
854
|
+
name: "8号桌",
|
|
855
|
+
width: 180,
|
|
856
|
+
height: 120,
|
|
857
|
+
zIndex: 0,
|
|
858
|
+
elementKind: "table",
|
|
859
|
+
dataBinding: {
|
|
860
|
+
dataSourceKey: RESTAURANT_DS_KEY,
|
|
861
|
+
recordId: "t8"
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
]
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
var restaurantTableColumns = [
|
|
868
|
+
{
|
|
869
|
+
title: "桌号",
|
|
870
|
+
dataIndex: "name",
|
|
871
|
+
key: "name",
|
|
872
|
+
width: 120,
|
|
873
|
+
type: "singleLineText"
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
title: "状态",
|
|
877
|
+
dataIndex: "status",
|
|
878
|
+
key: "status",
|
|
879
|
+
width: 120,
|
|
880
|
+
type: "singleSelect",
|
|
881
|
+
fieldProps: {
|
|
882
|
+
options: [
|
|
883
|
+
{ label: "全部", value: "all" },
|
|
884
|
+
{ label: "空闲", value: "空闲" },
|
|
885
|
+
{ label: "已预订", value: "已预订" },
|
|
886
|
+
{ label: "用餐中", value: "用餐中" },
|
|
887
|
+
{ label: "等待", value: "等待" },
|
|
888
|
+
{ label: "已结账", value: "已结账" }
|
|
889
|
+
]
|
|
890
|
+
},
|
|
891
|
+
filterable: true,
|
|
892
|
+
filter: { quickFilter: true }
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
title: "可坐人数",
|
|
896
|
+
dataIndex: "capacity",
|
|
897
|
+
key: "capacity",
|
|
898
|
+
width: 110,
|
|
899
|
+
type: "number"
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
title: "区域",
|
|
903
|
+
dataIndex: "area",
|
|
904
|
+
key: "area",
|
|
905
|
+
width: 140,
|
|
906
|
+
type: "singleLineText"
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
title: "当前用餐人数",
|
|
910
|
+
dataIndex: "guests",
|
|
911
|
+
key: "guests",
|
|
912
|
+
width: 130,
|
|
913
|
+
type: "number"
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
title: "顾客",
|
|
917
|
+
dataIndex: "customerName",
|
|
918
|
+
key: "customerName",
|
|
919
|
+
width: 120,
|
|
920
|
+
type: "singleLineText"
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
title: "预订时间",
|
|
924
|
+
dataIndex: "reserveTime",
|
|
925
|
+
key: "reserveTime",
|
|
926
|
+
width: 120,
|
|
927
|
+
type: "singleLineText"
|
|
928
|
+
}
|
|
929
|
+
];
|
|
930
|
+
var condimentRecordFormColumns = [
|
|
931
|
+
{ key: "name", label: "摆台名称", type: "string" },
|
|
932
|
+
{
|
|
933
|
+
key: "status",
|
|
934
|
+
label: "状态",
|
|
935
|
+
type: "select",
|
|
936
|
+
options: [
|
|
937
|
+
{ label: "正常", value: "正常" },
|
|
938
|
+
{ label: "需补货", value: "需补货" },
|
|
939
|
+
{ label: "维护中", value: "维护中" }
|
|
940
|
+
]
|
|
941
|
+
},
|
|
942
|
+
{ key: "flavorCount", label: "蘸料种类数", type: "number" },
|
|
943
|
+
{ key: "area", label: "区域", type: "string" },
|
|
944
|
+
{ key: "note", label: "备注", type: "string" }
|
|
945
|
+
];
|
|
946
|
+
function RestaurantTableRecordCustomForm(props) {
|
|
947
|
+
const { ctx } = props;
|
|
948
|
+
const [form] = import_antd.Form.useForm();
|
|
949
|
+
(0, import_react.useEffect)(() => {
|
|
950
|
+
form.setFieldsValue(ctx.record);
|
|
951
|
+
}, [ctx.recordId, ctx.record, form]);
|
|
952
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
953
|
+
import_antd.Form,
|
|
954
|
+
{
|
|
955
|
+
form,
|
|
956
|
+
layout: "vertical",
|
|
957
|
+
size: "small",
|
|
958
|
+
onFinish: (values) => {
|
|
959
|
+
var _a;
|
|
960
|
+
(_a = ctx.onSaveRecord) == null ? void 0 : _a.call(ctx, values);
|
|
961
|
+
}
|
|
962
|
+
},
|
|
963
|
+
/* @__PURE__ */ import_react.default.createElement("p", { style: { margin: "0 0 8px", fontSize: 12, color: "#8c8c8c" } }, "以下为自定义 React 表单示例(仍可 `ctx.onSaveRecord` 写回与内置 FloorMapDataForm 相同的数据通道)。"),
|
|
964
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "guests", label: "当前用餐人数" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, { min: 0, style: { width: "100%" } })),
|
|
965
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "customerName", label: "顾客" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Input, { allowClear: true })),
|
|
966
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "reserveTime", label: "预订时间" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Input, { placeholder: "如 18:30", allowClear: true })),
|
|
967
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
968
|
+
import_antd.Button,
|
|
969
|
+
{
|
|
970
|
+
type: "primary",
|
|
971
|
+
htmlType: "submit",
|
|
972
|
+
loading: ctx.savingRecord,
|
|
973
|
+
block: true,
|
|
974
|
+
size: "small"
|
|
975
|
+
},
|
|
976
|
+
"保存记录"
|
|
977
|
+
)
|
|
978
|
+
);
|
|
979
|
+
}
|
|
980
|
+
var restaurantRecordFormColumns = [
|
|
981
|
+
{ key: "name", label: "桌号", type: "string" },
|
|
982
|
+
{
|
|
983
|
+
key: "status",
|
|
984
|
+
label: "状态",
|
|
985
|
+
type: "select",
|
|
986
|
+
options: [
|
|
987
|
+
{ label: "空闲", value: "空闲" },
|
|
988
|
+
{ label: "已预订", value: "已预订" },
|
|
989
|
+
{ label: "用餐中", value: "用餐中" },
|
|
990
|
+
{ label: "等待", value: "等待" },
|
|
991
|
+
{ label: "已结账", value: "已结账" }
|
|
992
|
+
]
|
|
993
|
+
},
|
|
994
|
+
{ key: "capacity", label: "可坐人数", type: "number" },
|
|
995
|
+
{ key: "area", label: "区域", type: "string" },
|
|
996
|
+
{ key: "guests", label: "当前用餐人数", type: "number" },
|
|
997
|
+
{ key: "customerName", label: "顾客", type: "string" },
|
|
998
|
+
{ key: "reserveTime", label: "预订时间", type: "string" }
|
|
999
|
+
];
|
|
1000
|
+
var Default = {
|
|
1001
|
+
parameters: {
|
|
1002
|
+
layout: "fullscreen",
|
|
1003
|
+
docs: {
|
|
1004
|
+
description: {
|
|
1005
|
+
story: [
|
|
1006
|
+
"### 多数据源:餐桌 + 蘸料摆台(表格 ⇄ 平面图)",
|
|
1007
|
+
"",
|
|
1008
|
+
"- **`dataSources`**(根级):`{ tables, condimentStations }`,与 `dataSourceKey` 一致;ShellFrame 与 `FloorMap` props 合并后传入平面图。",
|
|
1009
|
+
"- **`floorMapLayoutContext`**:本 Story 将 `floorMapConfig` / `onSave` / 侧栏表单等放在根级 Context,`FloorMap` 仅保留 `mode`、`renderItemByKind`、`mapLayer` 等展示向 props。",
|
|
1010
|
+
"- **表格**:传根级 `data`(快筛 + 关键词过滤后分页);`dataSources.tables` 为**全量排序**餐桌,供平面图绑定。",
|
|
1011
|
+
"- **平面图**:始终渲染全部落位;未命中快筛/搜索的绑定行 **opacity=0.2**(`getMergedItemWrapperStyle`)。",
|
|
1012
|
+
"- **侧栏保存**:`onDataSourceRecordSave(key, id, patch)` 按 `key` 写回 `tables` 或 `condimentStations`。",
|
|
1013
|
+
"- **自定义表单开关**仍仅作用于 **餐桌** 数据源侧栏。",
|
|
1014
|
+
"",
|
|
1015
|
+
"```tsx",
|
|
1016
|
+
"<PisellRecordBoard data={...} dataSources={全量} floorMap={{ getMergedItemWrapperStyle: ... }} />",
|
|
1017
|
+
"```"
|
|
1018
|
+
].join("\n")
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
render: function DefaultRender() {
|
|
1023
|
+
const [pageNumber, setPageNumber] = (0, import_react.useState)(1);
|
|
1024
|
+
const [pageSize, setPageSize] = (0, import_react.useState)(10);
|
|
1025
|
+
const [loading] = (0, import_react.useState)(false);
|
|
1026
|
+
const [searchParams, setSearchParams] = (0, import_react.useState)({});
|
|
1027
|
+
const [selectedKeys, setSelectedKeys] = (0, import_react.useState)([]);
|
|
1028
|
+
const [selectedRows, setSelectedRows] = (0, import_react.useState)([]);
|
|
1029
|
+
const [tables, setTables] = (0, import_react.useState)(
|
|
1030
|
+
createInitialRestaurantTables
|
|
1031
|
+
);
|
|
1032
|
+
const [condimentStations, setCondimentStations] = (0, import_react.useState)(createInitialCondimentStations);
|
|
1033
|
+
const [floorMapConfig, setFloorMapConfig] = (0, import_react.useState)(
|
|
1034
|
+
createInitialRestaurantFloorMapConfig
|
|
1035
|
+
);
|
|
1036
|
+
const [mapEditMode, setMapEditMode] = (0, import_react.useState)(false);
|
|
1037
|
+
const [useCustomRecordForm, setUseCustomRecordForm] = (0, import_react.useState)(false);
|
|
1038
|
+
const sortedAllTables = (0, import_react.useMemo)(
|
|
1039
|
+
() => sortDataBySortKey(tables, searchParams == null ? void 0 : searchParams.sort),
|
|
1040
|
+
[tables, searchParams == null ? void 0 : searchParams.sort]
|
|
1041
|
+
);
|
|
1042
|
+
const filteredSortedTables = (0, import_react.useMemo)(
|
|
1043
|
+
() => sortedAllTables.filter(
|
|
1044
|
+
(row) => recordBoardStoryRowMatchesToolbar(
|
|
1045
|
+
row,
|
|
1046
|
+
searchParams
|
|
1047
|
+
)
|
|
1048
|
+
),
|
|
1049
|
+
[sortedAllTables, searchParams]
|
|
1050
|
+
);
|
|
1051
|
+
const total = filteredSortedTables.length;
|
|
1052
|
+
const data = (0, import_react.useMemo)(() => {
|
|
1053
|
+
const start = (pageNumber - 1) * pageSize;
|
|
1054
|
+
return filteredSortedTables.slice(start, start + pageSize);
|
|
1055
|
+
}, [pageNumber, pageSize, filteredSortedTables]);
|
|
1056
|
+
const value = (0, import_react.useMemo)(
|
|
1057
|
+
() => ({
|
|
1058
|
+
data,
|
|
1059
|
+
loading,
|
|
1060
|
+
total,
|
|
1061
|
+
pagination: { pageNumber, pageSize },
|
|
1062
|
+
onPageChange: (num, size) => {
|
|
1063
|
+
setPageNumber(num);
|
|
1064
|
+
setPageSize(size);
|
|
1065
|
+
},
|
|
1066
|
+
searchParams,
|
|
1067
|
+
onSearch: (params) => {
|
|
1068
|
+
setSearchParams(params);
|
|
1069
|
+
setPageNumber(1);
|
|
1070
|
+
},
|
|
1071
|
+
onReset: () => {
|
|
1072
|
+
setSearchParams({});
|
|
1073
|
+
setPageNumber(1);
|
|
1074
|
+
},
|
|
1075
|
+
layoutType: "grid",
|
|
1076
|
+
rowKey: "id"
|
|
1077
|
+
}),
|
|
1078
|
+
[data, loading, total, pageNumber, pageSize, searchParams]
|
|
1079
|
+
);
|
|
1080
|
+
const dataSources = (0, import_react.useMemo)(
|
|
1081
|
+
() => ({
|
|
1082
|
+
[RESTAURANT_DS_KEY]: sortedAllTables,
|
|
1083
|
+
[CONDIMENT_STATION_DS_KEY]: condimentStations
|
|
1084
|
+
}),
|
|
1085
|
+
[sortedAllTables, condimentStations]
|
|
1086
|
+
);
|
|
1087
|
+
const handleFloorMapSave = (0, import_react.useCallback)((config) => {
|
|
1088
|
+
setFloorMapConfig(config);
|
|
1089
|
+
console.log("[PisellRecordBoard Restaurant] floorMap onSave", config);
|
|
1090
|
+
}, []);
|
|
1091
|
+
const handleDataSourceRecordSave = (0, import_react.useCallback)(
|
|
1092
|
+
(dataSourceKey, id, newData) => {
|
|
1093
|
+
if (dataSourceKey === RESTAURANT_DS_KEY) {
|
|
1094
|
+
setTables(
|
|
1095
|
+
(prev) => prev.map((row) => row.id === id ? { ...row, ...newData } : row)
|
|
1096
|
+
);
|
|
1097
|
+
} else if (dataSourceKey === CONDIMENT_STATION_DS_KEY) {
|
|
1098
|
+
setCondimentStations(
|
|
1099
|
+
(prev) => prev.map((row) => row.id === id ? { ...row, ...newData } : row)
|
|
1100
|
+
);
|
|
1101
|
+
}
|
|
1102
|
+
console.log("[PisellRecordBoard Restaurant] onDataSourceRecordSave", {
|
|
1103
|
+
dataSourceKey,
|
|
1104
|
+
id,
|
|
1105
|
+
newData
|
|
1106
|
+
});
|
|
1107
|
+
},
|
|
1108
|
+
[]
|
|
1109
|
+
);
|
|
1110
|
+
const floorMapLayoutContext = (0, import_react.useMemo)(
|
|
1111
|
+
() => ({
|
|
1112
|
+
floorMapConfig,
|
|
1113
|
+
onSave: handleFloorMapSave,
|
|
1114
|
+
onDataSourceRecordSave: handleDataSourceRecordSave,
|
|
1115
|
+
dataSourceLabels: {
|
|
1116
|
+
[RESTAURANT_DS_KEY]: "餐桌",
|
|
1117
|
+
[CONDIMENT_STATION_DS_KEY]: "蘸料摆台"
|
|
1118
|
+
},
|
|
1119
|
+
dataSourceFormColumns: {
|
|
1120
|
+
[RESTAURANT_DS_KEY]: restaurantRecordFormColumns,
|
|
1121
|
+
[CONDIMENT_STATION_DS_KEY]: condimentRecordFormColumns
|
|
1122
|
+
},
|
|
1123
|
+
...useCustomRecordForm ? {
|
|
1124
|
+
dataSourceRecordForm: {
|
|
1125
|
+
[RESTAURANT_DS_KEY]: (ctx) => /* @__PURE__ */ import_react.default.createElement(RestaurantTableRecordCustomForm, { ctx })
|
|
1126
|
+
}
|
|
1127
|
+
} : {}
|
|
1128
|
+
}),
|
|
1129
|
+
[
|
|
1130
|
+
floorMapConfig,
|
|
1131
|
+
handleFloorMapSave,
|
|
1132
|
+
handleDataSourceRecordSave,
|
|
1133
|
+
useCustomRecordForm
|
|
1134
|
+
]
|
|
1135
|
+
);
|
|
1136
|
+
const floorMap = (0, import_react.useMemo)(
|
|
1137
|
+
() => ({
|
|
1138
|
+
mode: mapEditMode ? "edit" : "read",
|
|
1139
|
+
renderItemByKind: {
|
|
1140
|
+
table: (0, import_FigmaTableCard.getRenderItemByKindTable)(dataSources),
|
|
1141
|
+
roundTable: (0, import_FigmaTableCard.getRenderItemByKindRoundTable)(dataSources),
|
|
1142
|
+
condimentStation: getRenderItemByKindCondimentStation(dataSources)
|
|
1143
|
+
},
|
|
1144
|
+
mapLayer: {
|
|
1145
|
+
backgroundType: "color",
|
|
1146
|
+
backgroundColor: "#f5f5f5",
|
|
1147
|
+
padding: 24
|
|
1148
|
+
},
|
|
1149
|
+
zoom: { defaultScale: 1, min: 0.4, max: 2.2, step: 0.1 },
|
|
1150
|
+
pan: { enabled: true, boundary: "clamp" },
|
|
1151
|
+
controls: {
|
|
1152
|
+
showZoom: true,
|
|
1153
|
+
showReset: true,
|
|
1154
|
+
showFitBounds: true
|
|
1155
|
+
},
|
|
1156
|
+
enableHover: true,
|
|
1157
|
+
getMergedItemWrapperStyle: (item) => {
|
|
1158
|
+
var _a;
|
|
1159
|
+
const m = item;
|
|
1160
|
+
const b = (_a = m._sceneElement) == null ? void 0 : _a.dataBinding;
|
|
1161
|
+
if (!(b == null ? void 0 : b.dataSourceKey)) return void 0;
|
|
1162
|
+
const recordId = b.recordId != null ? String(b.recordId).trim() : "";
|
|
1163
|
+
if (!recordId || recordId.startsWith("new_")) return void 0;
|
|
1164
|
+
const rows = dataSources[b.dataSourceKey];
|
|
1165
|
+
const row = rows == null ? void 0 : rows.find((r) => r.id === recordId);
|
|
1166
|
+
if (!row) return void 0;
|
|
1167
|
+
if (recordBoardStoryRowMatchesToolbar(
|
|
1168
|
+
row,
|
|
1169
|
+
searchParams
|
|
1170
|
+
))
|
|
1171
|
+
return void 0;
|
|
1172
|
+
return { opacity: FLOOR_MAP_DIM_OPACITY };
|
|
1173
|
+
}
|
|
1174
|
+
}),
|
|
1175
|
+
[dataSources, mapEditMode, searchParams]
|
|
1176
|
+
);
|
|
1177
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
1178
|
+
"div",
|
|
1179
|
+
{
|
|
1180
|
+
style: {
|
|
1181
|
+
boxSizing: "border-box",
|
|
1182
|
+
height: "100vh",
|
|
1183
|
+
minHeight: "100vh",
|
|
1184
|
+
padding: 16,
|
|
1185
|
+
background: "#f5f5f5",
|
|
1186
|
+
display: "flex",
|
|
1187
|
+
flexDirection: "column",
|
|
1188
|
+
overflow: "hidden"
|
|
1189
|
+
}
|
|
1190
|
+
},
|
|
1191
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
1192
|
+
"div",
|
|
1193
|
+
{
|
|
1194
|
+
style: {
|
|
1195
|
+
flexShrink: 0,
|
|
1196
|
+
marginBottom: 12,
|
|
1197
|
+
padding: "10px 12px",
|
|
1198
|
+
background: "#e6f4ff",
|
|
1199
|
+
border: "1px solid #91caff",
|
|
1200
|
+
borderRadius: 8,
|
|
1201
|
+
fontSize: 13,
|
|
1202
|
+
lineHeight: 1.65,
|
|
1203
|
+
color: "#0958d9"
|
|
1204
|
+
}
|
|
1205
|
+
},
|
|
1206
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: "large", wrap: true, align: "center" }, /* @__PURE__ */ import_react.default.createElement("span", null, /* @__PURE__ */ import_react.default.createElement("strong", null, "表格:"), "快筛 + 搜索过滤 + 分页;平面图为全量落位,未命中行半透明显示。"), /* @__PURE__ */ import_react.default.createElement("span", null, /* @__PURE__ */ import_react.default.createElement("strong", null, "平面图:"), "`tables` + `condimentStations` 同时渲染;工具栏「表格 / 平面图」切换视图。"), /* @__PURE__ */ import_react.default.createElement("span", null, /* @__PURE__ */ import_react.default.createElement(import_antd.Switch, { checked: mapEditMode, onChange: setMapEditMode }), /* @__PURE__ */ import_react.default.createElement("span", { style: { marginLeft: 8 } }, "平面图编辑模式(关=只读,开=可拖桌位、侧栏改记录并写回对应数据源)")), /* @__PURE__ */ import_react.default.createElement("span", null, /* @__PURE__ */ import_react.default.createElement(
|
|
1207
|
+
import_antd.Switch,
|
|
1208
|
+
{
|
|
1209
|
+
checked: useCustomRecordForm,
|
|
1210
|
+
onChange: setUseCustomRecordForm
|
|
1211
|
+
}
|
|
1212
|
+
), /* @__PURE__ */ import_react.default.createElement("span", { style: { marginLeft: 8 } }, "侧栏自定义表单(仅", /* @__PURE__ */ import_react.default.createElement("strong", null, "餐桌"), "数据源;蘸料台仍用列配置表单)"))),
|
|
1213
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: 8, fontSize: 12, color: "#1677ff" } }, "提示:平面图为全量落位;仅当", /* @__PURE__ */ import_react.default.createElement("strong", null, "已绑定有效数据行"), "且该行未命中快筛/搜索时透明度", " ", Math.round(FLOOR_MAP_DIM_OPACITY * 100), "%(未选行、new_ 占位、行已删不参与淡化)。保存布局仍会输出 `onSave` 日志。")
|
|
1214
|
+
),
|
|
1215
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
1216
|
+
"div",
|
|
1217
|
+
{
|
|
1218
|
+
style: {
|
|
1219
|
+
flex: 1,
|
|
1220
|
+
minHeight: 0,
|
|
1221
|
+
minWidth: 0,
|
|
1222
|
+
display: "flex",
|
|
1223
|
+
flexDirection: "column"
|
|
1224
|
+
}
|
|
1225
|
+
},
|
|
1226
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
1227
|
+
import_index.default,
|
|
1228
|
+
{
|
|
1229
|
+
rowKey: "id",
|
|
1230
|
+
...value,
|
|
1231
|
+
dataSources,
|
|
1232
|
+
floorMapLayoutContext,
|
|
1233
|
+
defaultBodyView: "grid",
|
|
1234
|
+
style: { height: "100%", minHeight: 0, flex: 1 },
|
|
1235
|
+
grid: {
|
|
1236
|
+
columns: restaurantTableColumns,
|
|
1237
|
+
scroll: { x: 1460 },
|
|
1238
|
+
selectedKeys,
|
|
1239
|
+
selectedRows,
|
|
1240
|
+
onSelectionChange: (keys, rows) => {
|
|
1241
|
+
setSelectedKeys(keys);
|
|
1242
|
+
setSelectedRows(rows);
|
|
1243
|
+
}
|
|
1244
|
+
},
|
|
1245
|
+
toolBar: {
|
|
1246
|
+
search: true,
|
|
1247
|
+
quickFilter: true,
|
|
1248
|
+
filter: { hiddenQuickFilter: true }
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
/* @__PURE__ */ import_react.default.createElement(import_index.default.ShellFrame, null, /* @__PURE__ */ import_react.default.createElement(import_index.default.GridLayout, null), /* @__PURE__ */ import_react.default.createElement(
|
|
1252
|
+
import_index.default.FloorMap,
|
|
1253
|
+
{
|
|
1254
|
+
...floorMap
|
|
1255
|
+
}
|
|
1256
|
+
))
|
|
1257
|
+
)
|
|
1258
|
+
)
|
|
1259
|
+
);
|
|
1260
|
+
}
|
|
1261
|
+
};
|
|
415
1262
|
var GridLayoutWithTable = {
|
|
416
1263
|
parameters: {
|
|
417
|
-
docs: {
|
|
1264
|
+
docs: {
|
|
1265
|
+
description: {
|
|
1266
|
+
story: "列配置 type + fieldProps,筛选项与排序由 columns 派生;快速筛选在右侧「筛选」弹层内。"
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
418
1269
|
},
|
|
419
1270
|
render: function GridLayoutWithTableRender() {
|
|
420
1271
|
var _a;
|
|
@@ -425,7 +1276,10 @@ var GridLayoutWithTable = {
|
|
|
425
1276
|
const [selectedKeys, setSelectedKeys] = (0, import_react.useState)([]);
|
|
426
1277
|
const [selectedRows, setSelectedRows] = (0, import_react.useState)([]);
|
|
427
1278
|
const filterValues = (_a = searchParams == null ? void 0 : searchParams.filter) == null ? void 0 : _a.values;
|
|
428
|
-
const filteredList = (0, import_react.useMemo)(
|
|
1279
|
+
const filteredList = (0, import_react.useMemo)(
|
|
1280
|
+
() => filterDataByCriteria(mockData, filterValues),
|
|
1281
|
+
[searchParams]
|
|
1282
|
+
);
|
|
429
1283
|
const sortedList = (0, import_react.useMemo)(
|
|
430
1284
|
() => sortDataBySortKey(filteredList, searchParams == null ? void 0 : searchParams.sort),
|
|
431
1285
|
[filteredList, searchParams == null ? void 0 : searchParams.sort]
|
|
@@ -574,7 +1428,12 @@ var GridLayoutWithCollapseUniformColumns = {
|
|
|
574
1428
|
}, [pageNumber, pageSize, uniformData]);
|
|
575
1429
|
const columnsUniform = [
|
|
576
1430
|
{ title: "订单号", dataIndex: "orderNo", key: "orderNo", width: 140 },
|
|
577
|
-
{
|
|
1431
|
+
{
|
|
1432
|
+
title: "支付状态",
|
|
1433
|
+
dataIndex: "payStatus",
|
|
1434
|
+
key: "payStatus",
|
|
1435
|
+
width: 120
|
|
1436
|
+
},
|
|
578
1437
|
{ title: "订单金额", dataIndex: "amount", key: "amount", width: 120 },
|
|
579
1438
|
{ title: "备注", dataIndex: "note", key: "note", width: 160 }
|
|
580
1439
|
];
|
|
@@ -715,7 +1574,10 @@ var GridWithOnRow = {
|
|
|
715
1574
|
const [selectedKeys, setSelectedKeys] = (0, import_react.useState)([]);
|
|
716
1575
|
const [selectedRows, setSelectedRows] = (0, import_react.useState)([]);
|
|
717
1576
|
const filterValues = (_a = searchParams == null ? void 0 : searchParams.filter) == null ? void 0 : _a.values;
|
|
718
|
-
const filteredList = (0, import_react.useMemo)(
|
|
1577
|
+
const filteredList = (0, import_react.useMemo)(
|
|
1578
|
+
() => filterDataByCriteria(mockData, filterValues),
|
|
1579
|
+
[searchParams]
|
|
1580
|
+
);
|
|
719
1581
|
const sortedList = (0, import_react.useMemo)(
|
|
720
1582
|
() => sortDataBySortKey(filteredList, searchParams == null ? void 0 : searchParams.sort),
|
|
721
1583
|
[filteredList, searchParams == null ? void 0 : searchParams.sort]
|
|
@@ -765,8 +1627,9 @@ var GridWithOnRow = {
|
|
|
765
1627
|
},
|
|
766
1628
|
onRow: (record) => ({
|
|
767
1629
|
onClick: () => {
|
|
768
|
-
|
|
769
|
-
|
|
1630
|
+
const r = record;
|
|
1631
|
+
console.log("行点击", r.orderNo, r);
|
|
1632
|
+
alert(`点击订单:${r.orderNo}`);
|
|
770
1633
|
}
|
|
771
1634
|
}),
|
|
772
1635
|
rowClassName: (record) => record.orderStatus === "cancelled" ? "pisell-record-board-row-cancelled" : ""
|
|
@@ -779,7 +1642,11 @@ var GridWithOnRow = {
|
|
|
779
1642
|
};
|
|
780
1643
|
var GridLayoutWithColumnType = {
|
|
781
1644
|
parameters: {
|
|
782
|
-
docs: {
|
|
1645
|
+
docs: {
|
|
1646
|
+
description: {
|
|
1647
|
+
story: "与 GridLayoutWithTable 相同能力,可点排序、筛选、重置验证行为。"
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
783
1650
|
},
|
|
784
1651
|
render: function GridLayoutWithColumnTypeRender() {
|
|
785
1652
|
var _a;
|
|
@@ -790,7 +1657,10 @@ var GridLayoutWithColumnType = {
|
|
|
790
1657
|
const [selectedKeys, setSelectedKeys] = (0, import_react.useState)([]);
|
|
791
1658
|
const [selectedRows, setSelectedRows] = (0, import_react.useState)([]);
|
|
792
1659
|
const filterValues = (_a = searchParams == null ? void 0 : searchParams.filter) == null ? void 0 : _a.values;
|
|
793
|
-
const filteredList = (0, import_react.useMemo)(
|
|
1660
|
+
const filteredList = (0, import_react.useMemo)(
|
|
1661
|
+
() => filterDataByCriteria(mockData, filterValues),
|
|
1662
|
+
[searchParams]
|
|
1663
|
+
);
|
|
794
1664
|
const sortedList = (0, import_react.useMemo)(
|
|
795
1665
|
() => sortDataBySortKey(filteredList, searchParams == null ? void 0 : searchParams.sort),
|
|
796
1666
|
[filteredList, searchParams == null ? void 0 : searchParams.sort]
|
|
@@ -1028,7 +1898,10 @@ var GridLayoutWithQuickFilterOnLeft = {
|
|
|
1028
1898
|
const [selectedKeys, setSelectedKeys] = (0, import_react.useState)([]);
|
|
1029
1899
|
const [selectedRows, setSelectedRows] = (0, import_react.useState)([]);
|
|
1030
1900
|
const filterValues = (_a = searchParams == null ? void 0 : searchParams.filter) == null ? void 0 : _a.values;
|
|
1031
|
-
const filteredList = (0, import_react.useMemo)(
|
|
1901
|
+
const filteredList = (0, import_react.useMemo)(
|
|
1902
|
+
() => filterDataByCriteria(mockData, filterValues),
|
|
1903
|
+
[searchParams]
|
|
1904
|
+
);
|
|
1032
1905
|
const sortedList = (0, import_react.useMemo)(
|
|
1033
1906
|
() => sortDataBySortKey(filteredList, searchParams == null ? void 0 : searchParams.sort),
|
|
1034
1907
|
[filteredList, searchParams == null ? void 0 : searchParams.sort]
|
|
@@ -1319,7 +2192,11 @@ var GridLayoutWithPisellFindInToolBar = {
|
|
|
1319
2192
|
{
|
|
1320
2193
|
rowKey: "id",
|
|
1321
2194
|
...value,
|
|
1322
|
-
toolBar: {
|
|
2195
|
+
toolBar: {
|
|
2196
|
+
search: true,
|
|
2197
|
+
quickFilter: true,
|
|
2198
|
+
filter: { hiddenQuickFilter: true }
|
|
2199
|
+
},
|
|
1323
2200
|
grid: {
|
|
1324
2201
|
columns,
|
|
1325
2202
|
size: "small",
|
|
@@ -1395,7 +2272,11 @@ var GridLayoutToolBarSearchInput = {
|
|
|
1395
2272
|
};
|
|
1396
2273
|
var GridLayoutFull = {
|
|
1397
2274
|
parameters: {
|
|
1398
|
-
docs: {
|
|
2275
|
+
docs: {
|
|
2276
|
+
description: {
|
|
2277
|
+
story: "勾选行后显示批量操作栏,可配置 onDelete 等;含搜索、筛选、排序、重置。"
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
1399
2280
|
},
|
|
1400
2281
|
render: function GridLayoutFullRender() {
|
|
1401
2282
|
const [pageNumber, setPageNumber] = (0, import_react.useState)(1);
|
|
@@ -1463,7 +2344,11 @@ var GridLayoutFull = {
|
|
|
1463
2344
|
};
|
|
1464
2345
|
var Placeholder = {
|
|
1465
2346
|
parameters: {
|
|
1466
|
-
docs: {
|
|
2347
|
+
docs: {
|
|
2348
|
+
description: {
|
|
2349
|
+
story: "不传 value 时的占位态,用于设计态或未接数据源时。"
|
|
2350
|
+
}
|
|
2351
|
+
}
|
|
1467
2352
|
},
|
|
1468
2353
|
args: {
|
|
1469
2354
|
rowKey: "id"
|
|
@@ -1482,7 +2367,11 @@ var CardLayoutPlaceholder = {
|
|
|
1482
2367
|
};
|
|
1483
2368
|
var CustomComposition = {
|
|
1484
2369
|
parameters: {
|
|
1485
|
-
docs: {
|
|
2370
|
+
docs: {
|
|
2371
|
+
description: {
|
|
2372
|
+
story: "未用 ShellFrame,手动组合 ToolBar、BatchActionBar、Grid、Pagination。"
|
|
2373
|
+
}
|
|
2374
|
+
}
|
|
1486
2375
|
},
|
|
1487
2376
|
render: function CustomCompositionRender() {
|
|
1488
2377
|
const [pageNumber, setPageNumber] = (0, import_react.useState)(1);
|
|
@@ -1656,6 +2545,7 @@ var SearchAndGridOnly = {
|
|
|
1656
2545
|
CustomComposition,
|
|
1657
2546
|
CustomFilterSortRender,
|
|
1658
2547
|
CustomQuickFilterAndColumnsRender,
|
|
2548
|
+
Default,
|
|
1659
2549
|
GridLayoutFull,
|
|
1660
2550
|
GridLayoutToolBarSearchInput,
|
|
1661
2551
|
GridLayoutToolBarSortAndFilter,
|