@pisell/materials 6.11.17 → 6.11.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +32 -32
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +25 -25
- package/es/components/PisellCards/index.d.ts +1 -0
- package/es/components/PisellFields/index.d.ts +1 -0
- package/es/components/PisellLayouts/index.d.ts +11 -5
- package/es/components/PisellLayouts/index.js +8 -4
- package/es/components/PisellMetrics/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.d.ts +13 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.js +274 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +544 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/types.d.ts +117 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/types.js +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.d.ts +9 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +61 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +176 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +12 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.js +11 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +87 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Tabs/ReadPretty.d.ts +9 -0
- package/es/components/dataSourceComponents/fields/Tabs/ReadPretty.js +16 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.d.ts +23 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.js +93 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.less +64 -0
- package/es/components/dataSourceComponents/fields/Tabs/WithMode.d.ts +6 -0
- package/es/components/dataSourceComponents/fields/Tabs/WithMode.js +9 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +13 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.js +18 -0
- package/es/components/dataSourceComponents/fields/Tabs/type.d.ts +38 -0
- package/es/components/dataSourceComponents/fields/Tabs/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +50 -11
- package/es/components/dataSourceComponents/fields/index.js +5 -1
- package/es/components/dataSourceComponents/fields/utils.js +3 -0
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/pisellFilter/type.d.ts +4 -2
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +12 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +611 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.less +92 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +55 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +1667 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.js +203 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.less +189 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +37 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.js +341 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.less +89 -0
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +43 -0
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.js +436 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +21 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.js +133 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.less +7 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +543 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +162 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +36 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +135 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +150 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +9 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.js +71 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +369 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +239 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.js +195 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.less +19 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.js +85 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.less +7 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +33 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.js +90 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.less +101 -0
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +16 -0
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +29 -0
- package/es/components/pisellFloorMapLayout/components/index.d.ts +21 -0
- package/es/components/pisellFloorMapLayout/components/index.js +13 -0
- package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +16 -0
- package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.js +21 -0
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +28 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +63 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +562 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.d.ts +21 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.js +122 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +67 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +399 -0
- package/es/components/pisellFloorMapLayout/index.d.ts +15 -0
- package/es/components/pisellFloorMapLayout/index.js +12 -0
- package/es/components/pisellFloorMapLayout/locales-ja.d.ts +104 -0
- package/es/components/pisellFloorMapLayout/locales-ja.js +103 -0
- package/es/components/pisellFloorMapLayout/locales-pt.d.ts +104 -0
- package/es/components/pisellFloorMapLayout/locales-pt.js +103 -0
- package/es/components/pisellFloorMapLayout/locales.d.ts +506 -0
- package/es/components/pisellFloorMapLayout/locales.js +310 -0
- package/es/components/pisellFloorMapLayout/types.d.ts +586 -0
- package/es/components/pisellFloorMapLayout/types.js +152 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +20 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.js +129 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +87 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +15 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +56 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +22 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +156 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +89 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapStageDefaults.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapStageDefaults.js +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +108 -0
- package/es/components/pisellFloorMapLayout/utils/layoutMeasurements.d.ts +30 -0
- package/es/components/pisellFloorMapLayout/utils/layoutMeasurements.js +125 -0
- package/es/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.d.ts +7 -0
- package/es/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.js +29 -0
- package/es/components/pisellFloorMapLayout/utils/snap.d.ts +10 -0
- package/es/components/pisellFloorMapLayout/utils/snap.js +21 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.js +175 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.less +129 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.js +237 -0
- package/es/components/pisellHierarchicalSummaryList/components/Row.d.ts +35 -0
- package/es/components/pisellHierarchicalSummaryList/components/Row.js +313 -0
- package/es/components/pisellHierarchicalSummaryList/components/index.js +1 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/index.js +1 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.js +34 -0
- package/es/components/pisellHierarchicalSummaryList/index.js +5 -0
- package/es/components/pisellHierarchicalSummaryList/types.js +1 -0
- package/es/components/pisellModal/components/index.d.ts +1 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +2 -1
- package/es/components/pisellRecordBoard/PisellRecordBoard.js +98 -18
- package/es/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +4 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.stories.js +1276 -344
- package/es/components/pisellRecordBoard/index.d.ts +8 -2
- package/es/components/pisellRecordBoard/index.js +4 -2
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +1 -3
- package/es/components/pisellRecordBoard/shellFrame/FloorMap.d.ts +14 -0
- package/es/components/pisellRecordBoard/shellFrame/FloorMap.js +15 -0
- package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +16 -0
- package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.js +11 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +61 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +69 -11
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
- package/es/components/pisellRecordBoard/shellFrame/index.d.ts +6 -10
- package/es/components/pisellRecordBoard/shellFrame/index.js +111 -20
- package/es/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
- package/es/components/pisellRecordBoard/types.d.ts +68 -2
- package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
- package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +57 -0
- package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +3 -2
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +10 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.js +156 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.less +88 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.stories.d.ts +12 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.stories.js +105 -0
- package/es/components/pisellReservationSchedule/index.d.ts +2 -0
- package/es/components/pisellReservationSchedule/index.js +1 -0
- package/es/components/pisellReservationSchedule/locales.d.ts +25 -0
- package/es/components/pisellReservationSchedule/locales.js +24 -0
- package/es/components/pisellReservationSchedule/types.d.ts +42 -0
- package/es/components/pisellReservationSchedule/types.js +1 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +94 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +66 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.js +197 -0
- package/es/components/pisellReservationScheduleBand/index.d.ts +2 -0
- package/es/components/pisellReservationScheduleBand/index.js +1 -0
- package/es/components/pisellReservationScheduleBand/types.d.ts +49 -0
- package/es/components/pisellReservationScheduleBand/types.js +1 -0
- package/es/components/pisellShellFrame/PisellShellFrame.less +11 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +787 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +461 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.stories.js +290 -0
- package/es/components/pisellTimeNavigator/components/BackgroundLayer.js +30 -0
- package/es/components/pisellTimeNavigator/components/CursorLayer.d.ts +25 -0
- package/es/components/pisellTimeNavigator/components/CursorLayer.js +77 -0
- package/es/components/pisellTimeNavigator/components/GestureLayer.d.ts +33 -0
- package/es/components/pisellTimeNavigator/components/GestureLayer.js +91 -0
- package/es/components/pisellTimeNavigator/components/NowButton.d.ts +14 -0
- package/es/components/pisellTimeNavigator/components/NowButton.js +38 -0
- package/es/components/pisellTimeNavigator/components/ScaleLayer.d.ts +22 -0
- package/es/components/pisellTimeNavigator/components/ScaleLayer.js +73 -0
- package/es/components/pisellTimeNavigator/components/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/components/index.js +5 -0
- package/es/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/hooks/index.js +3 -0
- package/es/components/pisellTimeNavigator/hooks/useDragInertia.js +109 -0
- package/es/components/pisellTimeNavigator/hooks/useRealtime.js +16 -0
- package/es/components/pisellTimeNavigator/hooks/useTimeAxis.js +76 -0
- package/es/components/pisellTimeNavigator/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/index.js +4 -0
- package/es/components/pisellTimeNavigator/locales.d.ts +22 -0
- package/es/components/pisellTimeNavigator/locales.js +21 -0
- package/es/components/pisellTimeNavigator/types.js +1 -0
- package/es/components/pisellTimeNavigator/utils/index.js +116 -0
- package/es/components/pisellWalletPassCard/index.js +1 -1
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/table/Table/fields/date/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/link/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/index.js +1 -1
- package/es/hooks/useResponsive.d.ts +1 -1
- package/es/index.d.ts +49 -33
- package/es/index.js +47 -27
- package/es/locales/en-US.d.ts +3 -0
- package/es/locales/en-US.js +3 -0
- package/es/locales/ja.d.ts +8 -0
- package/es/locales/ja.js +25 -7
- package/es/locales/pt.d.ts +8 -0
- package/es/locales/pt.js +21 -3
- package/es/locales/zh-CN.d.ts +3 -0
- package/es/locales/zh-CN.js +3 -0
- package/es/locales/zh-TW.d.ts +3 -0
- package/es/locales/zh-TW.js +3 -0
- package/lib/components/PisellCards/index.d.ts +1 -0
- package/lib/components/PisellFields/index.d.ts +1 -0
- package/lib/components/PisellLayouts/index.d.ts +11 -5
- package/lib/components/PisellLayouts/index.js +15 -1
- package/lib/components/PisellMetrics/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.d.ts +13 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.js +229 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +544 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/types.d.ts +117 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/types.js +17 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.d.ts +9 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +64 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +157 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +12 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.js +40 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +87 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Tabs/ReadPretty.d.ts +9 -0
- package/lib/components/dataSourceComponents/fields/Tabs/ReadPretty.js +45 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.d.ts +23 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.js +95 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.less +64 -0
- package/lib/components/dataSourceComponents/fields/Tabs/WithMode.d.ts +6 -0
- package/lib/components/dataSourceComponents/fields/Tabs/WithMode.js +39 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +13 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.js +40 -0
- package/lib/components/dataSourceComponents/fields/Tabs/type.d.ts +38 -0
- package/lib/components/dataSourceComponents/fields/Tabs/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +50 -11
- package/lib/components/dataSourceComponents/fields/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/utils.js +3 -0
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/pisellFilter/type.d.ts +4 -2
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +12 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +709 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.less +92 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +55 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +1353 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.js +237 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.less +189 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +37 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.js +358 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.less +89 -0
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +43 -0
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.js +486 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +21 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.js +119 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.less +7 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +556 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +162 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +36 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +199 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +150 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +9 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.js +96 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +348 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +239 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.js +219 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.less +19 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.js +110 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.less +7 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +33 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.js +127 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.less +101 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +16 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +65 -0
- package/lib/components/pisellFloorMapLayout/components/index.d.ts +21 -0
- package/lib/components/pisellFloorMapLayout/components/index.js +56 -0
- package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +16 -0
- package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.js +54 -0
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +47 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +63 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +546 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.d.ts +21 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.js +146 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +67 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +382 -0
- package/lib/components/pisellFloorMapLayout/index.d.ts +15 -0
- package/lib/components/pisellFloorMapLayout/index.js +64 -0
- package/lib/components/pisellFloorMapLayout/locales-ja.d.ts +104 -0
- package/lib/components/pisellFloorMapLayout/locales-ja.js +124 -0
- package/lib/components/pisellFloorMapLayout/locales-pt.d.ts +104 -0
- package/lib/components/pisellFloorMapLayout/locales-pt.js +124 -0
- package/lib/components/pisellFloorMapLayout/locales.d.ts +506 -0
- package/lib/components/pisellFloorMapLayout/locales.js +340 -0
- package/lib/components/pisellFloorMapLayout/types.d.ts +586 -0
- package/lib/components/pisellFloorMapLayout/types.js +32 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +20 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.js +126 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +66 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +38 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +67 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +22 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +142 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +136 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapStageDefaults.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapStageDefaults.js +33 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +128 -0
- package/lib/components/pisellFloorMapLayout/utils/layoutMeasurements.d.ts +30 -0
- package/lib/components/pisellFloorMapLayout/utils/layoutMeasurements.js +96 -0
- package/lib/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.d.ts +7 -0
- package/lib/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.js +41 -0
- package/lib/components/pisellFloorMapLayout/utils/snap.d.ts +10 -0
- package/lib/components/pisellFloorMapLayout/utils/snap.js +43 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.js +179 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.less +129 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.js +185 -0
- package/lib/components/pisellHierarchicalSummaryList/components/Row.d.ts +35 -0
- package/lib/components/pisellHierarchicalSummaryList/components/Row.js +343 -0
- package/lib/components/pisellHierarchicalSummaryList/components/index.js +29 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/index.js +29 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.js +49 -0
- package/lib/components/pisellHierarchicalSummaryList/index.js +31 -0
- package/lib/components/pisellHierarchicalSummaryList/types.js +17 -0
- package/lib/components/pisellModal/components/index.d.ts +1 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +2 -1
- package/lib/components/pisellRecordBoard/PisellRecordBoard.js +86 -8
- package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +4 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.js +915 -25
- package/lib/components/pisellRecordBoard/index.d.ts +8 -2
- package/lib/components/pisellRecordBoard/index.js +6 -2
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +8 -2
- package/lib/components/pisellRecordBoard/shellFrame/FloorMap.d.ts +14 -0
- package/lib/components/pisellRecordBoard/shellFrame/FloorMap.js +27 -0
- package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +16 -0
- package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.js +45 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +61 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +60 -8
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
- package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +6 -10
- package/lib/components/pisellRecordBoard/shellFrame/index.js +101 -9
- package/lib/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
- package/lib/components/pisellRecordBoard/types.d.ts +68 -2
- package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
- package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +88 -0
- package/lib/components/pisellRecordBoard/utils/recordBoardColumns.js +11 -1
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +10 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.js +200 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.less +88 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.stories.d.ts +12 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.stories.js +116 -0
- package/lib/components/pisellReservationSchedule/index.d.ts +2 -0
- package/lib/components/pisellReservationSchedule/index.js +29 -0
- package/lib/components/pisellReservationSchedule/locales.d.ts +25 -0
- package/lib/components/pisellReservationSchedule/locales.js +47 -0
- package/lib/components/pisellReservationSchedule/types.d.ts +42 -0
- package/lib/components/pisellReservationSchedule/types.js +17 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +128 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +66 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.js +181 -0
- package/lib/components/pisellReservationScheduleBand/index.d.ts +2 -0
- package/lib/components/pisellReservationScheduleBand/index.js +29 -0
- package/lib/components/pisellReservationScheduleBand/types.d.ts +49 -0
- package/lib/components/pisellReservationScheduleBand/types.js +17 -0
- package/lib/components/pisellShellFrame/PisellShellFrame.less +11 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +901 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +461 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.stories.js +273 -0
- package/lib/components/pisellTimeNavigator/components/BackgroundLayer.js +78 -0
- package/lib/components/pisellTimeNavigator/components/CursorLayer.d.ts +25 -0
- package/lib/components/pisellTimeNavigator/components/CursorLayer.js +111 -0
- package/lib/components/pisellTimeNavigator/components/GestureLayer.d.ts +33 -0
- package/lib/components/pisellTimeNavigator/components/GestureLayer.js +170 -0
- package/lib/components/pisellTimeNavigator/components/NowButton.d.ts +14 -0
- package/lib/components/pisellTimeNavigator/components/NowButton.js +81 -0
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.d.ts +22 -0
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.js +116 -0
- package/lib/components/pisellTimeNavigator/components/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/components/index.js +41 -0
- package/lib/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/hooks/index.js +35 -0
- package/lib/components/pisellTimeNavigator/hooks/useDragInertia.js +136 -0
- package/lib/components/pisellTimeNavigator/hooks/useRealtime.js +49 -0
- package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.js +87 -0
- package/lib/components/pisellTimeNavigator/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/index.js +47 -0
- package/lib/components/pisellTimeNavigator/locales.d.ts +22 -0
- package/lib/components/pisellTimeNavigator/locales.js +41 -0
- package/lib/components/pisellTimeNavigator/types.js +17 -0
- package/lib/components/pisellTimeNavigator/utils/index.js +107 -0
- package/lib/components/pisellWalletPassCard/index.js +1 -1
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/table/Table/fields/date/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/link/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/index.js +2 -2
- package/lib/hooks/useResponsive.d.ts +1 -1
- package/lib/index.d.ts +49 -33
- package/lib/index.js +93 -27
- package/lib/locales/en-US.d.ts +3 -0
- package/lib/locales/en-US.js +3 -0
- package/lib/locales/ja.d.ts +8 -0
- package/lib/locales/ja.js +22 -1
- package/lib/locales/pt.d.ts +8 -0
- package/lib/locales/pt.js +22 -1
- package/lib/locales/zh-CN.d.ts +3 -0
- package/lib/locales/zh-CN.js +3 -0
- package/lib/locales/zh-TW.d.ts +3 -0
- package/lib/locales/zh-TW.js +3 -0
- package/lowcode/data-source-form/constants.ts +3 -0
- package/lowcode/data-source-form/utils.ts +31 -5
- package/lowcode/data-source-sub-form/meta.ts +259 -0
- package/lowcode/data-source-sub-form/snippets.ts +21 -0
- package/lowcode/floor-map-image-element/meta.ts +113 -0
- package/lowcode/floor-map-layout-provider/meta.ts +65 -0
- package/lowcode/form-item-record-list-wrapper/meta.ts +180 -0
- package/lowcode/form-item-record-list-wrapper/snippets.ts +18 -0
- package/lowcode/form-item-tabs/meta.ts +172 -0
- package/lowcode/pisell-floor-map-layout/meta.ts +5599 -0
- package/lowcode/pisell-hierarchical-summary-list/meta.ts +240 -0
- package/lowcode/pisell-reservation-schedule/index.ts +3 -0
- package/lowcode/pisell-reservation-schedule/meta.ts +69 -0
- package/lowcode/pisell-reservation-schedule/snippets.ts +1 -0
- package/lowcode/pisell-reservation-schedule-band/index.ts +3 -0
- package/lowcode/pisell-reservation-schedule-band/meta.ts +96 -0
- package/lowcode/pisell-reservation-schedule-band/snippets.ts +1 -0
- package/lowcode/pisell-time-navigator/index.ts +3 -0
- package/lowcode/pisell-time-navigator/meta.ts +298 -0
- package/lowcode/pisell-time-navigator/snippets.ts +1 -0
- package/lowcode/render-figma-style-round-table-card/meta.ts +589 -0
- package/lowcode/render-figma-style-table-card/meta.ts +589 -0
- package/package.json +4 -3
- package/es/components/PisellCards/components/GraphicTextCard/types.d.ts +0 -290
- package/es/components/PisellCards/components/TextCard/TextCard.d.ts +0 -8
- package/es/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +0 -26
- package/es/components/PisellCards/components/TextCard/components/TextContent.d.ts +0 -21
- package/es/components/PisellCards/components/TextCard/types.d.ts +0 -270
- package/es/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -4
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/es/components/drag-sort-tree/index.d.ts +0 -5
- package/es/components/iconfont/index.d.ts +0 -8
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/pisell-config-provider/index.d.ts +0 -13
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/pisellGridPro/index.d.ts +0 -4
- package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/Gift/types.d.ts +0 -29
- package/es/components/productCard/cartSkuCard/components/Promotion/index.d.ts +0 -7
- package/es/components/productCard/cartSkuCard/locales.d.ts +0 -178
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/es/components/productCard/status.d.ts +0 -32
- package/es/components/productCard/types.d.ts +0 -95
- package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -9
- package/es/components/table/types.d.ts +0 -268
- package/es/components/versionModal/index.d.ts +0 -23
- package/lib/components/PisellCards/components/GraphicTextCard/types.d.ts +0 -290
- package/lib/components/PisellCards/components/TextCard/TextCard.d.ts +0 -8
- package/lib/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +0 -26
- package/lib/components/PisellCards/components/TextCard/components/TextContent.d.ts +0 -21
- package/lib/components/PisellCards/components/TextCard/types.d.ts +0 -270
- package/lib/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -4
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/lib/components/drag-sort-tree/index.d.ts +0 -5
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/pisell-config-provider/index.d.ts +0 -13
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/pisellGridPro/index.d.ts +0 -4
- package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/Gift/types.d.ts +0 -29
- package/lib/components/productCard/cartSkuCard/components/Promotion/index.d.ts +0 -7
- package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -178
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/lib/components/productCard/status.d.ts +0 -32
- package/lib/components/productCard/types.d.ts +0 -95
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -9
- package/lib/components/table/types.d.ts +0 -268
- package/lib/components/versionModal/index.d.ts +0 -23
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ReactNode, Key, ComponentType } from 'react';
|
|
1
|
+
import type { ReactNode, Key, ComponentType, Ref } from 'react';
|
|
2
|
+
import type { PisellFloorMapLayoutProps, PisellFloorMapLayoutRef, FloorMapDataSources, FloorMapLayoutContextValue } from '../pisellFloorMapLayout/types';
|
|
2
3
|
import type { TableProps } from 'antd';
|
|
3
4
|
/**
|
|
4
5
|
* 布局类型:一种 layout 对应一种「视图的集合」
|
|
@@ -120,11 +121,26 @@ export interface RecordBoardListResult {
|
|
|
120
121
|
count?: number;
|
|
121
122
|
total?: number;
|
|
122
123
|
}
|
|
124
|
+
/** ShellFrame 内容区:表格或平面图(与 GridLayout 同级切换) */
|
|
125
|
+
export declare type RecordBoardBodyView = 'grid' | 'floorMap';
|
|
126
|
+
/**
|
|
127
|
+
* 平面图槽位 props:与 PisellFloorMapLayout 对齐;items/renderItem 可省略(由 RecordBoard 默认 [] / () => null)。
|
|
128
|
+
*/
|
|
129
|
+
export declare type RecordBoardFloorMapProps = Partial<PisellFloorMapLayoutProps>;
|
|
123
130
|
/**
|
|
124
131
|
* RecordBoard 容器 Context 值
|
|
125
132
|
* 与具体 layout 类型无关,所有 layout 共用同一套数据与操作
|
|
126
133
|
*/
|
|
127
134
|
export interface RecordBoardContextValue {
|
|
135
|
+
/**
|
|
136
|
+
* 平面图多数据源字典(整份各 key,不参与表格分页切片)。
|
|
137
|
+
* ShellFrame 会与 FloorMap 子 props 中的 dataSources 合并后传入 PisellFloorMapLayout。
|
|
138
|
+
*/
|
|
139
|
+
dataSources?: FloorMapDataSources;
|
|
140
|
+
/**
|
|
141
|
+
* 表格绑定 `dataSources` 的 key;仅当未传入根级 `data` 时,表格数据由 `dataSources[gridDataSourceKey]` 推导并做客户端分页切片。
|
|
142
|
+
*/
|
|
143
|
+
gridDataSourceKey?: string;
|
|
128
144
|
/** 当前列表数据 */
|
|
129
145
|
data: any[];
|
|
130
146
|
/** 加载态 */
|
|
@@ -174,6 +190,24 @@ export interface RecordBoardContextValue {
|
|
|
174
190
|
filterResetKey?: number;
|
|
175
191
|
/** 递增 filterResetKey,由 ToolBarReset 在重置时调用 */
|
|
176
192
|
setFilterResetKey?: (fn: (prev: number) => number) => void;
|
|
193
|
+
/** 当前主内容区:表格或平面图;无平面图配置时一般为 grid(ShellFrame 内仅 FloorMap 时会改为 floorMap) */
|
|
194
|
+
bodyView: RecordBoardBodyView;
|
|
195
|
+
setBodyView: (v: RecordBoardBodyView) => void;
|
|
196
|
+
/** 根级传入的平面图 props(可选);与 ShellFrame 内 FloorMap 子组件合并,子优先 */
|
|
197
|
+
floorMapProps?: RecordBoardFloorMapProps;
|
|
198
|
+
/**
|
|
199
|
+
* 平面图数据/保存等注入上下文(与 `FloorMapLayoutContextValue` 同形),由 Shell 内置 `FloorMapLayoutProvider` 注入 `PisellFloorMapLayout`;
|
|
200
|
+
* 与 `useRecordBoardContext()` 同源镜像,供 Toolbar 等读取。
|
|
201
|
+
*/
|
|
202
|
+
floorMapLayoutContext?: FloorMapLayoutContextValue;
|
|
203
|
+
/** 双视图并存时首屏偏好(根 props,与 PisellRecordBoard.defaultBodyView 一致) */
|
|
204
|
+
defaultBodyView?: RecordBoardBodyView;
|
|
205
|
+
/** 挂到 ShellFrame 内 PisellFloorMapLayout,供外部 imperative 调用(如 saveLayout / fitBounds) */
|
|
206
|
+
floorMapLayoutRef?: Ref<PisellFloorMapLayoutRef | null>;
|
|
207
|
+
/**
|
|
208
|
+
* 平面图视图下叠在画布内的底部居中悬浮区(如「编辑平面图」),不单独占一行 footer。
|
|
209
|
+
*/
|
|
210
|
+
floorMapFooter?: ReactNode;
|
|
177
211
|
}
|
|
178
212
|
/**
|
|
179
213
|
* 各 layout 下子组件的可选透传配置(类似 ChildComponentProps)
|
|
@@ -209,6 +243,7 @@ export interface RecordBoardToolBarProps {
|
|
|
209
243
|
* 在 ToolBar 左侧展示内联快速筛选(替代 Filter 弹层内的 quickFilter)。
|
|
210
244
|
* 为 true 时使用 columns 派生的 quickFilter 列表;为对象时可传 filterList、formFiltersPrefix、size 等。
|
|
211
245
|
* 启用后建议对 filter 传 hiddenQuickFilter: true,弹层内仅保留高级筛选。
|
|
246
|
+
* hideFilterNamesOnFloorMap:仅当 Shell 内同时有表格+平面图且当前为平面图时,按筛选项 name(或 key)从内联快筛中移除,避免与顶栏日程重复(如预约 booking_time_start_between)。
|
|
212
247
|
*/
|
|
213
248
|
quickFilter?: boolean | Record<string, any>;
|
|
214
249
|
/** 列显示隐藏设置入口;默认 true(有 grid.columns 时显示);false 时不渲染 */
|
|
@@ -280,9 +315,19 @@ export interface RecordBoardProps {
|
|
|
280
315
|
rowKey?: string | ((record: any) => Key);
|
|
281
316
|
/** 当前列表数据 */
|
|
282
317
|
data?: any[];
|
|
318
|
+
/**
|
|
319
|
+
* 平面图多数据源;与 `FloorMap` / 根级 `floorMap` 的 dataSources 在 ShellFrame 内合并(后者覆盖同 key)。
|
|
320
|
+
* 表格默认仍用 `data`;若不传 `data` 且提供 `gridDataSourceKey`,则由本字段对应 key 推导表格行并客户端分页。
|
|
321
|
+
*/
|
|
322
|
+
dataSources?: FloorMapDataSources;
|
|
323
|
+
/**
|
|
324
|
+
* 表格使用的 `dataSources` key(如 `'tables'`);与 `floorMapConfig` 内 `dataSourceKey` 对齐。
|
|
325
|
+
* 仅在根级 **`data` 未传入**时生效。
|
|
326
|
+
*/
|
|
327
|
+
gridDataSourceKey?: string;
|
|
283
328
|
/** 加载态 */
|
|
284
329
|
loading?: boolean;
|
|
285
|
-
/**
|
|
330
|
+
/** 总数(用于分页);由 `dataSources` 推导表格时,未传则默认为该 key 对应数组长度 */
|
|
286
331
|
total?: number;
|
|
287
332
|
/** 分页状态 */
|
|
288
333
|
pagination?: RecordBoardPaginationState;
|
|
@@ -310,6 +355,27 @@ export interface RecordBoardProps {
|
|
|
310
355
|
cardList?: Record<string, any>;
|
|
311
356
|
/** 是否启用分页(与 pagination 状态区分) */
|
|
312
357
|
enablePagination?: boolean;
|
|
358
|
+
/**
|
|
359
|
+
* 平面图(可选,兼容低代码 / SalesGrid 等):与 PisellFloorMapLayout 对齐。
|
|
360
|
+
* 推荐在 ShellFrame 内使用 PisellRecordBoard.FloorMap 声明;若同时传根级与本项,Shell 内子组件 props 优先合并。
|
|
361
|
+
*/
|
|
362
|
+
floorMap?: RecordBoardFloorMapProps;
|
|
363
|
+
/**
|
|
364
|
+
* 平面图 Context 注入(`FloorMapLayoutContextValue`):配置/保存/加载等;展示向 props 仍建议走 `floorMap`。
|
|
365
|
+
* Shell 在平面图节点内置 Provider,无需再包一层 `FloorMapLayoutProvider`。
|
|
366
|
+
*/
|
|
367
|
+
floorMapLayoutContext?: FloorMapLayoutContextValue;
|
|
368
|
+
/**
|
|
369
|
+
* 表格与平面图并存时首屏子视图,默认 grid。
|
|
370
|
+
* 仅声明 FloorMap 而无 Grid/Card 内容时由 ShellFrame 固定为平面图,不出现切换器。
|
|
371
|
+
*/
|
|
372
|
+
defaultBodyView?: RecordBoardBodyView;
|
|
373
|
+
/** 与 bodyView 同步持久化到 localStorage 的 key(双视图时生效) */
|
|
374
|
+
bodyViewStorageKey?: string;
|
|
375
|
+
/** 平面图 Layout 实例 ref,由 ShellFrame 注入 */
|
|
376
|
+
floorMapLayoutRef?: Ref<PisellFloorMapLayoutRef | null>;
|
|
377
|
+
/** 平面图画布内底部悬浮插槽(如编辑入口),注入 Context 供 ShellFrame 渲染 */
|
|
378
|
+
floorMapFooter?: ReactNode;
|
|
313
379
|
/** 其他 */
|
|
314
380
|
[key: string]: any;
|
|
315
381
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { RecordBoardFloorMapProps } from '../types';
|
|
3
|
+
/** 与 shellFrame/FloorMap 上定义的 displayName 一致,用于从 ShellFrame children 中识别平面图槽 */
|
|
4
|
+
export declare const RECORD_BOARD_FLOOR_MAP_DISPLAY_NAME = "RecordBoard.FloorMap";
|
|
5
|
+
/**
|
|
6
|
+
* 将 ShellFrame 的 children 拆成:供表格区渲染的子树 + 可选的 FloorMap 透传 props。
|
|
7
|
+
* 支持 Fragment 嵌套;多个 FloorMap 时以最后一个为准。
|
|
8
|
+
*/
|
|
9
|
+
export declare function partitionShellFrameChildren(children: React.ReactNode): {
|
|
10
|
+
gridChildren: React.ReactNode;
|
|
11
|
+
/** 是否出现 FloorMap 槽位节点(props 可为空,可与根级 floorMap 合并) */
|
|
12
|
+
hasFloorMapChild: boolean;
|
|
13
|
+
floorMapPropsFromChild?: RecordBoardFloorMapProps;
|
|
14
|
+
hasGridContent: boolean;
|
|
15
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import RecordBoardFloorMap from "../shellFrame/FloorMap";
|
|
3
|
+
|
|
4
|
+
/** 与 shellFrame/FloorMap 上定义的 displayName 一致,用于从 ShellFrame children 中识别平面图槽 */
|
|
5
|
+
export var RECORD_BOARD_FLOOR_MAP_DISPLAY_NAME = 'RecordBoard.FloorMap';
|
|
6
|
+
|
|
7
|
+
/** displayName 在部分构建下可能被摇掉;与 RecordBoardFloorMap 引用一致时仍可识别,工具栏才出「表格/平面图」切换 */
|
|
8
|
+
function isRecordBoardFloorMapElementType(type) {
|
|
9
|
+
if (type === RecordBoardFloorMap) return true;
|
|
10
|
+
var dn = type === null || type === void 0 ? void 0 : type.displayName;
|
|
11
|
+
return dn === RECORD_BOARD_FLOOR_MAP_DISPLAY_NAME;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 将 ShellFrame 的 children 拆成:供表格区渲染的子树 + 可选的 FloorMap 透传 props。
|
|
16
|
+
* 支持 Fragment 嵌套;多个 FloorMap 时以最后一个为准。
|
|
17
|
+
*/
|
|
18
|
+
export function partitionShellFrameChildren(children) {
|
|
19
|
+
var foundFloorMap = false;
|
|
20
|
+
var floorProps;
|
|
21
|
+
var gridChunks = [];
|
|
22
|
+
var walk = function walk(node) {
|
|
23
|
+
React.Children.forEach(node, function (child) {
|
|
24
|
+
if (child == null || child === false) return;
|
|
25
|
+
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
26
|
+
gridChunks.push(child);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (child.type === React.Fragment) {
|
|
30
|
+
walk(child.props.children);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (isRecordBoardFloorMapElementType(child.type)) {
|
|
34
|
+
foundFloorMap = true;
|
|
35
|
+
floorProps = child.props;
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
gridChunks.push(child);
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
walk(children);
|
|
42
|
+
var hasGridContent = gridChunks.length > 0;
|
|
43
|
+
var gridChildren;
|
|
44
|
+
if (!hasGridContent) {
|
|
45
|
+
gridChildren = null;
|
|
46
|
+
} else if (gridChunks.length === 1) {
|
|
47
|
+
gridChildren = gridChunks[0];
|
|
48
|
+
} else {
|
|
49
|
+
gridChildren = /*#__PURE__*/React.createElement(React.Fragment, null, gridChunks);
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
gridChildren: gridChildren,
|
|
53
|
+
hasFloorMapChild: foundFloorMap,
|
|
54
|
+
floorMapPropsFromChild: floorProps,
|
|
55
|
+
hasGridContent: hasGridContent
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -25,6 +25,7 @@ import { PisellRating } from "../../pisellRating";
|
|
|
25
25
|
import { PisellSingleSelect } from "../../pisellSingleSelect";
|
|
26
26
|
import { PisellMultipleSelect } from "../../pisellMultipleSelect";
|
|
27
27
|
import { PisellDateTimeDisplay } from "../../pisellDateTimeDisplay";
|
|
28
|
+
import { getText } from "../../../locales";
|
|
28
29
|
var FIELD_TYPE_TO_READ_COMPONENT = {
|
|
29
30
|
singleLineText: PisellSingleLineText,
|
|
30
31
|
longText: PisellLongText,
|
|
@@ -329,7 +330,7 @@ function columnToFilterItem(column) {
|
|
|
329
330
|
if (column.filterable === false) return null;
|
|
330
331
|
var hasExplicitFilter = column.filter && (column.filter.type != null || column.filter.component);
|
|
331
332
|
if (column.type && !hasExplicitFilter) {
|
|
332
|
-
var _column$fieldProps2, _fieldProps$options, _fieldProps$placehold;
|
|
333
|
+
var _column$fieldProps2, _fieldProps$options, _fieldProps$placehold, _getText;
|
|
333
334
|
var fieldType = column.type;
|
|
334
335
|
var _filterType = FIELD_TYPE_TO_FILTER_TYPE[fieldType];
|
|
335
336
|
var fieldProps = (_column$fieldProps2 = column.fieldProps) !== null && _column$fieldProps2 !== void 0 ? _column$fieldProps2 : {};
|
|
@@ -349,7 +350,7 @@ function columnToFilterItem(column) {
|
|
|
349
350
|
options: options !== null && options !== void 0 ? options : [],
|
|
350
351
|
getOptions: fieldProps.getOptions
|
|
351
352
|
}, fieldProps) : _objectSpread({
|
|
352
|
-
placeholder: (_fieldProps$placehold = fieldProps.placeholder) !== null && _fieldProps$placehold !== void 0 ? _fieldProps$placehold :
|
|
353
|
+
placeholder: (_fieldProps$placehold = fieldProps.placeholder) !== null && _fieldProps$placehold !== void 0 ? _fieldProps$placehold : String((_getText = getText('pisell2.recordBoard.filter.placeholderEnter')) !== null && _getText !== void 0 ? _getText : '').replace(/\{label\}/g, label)
|
|
353
354
|
}, fieldProps),
|
|
354
355
|
other: _objectSpread({
|
|
355
356
|
fieldType: fieldType,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PisellReservationScheduleProps } from './types';
|
|
3
|
+
import './PisellReservationSchedule.less';
|
|
4
|
+
/**
|
|
5
|
+
* 营业日导航条:上一日、中间日期文案、下一日(深色条样式,适配预约顶栏)
|
|
6
|
+
*/
|
|
7
|
+
export declare function PisellReservationSchedule(props: PisellReservationScheduleProps): React.JSX.Element;
|
|
8
|
+
export declare namespace PisellReservationSchedule {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { useMemo, useCallback, useState } from 'react';
|
|
8
|
+
import dayjs from 'dayjs';
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
import { Modal } from 'antd';
|
|
11
|
+
import { DateCalendar } from '@pisell/date-picker';
|
|
12
|
+
import ChevronLeft from '@pisell/icon/es/ChevronLeft';
|
|
13
|
+
import ChevronRight from '@pisell/icon/es/ChevronRight';
|
|
14
|
+
import { locales } from '@pisell/utils';
|
|
15
|
+
import useEngineContext from "../../hooks/useEngineContext";
|
|
16
|
+
import pisellReservationScheduleLocales from "./locales";
|
|
17
|
+
import "./PisellReservationSchedule.less";
|
|
18
|
+
var I18N_TODAY = 'pisell-reservation-schedule.today';
|
|
19
|
+
var I18N_PREV = 'pisell-reservation-schedule.prev';
|
|
20
|
+
var I18N_NEXT = 'pisell-reservation-schedule.next';
|
|
21
|
+
var I18N_PICK_DATE = 'pisell-reservation-schedule.pick-date';
|
|
22
|
+
var I18N_PICK_DATE_TITLE = 'pisell-reservation-schedule.pick-date-title';
|
|
23
|
+
function parseDay(input, fallback) {
|
|
24
|
+
if (input == null) return fallback.startOf('day');
|
|
25
|
+
var d = dayjs(input);
|
|
26
|
+
return (d.isValid() ? d : fallback).startOf('day');
|
|
27
|
+
}
|
|
28
|
+
function toDayjsLocale(engineLocale) {
|
|
29
|
+
if (!engineLocale || engineLocale === 'en') return 'en';
|
|
30
|
+
if (engineLocale === 'zh-HK') return 'zh-hk';
|
|
31
|
+
return 'zh-cn';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 营业日导航条:上一日、中间日期文案、下一日(深色条样式,适配预约顶栏)
|
|
36
|
+
*/
|
|
37
|
+
export function PisellReservationSchedule(props) {
|
|
38
|
+
var _context$engine;
|
|
39
|
+
var valueProp = props.value,
|
|
40
|
+
onChange = props.onChange,
|
|
41
|
+
defaultValue = props.defaultValue,
|
|
42
|
+
minDateProp = props.minDate,
|
|
43
|
+
maxDateProp = props.maxDate,
|
|
44
|
+
_props$navigationLock = props.navigationLocked,
|
|
45
|
+
navigationLocked = _props$navigationLock === void 0 ? false : _props$navigationLock,
|
|
46
|
+
className = props.className,
|
|
47
|
+
style = props.style;
|
|
48
|
+
var context = useEngineContext();
|
|
49
|
+
var engineLocale = (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en';
|
|
50
|
+
locales.init(pisellReservationScheduleLocales, engineLocale);
|
|
51
|
+
var today = useMemo(function () {
|
|
52
|
+
return dayjs().startOf('day');
|
|
53
|
+
}, []);
|
|
54
|
+
var isControlled = valueProp !== undefined;
|
|
55
|
+
var _useState = useState(function () {
|
|
56
|
+
return parseDay(valueProp !== null && valueProp !== void 0 ? valueProp : defaultValue, today);
|
|
57
|
+
}),
|
|
58
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
59
|
+
internal = _useState2[0],
|
|
60
|
+
setInternal = _useState2[1];
|
|
61
|
+
var value = isControlled ? parseDay(valueProp, today) : internal;
|
|
62
|
+
var minDate = useMemo(function () {
|
|
63
|
+
return minDateProp != null ? parseDay(minDateProp, today) : undefined;
|
|
64
|
+
}, [minDateProp, today]);
|
|
65
|
+
var maxDate = useMemo(function () {
|
|
66
|
+
return maxDateProp != null ? parseDay(maxDateProp, today) : undefined;
|
|
67
|
+
}, [maxDateProp, today]);
|
|
68
|
+
var emit = useCallback(function (next) {
|
|
69
|
+
var d = next.startOf('day');
|
|
70
|
+
if (minDate && d.isBefore(minDate)) d = minDate;
|
|
71
|
+
if (maxDate && d.isAfter(maxDate)) d = maxDate;
|
|
72
|
+
if (!isControlled) setInternal(d);
|
|
73
|
+
onChange === null || onChange === void 0 || onChange(d);
|
|
74
|
+
}, [isControlled, onChange, minDate, maxDate]);
|
|
75
|
+
var prevDisabled = navigationLocked || (minDate ? value.isSame(minDate, 'day') : false);
|
|
76
|
+
var nextDisabled = navigationLocked || (maxDate ? value.isSame(maxDate, 'day') : false);
|
|
77
|
+
var _useState3 = useState(false),
|
|
78
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
79
|
+
calendarOpen = _useState4[0],
|
|
80
|
+
setCalendarOpen = _useState4[1];
|
|
81
|
+
var centerLabel = useMemo(function () {
|
|
82
|
+
var djLoc = toDayjsLocale(engineLocale);
|
|
83
|
+
var dl = value.locale(djLoc);
|
|
84
|
+
var isToday = value.isSame(today, 'day');
|
|
85
|
+
var todayText = locales.getText(I18N_TODAY);
|
|
86
|
+
var dateStr = djLoc === 'en' ? dl.format('MMM D') : dl.format('M月D日');
|
|
87
|
+
var weekStr = dl.format('ddd');
|
|
88
|
+
var parts = [];
|
|
89
|
+
if (isToday && todayText) parts.push(todayText);
|
|
90
|
+
parts.push(dateStr);
|
|
91
|
+
parts.push(weekStr);
|
|
92
|
+
return parts.join(djLoc === 'en' ? ' · ' : ' · ');
|
|
93
|
+
}, [value, today, engineLocale]);
|
|
94
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
95
|
+
className: classNames('pisell-reservation-schedule', className),
|
|
96
|
+
style: style
|
|
97
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
98
|
+
className: "pisell-reservation-schedule-inner"
|
|
99
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
100
|
+
type: "button",
|
|
101
|
+
className: "pisell-reservation-schedule-btn",
|
|
102
|
+
"aria-label": locales.getText(I18N_PREV),
|
|
103
|
+
disabled: prevDisabled,
|
|
104
|
+
onClick: function onClick() {
|
|
105
|
+
if (navigationLocked) return;
|
|
106
|
+
emit(value.subtract(1, 'day'));
|
|
107
|
+
}
|
|
108
|
+
}, /*#__PURE__*/React.createElement(ChevronLeft, {
|
|
109
|
+
className: "pisell-reservation-schedule-btn-icon"
|
|
110
|
+
})), navigationLocked ? /*#__PURE__*/React.createElement("span", {
|
|
111
|
+
className: "pisell-reservation-schedule-label pisell-reservation-schedule-label--static",
|
|
112
|
+
"aria-label": centerLabel
|
|
113
|
+
}, centerLabel) : /*#__PURE__*/React.createElement("button", {
|
|
114
|
+
type: "button",
|
|
115
|
+
className: "pisell-reservation-schedule-label pisell-reservation-schedule-label-trigger",
|
|
116
|
+
"aria-label": locales.getText(I18N_PICK_DATE),
|
|
117
|
+
"aria-haspopup": "dialog",
|
|
118
|
+
"aria-expanded": calendarOpen,
|
|
119
|
+
onClick: function onClick() {
|
|
120
|
+
return setCalendarOpen(true);
|
|
121
|
+
}
|
|
122
|
+
}, centerLabel), /*#__PURE__*/React.createElement("button", {
|
|
123
|
+
type: "button",
|
|
124
|
+
className: "pisell-reservation-schedule-btn",
|
|
125
|
+
"aria-label": locales.getText(I18N_NEXT),
|
|
126
|
+
disabled: nextDisabled,
|
|
127
|
+
onClick: function onClick() {
|
|
128
|
+
if (navigationLocked) return;
|
|
129
|
+
emit(value.add(1, 'day'));
|
|
130
|
+
}
|
|
131
|
+
}, /*#__PURE__*/React.createElement(ChevronRight, {
|
|
132
|
+
className: "pisell-reservation-schedule-btn-icon"
|
|
133
|
+
}))), /*#__PURE__*/React.createElement(Modal, {
|
|
134
|
+
title: locales.getText(I18N_PICK_DATE_TITLE),
|
|
135
|
+
open: !navigationLocked && calendarOpen,
|
|
136
|
+
onCancel: function onCancel() {
|
|
137
|
+
return setCalendarOpen(false);
|
|
138
|
+
},
|
|
139
|
+
footer: null,
|
|
140
|
+
width: "auto",
|
|
141
|
+
centered: true,
|
|
142
|
+
destroyOnClose: true,
|
|
143
|
+
wrapClassName: "pisell-reservation-schedule-date-modal"
|
|
144
|
+
}, /*#__PURE__*/React.createElement(DateCalendar, {
|
|
145
|
+
value: value,
|
|
146
|
+
minDate: minDate,
|
|
147
|
+
maxDate: maxDate,
|
|
148
|
+
onChange: function onChange(d) {
|
|
149
|
+
if (d) {
|
|
150
|
+
emit(dayjs(d));
|
|
151
|
+
setCalendarOpen(false);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
})));
|
|
155
|
+
}
|
|
156
|
+
PisellReservationSchedule.displayName = 'PisellReservationSchedule';
|
|
@@ -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,105 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { useState } from 'react';
|
|
8
|
+
import dayjs from 'dayjs';
|
|
9
|
+
import { PisellReservationSchedule } from "./PisellReservationSchedule";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* PisellReservationSchedule:预约营业日导航(上一天 / 日期文案 / 下一天)。
|
|
13
|
+
* 多语言与日期格式依赖 LowCode 引擎 locale。详见组件目录下 docs/PisellReservationSchedule.md。
|
|
14
|
+
*/
|
|
15
|
+
var meta = {
|
|
16
|
+
title: 'Data Entry/PisellReservationSchedule',
|
|
17
|
+
component: PisellReservationSchedule,
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
parameters: {
|
|
20
|
+
layout: 'padded',
|
|
21
|
+
docs: {
|
|
22
|
+
description: {
|
|
23
|
+
component: '深色圆角营业日条:左右切换日历日,中间展示「今天(若当日)· 日期 · 星期」。可与 PisellTimeNavigator 组合为 PisellReservationScheduleBand。支持受控 `value` / `onChange(dayjs)`,以及 `minDate` / `maxDate`。'
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
argTypes: {
|
|
28
|
+
value: {
|
|
29
|
+
description: '当前选中日(受控),dayjs 或可解析字符串',
|
|
30
|
+
control: 'text'
|
|
31
|
+
},
|
|
32
|
+
defaultValue: {
|
|
33
|
+
description: '非受控初始日',
|
|
34
|
+
control: 'text'
|
|
35
|
+
},
|
|
36
|
+
minDate: {
|
|
37
|
+
description: '不可早于该日(含)',
|
|
38
|
+
control: 'text'
|
|
39
|
+
},
|
|
40
|
+
maxDate: {
|
|
41
|
+
description: '不可晚于该日(含)',
|
|
42
|
+
control: 'text'
|
|
43
|
+
},
|
|
44
|
+
onChange: {
|
|
45
|
+
action: 'onChange',
|
|
46
|
+
description: '选中日变更,参数为 Dayjs(当日 0 点)'
|
|
47
|
+
},
|
|
48
|
+
className: {
|
|
49
|
+
control: 'text'
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
export default meta;
|
|
54
|
+
export var Default = {
|
|
55
|
+
args: {
|
|
56
|
+
defaultValue: dayjs().format('YYYY-MM-DD')
|
|
57
|
+
},
|
|
58
|
+
decorators: [function (StoryComp) {
|
|
59
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
style: {
|
|
61
|
+
maxWidth: 440
|
|
62
|
+
}
|
|
63
|
+
}, /*#__PURE__*/React.createElement(StoryComp, null));
|
|
64
|
+
}]
|
|
65
|
+
};
|
|
66
|
+
export var WithMinMax = {
|
|
67
|
+
args: {
|
|
68
|
+
defaultValue: dayjs().format('YYYY-MM-DD'),
|
|
69
|
+
minDate: dayjs().startOf('day'),
|
|
70
|
+
maxDate: dayjs().add(14, 'day').endOf('day')
|
|
71
|
+
},
|
|
72
|
+
decorators: [function (StoryComp) {
|
|
73
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
style: {
|
|
75
|
+
maxWidth: 440
|
|
76
|
+
}
|
|
77
|
+
}, /*#__PURE__*/React.createElement(StoryComp, null));
|
|
78
|
+
}]
|
|
79
|
+
};
|
|
80
|
+
export var Controlled = {
|
|
81
|
+
render: function ControlledRender() {
|
|
82
|
+
var _useState = useState(dayjs().startOf('day')),
|
|
83
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
84
|
+
value = _useState2[0],
|
|
85
|
+
setValue = _useState2[1];
|
|
86
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
87
|
+
style: {
|
|
88
|
+
maxWidth: 440
|
|
89
|
+
}
|
|
90
|
+
}, /*#__PURE__*/React.createElement(PisellReservationSchedule, {
|
|
91
|
+
value: value,
|
|
92
|
+
onChange: function onChange(d) {
|
|
93
|
+
setValue(d);
|
|
94
|
+
// eslint-disable-next-line no-console
|
|
95
|
+
console.log('onChange', d.format('YYYY-MM-DD'));
|
|
96
|
+
}
|
|
97
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
98
|
+
style: {
|
|
99
|
+
marginTop: 12,
|
|
100
|
+
fontSize: 12,
|
|
101
|
+
color: '#666'
|
|
102
|
+
}
|
|
103
|
+
}, "\u5F53\u524D\uFF1A", value.format('YYYY-MM-DD dddd')));
|
|
104
|
+
}
|
|
105
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PisellReservationSchedule } from "./PisellReservationSchedule";
|
|
@@ -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,24 @@
|
|
|
1
|
+
/** PisellReservationSchedule 多语言;使用前 locales.init 合并 */
|
|
2
|
+
export default {
|
|
3
|
+
en: {
|
|
4
|
+
'pisell-reservation-schedule.today': 'Today',
|
|
5
|
+
'pisell-reservation-schedule.prev': 'Previous day',
|
|
6
|
+
'pisell-reservation-schedule.next': 'Next day',
|
|
7
|
+
'pisell-reservation-schedule.pick-date': 'Pick a date',
|
|
8
|
+
'pisell-reservation-schedule.pick-date-title': 'Pick a date'
|
|
9
|
+
},
|
|
10
|
+
'zh-CN': {
|
|
11
|
+
'pisell-reservation-schedule.today': '今天',
|
|
12
|
+
'pisell-reservation-schedule.prev': '上一天',
|
|
13
|
+
'pisell-reservation-schedule.next': '下一天',
|
|
14
|
+
'pisell-reservation-schedule.pick-date': '选择日期',
|
|
15
|
+
'pisell-reservation-schedule.pick-date-title': '选择日期'
|
|
16
|
+
},
|
|
17
|
+
'zh-HK': {
|
|
18
|
+
'pisell-reservation-schedule.today': '今天',
|
|
19
|
+
'pisell-reservation-schedule.prev': '上一日',
|
|
20
|
+
'pisell-reservation-schedule.next': '下一日',
|
|
21
|
+
'pisell-reservation-schedule.pick-date': '選擇日期',
|
|
22
|
+
'pisell-reservation-schedule.pick-date-title': '選擇日期'
|
|
23
|
+
}
|
|
24
|
+
};
|