@pisell/materials 6.11.17 → 6.11.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +32 -32
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +25 -25
- package/es/components/PisellCards/index.d.ts +1 -0
- package/es/components/PisellFields/index.d.ts +1 -0
- package/es/components/PisellLayouts/index.d.ts +11 -5
- package/es/components/PisellLayouts/index.js +8 -4
- package/es/components/PisellMetrics/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.d.ts +13 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.js +274 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +544 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/types.d.ts +117 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/types.js +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.d.ts +9 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +61 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +176 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +12 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.js +11 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +87 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Tabs/ReadPretty.d.ts +9 -0
- package/es/components/dataSourceComponents/fields/Tabs/ReadPretty.js +16 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.d.ts +23 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.js +93 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.less +64 -0
- package/es/components/dataSourceComponents/fields/Tabs/WithMode.d.ts +6 -0
- package/es/components/dataSourceComponents/fields/Tabs/WithMode.js +9 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +13 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.js +18 -0
- package/es/components/dataSourceComponents/fields/Tabs/type.d.ts +38 -0
- package/es/components/dataSourceComponents/fields/Tabs/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +50 -11
- package/es/components/dataSourceComponents/fields/index.js +5 -1
- package/es/components/dataSourceComponents/fields/utils.js +3 -0
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/pisellFilter/type.d.ts +4 -2
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +12 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +611 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.less +92 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +55 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +1667 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.js +203 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.less +189 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +37 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.js +341 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.less +89 -0
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +43 -0
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.js +436 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +21 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.js +133 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.less +7 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +543 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +162 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +36 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +135 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +150 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +9 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.js +71 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +369 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +239 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.js +195 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.less +19 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.js +85 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.less +7 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +33 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.js +90 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.less +101 -0
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +16 -0
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +29 -0
- package/es/components/pisellFloorMapLayout/components/index.d.ts +21 -0
- package/es/components/pisellFloorMapLayout/components/index.js +13 -0
- package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +16 -0
- package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.js +21 -0
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +28 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +63 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +562 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.d.ts +21 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.js +122 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +67 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +399 -0
- package/es/components/pisellFloorMapLayout/index.d.ts +15 -0
- package/es/components/pisellFloorMapLayout/index.js +12 -0
- package/es/components/pisellFloorMapLayout/locales-ja.d.ts +104 -0
- package/es/components/pisellFloorMapLayout/locales-ja.js +103 -0
- package/es/components/pisellFloorMapLayout/locales-pt.d.ts +104 -0
- package/es/components/pisellFloorMapLayout/locales-pt.js +103 -0
- package/es/components/pisellFloorMapLayout/locales.d.ts +506 -0
- package/es/components/pisellFloorMapLayout/locales.js +310 -0
- package/es/components/pisellFloorMapLayout/types.d.ts +586 -0
- package/es/components/pisellFloorMapLayout/types.js +152 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +20 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.js +129 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +87 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +15 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +56 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +22 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +156 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +89 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapStageDefaults.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapStageDefaults.js +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +108 -0
- package/es/components/pisellFloorMapLayout/utils/layoutMeasurements.d.ts +30 -0
- package/es/components/pisellFloorMapLayout/utils/layoutMeasurements.js +125 -0
- package/es/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.d.ts +7 -0
- package/es/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.js +29 -0
- package/es/components/pisellFloorMapLayout/utils/snap.d.ts +10 -0
- package/es/components/pisellFloorMapLayout/utils/snap.js +21 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.js +175 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.less +129 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.js +237 -0
- package/es/components/pisellHierarchicalSummaryList/components/Row.d.ts +35 -0
- package/es/components/pisellHierarchicalSummaryList/components/Row.js +313 -0
- package/es/components/pisellHierarchicalSummaryList/components/index.js +1 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/index.js +1 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.js +34 -0
- package/es/components/pisellHierarchicalSummaryList/index.js +5 -0
- package/es/components/pisellHierarchicalSummaryList/types.js +1 -0
- package/es/components/pisellModal/components/index.d.ts +1 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +2 -1
- package/es/components/pisellRecordBoard/PisellRecordBoard.js +98 -18
- package/es/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +4 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.stories.js +1276 -344
- package/es/components/pisellRecordBoard/index.d.ts +8 -2
- package/es/components/pisellRecordBoard/index.js +4 -2
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +1 -3
- package/es/components/pisellRecordBoard/shellFrame/FloorMap.d.ts +14 -0
- package/es/components/pisellRecordBoard/shellFrame/FloorMap.js +15 -0
- package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +16 -0
- package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.js +11 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +61 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +69 -11
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
- package/es/components/pisellRecordBoard/shellFrame/index.d.ts +6 -10
- package/es/components/pisellRecordBoard/shellFrame/index.js +111 -20
- package/es/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
- package/es/components/pisellRecordBoard/types.d.ts +68 -2
- package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
- package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +57 -0
- package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +3 -2
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +10 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.js +156 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.less +88 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.stories.d.ts +12 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.stories.js +105 -0
- package/es/components/pisellReservationSchedule/index.d.ts +2 -0
- package/es/components/pisellReservationSchedule/index.js +1 -0
- package/es/components/pisellReservationSchedule/locales.d.ts +25 -0
- package/es/components/pisellReservationSchedule/locales.js +24 -0
- package/es/components/pisellReservationSchedule/types.d.ts +42 -0
- package/es/components/pisellReservationSchedule/types.js +1 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +94 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +66 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.js +197 -0
- package/es/components/pisellReservationScheduleBand/index.d.ts +2 -0
- package/es/components/pisellReservationScheduleBand/index.js +1 -0
- package/es/components/pisellReservationScheduleBand/types.d.ts +49 -0
- package/es/components/pisellReservationScheduleBand/types.js +1 -0
- package/es/components/pisellShellFrame/PisellShellFrame.less +11 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +787 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +461 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.stories.js +290 -0
- package/es/components/pisellTimeNavigator/components/BackgroundLayer.js +30 -0
- package/es/components/pisellTimeNavigator/components/CursorLayer.d.ts +25 -0
- package/es/components/pisellTimeNavigator/components/CursorLayer.js +77 -0
- package/es/components/pisellTimeNavigator/components/GestureLayer.d.ts +33 -0
- package/es/components/pisellTimeNavigator/components/GestureLayer.js +91 -0
- package/es/components/pisellTimeNavigator/components/NowButton.d.ts +14 -0
- package/es/components/pisellTimeNavigator/components/NowButton.js +38 -0
- package/es/components/pisellTimeNavigator/components/ScaleLayer.d.ts +22 -0
- package/es/components/pisellTimeNavigator/components/ScaleLayer.js +73 -0
- package/es/components/pisellTimeNavigator/components/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/components/index.js +5 -0
- package/es/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/hooks/index.js +3 -0
- package/es/components/pisellTimeNavigator/hooks/useDragInertia.js +109 -0
- package/es/components/pisellTimeNavigator/hooks/useRealtime.js +16 -0
- package/es/components/pisellTimeNavigator/hooks/useTimeAxis.js +76 -0
- package/es/components/pisellTimeNavigator/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/index.js +4 -0
- package/es/components/pisellTimeNavigator/locales.d.ts +22 -0
- package/es/components/pisellTimeNavigator/locales.js +21 -0
- package/es/components/pisellTimeNavigator/types.js +1 -0
- package/es/components/pisellTimeNavigator/utils/index.js +116 -0
- package/es/components/pisellWalletPassCard/index.js +1 -1
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/table/Table/fields/date/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/link/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/index.js +1 -1
- package/es/hooks/useResponsive.d.ts +1 -1
- package/es/index.d.ts +49 -33
- package/es/index.js +47 -27
- package/es/locales/en-US.d.ts +3 -0
- package/es/locales/en-US.js +3 -0
- package/es/locales/ja.d.ts +8 -0
- package/es/locales/ja.js +25 -7
- package/es/locales/pt.d.ts +8 -0
- package/es/locales/pt.js +21 -3
- package/es/locales/zh-CN.d.ts +3 -0
- package/es/locales/zh-CN.js +3 -0
- package/es/locales/zh-TW.d.ts +3 -0
- package/es/locales/zh-TW.js +3 -0
- package/lib/components/PisellCards/index.d.ts +1 -0
- package/lib/components/PisellFields/index.d.ts +1 -0
- package/lib/components/PisellLayouts/index.d.ts +11 -5
- package/lib/components/PisellLayouts/index.js +15 -1
- package/lib/components/PisellMetrics/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.d.ts +13 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.js +229 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +544 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/types.d.ts +117 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/types.js +17 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.d.ts +9 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +64 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +157 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +12 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.js +40 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +87 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Tabs/ReadPretty.d.ts +9 -0
- package/lib/components/dataSourceComponents/fields/Tabs/ReadPretty.js +45 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.d.ts +23 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.js +95 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.less +64 -0
- package/lib/components/dataSourceComponents/fields/Tabs/WithMode.d.ts +6 -0
- package/lib/components/dataSourceComponents/fields/Tabs/WithMode.js +39 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +13 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.js +40 -0
- package/lib/components/dataSourceComponents/fields/Tabs/type.d.ts +38 -0
- package/lib/components/dataSourceComponents/fields/Tabs/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +50 -11
- package/lib/components/dataSourceComponents/fields/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/utils.js +3 -0
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/pisellFilter/type.d.ts +4 -2
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +12 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +709 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.less +92 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +55 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +1353 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.js +237 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.less +189 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +37 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.js +358 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.less +89 -0
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +43 -0
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.js +486 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +21 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.js +119 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.less +7 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +556 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +162 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +36 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +199 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +150 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +9 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.js +96 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +348 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +239 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.js +219 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.less +19 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.js +110 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.less +7 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +33 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.js +127 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.less +101 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +16 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +65 -0
- package/lib/components/pisellFloorMapLayout/components/index.d.ts +21 -0
- package/lib/components/pisellFloorMapLayout/components/index.js +56 -0
- package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +16 -0
- package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.js +54 -0
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +47 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +63 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +546 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.d.ts +21 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.js +146 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +67 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +382 -0
- package/lib/components/pisellFloorMapLayout/index.d.ts +15 -0
- package/lib/components/pisellFloorMapLayout/index.js +64 -0
- package/lib/components/pisellFloorMapLayout/locales-ja.d.ts +104 -0
- package/lib/components/pisellFloorMapLayout/locales-ja.js +124 -0
- package/lib/components/pisellFloorMapLayout/locales-pt.d.ts +104 -0
- package/lib/components/pisellFloorMapLayout/locales-pt.js +124 -0
- package/lib/components/pisellFloorMapLayout/locales.d.ts +506 -0
- package/lib/components/pisellFloorMapLayout/locales.js +340 -0
- package/lib/components/pisellFloorMapLayout/types.d.ts +586 -0
- package/lib/components/pisellFloorMapLayout/types.js +32 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +20 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.js +126 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +66 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +38 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +67 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +22 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +142 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +136 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapStageDefaults.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapStageDefaults.js +33 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +128 -0
- package/lib/components/pisellFloorMapLayout/utils/layoutMeasurements.d.ts +30 -0
- package/lib/components/pisellFloorMapLayout/utils/layoutMeasurements.js +96 -0
- package/lib/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.d.ts +7 -0
- package/lib/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.js +41 -0
- package/lib/components/pisellFloorMapLayout/utils/snap.d.ts +10 -0
- package/lib/components/pisellFloorMapLayout/utils/snap.js +43 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.js +179 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.less +129 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.js +185 -0
- package/lib/components/pisellHierarchicalSummaryList/components/Row.d.ts +35 -0
- package/lib/components/pisellHierarchicalSummaryList/components/Row.js +343 -0
- package/lib/components/pisellHierarchicalSummaryList/components/index.js +29 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/index.js +29 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.js +49 -0
- package/lib/components/pisellHierarchicalSummaryList/index.js +31 -0
- package/lib/components/pisellHierarchicalSummaryList/types.js +17 -0
- package/lib/components/pisellModal/components/index.d.ts +1 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +2 -1
- package/lib/components/pisellRecordBoard/PisellRecordBoard.js +86 -8
- package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +4 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.js +915 -25
- package/lib/components/pisellRecordBoard/index.d.ts +8 -2
- package/lib/components/pisellRecordBoard/index.js +6 -2
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +8 -2
- package/lib/components/pisellRecordBoard/shellFrame/FloorMap.d.ts +14 -0
- package/lib/components/pisellRecordBoard/shellFrame/FloorMap.js +27 -0
- package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +16 -0
- package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.js +45 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +61 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +60 -8
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
- package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +6 -10
- package/lib/components/pisellRecordBoard/shellFrame/index.js +101 -9
- package/lib/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
- package/lib/components/pisellRecordBoard/types.d.ts +68 -2
- package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
- package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +88 -0
- package/lib/components/pisellRecordBoard/utils/recordBoardColumns.js +11 -1
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +10 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.js +200 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.less +88 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.stories.d.ts +12 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.stories.js +116 -0
- package/lib/components/pisellReservationSchedule/index.d.ts +2 -0
- package/lib/components/pisellReservationSchedule/index.js +29 -0
- package/lib/components/pisellReservationSchedule/locales.d.ts +25 -0
- package/lib/components/pisellReservationSchedule/locales.js +47 -0
- package/lib/components/pisellReservationSchedule/types.d.ts +42 -0
- package/lib/components/pisellReservationSchedule/types.js +17 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +128 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +66 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.js +181 -0
- package/lib/components/pisellReservationScheduleBand/index.d.ts +2 -0
- package/lib/components/pisellReservationScheduleBand/index.js +29 -0
- package/lib/components/pisellReservationScheduleBand/types.d.ts +49 -0
- package/lib/components/pisellReservationScheduleBand/types.js +17 -0
- package/lib/components/pisellShellFrame/PisellShellFrame.less +11 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +901 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +461 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.stories.js +273 -0
- package/lib/components/pisellTimeNavigator/components/BackgroundLayer.js +78 -0
- package/lib/components/pisellTimeNavigator/components/CursorLayer.d.ts +25 -0
- package/lib/components/pisellTimeNavigator/components/CursorLayer.js +111 -0
- package/lib/components/pisellTimeNavigator/components/GestureLayer.d.ts +33 -0
- package/lib/components/pisellTimeNavigator/components/GestureLayer.js +170 -0
- package/lib/components/pisellTimeNavigator/components/NowButton.d.ts +14 -0
- package/lib/components/pisellTimeNavigator/components/NowButton.js +81 -0
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.d.ts +22 -0
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.js +116 -0
- package/lib/components/pisellTimeNavigator/components/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/components/index.js +41 -0
- package/lib/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/hooks/index.js +35 -0
- package/lib/components/pisellTimeNavigator/hooks/useDragInertia.js +136 -0
- package/lib/components/pisellTimeNavigator/hooks/useRealtime.js +49 -0
- package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.js +87 -0
- package/lib/components/pisellTimeNavigator/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/index.js +47 -0
- package/lib/components/pisellTimeNavigator/locales.d.ts +22 -0
- package/lib/components/pisellTimeNavigator/locales.js +41 -0
- package/lib/components/pisellTimeNavigator/types.js +17 -0
- package/lib/components/pisellTimeNavigator/utils/index.js +107 -0
- package/lib/components/pisellWalletPassCard/index.js +1 -1
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/table/Table/fields/date/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/link/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/index.js +2 -2
- package/lib/hooks/useResponsive.d.ts +1 -1
- package/lib/index.d.ts +49 -33
- package/lib/index.js +93 -27
- package/lib/locales/en-US.d.ts +3 -0
- package/lib/locales/en-US.js +3 -0
- package/lib/locales/ja.d.ts +8 -0
- package/lib/locales/ja.js +22 -1
- package/lib/locales/pt.d.ts +8 -0
- package/lib/locales/pt.js +22 -1
- package/lib/locales/zh-CN.d.ts +3 -0
- package/lib/locales/zh-CN.js +3 -0
- package/lib/locales/zh-TW.d.ts +3 -0
- package/lib/locales/zh-TW.js +3 -0
- package/lowcode/data-source-form/constants.ts +3 -0
- package/lowcode/data-source-form/utils.ts +31 -5
- package/lowcode/data-source-sub-form/meta.ts +259 -0
- package/lowcode/data-source-sub-form/snippets.ts +21 -0
- package/lowcode/floor-map-image-element/meta.ts +113 -0
- package/lowcode/floor-map-layout-provider/meta.ts +65 -0
- package/lowcode/form-item-record-list-wrapper/meta.ts +180 -0
- package/lowcode/form-item-record-list-wrapper/snippets.ts +18 -0
- package/lowcode/form-item-tabs/meta.ts +172 -0
- package/lowcode/pisell-floor-map-layout/meta.ts +5599 -0
- package/lowcode/pisell-hierarchical-summary-list/meta.ts +240 -0
- package/lowcode/pisell-reservation-schedule/index.ts +3 -0
- package/lowcode/pisell-reservation-schedule/meta.ts +69 -0
- package/lowcode/pisell-reservation-schedule/snippets.ts +1 -0
- package/lowcode/pisell-reservation-schedule-band/index.ts +3 -0
- package/lowcode/pisell-reservation-schedule-band/meta.ts +96 -0
- package/lowcode/pisell-reservation-schedule-band/snippets.ts +1 -0
- package/lowcode/pisell-time-navigator/index.ts +3 -0
- package/lowcode/pisell-time-navigator/meta.ts +298 -0
- package/lowcode/pisell-time-navigator/snippets.ts +1 -0
- package/lowcode/render-figma-style-round-table-card/meta.ts +589 -0
- package/lowcode/render-figma-style-table-card/meta.ts +589 -0
- package/package.json +4 -3
- package/es/components/PisellCards/components/GraphicTextCard/types.d.ts +0 -290
- package/es/components/PisellCards/components/TextCard/TextCard.d.ts +0 -8
- package/es/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +0 -26
- package/es/components/PisellCards/components/TextCard/components/TextContent.d.ts +0 -21
- package/es/components/PisellCards/components/TextCard/types.d.ts +0 -270
- package/es/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -4
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/es/components/drag-sort-tree/index.d.ts +0 -5
- package/es/components/iconfont/index.d.ts +0 -8
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/pisell-config-provider/index.d.ts +0 -13
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/pisellGridPro/index.d.ts +0 -4
- package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/Gift/types.d.ts +0 -29
- package/es/components/productCard/cartSkuCard/components/Promotion/index.d.ts +0 -7
- package/es/components/productCard/cartSkuCard/locales.d.ts +0 -178
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/es/components/productCard/status.d.ts +0 -32
- package/es/components/productCard/types.d.ts +0 -95
- package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -9
- package/es/components/table/types.d.ts +0 -268
- package/es/components/versionModal/index.d.ts +0 -23
- package/lib/components/PisellCards/components/GraphicTextCard/types.d.ts +0 -290
- package/lib/components/PisellCards/components/TextCard/TextCard.d.ts +0 -8
- package/lib/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +0 -26
- package/lib/components/PisellCards/components/TextCard/components/TextContent.d.ts +0 -21
- package/lib/components/PisellCards/components/TextCard/types.d.ts +0 -270
- package/lib/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -4
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/lib/components/drag-sort-tree/index.d.ts +0 -5
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/pisell-config-provider/index.d.ts +0 -13
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/pisellGridPro/index.d.ts +0 -4
- package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/Gift/types.d.ts +0 -29
- package/lib/components/productCard/cartSkuCard/components/Promotion/index.d.ts +0 -7
- package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -178
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/lib/components/productCard/status.d.ts +0 -32
- package/lib/components/productCard/types.d.ts +0 -95
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -9
- package/lib/components/table/types.d.ts +0 -268
- package/lib/components/versionModal/index.d.ts +0 -23
|
@@ -0,0 +1,709 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellFloorMapLayout/PisellFloorMapLayout.tsx
|
|
30
|
+
var PisellFloorMapLayout_exports = {};
|
|
31
|
+
__export(PisellFloorMapLayout_exports, {
|
|
32
|
+
PisellFloorMapLayout: () => PisellFloorMapLayout,
|
|
33
|
+
default: () => PisellFloorMapLayout_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(PisellFloorMapLayout_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_icons = require("@ant-design/icons");
|
|
39
|
+
var import_react_zoom_pan_pinch = require("react-zoom-pan-pinch");
|
|
40
|
+
var import_MapLayer = __toESM(require("./components/MapLayer"));
|
|
41
|
+
var import_ItemLayer = __toESM(require("./components/ItemLayer"));
|
|
42
|
+
var import_EditableItemLayer = require("./components/EditableItemLayer");
|
|
43
|
+
var import_FloorMapToolbar = require("./components/FloorMapToolbar");
|
|
44
|
+
var import_FloorMapEditTopBar = require("./components/FloorMapEditTopBar");
|
|
45
|
+
var import_CanvasTabs = require("./components/CanvasTabs");
|
|
46
|
+
var import_FloorMapEditPanel = require("./components/FloorMapEditPanel");
|
|
47
|
+
var import_ViewControlsWithZoom = require("./components/ViewControlsWithZoom");
|
|
48
|
+
var import_useFloorMapEditState = require("./hooks/useFloorMapEditState");
|
|
49
|
+
var import_useFloorMapTransformMetrics = require("./hooks/useFloorMapTransformMetrics");
|
|
50
|
+
var import_layoutMeasurements = require("./utils/layoutMeasurements");
|
|
51
|
+
var import_floorMapFallbackRender = require("./utils/floorMapFallbackRender");
|
|
52
|
+
var import_floorMapElementKindUtils = require("./utils/floorMapElementKindUtils");
|
|
53
|
+
var import_floorMapDropUtils = require("./utils/floorMapDropUtils");
|
|
54
|
+
var import_useFloorMapPaletteTouchDrag = require("./hooks/useFloorMapPaletteTouchDrag");
|
|
55
|
+
var import_mergeCanvasesForTabs = require("./utils/mergeCanvasesForTabs");
|
|
56
|
+
var import_FloorMapLayoutContext = require("./context/FloorMapLayoutContext");
|
|
57
|
+
var import_mergeFloorMapLayoutContext = require("./context/mergeFloorMapLayoutContext");
|
|
58
|
+
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
59
|
+
var import_utils = require("@pisell/utils");
|
|
60
|
+
var import_floorMapCanvasDisplay = require("./utils/floorMapCanvasDisplay");
|
|
61
|
+
var import_PisellFloorMapLayout = require("./PisellFloorMapLayout.less");
|
|
62
|
+
var PREFIX = "pisell-floor-map-layout";
|
|
63
|
+
function PisellFloorMapLayoutInner(props, ref) {
|
|
64
|
+
var _a, _b;
|
|
65
|
+
const layoutCtx = (0, import_FloorMapLayoutContext.useFloorMapLayoutContext)();
|
|
66
|
+
const p = (0, import_mergeFloorMapLayoutContext.mergeFloorMapLayoutPropsFromContext)(props, layoutCtx);
|
|
67
|
+
const {
|
|
68
|
+
className,
|
|
69
|
+
style,
|
|
70
|
+
items: itemsProp,
|
|
71
|
+
renderItem,
|
|
72
|
+
rowKey,
|
|
73
|
+
renderItemByKind,
|
|
74
|
+
getMergedItemWrapperStyle,
|
|
75
|
+
mapLayer,
|
|
76
|
+
cellSize: cellSizeProp,
|
|
77
|
+
itemUnit = "cell",
|
|
78
|
+
zoom = {},
|
|
79
|
+
pan = {},
|
|
80
|
+
controls = {},
|
|
81
|
+
enableHover = true,
|
|
82
|
+
onItemClick,
|
|
83
|
+
onItemHover,
|
|
84
|
+
onItemLeave,
|
|
85
|
+
mode = "read",
|
|
86
|
+
floorMapConfig: floorMapConfigProp,
|
|
87
|
+
dataSources,
|
|
88
|
+
onSave,
|
|
89
|
+
onDataSourceRecordSave,
|
|
90
|
+
dataSourceLabels,
|
|
91
|
+
dataSourceFormColumns,
|
|
92
|
+
dataSourceRecordForm,
|
|
93
|
+
loading,
|
|
94
|
+
saveError,
|
|
95
|
+
onElementRenderError,
|
|
96
|
+
toolbarShowSave = true,
|
|
97
|
+
floorMapFullscreenMode,
|
|
98
|
+
showDataSourceRecordFormBlock,
|
|
99
|
+
floorMapViewportOverlay,
|
|
100
|
+
canvasTabsBarTrailing
|
|
101
|
+
} = p;
|
|
102
|
+
const isFloorMapView = Boolean(floorMapConfigProp);
|
|
103
|
+
const contentOffsetRef = (0, import_react.useRef)({ x: 0, y: 0 });
|
|
104
|
+
const mapDropLayerRef = (0, import_react.useRef)(null);
|
|
105
|
+
const transformRef = (0, import_react.useRef)(null);
|
|
106
|
+
const edit = (0, import_useFloorMapEditState.useFloorMapEditState)({
|
|
107
|
+
floorMapConfigProp,
|
|
108
|
+
isFloorMapView,
|
|
109
|
+
itemsProp,
|
|
110
|
+
cellSizeProp,
|
|
111
|
+
dataSources,
|
|
112
|
+
onSave,
|
|
113
|
+
onDataSourceRecordSave,
|
|
114
|
+
dataSourceFormColumns,
|
|
115
|
+
dataSourceRecordForm,
|
|
116
|
+
dataSourceLabels,
|
|
117
|
+
layoutPrefix: PREFIX,
|
|
118
|
+
contentOffsetRef,
|
|
119
|
+
showDataSourceRecordFormBlock
|
|
120
|
+
});
|
|
121
|
+
const {
|
|
122
|
+
config,
|
|
123
|
+
currentCanvasId,
|
|
124
|
+
setCurrentCanvasId,
|
|
125
|
+
selectedId,
|
|
126
|
+
setSelectedId,
|
|
127
|
+
placeMode,
|
|
128
|
+
setPlaceMode,
|
|
129
|
+
items,
|
|
130
|
+
saving,
|
|
131
|
+
savingRecord,
|
|
132
|
+
handleAddCanvas,
|
|
133
|
+
handleRemoveCanvas,
|
|
134
|
+
handleRenameCanvas,
|
|
135
|
+
handleUpdateItem,
|
|
136
|
+
handleCanvasPlaceClick,
|
|
137
|
+
handleSave,
|
|
138
|
+
placeSceneElementFromPaletteDrop,
|
|
139
|
+
editPanelParams,
|
|
140
|
+
placeOverlayClass,
|
|
141
|
+
isLayoutDirty,
|
|
142
|
+
toggleDraftCanvasShowGrid
|
|
143
|
+
} = edit;
|
|
144
|
+
const effectiveMapLayer = (0, import_react.useMemo)(() => {
|
|
145
|
+
if (!isFloorMapView || !config || !currentCanvasId) {
|
|
146
|
+
return mapLayer;
|
|
147
|
+
}
|
|
148
|
+
const canvas = config.canvases.find((c) => c.id === currentCanvasId);
|
|
149
|
+
return { ...mapLayer ?? {}, ...(canvas == null ? void 0 : canvas.mapLayer) ?? {} };
|
|
150
|
+
}, [isFloorMapView, config, currentCanvasId, mapLayer]);
|
|
151
|
+
const transformWrapperKey = (0, import_react.useMemo)(() => {
|
|
152
|
+
if (!isFloorMapView) return "fmap-layout";
|
|
153
|
+
const bp = (effectiveMapLayer == null ? void 0 : effectiveMapLayer.boundingPadding) ?? "d";
|
|
154
|
+
const z = zoom.defaultScale ?? 1;
|
|
155
|
+
return `fmap-${currentCanvasId ?? "na"}-bp${bp}-z${z}`;
|
|
156
|
+
}, [
|
|
157
|
+
isFloorMapView,
|
|
158
|
+
currentCanvasId,
|
|
159
|
+
effectiveMapLayer == null ? void 0 : effectiveMapLayer.boundingPadding,
|
|
160
|
+
zoom.defaultScale
|
|
161
|
+
]);
|
|
162
|
+
const canvasesForTabs = (0, import_react.useMemo)(
|
|
163
|
+
() => config ? (0, import_mergeCanvasesForTabs.mergeCanvasesForTabs)(config) : [],
|
|
164
|
+
[config]
|
|
165
|
+
);
|
|
166
|
+
const engineCtx = (0, import_useEngineContext.default)();
|
|
167
|
+
const engineLocale = ((_b = (_a = engineCtx == null ? void 0 : engineCtx.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "zh-CN";
|
|
168
|
+
const hasCanvasTabsBarTrailing = canvasTabsBarTrailing != null && canvasTabsBarTrailing !== false;
|
|
169
|
+
const showReadModeCanvasTabsBar = (0, import_react.useMemo)(() => {
|
|
170
|
+
if (!isFloorMapView || mode !== "read" || !config) return false;
|
|
171
|
+
if (hasCanvasTabsBarTrailing) return true;
|
|
172
|
+
return canvasesForTabs.filter((c) => c.enabled).length > 1;
|
|
173
|
+
}, [isFloorMapView, mode, config, canvasesForTabs, hasCanvasTabsBarTrailing]);
|
|
174
|
+
const readCanvasTabsAriaLabel = (0, import_react.useMemo)(() => {
|
|
175
|
+
(0, import_floorMapCanvasDisplay.initFloorMapLayoutLocales)(engineLocale);
|
|
176
|
+
return import_utils.locales.getText("pisell-floor-map-layout.read-canvas-tabs.aria");
|
|
177
|
+
}, [engineLocale]);
|
|
178
|
+
const readCanvasTabsFsLabels = (0, import_react.useMemo)(() => {
|
|
179
|
+
(0, import_floorMapCanvasDisplay.initFloorMapLayoutLocales)(engineLocale);
|
|
180
|
+
return {
|
|
181
|
+
fsEnterAria: import_utils.locales.getText(
|
|
182
|
+
"pisell-floor-map-layout.edit-top-bar.fullscreen-enter-aria"
|
|
183
|
+
),
|
|
184
|
+
fsEnterTitle: import_utils.locales.getText(
|
|
185
|
+
"pisell-floor-map-layout.edit-top-bar.fullscreen-enter-title"
|
|
186
|
+
),
|
|
187
|
+
fsExitAria: import_utils.locales.getText(
|
|
188
|
+
"pisell-floor-map-layout.edit-top-bar.fullscreen-exit-aria"
|
|
189
|
+
),
|
|
190
|
+
fsExitTitle: import_utils.locales.getText(
|
|
191
|
+
"pisell-floor-map-layout.edit-top-bar.fullscreen-exit-title"
|
|
192
|
+
)
|
|
193
|
+
};
|
|
194
|
+
}, [engineLocale]);
|
|
195
|
+
const loadingLabel = (0, import_react.useMemo)(() => {
|
|
196
|
+
(0, import_floorMapCanvasDisplay.initFloorMapLayoutLocales)(engineLocale);
|
|
197
|
+
return import_utils.locales.getText("pisell-floor-map-layout.loading");
|
|
198
|
+
}, [engineLocale]);
|
|
199
|
+
const cellSize = cellSizeProp ?? import_layoutMeasurements.DEFAULT_CELL_SIZE;
|
|
200
|
+
const itemGap = (0, import_react.useMemo)(
|
|
201
|
+
() => (0, import_layoutMeasurements.gapToPx)(effectiveMapLayer == null ? void 0 : effectiveMapLayer.gap),
|
|
202
|
+
[effectiveMapLayer == null ? void 0 : effectiveMapLayer.gap]
|
|
203
|
+
);
|
|
204
|
+
const effectiveItemUnit = isFloorMapView ? "pixel" : itemUnit;
|
|
205
|
+
const metrics = (0, import_useFloorMapTransformMetrics.useFloorMapTransformMetrics)({
|
|
206
|
+
items,
|
|
207
|
+
cellSize,
|
|
208
|
+
itemGap,
|
|
209
|
+
effectiveItemUnit,
|
|
210
|
+
isFloorMapView,
|
|
211
|
+
mode,
|
|
212
|
+
zoom,
|
|
213
|
+
transformRef,
|
|
214
|
+
contentOffsetRef,
|
|
215
|
+
boundingPadding: effectiveMapLayer == null ? void 0 : effectiveMapLayer.boundingPadding,
|
|
216
|
+
frameResetKey: isFloorMapView ? transformWrapperKey : void 0
|
|
217
|
+
});
|
|
218
|
+
const {
|
|
219
|
+
containerRef,
|
|
220
|
+
mapAreaRef,
|
|
221
|
+
mapAreaSize,
|
|
222
|
+
contentWidth,
|
|
223
|
+
contentHeight,
|
|
224
|
+
contentOffsetX,
|
|
225
|
+
contentOffsetY,
|
|
226
|
+
initialPositionX,
|
|
227
|
+
initialPositionY,
|
|
228
|
+
zoomConfig,
|
|
229
|
+
scale,
|
|
230
|
+
setScale,
|
|
231
|
+
isFullscreen,
|
|
232
|
+
toggleFullscreen,
|
|
233
|
+
fitBounds,
|
|
234
|
+
lastTransformRef,
|
|
235
|
+
isInteractingWithElement,
|
|
236
|
+
setIsInteractingWithElement
|
|
237
|
+
} = metrics;
|
|
238
|
+
const fsMode = floorMapFullscreenMode ?? "toggle";
|
|
239
|
+
const useFullTopChrome = isFloorMapView && mode === "edit" && (fsMode === "locked" || fsMode === "toggle" && isFullscreen);
|
|
240
|
+
const editToggleFullscreen = fsMode === "toggle" ? toggleFullscreen : void 0;
|
|
241
|
+
const readToggleFullscreen = isFloorMapView && mode === "read" && fsMode === "toggle" ? toggleFullscreen : void 0;
|
|
242
|
+
const viewControlsConfig = (0, import_react.useMemo)(() => {
|
|
243
|
+
if (!isFloorMapView || mode !== "edit") return controls;
|
|
244
|
+
return {
|
|
245
|
+
...controls,
|
|
246
|
+
showFullscreen: false
|
|
247
|
+
};
|
|
248
|
+
}, [isFloorMapView, mode, controls]);
|
|
249
|
+
const topBarExtraActions = null;
|
|
250
|
+
const [mapPaletteDragActive, setMapPaletteDragActive] = (0, import_react.useState)(false);
|
|
251
|
+
(0, import_react.useEffect)(() => {
|
|
252
|
+
const clear = () => setMapPaletteDragActive(false);
|
|
253
|
+
window.addEventListener("dragend", clear);
|
|
254
|
+
return () => window.removeEventListener("dragend", clear);
|
|
255
|
+
}, []);
|
|
256
|
+
const handlePaletteDropOnCanvas = (0, import_react.useCallback)(
|
|
257
|
+
(e) => {
|
|
258
|
+
e.preventDefault();
|
|
259
|
+
e.stopPropagation();
|
|
260
|
+
setMapPaletteDragActive(false);
|
|
261
|
+
if (!isFloorMapView || mode !== "edit") return;
|
|
262
|
+
const payload = (0, import_floorMapDropUtils.parsePaletteDragPayload)(e.dataTransfer);
|
|
263
|
+
if (!payload) return;
|
|
264
|
+
const { x: cx, y: cy } = (0, import_floorMapDropUtils.sceneXYFromContentDropOffset)(
|
|
265
|
+
e.nativeEvent.offsetX,
|
|
266
|
+
e.nativeEvent.offsetY,
|
|
267
|
+
contentOffsetRef.current
|
|
268
|
+
);
|
|
269
|
+
placeSceneElementFromPaletteDrop(cx, cy, {
|
|
270
|
+
type: "scene",
|
|
271
|
+
elementKind: payload.elementKind,
|
|
272
|
+
dataSourceKey: payload.dataSourceKey,
|
|
273
|
+
recordId: payload.recordId,
|
|
274
|
+
recordIds: payload.recordIds
|
|
275
|
+
});
|
|
276
|
+
},
|
|
277
|
+
[isFloorMapView, mode, placeSceneElementFromPaletteDrop]
|
|
278
|
+
);
|
|
279
|
+
const applyPaletteTouchDropInScene = (0, import_react.useCallback)(
|
|
280
|
+
(payload, cx, cy) => {
|
|
281
|
+
if (!isFloorMapView || mode !== "edit") return;
|
|
282
|
+
placeSceneElementFromPaletteDrop(cx, cy, {
|
|
283
|
+
type: "scene",
|
|
284
|
+
elementKind: payload.elementKind,
|
|
285
|
+
dataSourceKey: payload.dataSourceKey,
|
|
286
|
+
recordId: payload.recordId,
|
|
287
|
+
recordIds: payload.recordIds
|
|
288
|
+
});
|
|
289
|
+
},
|
|
290
|
+
[isFloorMapView, mode, placeSceneElementFromPaletteDrop]
|
|
291
|
+
);
|
|
292
|
+
const paletteTouchDrag = (0, import_useFloorMapPaletteTouchDrag.useFloorMapPaletteTouchDrag)({
|
|
293
|
+
enabled: Boolean(
|
|
294
|
+
isFloorMapView && mode === "edit" && (config == null ? void 0 : config.canvasUi.canCreate)
|
|
295
|
+
),
|
|
296
|
+
mapDropLayerRef,
|
|
297
|
+
contentWidth,
|
|
298
|
+
contentHeight,
|
|
299
|
+
contentOffsetRef,
|
|
300
|
+
setMapPaletteDragActive,
|
|
301
|
+
onDropInScene: applyPaletteTouchDropInScene
|
|
302
|
+
});
|
|
303
|
+
const fallbackPlaceholderRender = (0, import_react.useCallback)((item) => {
|
|
304
|
+
return (0, import_floorMapFallbackRender.renderFloorMapFallbackPlaceholder)(item);
|
|
305
|
+
}, []);
|
|
306
|
+
const effectiveRenderItem = (0, import_react.useCallback)(
|
|
307
|
+
(item, index, options) => {
|
|
308
|
+
const merged = item;
|
|
309
|
+
const kind = merged == null ? void 0 : merged.elementKind;
|
|
310
|
+
if (isFloorMapView && floorMapConfigProp && merged._sceneElement) {
|
|
311
|
+
const kc = (0, import_floorMapElementKindUtils.getElementKindConfig)(floorMapConfigProp, kind);
|
|
312
|
+
const issue = (0, import_floorMapElementKindUtils.getSceneElementRenderIssue)(
|
|
313
|
+
merged._sceneElement,
|
|
314
|
+
kc,
|
|
315
|
+
dataSources
|
|
316
|
+
);
|
|
317
|
+
if (issue) {
|
|
318
|
+
return (0, import_floorMapFallbackRender.renderFloorMapRenderError)(issue);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
if (isFloorMapView && kind && (renderItemByKind == null ? void 0 : renderItemByKind[kind])) {
|
|
322
|
+
try {
|
|
323
|
+
return renderItemByKind[kind](item, index, options);
|
|
324
|
+
} catch (err) {
|
|
325
|
+
if (merged._sceneElement) {
|
|
326
|
+
onElementRenderError == null ? void 0 : onElementRenderError(merged._sceneElement, err);
|
|
327
|
+
}
|
|
328
|
+
return (0, import_floorMapFallbackRender.renderFloorMapRenderError)(
|
|
329
|
+
err instanceof Error ? err.message : String(err)
|
|
330
|
+
);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
if (isFloorMapView && kind) {
|
|
334
|
+
return fallbackPlaceholderRender(merged);
|
|
335
|
+
}
|
|
336
|
+
return renderItem(item, index, options);
|
|
337
|
+
},
|
|
338
|
+
[
|
|
339
|
+
isFloorMapView,
|
|
340
|
+
floorMapConfigProp,
|
|
341
|
+
dataSources,
|
|
342
|
+
renderItemByKind,
|
|
343
|
+
renderItem,
|
|
344
|
+
fallbackPlaceholderRender,
|
|
345
|
+
onElementRenderError
|
|
346
|
+
]
|
|
347
|
+
);
|
|
348
|
+
const handleItemClick = (0, import_react.useCallback)(
|
|
349
|
+
(item, index, e) => {
|
|
350
|
+
if (isFloorMapView && mode === "edit") setSelectedId(item.id);
|
|
351
|
+
onItemClick == null ? void 0 : onItemClick(item, index, e);
|
|
352
|
+
},
|
|
353
|
+
[isFloorMapView, mode, onItemClick, setSelectedId]
|
|
354
|
+
);
|
|
355
|
+
(0, import_react.useImperativeHandle)(
|
|
356
|
+
ref,
|
|
357
|
+
() => ({
|
|
358
|
+
zoomIn: () => {
|
|
359
|
+
var _a2;
|
|
360
|
+
return (_a2 = transformRef.current) == null ? void 0 : _a2.zoomIn();
|
|
361
|
+
},
|
|
362
|
+
zoomOut: () => {
|
|
363
|
+
var _a2;
|
|
364
|
+
return (_a2 = transformRef.current) == null ? void 0 : _a2.zoomOut();
|
|
365
|
+
},
|
|
366
|
+
reset: () => {
|
|
367
|
+
var _a2;
|
|
368
|
+
return (_a2 = transformRef.current) == null ? void 0 : _a2.resetTransform();
|
|
369
|
+
},
|
|
370
|
+
fitBounds,
|
|
371
|
+
saveLayout: () => handleSave()
|
|
372
|
+
}),
|
|
373
|
+
[fitBounds, handleSave]
|
|
374
|
+
);
|
|
375
|
+
const showSidebar = isFloorMapView && mode === "edit" && config && dataSources;
|
|
376
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
377
|
+
"div",
|
|
378
|
+
{
|
|
379
|
+
ref: containerRef,
|
|
380
|
+
className: (0, import_classnames.default)(PREFIX, className, {
|
|
381
|
+
[`${PREFIX}-floor-map-view`]: isFloorMapView,
|
|
382
|
+
[`${PREFIX}-mode-edit`]: isFloorMapView && mode === "edit"
|
|
383
|
+
}),
|
|
384
|
+
style: {
|
|
385
|
+
display: "flex",
|
|
386
|
+
flexDirection: "column",
|
|
387
|
+
...isFloorMapView ? { minHeight: 0 } : {},
|
|
388
|
+
...style
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
isFloorMapView && mode === "edit" && config && !useFullTopChrome && /* @__PURE__ */ import_react.default.createElement(
|
|
392
|
+
import_FloorMapEditTopBar.FloorMapEditTopBar,
|
|
393
|
+
{
|
|
394
|
+
mode: "compact",
|
|
395
|
+
config,
|
|
396
|
+
canvases: canvasesForTabs,
|
|
397
|
+
currentCanvasId,
|
|
398
|
+
onTabChange: (id) => {
|
|
399
|
+
setCurrentCanvasId(id);
|
|
400
|
+
setSelectedId(null);
|
|
401
|
+
},
|
|
402
|
+
canEditTabs: config.canvasUi.canEdit,
|
|
403
|
+
onAddCanvas: handleAddCanvas,
|
|
404
|
+
onRemoveCanvas: handleRemoveCanvas,
|
|
405
|
+
onRenameCanvas: handleRenameCanvas,
|
|
406
|
+
toggleFullscreen: editToggleFullscreen,
|
|
407
|
+
isFullscreen: false,
|
|
408
|
+
controls,
|
|
409
|
+
canvasTabsBarTrailing
|
|
410
|
+
}
|
|
411
|
+
),
|
|
412
|
+
isFloorMapView && mode === "edit" && config && useFullTopChrome && /* @__PURE__ */ import_react.default.createElement(
|
|
413
|
+
import_FloorMapEditTopBar.FloorMapEditTopBar,
|
|
414
|
+
{
|
|
415
|
+
mode: "full",
|
|
416
|
+
config,
|
|
417
|
+
canvases: canvasesForTabs,
|
|
418
|
+
currentCanvasId,
|
|
419
|
+
onTabChange: (id) => {
|
|
420
|
+
setCurrentCanvasId(id);
|
|
421
|
+
setSelectedId(null);
|
|
422
|
+
},
|
|
423
|
+
canEditTabs: config.canvasUi.canEdit,
|
|
424
|
+
onAddCanvas: handleAddCanvas,
|
|
425
|
+
onRemoveCanvas: handleRemoveCanvas,
|
|
426
|
+
onRenameCanvas: handleRenameCanvas,
|
|
427
|
+
onSave: onSave ? handleSave : void 0,
|
|
428
|
+
saving,
|
|
429
|
+
saveError,
|
|
430
|
+
layoutDirty: isLayoutDirty,
|
|
431
|
+
toggleFullscreen: editToggleFullscreen,
|
|
432
|
+
isFullscreen,
|
|
433
|
+
controls,
|
|
434
|
+
extraActions: topBarExtraActions,
|
|
435
|
+
canvasTabsBarTrailing
|
|
436
|
+
}
|
|
437
|
+
),
|
|
438
|
+
showReadModeCanvasTabsBar && /* @__PURE__ */ import_react.default.createElement(
|
|
439
|
+
"div",
|
|
440
|
+
{
|
|
441
|
+
className: `${PREFIX}-edit-top-bar ${PREFIX}-read-canvas-tabs-bar`,
|
|
442
|
+
role: "toolbar",
|
|
443
|
+
"aria-label": readCanvasTabsAriaLabel
|
|
444
|
+
},
|
|
445
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}-edit-top-bar-tabs` }, /* @__PURE__ */ import_react.default.createElement(
|
|
446
|
+
import_CanvasTabs.CanvasTabs,
|
|
447
|
+
{
|
|
448
|
+
canvases: canvasesForTabs,
|
|
449
|
+
currentCanvasId,
|
|
450
|
+
onTabChange: (id) => {
|
|
451
|
+
setCurrentCanvasId(id);
|
|
452
|
+
setSelectedId(null);
|
|
453
|
+
},
|
|
454
|
+
canEdit: false,
|
|
455
|
+
className: `${PREFIX}-edit-top-bar-canvas-tabs`
|
|
456
|
+
}
|
|
457
|
+
)),
|
|
458
|
+
hasCanvasTabsBarTrailing || readToggleFullscreen ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}-edit-top-bar-actions` }, canvasTabsBarTrailing, readToggleFullscreen ? /* @__PURE__ */ import_react.default.createElement(
|
|
459
|
+
"button",
|
|
460
|
+
{
|
|
461
|
+
type: "button",
|
|
462
|
+
className: (0, import_classnames.default)(
|
|
463
|
+
`${PREFIX}-edit-top-bar-btn`,
|
|
464
|
+
`${PREFIX}-edit-top-bar-btn-ghost`
|
|
465
|
+
),
|
|
466
|
+
onClick: () => readToggleFullscreen(),
|
|
467
|
+
"aria-label": isFullscreen ? readCanvasTabsFsLabels.fsExitAria : readCanvasTabsFsLabels.fsEnterAria,
|
|
468
|
+
title: isFullscreen ? readCanvasTabsFsLabels.fsExitTitle : readCanvasTabsFsLabels.fsEnterTitle
|
|
469
|
+
},
|
|
470
|
+
isFullscreen ? /* @__PURE__ */ import_react.default.createElement(import_icons.FullscreenExitOutlined, null) : /* @__PURE__ */ import_react.default.createElement(import_icons.FullscreenOutlined, null)
|
|
471
|
+
) : null) : null
|
|
472
|
+
),
|
|
473
|
+
loading && /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}-loading` }, /* @__PURE__ */ import_react.default.createElement("span", null, loadingLabel)),
|
|
474
|
+
saveError && !(isFloorMapView && mode === "edit" && config) && /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}-save-error` }, typeof saveError === "string" ? saveError : saveError == null ? void 0 : saveError.message),
|
|
475
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
476
|
+
"div",
|
|
477
|
+
{
|
|
478
|
+
className: showSidebar ? `${PREFIX}-edit-layout` : void 0,
|
|
479
|
+
style: { flex: 1, display: "flex", minHeight: 0 }
|
|
480
|
+
},
|
|
481
|
+
showSidebar && /* @__PURE__ */ import_react.default.createElement(
|
|
482
|
+
import_FloorMapToolbar.FloorMapToolbar,
|
|
483
|
+
{
|
|
484
|
+
config,
|
|
485
|
+
dataSources,
|
|
486
|
+
dataSourceLabels,
|
|
487
|
+
canCreate: config.canvasUi.canCreate,
|
|
488
|
+
placeMode,
|
|
489
|
+
onPlaceModeChange: setPlaceMode,
|
|
490
|
+
sceneElements: config.sceneElements ?? [],
|
|
491
|
+
renderPreviewItem: (item) => effectiveRenderItem(item, 0),
|
|
492
|
+
placementPreviewSize: { width: 180, height: 120 },
|
|
493
|
+
decorationPreviewSize: 48,
|
|
494
|
+
onSave: onSave && config.canvasUi.canEdit && (!useFullTopChrome && toolbarShowSave !== false || useFullTopChrome && isFullscreen) ? handleSave : void 0,
|
|
495
|
+
saving,
|
|
496
|
+
saveError,
|
|
497
|
+
layoutDirty: isLayoutDirty,
|
|
498
|
+
onPaletteCardPointerDown: paletteTouchDrag.handlePaletteCardPointerDown,
|
|
499
|
+
consumeToolbarClickIfTouchDrag: paletteTouchDrag.consumeToolbarClickIfTouchDrag
|
|
500
|
+
}
|
|
501
|
+
),
|
|
502
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
503
|
+
"div",
|
|
504
|
+
{
|
|
505
|
+
ref: mapAreaRef,
|
|
506
|
+
className: showSidebar ? `${PREFIX}-map-area` : void 0,
|
|
507
|
+
style: {
|
|
508
|
+
flex: 1,
|
|
509
|
+
position: "relative",
|
|
510
|
+
minWidth: 0,
|
|
511
|
+
overflow: "hidden"
|
|
512
|
+
},
|
|
513
|
+
onDragEnter: (e) => {
|
|
514
|
+
if (!isFloorMapView || mode !== "edit") return;
|
|
515
|
+
if (!(0, import_floorMapDropUtils.isFloorMapPaletteDrag)(e.dataTransfer)) return;
|
|
516
|
+
e.preventDefault();
|
|
517
|
+
e.stopPropagation();
|
|
518
|
+
setMapPaletteDragActive(true);
|
|
519
|
+
},
|
|
520
|
+
onDragOver: (e) => {
|
|
521
|
+
if (!isFloorMapView || mode !== "edit" || !mapPaletteDragActive)
|
|
522
|
+
return;
|
|
523
|
+
e.preventDefault();
|
|
524
|
+
e.stopPropagation();
|
|
525
|
+
},
|
|
526
|
+
onDragLeave: (e) => {
|
|
527
|
+
var _a2;
|
|
528
|
+
if (!mapPaletteDragActive) return;
|
|
529
|
+
const related = e.relatedTarget;
|
|
530
|
+
if (!((_a2 = mapAreaRef.current) == null ? void 0 : _a2.contains(related))) {
|
|
531
|
+
setMapPaletteDragActive(false);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
536
|
+
import_react_zoom_pan_pinch.TransformWrapper,
|
|
537
|
+
{
|
|
538
|
+
key: transformWrapperKey,
|
|
539
|
+
centerOnInit: false,
|
|
540
|
+
initialScale: zoomConfig.initialScale,
|
|
541
|
+
initialPositionX,
|
|
542
|
+
initialPositionY,
|
|
543
|
+
minScale: zoomConfig.minScale,
|
|
544
|
+
maxScale: zoomConfig.maxScale,
|
|
545
|
+
...{ step: zoomConfig.step },
|
|
546
|
+
panning: {
|
|
547
|
+
disabled: pan.enabled === false || isInteractingWithElement,
|
|
548
|
+
velocityDisabled: true
|
|
549
|
+
},
|
|
550
|
+
doubleClick: { disabled: true },
|
|
551
|
+
onTransformed: (_, state) => {
|
|
552
|
+
setScale(state.scale);
|
|
553
|
+
lastTransformRef.current = {
|
|
554
|
+
x: state.positionX,
|
|
555
|
+
y: state.positionY,
|
|
556
|
+
scale: state.scale
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
(ctx) => {
|
|
561
|
+
transformRef.current = ctx;
|
|
562
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
563
|
+
import_react_zoom_pan_pinch.TransformComponent,
|
|
564
|
+
{
|
|
565
|
+
wrapperStyle: {
|
|
566
|
+
width: "100%",
|
|
567
|
+
height: "100%",
|
|
568
|
+
backgroundColor: "#F2F4F7",
|
|
569
|
+
overflow: "visible"
|
|
570
|
+
},
|
|
571
|
+
contentStyle: {
|
|
572
|
+
width: contentWidth,
|
|
573
|
+
height: contentHeight,
|
|
574
|
+
minWidth: contentWidth,
|
|
575
|
+
minHeight: contentHeight,
|
|
576
|
+
position: "relative",
|
|
577
|
+
overflow: "visible",
|
|
578
|
+
backgroundColor: "#F2F4F7"
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
582
|
+
import_MapLayer.default,
|
|
583
|
+
{
|
|
584
|
+
config: effectiveMapLayer,
|
|
585
|
+
contentWidth,
|
|
586
|
+
contentHeight,
|
|
587
|
+
cellSize,
|
|
588
|
+
preferCanvasGrid: true,
|
|
589
|
+
pointerEventsNone: isFloorMapView && mode === "edit"
|
|
590
|
+
}
|
|
591
|
+
),
|
|
592
|
+
isFloorMapView && mode === "edit" ? /* @__PURE__ */ import_react.default.createElement(
|
|
593
|
+
import_EditableItemLayer.EditableItemLayer,
|
|
594
|
+
{
|
|
595
|
+
items,
|
|
596
|
+
renderItem: effectiveRenderItem,
|
|
597
|
+
rowKey,
|
|
598
|
+
cellSize,
|
|
599
|
+
itemUnit: effectiveItemUnit,
|
|
600
|
+
itemGap,
|
|
601
|
+
contentWidth,
|
|
602
|
+
contentHeight,
|
|
603
|
+
contentOffsetX,
|
|
604
|
+
contentOffsetY,
|
|
605
|
+
selectedId,
|
|
606
|
+
onSelect: setSelectedId,
|
|
607
|
+
onUpdateItem: handleUpdateItem,
|
|
608
|
+
snapStep: (effectiveMapLayer == null ? void 0 : effectiveMapLayer.snapStep) ?? 0,
|
|
609
|
+
scale,
|
|
610
|
+
onInteractionChange: setIsInteractingWithElement,
|
|
611
|
+
getMergedItemWrapperStyle
|
|
612
|
+
}
|
|
613
|
+
) : /* @__PURE__ */ import_react.default.createElement(
|
|
614
|
+
import_ItemLayer.default,
|
|
615
|
+
{
|
|
616
|
+
items,
|
|
617
|
+
renderItem: effectiveRenderItem,
|
|
618
|
+
rowKey,
|
|
619
|
+
cellSize,
|
|
620
|
+
itemUnit: effectiveItemUnit,
|
|
621
|
+
itemGap,
|
|
622
|
+
contentWidth,
|
|
623
|
+
contentHeight,
|
|
624
|
+
contentOffsetX,
|
|
625
|
+
contentOffsetY,
|
|
626
|
+
enableHover,
|
|
627
|
+
onItemClick: handleItemClick,
|
|
628
|
+
onItemHover,
|
|
629
|
+
onItemLeave,
|
|
630
|
+
getMergedItemWrapperStyle,
|
|
631
|
+
onInteractionChange: setIsInteractingWithElement
|
|
632
|
+
}
|
|
633
|
+
),
|
|
634
|
+
isFloorMapView && mode === "edit" && (placeMode == null ? void 0 : placeMode.type) === "scene" && /* @__PURE__ */ import_react.default.createElement(
|
|
635
|
+
"div",
|
|
636
|
+
{
|
|
637
|
+
className: placeOverlayClass,
|
|
638
|
+
style: { width: contentWidth, height: contentHeight },
|
|
639
|
+
onClick: handleCanvasPlaceClick
|
|
640
|
+
}
|
|
641
|
+
),
|
|
642
|
+
isFloorMapView && mode === "edit" && /* @__PURE__ */ import_react.default.createElement(
|
|
643
|
+
"div",
|
|
644
|
+
{
|
|
645
|
+
ref: mapDropLayerRef,
|
|
646
|
+
className: (0, import_classnames.default)(`${PREFIX}-map-drop-layer`, {
|
|
647
|
+
[`${PREFIX}-map-drop-layer-active`]: mapPaletteDragActive
|
|
648
|
+
}),
|
|
649
|
+
style: { width: contentWidth, height: contentHeight },
|
|
650
|
+
onDragOver: (ev) => {
|
|
651
|
+
ev.preventDefault();
|
|
652
|
+
ev.stopPropagation();
|
|
653
|
+
},
|
|
654
|
+
onDrop: handlePaletteDropOnCanvas
|
|
655
|
+
}
|
|
656
|
+
)
|
|
657
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
658
|
+
import_ViewControlsWithZoom.ViewControlsWithZoom,
|
|
659
|
+
{
|
|
660
|
+
config: viewControlsConfig,
|
|
661
|
+
scale,
|
|
662
|
+
isFullscreen,
|
|
663
|
+
fitBounds,
|
|
664
|
+
toggleFullscreen: editToggleFullscreen,
|
|
665
|
+
mapGridVisible: Boolean(effectiveMapLayer == null ? void 0 : effectiveMapLayer.showGrid),
|
|
666
|
+
onToggleMapGrid: isFloorMapView ? toggleDraftCanvasShowGrid : void 0
|
|
667
|
+
}
|
|
668
|
+
), isFloorMapView && floorMapViewportOverlay != null ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}-viewport-overlay` }, typeof floorMapViewportOverlay === "function" ? floorMapViewportOverlay({
|
|
669
|
+
items,
|
|
670
|
+
dataSources,
|
|
671
|
+
currentCanvasId,
|
|
672
|
+
mode
|
|
673
|
+
}) : floorMapViewportOverlay) : null, isFloorMapView && mode === "edit" && editPanelParams && config && dataSources && /* @__PURE__ */ import_react.default.createElement(
|
|
674
|
+
"div",
|
|
675
|
+
{
|
|
676
|
+
className: (0, import_classnames.default)(
|
|
677
|
+
`${PREFIX}-edit-panel-wrap`,
|
|
678
|
+
mapAreaSize.height > 0 && `${PREFIX}-edit-panel-wrap-constrained`
|
|
679
|
+
),
|
|
680
|
+
style: mapAreaSize.height > 0 ? {
|
|
681
|
+
height: mapAreaSize.height - 32,
|
|
682
|
+
maxHeight: mapAreaSize.height - 32,
|
|
683
|
+
overflow: "hidden",
|
|
684
|
+
top: 16,
|
|
685
|
+
transform: "none"
|
|
686
|
+
} : void 0
|
|
687
|
+
},
|
|
688
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
689
|
+
import_FloorMapEditPanel.FloorMapEditPanel,
|
|
690
|
+
{
|
|
691
|
+
...editPanelParams,
|
|
692
|
+
config,
|
|
693
|
+
dataSources,
|
|
694
|
+
savingRecord
|
|
695
|
+
}
|
|
696
|
+
)
|
|
697
|
+
));
|
|
698
|
+
}
|
|
699
|
+
)
|
|
700
|
+
)
|
|
701
|
+
)
|
|
702
|
+
);
|
|
703
|
+
}
|
|
704
|
+
var PisellFloorMapLayout = import_react.default.forwardRef(PisellFloorMapLayoutInner);
|
|
705
|
+
var PisellFloorMapLayout_default = PisellFloorMapLayout;
|
|
706
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
707
|
+
0 && (module.exports = {
|
|
708
|
+
PisellFloorMapLayout
|
|
709
|
+
});
|