@pisell/materials 6.11.17 → 6.11.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +32 -32
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +25 -25
- package/es/components/PisellLayouts/index.d.ts +10 -5
- package/es/components/PisellLayouts/index.js +8 -4
- package/es/components/dataSourceComponents/dataSourceSubForm/index.d.ts +13 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.js +274 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +544 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/types.d.ts +117 -0
- package/es/components/dataSourceComponents/dataSourceSubForm/types.js +1 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.d.ts +9 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +61 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +176 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +12 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.js +11 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +87 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Tabs/ReadPretty.d.ts +9 -0
- package/es/components/dataSourceComponents/fields/Tabs/ReadPretty.js +16 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.d.ts +23 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.js +93 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.less +64 -0
- package/es/components/dataSourceComponents/fields/Tabs/WithMode.d.ts +6 -0
- package/es/components/dataSourceComponents/fields/Tabs/WithMode.js +9 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +12 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.js +18 -0
- package/es/components/dataSourceComponents/fields/Tabs/type.d.ts +38 -0
- package/es/components/dataSourceComponents/fields/Tabs/type.js +1 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +39 -1
- package/es/components/dataSourceComponents/fields/index.js +5 -1
- package/es/components/dataSourceComponents/fields/utils.js +3 -0
- package/es/components/pisellFilter/type.d.ts +4 -2
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +12 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +611 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.less +92 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +55 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +1667 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.js +203 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.less +189 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +37 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.js +341 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.less +89 -0
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +43 -0
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.js +432 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +21 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.js +131 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapDataForm.less +7 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +543 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +162 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +36 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +135 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +149 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +9 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.js +69 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +366 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +239 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.d.ts +48 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.js +195 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.less +19 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.js +85 -0
- package/es/components/pisellFloorMapLayout/components/MapLayer.less +7 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +33 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.js +88 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.less +101 -0
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +16 -0
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +29 -0
- package/es/components/pisellFloorMapLayout/components/index.d.ts +21 -0
- package/es/components/pisellFloorMapLayout/components/index.js +13 -0
- package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +16 -0
- package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.js +21 -0
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +28 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +63 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +561 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.d.ts +21 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.js +122 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +67 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +399 -0
- package/es/components/pisellFloorMapLayout/index.d.ts +15 -0
- package/es/components/pisellFloorMapLayout/index.js +12 -0
- package/es/components/pisellFloorMapLayout/locales.d.ts +192 -0
- package/es/components/pisellFloorMapLayout/locales.js +191 -0
- package/es/components/pisellFloorMapLayout/types.d.ts +586 -0
- package/es/components/pisellFloorMapLayout/types.js +152 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +20 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.js +129 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +87 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.d.ts +9 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +24 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +56 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +22 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +155 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +89 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapStageDefaults.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapStageDefaults.js +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +108 -0
- package/es/components/pisellFloorMapLayout/utils/layoutMeasurements.d.ts +30 -0
- package/es/components/pisellFloorMapLayout/utils/layoutMeasurements.js +125 -0
- package/es/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.d.ts +7 -0
- package/es/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.js +29 -0
- package/es/components/pisellFloorMapLayout/utils/snap.d.ts +10 -0
- package/es/components/pisellFloorMapLayout/utils/snap.js +21 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.js +175 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.less +129 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +10 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.js +237 -0
- package/es/components/pisellHierarchicalSummaryList/components/Row.d.ts +35 -0
- package/es/components/pisellHierarchicalSummaryList/components/Row.js +313 -0
- package/es/components/pisellHierarchicalSummaryList/components/index.d.ts +1 -0
- package/es/components/pisellHierarchicalSummaryList/components/index.js +1 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/index.d.ts +2 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/index.js +1 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +15 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.js +34 -0
- package/es/components/pisellHierarchicalSummaryList/index.d.ts +5 -0
- package/es/components/pisellHierarchicalSummaryList/index.js +5 -0
- package/es/components/pisellHierarchicalSummaryList/types.d.ts +248 -0
- package/es/components/pisellHierarchicalSummaryList/types.js +1 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +2 -1
- package/es/components/pisellRecordBoard/PisellRecordBoard.js +98 -18
- package/es/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +4 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.stories.js +1276 -344
- package/es/components/pisellRecordBoard/index.d.ts +8 -2
- package/es/components/pisellRecordBoard/index.js +4 -2
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +1 -3
- package/es/components/pisellRecordBoard/shellFrame/FloorMap.d.ts +14 -0
- package/es/components/pisellRecordBoard/shellFrame/FloorMap.js +15 -0
- package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +16 -0
- package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.js +11 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +61 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +69 -11
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
- package/es/components/pisellRecordBoard/shellFrame/index.d.ts +6 -10
- package/es/components/pisellRecordBoard/shellFrame/index.js +111 -20
- package/es/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
- package/es/components/pisellRecordBoard/types.d.ts +68 -2
- package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
- package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +57 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +10 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.js +156 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.less +88 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.stories.d.ts +12 -0
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.stories.js +105 -0
- package/es/components/pisellReservationSchedule/index.d.ts +2 -0
- package/es/components/pisellReservationSchedule/index.js +1 -0
- package/es/components/pisellReservationSchedule/locales.d.ts +25 -0
- package/es/components/pisellReservationSchedule/locales.js +24 -0
- package/es/components/pisellReservationSchedule/types.d.ts +42 -0
- package/es/components/pisellReservationSchedule/types.js +1 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +94 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +66 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.js +197 -0
- package/es/components/pisellReservationScheduleBand/index.d.ts +2 -0
- package/es/components/pisellReservationScheduleBand/index.js +1 -0
- package/es/components/pisellReservationScheduleBand/types.d.ts +49 -0
- package/es/components/pisellReservationScheduleBand/types.js +1 -0
- package/es/components/pisellShellFrame/PisellShellFrame.less +11 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +787 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +461 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.stories.js +290 -0
- package/es/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +14 -0
- package/es/components/pisellTimeNavigator/components/BackgroundLayer.js +30 -0
- package/es/components/pisellTimeNavigator/components/CursorLayer.d.ts +25 -0
- package/es/components/pisellTimeNavigator/components/CursorLayer.js +77 -0
- package/es/components/pisellTimeNavigator/components/GestureLayer.d.ts +33 -0
- package/es/components/pisellTimeNavigator/components/GestureLayer.js +91 -0
- package/es/components/pisellTimeNavigator/components/NowButton.d.ts +14 -0
- package/es/components/pisellTimeNavigator/components/NowButton.js +38 -0
- package/es/components/pisellTimeNavigator/components/ScaleLayer.d.ts +22 -0
- package/es/components/pisellTimeNavigator/components/ScaleLayer.js +73 -0
- package/es/components/pisellTimeNavigator/components/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/components/index.js +5 -0
- package/es/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/hooks/index.js +3 -0
- package/es/components/pisellTimeNavigator/hooks/useDragInertia.d.ts +14 -0
- package/es/components/pisellTimeNavigator/hooks/useDragInertia.js +109 -0
- package/es/components/pisellTimeNavigator/hooks/useRealtime.d.ts +5 -0
- package/es/components/pisellTimeNavigator/hooks/useRealtime.js +16 -0
- package/es/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +27 -0
- package/es/components/pisellTimeNavigator/hooks/useTimeAxis.js +76 -0
- package/es/components/pisellTimeNavigator/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/index.js +4 -0
- package/es/components/pisellTimeNavigator/locales.d.ts +22 -0
- package/es/components/pisellTimeNavigator/locales.js +21 -0
- package/es/components/pisellTimeNavigator/types.d.ts +160 -0
- package/es/components/pisellTimeNavigator/types.js +1 -0
- package/es/components/pisellTimeNavigator/utils/index.d.ts +30 -0
- package/es/components/pisellTimeNavigator/utils/index.js +116 -0
- package/es/components/pisellWalletPassCard/index.js +1 -1
- package/es/components/table/index.js +1 -1
- package/es/index.d.ts +49 -33
- package/es/index.js +47 -27
- package/es/locales/en-US.d.ts +2 -0
- package/es/locales/en-US.js +2 -0
- package/es/locales/zh-CN.d.ts +2 -0
- package/es/locales/zh-CN.js +2 -0
- package/es/locales/zh-TW.d.ts +2 -0
- package/es/locales/zh-TW.js +2 -0
- package/lib/components/PisellLayouts/index.d.ts +10 -5
- package/lib/components/PisellLayouts/index.js +15 -1
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.d.ts +13 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.js +229 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.less +19 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/schema-full-example.json +544 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/schema-simple-example.json +174 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/types.d.ts +117 -0
- package/lib/components/dataSourceComponents/dataSourceSubForm/types.js +17 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.d.ts +9 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/ReadPretty.js +64 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/WithMode.js +157 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +12 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.js +40 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/type.d.ts +87 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Tabs/ReadPretty.d.ts +9 -0
- package/lib/components/dataSourceComponents/fields/Tabs/ReadPretty.js +45 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.d.ts +23 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.js +95 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.less +64 -0
- package/lib/components/dataSourceComponents/fields/Tabs/WithMode.d.ts +6 -0
- package/lib/components/dataSourceComponents/fields/Tabs/WithMode.js +39 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +12 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.js +40 -0
- package/lib/components/dataSourceComponents/fields/Tabs/type.d.ts +38 -0
- package/lib/components/dataSourceComponents/fields/Tabs/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +39 -1
- package/lib/components/dataSourceComponents/fields/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/utils.js +3 -0
- package/lib/components/pisellFilter/type.d.ts +4 -2
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +12 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +709 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.less +92 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +55 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +1353 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.js +237 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.less +189 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +37 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.js +358 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.less +89 -0
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +43 -0
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.js +482 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.d.ts +21 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.js +117 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapDataForm.less +7 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +556 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +162 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +36 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +195 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +149 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +9 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.js +94 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +337 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +239 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.d.ts +48 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.js +219 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.less +19 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.js +110 -0
- package/lib/components/pisellFloorMapLayout/components/MapLayer.less +7 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +33 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.js +121 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.less +101 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +16 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +65 -0
- package/lib/components/pisellFloorMapLayout/components/index.d.ts +21 -0
- package/lib/components/pisellFloorMapLayout/components/index.js +56 -0
- package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +16 -0
- package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.js +54 -0
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +47 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +63 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +545 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.d.ts +21 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapPaletteTouchDrag.js +146 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +67 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +382 -0
- package/lib/components/pisellFloorMapLayout/index.d.ts +15 -0
- package/lib/components/pisellFloorMapLayout/index.js +64 -0
- package/lib/components/pisellFloorMapLayout/locales.d.ts +192 -0
- package/lib/components/pisellFloorMapLayout/locales.js +212 -0
- package/lib/components/pisellFloorMapLayout/types.d.ts +586 -0
- package/lib/components/pisellFloorMapLayout/types.js +32 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +20 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.js +126 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +66 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.d.ts +9 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDataRecordLabel.js +44 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +67 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +22 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +139 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +136 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapStageDefaults.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapStageDefaults.js +33 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapViewConfigDiff.js +128 -0
- package/lib/components/pisellFloorMapLayout/utils/layoutMeasurements.d.ts +30 -0
- package/lib/components/pisellFloorMapLayout/utils/layoutMeasurements.js +96 -0
- package/lib/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.d.ts +7 -0
- package/lib/components/pisellFloorMapLayout/utils/mergeCanvasesForTabs.js +41 -0
- package/lib/components/pisellFloorMapLayout/utils/snap.d.ts +10 -0
- package/lib/components/pisellFloorMapLayout/utils/snap.js +43 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.js +179 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.less +129 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +10 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.js +185 -0
- package/lib/components/pisellHierarchicalSummaryList/components/Row.d.ts +35 -0
- package/lib/components/pisellHierarchicalSummaryList/components/Row.js +343 -0
- package/lib/components/pisellHierarchicalSummaryList/components/index.d.ts +1 -0
- package/lib/components/pisellHierarchicalSummaryList/components/index.js +29 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/index.d.ts +2 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/index.js +29 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +15 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.js +49 -0
- package/lib/components/pisellHierarchicalSummaryList/index.d.ts +5 -0
- package/lib/components/pisellHierarchicalSummaryList/index.js +31 -0
- package/lib/components/pisellHierarchicalSummaryList/types.d.ts +248 -0
- package/lib/components/pisellHierarchicalSummaryList/types.js +17 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +2 -1
- package/lib/components/pisellRecordBoard/PisellRecordBoard.js +86 -8
- package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +4 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.js +915 -25
- package/lib/components/pisellRecordBoard/index.d.ts +8 -2
- package/lib/components/pisellRecordBoard/index.js +6 -2
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +8 -2
- package/lib/components/pisellRecordBoard/shellFrame/FloorMap.d.ts +14 -0
- package/lib/components/pisellRecordBoard/shellFrame/FloorMap.js +27 -0
- package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +16 -0
- package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.js +45 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +61 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +60 -8
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
- package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +6 -10
- package/lib/components/pisellRecordBoard/shellFrame/index.js +101 -9
- package/lib/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
- package/lib/components/pisellRecordBoard/types.d.ts +68 -2
- package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.d.ts +15 -0
- package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +88 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +10 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.js +200 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.less +88 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.stories.d.ts +12 -0
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.stories.js +116 -0
- package/lib/components/pisellReservationSchedule/index.d.ts +2 -0
- package/lib/components/pisellReservationSchedule/index.js +29 -0
- package/lib/components/pisellReservationSchedule/locales.d.ts +25 -0
- package/lib/components/pisellReservationSchedule/locales.js +47 -0
- package/lib/components/pisellReservationSchedule/types.d.ts +42 -0
- package/lib/components/pisellReservationSchedule/types.js +17 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +128 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +66 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.js +181 -0
- package/lib/components/pisellReservationScheduleBand/index.d.ts +2 -0
- package/lib/components/pisellReservationScheduleBand/index.js +29 -0
- package/lib/components/pisellReservationScheduleBand/types.d.ts +49 -0
- package/lib/components/pisellReservationScheduleBand/types.js +17 -0
- package/lib/components/pisellShellFrame/PisellShellFrame.less +11 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +901 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +461 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.stories.js +273 -0
- package/lib/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +14 -0
- package/lib/components/pisellTimeNavigator/components/BackgroundLayer.js +78 -0
- package/lib/components/pisellTimeNavigator/components/CursorLayer.d.ts +25 -0
- package/lib/components/pisellTimeNavigator/components/CursorLayer.js +111 -0
- package/lib/components/pisellTimeNavigator/components/GestureLayer.d.ts +33 -0
- package/lib/components/pisellTimeNavigator/components/GestureLayer.js +170 -0
- package/lib/components/pisellTimeNavigator/components/NowButton.d.ts +14 -0
- package/lib/components/pisellTimeNavigator/components/NowButton.js +81 -0
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.d.ts +22 -0
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.js +116 -0
- package/lib/components/pisellTimeNavigator/components/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/components/index.js +41 -0
- package/lib/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/hooks/index.js +35 -0
- package/lib/components/pisellTimeNavigator/hooks/useDragInertia.d.ts +14 -0
- package/lib/components/pisellTimeNavigator/hooks/useDragInertia.js +136 -0
- package/lib/components/pisellTimeNavigator/hooks/useRealtime.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/hooks/useRealtime.js +49 -0
- package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +27 -0
- package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.js +87 -0
- package/lib/components/pisellTimeNavigator/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/index.js +47 -0
- package/lib/components/pisellTimeNavigator/locales.d.ts +22 -0
- package/lib/components/pisellTimeNavigator/locales.js +41 -0
- package/lib/components/pisellTimeNavigator/types.d.ts +160 -0
- package/lib/components/pisellTimeNavigator/types.js +17 -0
- package/lib/components/pisellTimeNavigator/utils/index.d.ts +30 -0
- package/lib/components/pisellTimeNavigator/utils/index.js +107 -0
- package/lib/components/pisellWalletPassCard/index.js +1 -1
- package/lib/components/table/index.js +2 -2
- package/lib/index.d.ts +49 -33
- package/lib/index.js +93 -27
- package/lib/locales/en-US.d.ts +2 -0
- package/lib/locales/en-US.js +2 -0
- package/lib/locales/zh-CN.d.ts +2 -0
- package/lib/locales/zh-CN.js +2 -0
- package/lib/locales/zh-TW.d.ts +2 -0
- package/lib/locales/zh-TW.js +2 -0
- package/lowcode/data-source-form/constants.ts +3 -0
- package/lowcode/data-source-form/utils.ts +31 -5
- package/lowcode/data-source-sub-form/meta.ts +259 -0
- package/lowcode/data-source-sub-form/snippets.ts +21 -0
- package/lowcode/floor-map-image-element/meta.ts +113 -0
- package/lowcode/floor-map-layout-provider/meta.ts +65 -0
- package/lowcode/form-item-record-list-wrapper/meta.ts +180 -0
- package/lowcode/form-item-record-list-wrapper/snippets.ts +18 -0
- package/lowcode/form-item-tabs/meta.ts +172 -0
- package/lowcode/pisell-floor-map-layout/meta.ts +5599 -0
- package/lowcode/pisell-hierarchical-summary-list/meta.ts +240 -0
- package/lowcode/pisell-reservation-schedule/index.ts +3 -0
- package/lowcode/pisell-reservation-schedule/meta.ts +69 -0
- package/lowcode/pisell-reservation-schedule/snippets.ts +1 -0
- package/lowcode/pisell-reservation-schedule-band/index.ts +3 -0
- package/lowcode/pisell-reservation-schedule-band/meta.ts +96 -0
- package/lowcode/pisell-reservation-schedule-band/snippets.ts +1 -0
- package/lowcode/pisell-time-navigator/index.ts +3 -0
- package/lowcode/pisell-time-navigator/meta.ts +298 -0
- package/lowcode/pisell-time-navigator/snippets.ts +1 -0
- package/lowcode/render-figma-style-round-table-card/meta.ts +589 -0
- package/lowcode/render-figma-style-table-card/meta.ts +589 -0
- package/package.json +3 -2
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PisellHierarchicalSummaryList 组件样式
|
|
3
|
+
* 布局与结构在此定义;行内文案/颜色/字重等可由 levelConfig(labelTextStyle / valueTextStyle / metaTextStyle)
|
|
4
|
+
* 通过 Row 内联样式覆盖,便于上层 1:1 复刻设计稿。
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
@prefix: pisell-hierarchical-summary-list;
|
|
8
|
+
|
|
9
|
+
.@{prefix} {
|
|
10
|
+
width: 100%;
|
|
11
|
+
background: #fff;
|
|
12
|
+
padding: 20px;
|
|
13
|
+
|
|
14
|
+
/* 标题栏(L1/L2)上下 20px,展开后下边距 16px,由 Row 内联 style 控制 */
|
|
15
|
+
|
|
16
|
+
&-node {
|
|
17
|
+
&:first-child {
|
|
18
|
+
margin-top: 0 !important;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&-row {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
gap: 8px;
|
|
27
|
+
width: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&-row-expandable {
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&-row-left {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: 8px;
|
|
38
|
+
min-width: 0;
|
|
39
|
+
flex: 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* 默认样式,可由 levelConfig.labelTextStyle 覆盖;flex: 0 0 auto 使 itemsCount 紧挨标题左侧而非靠右 */
|
|
43
|
+
|
|
44
|
+
&-row-label {
|
|
45
|
+
flex: 0 0 auto;
|
|
46
|
+
min-width: 0;
|
|
47
|
+
color: #1b1b1b;
|
|
48
|
+
font-size: 16px;
|
|
49
|
+
line-height: 24px;
|
|
50
|
+
font-weight: 700;
|
|
51
|
+
white-space: normal;
|
|
52
|
+
word-break: break-word;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&-row-meta {
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: 4px;
|
|
59
|
+
flex-shrink: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* 默认样式,可由 levelConfig.metaTextStyle 覆盖;itemsCount 等 meta 文案颜色 #667085 */
|
|
63
|
+
|
|
64
|
+
&-row-dot,
|
|
65
|
+
&-row-items-count,
|
|
66
|
+
&-row-info {
|
|
67
|
+
color: #667085;
|
|
68
|
+
font-size: 16px;
|
|
69
|
+
line-height: 24px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&-row-items-count {
|
|
73
|
+
font-weight: 400;
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* 子项列表左侧圆点(level 3+),颜色与 meta 一致 */
|
|
78
|
+
|
|
79
|
+
&-row-bullet {
|
|
80
|
+
display: inline-flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: center;
|
|
83
|
+
flex-shrink: 0;
|
|
84
|
+
line-height: 24px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&-row-info {
|
|
88
|
+
display: inline-flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
justify-content: center;
|
|
91
|
+
line-height: 1;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&-row-right {
|
|
95
|
+
display: inline-flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: flex-end;
|
|
98
|
+
gap: 6px;
|
|
99
|
+
flex-shrink: 0;
|
|
100
|
+
white-space: nowrap;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* 默认样式,可由 levelConfig.valueTextStyle 覆盖 */
|
|
104
|
+
|
|
105
|
+
&-row-value {
|
|
106
|
+
color: #1b1b1b;
|
|
107
|
+
font-size: 16px;
|
|
108
|
+
line-height: 24px;
|
|
109
|
+
font-weight: 700;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&-row-extra {
|
|
113
|
+
display: inline-flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&-row-expand-icon {
|
|
118
|
+
display: inline-flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
justify-content: center;
|
|
121
|
+
width: 24px;
|
|
122
|
+
height: 24px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&-children {
|
|
126
|
+
width: 100%;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { PisellHierarchicalSummaryList } from './PisellHierarchicalSummaryList';
|
|
3
|
+
declare const meta: Meta<typeof PisellHierarchicalSummaryList>;
|
|
4
|
+
export default meta;
|
|
5
|
+
declare type Story = StoryObj<typeof PisellHierarchicalSummaryList>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Accordion: Story;
|
|
8
|
+
export declare const MaxExpandLevel: Story;
|
|
9
|
+
export declare const AggregateSum: Story;
|
|
10
|
+
export declare const FullFeatured: Story;
|
|
@@ -0,0 +1,185 @@
|
|
|
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/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.tsx
|
|
30
|
+
var PisellHierarchicalSummaryList_stories_exports = {};
|
|
31
|
+
__export(PisellHierarchicalSummaryList_stories_exports, {
|
|
32
|
+
Accordion: () => Accordion,
|
|
33
|
+
AggregateSum: () => AggregateSum,
|
|
34
|
+
Default: () => Default,
|
|
35
|
+
FullFeatured: () => FullFeatured,
|
|
36
|
+
MaxExpandLevel: () => MaxExpandLevel,
|
|
37
|
+
default: () => PisellHierarchicalSummaryList_stories_default
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(PisellHierarchicalSummaryList_stories_exports);
|
|
40
|
+
var import_react = __toESM(require("react"));
|
|
41
|
+
var import_PisellHierarchicalSummaryList = require("./PisellHierarchicalSummaryList");
|
|
42
|
+
var demoItems = [
|
|
43
|
+
{
|
|
44
|
+
key: "l1",
|
|
45
|
+
label: "Label",
|
|
46
|
+
value: /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#1570EF" } }, "Value"),
|
|
47
|
+
children: [
|
|
48
|
+
{
|
|
49
|
+
key: "l2",
|
|
50
|
+
label: "Label",
|
|
51
|
+
value: "Value",
|
|
52
|
+
children: [
|
|
53
|
+
{ key: "l3-1", label: "Label", itemsCount: "N items", value: "Value" },
|
|
54
|
+
{ key: "l3-2", label: "Label", infoTooltip: "Tooltip", value: "Value" },
|
|
55
|
+
{ key: "l3-3", label: "Label", value: "Value" },
|
|
56
|
+
{
|
|
57
|
+
key: "l3-4",
|
|
58
|
+
label: "Label",
|
|
59
|
+
itemsCount: "2 items",
|
|
60
|
+
value: "Value",
|
|
61
|
+
children: [
|
|
62
|
+
{ key: "l4-1", label: /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#667085" } }, "• Label"), value: /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#667085" } }, "Value") },
|
|
63
|
+
{ key: "l4-2", label: /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#667085" } }, "• Label"), value: /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#667085" } }, "Value") }
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
];
|
|
71
|
+
var meta = {
|
|
72
|
+
title: "Data Display/PisellHierarchicalSummaryList",
|
|
73
|
+
component: import_PisellHierarchicalSummaryList.PisellHierarchicalSummaryList,
|
|
74
|
+
tags: ["autodocs"],
|
|
75
|
+
argTypes: {
|
|
76
|
+
defaultExpandedLevel: { control: "number", description: "默认展开层级(非受控初始化)" },
|
|
77
|
+
accordion: { control: "boolean", description: "手风琴模式(同级仅一个展开)" },
|
|
78
|
+
maxRenderLevel: { control: "number", description: "最大渲染层级" },
|
|
79
|
+
maxExpandLevel: { control: "number", description: "最大可展开层级" },
|
|
80
|
+
indent: { control: "number", description: "缩进(px)" },
|
|
81
|
+
rowGap: { control: "number", description: "行间距(px)" }
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
var PisellHierarchicalSummaryList_stories_default = meta;
|
|
85
|
+
var Default = {
|
|
86
|
+
args: {
|
|
87
|
+
items: demoItems,
|
|
88
|
+
defaultExpandedLevel: 2
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
var Accordion = {
|
|
92
|
+
args: {
|
|
93
|
+
items: demoItems,
|
|
94
|
+
defaultExpandedLevel: 3,
|
|
95
|
+
accordion: true
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
var MaxExpandLevel = {
|
|
99
|
+
args: {
|
|
100
|
+
items: demoItems,
|
|
101
|
+
defaultExpandedLevel: 5,
|
|
102
|
+
maxExpandLevel: 2
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
var AggregateSum = {
|
|
106
|
+
args: {
|
|
107
|
+
items: [
|
|
108
|
+
{
|
|
109
|
+
key: "sum-root",
|
|
110
|
+
label: "Total",
|
|
111
|
+
children: [
|
|
112
|
+
{ key: "a", label: "A", value: 10 },
|
|
113
|
+
{ key: "b", label: "B", value: 20 },
|
|
114
|
+
{ key: "c", label: "C", value: 5, children: [{ key: "c-1", label: "C-1", value: 2 }] }
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
defaultExpandedLevel: 2,
|
|
119
|
+
aggregate: {
|
|
120
|
+
mode: "sum",
|
|
121
|
+
format: (sum) => `$${sum}`
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
var FullFeatured = {
|
|
126
|
+
args: {
|
|
127
|
+
items: demoItems,
|
|
128
|
+
defaultExpandedLevel: 3,
|
|
129
|
+
accordion: false,
|
|
130
|
+
maxRenderLevel: 4,
|
|
131
|
+
maxExpandLevel: 3,
|
|
132
|
+
indent: 16,
|
|
133
|
+
rowGap: 8,
|
|
134
|
+
levelConfig: {
|
|
135
|
+
1: {
|
|
136
|
+
rowStyle: { background: "#F5F5F5", padding: "8px 12px", borderRadius: 8 },
|
|
137
|
+
labelTextStyle: { fontWeight: 700 },
|
|
138
|
+
valueTextStyle: { color: "#1570EF", fontWeight: 700 }
|
|
139
|
+
},
|
|
140
|
+
2: {
|
|
141
|
+
rowStyle: { padding: "4px 8px" },
|
|
142
|
+
labelTextStyle: { fontWeight: 600 },
|
|
143
|
+
showDotSeparator: true
|
|
144
|
+
},
|
|
145
|
+
3: {
|
|
146
|
+
rowStyle: { padding: "2px 8px" },
|
|
147
|
+
labelTextStyle: { color: "#1B1B1B", fontWeight: 500 },
|
|
148
|
+
valueTextStyle: { color: "#1B1B1B", fontWeight: 500 }
|
|
149
|
+
},
|
|
150
|
+
4: {
|
|
151
|
+
rowStyle: { paddingLeft: 0 },
|
|
152
|
+
labelTextStyle: { color: "#667085", fontWeight: 400 },
|
|
153
|
+
valueTextStyle: { color: "#667085", fontWeight: 400 }
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
aggregate: {
|
|
157
|
+
mode: "sum",
|
|
158
|
+
getNumberValue: (item) => {
|
|
159
|
+
if (typeof item.value === "number") return item.value;
|
|
160
|
+
return null;
|
|
161
|
+
},
|
|
162
|
+
format: (sum, { level }) => level === 1 ? `Total $${sum}` : `$${sum}`
|
|
163
|
+
},
|
|
164
|
+
renderLabel: (item, ctx) => {
|
|
165
|
+
if (ctx.level === 1) {
|
|
166
|
+
return /* @__PURE__ */ import_react.default.createElement("span", null, item.label, " ", item.itemsCount ? /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#667085", marginLeft: 4 } }, item.itemsCount) : null);
|
|
167
|
+
}
|
|
168
|
+
return item.label;
|
|
169
|
+
},
|
|
170
|
+
renderValue: (item, ctx) => {
|
|
171
|
+
if (ctx.aggregatedValue !== void 0) {
|
|
172
|
+
return ctx.aggregatedValue;
|
|
173
|
+
}
|
|
174
|
+
return item.value ?? "—";
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
179
|
+
0 && (module.exports = {
|
|
180
|
+
Accordion,
|
|
181
|
+
AggregateSum,
|
|
182
|
+
Default,
|
|
183
|
+
FullFeatured,
|
|
184
|
+
MaxExpandLevel
|
|
185
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PisellHierarchicalSummaryListAggregateConfig, PisellHierarchicalSummaryListItem, PisellHierarchicalSummaryListKey, PisellHierarchicalSummaryListLevelConfig, PisellHierarchicalSummaryListRenderContext } from '../types';
|
|
3
|
+
export interface RowProps {
|
|
4
|
+
prefixCls: string;
|
|
5
|
+
item: PisellHierarchicalSummaryListItem;
|
|
6
|
+
level: number;
|
|
7
|
+
index: number;
|
|
8
|
+
parentPathKeys: PisellHierarchicalSummaryListKey[];
|
|
9
|
+
expandedKeySet: ReadonlySet<PisellHierarchicalSummaryListKey>;
|
|
10
|
+
toggleExpanded: (key: PisellHierarchicalSummaryListKey, options?: {
|
|
11
|
+
siblingKeys?: PisellHierarchicalSummaryListKey[];
|
|
12
|
+
}) => void;
|
|
13
|
+
getKey: (item: PisellHierarchicalSummaryListItem, ctx: {
|
|
14
|
+
level: number;
|
|
15
|
+
index: number;
|
|
16
|
+
parentPathKeys: PisellHierarchicalSummaryListKey[];
|
|
17
|
+
}) => PisellHierarchicalSummaryListKey;
|
|
18
|
+
levelConfig?: Record<number, PisellHierarchicalSummaryListLevelConfig>;
|
|
19
|
+
indent: number;
|
|
20
|
+
rowGap: number;
|
|
21
|
+
gaps?: {
|
|
22
|
+
row?: number;
|
|
23
|
+
rowLeft?: number;
|
|
24
|
+
meta?: number;
|
|
25
|
+
rowRight?: number;
|
|
26
|
+
};
|
|
27
|
+
maxRenderLevel?: number;
|
|
28
|
+
maxExpandLevel?: number;
|
|
29
|
+
aggregate?: PisellHierarchicalSummaryListAggregateConfig;
|
|
30
|
+
renderLabel?: (item: PisellHierarchicalSummaryListItem, ctx: PisellHierarchicalSummaryListRenderContext) => React.ReactNode;
|
|
31
|
+
renderValue?: (item: PisellHierarchicalSummaryListItem, ctx: PisellHierarchicalSummaryListRenderContext) => React.ReactNode;
|
|
32
|
+
/** 父行是否带有 itemsCount(仅此类子项显示圆点 + #667085,其他保持黑色) */
|
|
33
|
+
parentHasItemsCount?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare const Row: React.FC<RowProps>;
|
|
@@ -0,0 +1,343 @@
|
|
|
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/pisellHierarchicalSummaryList/components/Row.tsx
|
|
30
|
+
var Row_exports = {};
|
|
31
|
+
__export(Row_exports, {
|
|
32
|
+
Row: () => Row
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Row_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_icons = require("@ant-design/icons");
|
|
38
|
+
var import_classnames = __toESM(require("classnames"));
|
|
39
|
+
function getLevelCfg(levelConfig, level) {
|
|
40
|
+
for (let lv = level; lv >= 1; lv--) {
|
|
41
|
+
const cfg = levelConfig == null ? void 0 : levelConfig[lv];
|
|
42
|
+
if (cfg) return cfg;
|
|
43
|
+
}
|
|
44
|
+
return void 0;
|
|
45
|
+
}
|
|
46
|
+
function normalizeChildren(children) {
|
|
47
|
+
if (!(children == null ? void 0 : children.length)) return [];
|
|
48
|
+
return children.filter((c) => !c.hidden).slice().sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
|
49
|
+
}
|
|
50
|
+
function defaultGetNumberValue(item) {
|
|
51
|
+
return typeof item.value === "number" ? item.value : null;
|
|
52
|
+
}
|
|
53
|
+
function aggregateSum(item, getNumberValue) {
|
|
54
|
+
var _a;
|
|
55
|
+
const children = normalizeChildren(item.children);
|
|
56
|
+
if (!children.length) return 0;
|
|
57
|
+
let sum = 0;
|
|
58
|
+
for (const child of children) {
|
|
59
|
+
const self = getNumberValue(child);
|
|
60
|
+
if (typeof self === "number" && !Number.isNaN(self)) {
|
|
61
|
+
sum += self;
|
|
62
|
+
}
|
|
63
|
+
if ((_a = child.children) == null ? void 0 : _a.length) {
|
|
64
|
+
sum += aggregateSum(child, getNumberValue);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return sum;
|
|
68
|
+
}
|
|
69
|
+
var Row = import_react.default.memo((props) => {
|
|
70
|
+
var _a, _b, _c;
|
|
71
|
+
const {
|
|
72
|
+
prefixCls,
|
|
73
|
+
item,
|
|
74
|
+
level,
|
|
75
|
+
index,
|
|
76
|
+
parentPathKeys,
|
|
77
|
+
expandedKeySet,
|
|
78
|
+
toggleExpanded,
|
|
79
|
+
getKey,
|
|
80
|
+
levelConfig,
|
|
81
|
+
indent,
|
|
82
|
+
rowGap,
|
|
83
|
+
gaps,
|
|
84
|
+
maxRenderLevel,
|
|
85
|
+
maxExpandLevel,
|
|
86
|
+
aggregate,
|
|
87
|
+
renderLabel,
|
|
88
|
+
renderValue,
|
|
89
|
+
parentHasItemsCount = false
|
|
90
|
+
} = props;
|
|
91
|
+
const key = (0, import_react.useMemo)(
|
|
92
|
+
() => item.key ?? getKey(item, { level, index, parentPathKeys }),
|
|
93
|
+
[getKey, index, item, level, parentPathKeys]
|
|
94
|
+
);
|
|
95
|
+
const pathKeys = (0, import_react.useMemo)(
|
|
96
|
+
() => [...parentPathKeys, key],
|
|
97
|
+
[parentPathKeys, key]
|
|
98
|
+
);
|
|
99
|
+
const children = (0, import_react.useMemo)(
|
|
100
|
+
() => normalizeChildren(item.children),
|
|
101
|
+
[item.children]
|
|
102
|
+
);
|
|
103
|
+
const hasExpandedContent = item.expandedContent != null;
|
|
104
|
+
const canRenderChildren = maxRenderLevel ? level < maxRenderLevel : true;
|
|
105
|
+
const hasChildren = canRenderChildren && children.length > 0 || hasExpandedContent;
|
|
106
|
+
const canExpand = hasChildren && (maxExpandLevel ? level < maxExpandLevel : true);
|
|
107
|
+
const expanded = canExpand && expandedKeySet.has(key);
|
|
108
|
+
const cfg = getLevelCfg(levelConfig, level);
|
|
109
|
+
const nextIndent = (cfg == null ? void 0 : cfg.indent) ?? indent;
|
|
110
|
+
const rowStyleMerged = {
|
|
111
|
+
...cfg == null ? void 0 : cfg.rowStyle,
|
|
112
|
+
...item.rowStyle
|
|
113
|
+
};
|
|
114
|
+
if (level === 1) {
|
|
115
|
+
rowStyleMerged.paddingTop = 20;
|
|
116
|
+
rowStyleMerged.paddingBottom = 20;
|
|
117
|
+
}
|
|
118
|
+
if (level === 2) {
|
|
119
|
+
rowStyleMerged.paddingTop = 20;
|
|
120
|
+
rowStyleMerged.paddingBottom = expanded ? 16 : 20;
|
|
121
|
+
}
|
|
122
|
+
const aggregatedValue = (0, import_react.useMemo)(() => {
|
|
123
|
+
if (item.value !== void 0) return void 0;
|
|
124
|
+
if (!aggregate || (aggregate.mode ?? "none") === "none") return void 0;
|
|
125
|
+
if ((aggregate.mode ?? "none") !== "sum") return void 0;
|
|
126
|
+
const sum = aggregateSum(
|
|
127
|
+
item,
|
|
128
|
+
aggregate.getNumberValue ?? defaultGetNumberValue
|
|
129
|
+
);
|
|
130
|
+
return aggregate.format ? aggregate.format(sum, { item, level }) : sum;
|
|
131
|
+
}, [aggregate, item, level]);
|
|
132
|
+
const ctx = (0, import_react.useMemo)(
|
|
133
|
+
() => ({
|
|
134
|
+
level,
|
|
135
|
+
pathKeys,
|
|
136
|
+
expanded,
|
|
137
|
+
hasChildren,
|
|
138
|
+
aggregatedValue
|
|
139
|
+
}),
|
|
140
|
+
[aggregatedValue, expanded, hasChildren, level, pathKeys]
|
|
141
|
+
);
|
|
142
|
+
const siblingKeys = (0, import_react.useMemo)(
|
|
143
|
+
() => hasExpandedContent ? [] : children.map(
|
|
144
|
+
(c, i) => c.key ?? getKey(c, {
|
|
145
|
+
level: level + 1,
|
|
146
|
+
index: i,
|
|
147
|
+
parentPathKeys: pathKeys
|
|
148
|
+
})
|
|
149
|
+
),
|
|
150
|
+
[children, getKey, hasExpandedContent, level, pathKeys]
|
|
151
|
+
);
|
|
152
|
+
const onToggle = (0, import_react.useCallback)(() => {
|
|
153
|
+
if (!canExpand) return;
|
|
154
|
+
toggleExpanded(key, { siblingKeys });
|
|
155
|
+
}, [canExpand, key, siblingKeys, toggleExpanded]);
|
|
156
|
+
const left = renderLabel ? renderLabel(item, ctx) : item.label;
|
|
157
|
+
const right = renderValue ? renderValue(item, ctx) : aggregatedValue ?? item.value;
|
|
158
|
+
const showDotSeparator = (cfg == null ? void 0 : cfg.showDotSeparator) ?? true;
|
|
159
|
+
const showItemsCount = item.itemsCount !== void 0 && item.itemsCount !== null;
|
|
160
|
+
const showInfo = item.infoTooltip !== void 0 && item.infoTooltip !== null;
|
|
161
|
+
const metaStyle = cfg == null ? void 0 : cfg.metaTextStyle;
|
|
162
|
+
const infoIconStyleObj = (cfg == null ? void 0 : cfg.infoIconStyle) != null ? {
|
|
163
|
+
fontSize: cfg.infoIconStyle.size,
|
|
164
|
+
color: cfg.infoIconStyle.color,
|
|
165
|
+
width: cfg.infoIconStyle.width ?? cfg.infoIconStyle.size ?? 16,
|
|
166
|
+
height: cfg.infoIconStyle.height ?? cfg.infoIconStyle.size ?? 16,
|
|
167
|
+
display: "inline-flex",
|
|
168
|
+
alignItems: "center",
|
|
169
|
+
justifyContent: "center"
|
|
170
|
+
} : showInfo ? {
|
|
171
|
+
fontSize: 16,
|
|
172
|
+
width: 16,
|
|
173
|
+
height: 16,
|
|
174
|
+
display: "inline-flex",
|
|
175
|
+
alignItems: "center",
|
|
176
|
+
justifyContent: "center"
|
|
177
|
+
} : void 0;
|
|
178
|
+
const leftMeta = (showItemsCount || showInfo) && /* @__PURE__ */ import_react.default.createElement(
|
|
179
|
+
"span",
|
|
180
|
+
{
|
|
181
|
+
className: `${prefixCls}-row-meta`,
|
|
182
|
+
style: {
|
|
183
|
+
...metaStyle,
|
|
184
|
+
...(gaps == null ? void 0 : gaps.meta) !== void 0 ? { gap: gaps.meta } : void 0
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
showItemsCount ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-row-items-count`, style: metaStyle }, item.itemsCount) : null,
|
|
188
|
+
showInfo ? /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: item.infoTooltip }, /* @__PURE__ */ import_react.default.createElement(
|
|
189
|
+
"span",
|
|
190
|
+
{
|
|
191
|
+
className: `${prefixCls}-row-info`,
|
|
192
|
+
"aria-label": "info",
|
|
193
|
+
style: infoIconStyleObj
|
|
194
|
+
},
|
|
195
|
+
/* @__PURE__ */ import_react.default.createElement(import_icons.QuestionCircleOutlined, null)
|
|
196
|
+
)) : null
|
|
197
|
+
);
|
|
198
|
+
const isTitleRow = level <= 2;
|
|
199
|
+
const nodeStyle = {
|
|
200
|
+
...isTitleRow ? expanded ? { paddingBottom: 20 } : {} : { marginTop: rowGap },
|
|
201
|
+
...level === 2 ? { paddingLeft: 20, paddingRight: 20 } : {},
|
|
202
|
+
...level === 2 && ((_a = cfg == null ? void 0 : cfg.divider) == null ? void 0 : _a.show) ? {
|
|
203
|
+
borderTop: `1px ${cfg.divider.style ?? "solid"} ${cfg.divider.color ?? "#D0D5DD"}`
|
|
204
|
+
} : {}
|
|
205
|
+
};
|
|
206
|
+
const isGroupOnly = hasChildren && (item.label === "" || item.label === null || item.label === void 0) && item.value === void 0;
|
|
207
|
+
if (isGroupOnly) {
|
|
208
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, children.map((child, childIndex) => /* @__PURE__ */ import_react.default.createElement(
|
|
209
|
+
Row,
|
|
210
|
+
{
|
|
211
|
+
key: child.key ?? getKey(child, {
|
|
212
|
+
level,
|
|
213
|
+
index: childIndex,
|
|
214
|
+
parentPathKeys: pathKeys
|
|
215
|
+
}),
|
|
216
|
+
...props,
|
|
217
|
+
item: child,
|
|
218
|
+
level,
|
|
219
|
+
index: childIndex,
|
|
220
|
+
parentPathKeys: pathKeys
|
|
221
|
+
}
|
|
222
|
+
)));
|
|
223
|
+
}
|
|
224
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-node`, style: nodeStyle }, /* @__PURE__ */ import_react.default.createElement(
|
|
225
|
+
"div",
|
|
226
|
+
{
|
|
227
|
+
className: (0, import_classnames.default)(
|
|
228
|
+
`${prefixCls}-row`,
|
|
229
|
+
cfg == null ? void 0 : cfg.rowClassName,
|
|
230
|
+
item.rowClassName,
|
|
231
|
+
{
|
|
232
|
+
[`${prefixCls}-row-expandable`]: canExpand,
|
|
233
|
+
[`${prefixCls}-row-expanded`]: expanded
|
|
234
|
+
}
|
|
235
|
+
),
|
|
236
|
+
style: {
|
|
237
|
+
...rowStyleMerged,
|
|
238
|
+
...(gaps == null ? void 0 : gaps.row) !== void 0 ? { gap: gaps.row } : void 0
|
|
239
|
+
},
|
|
240
|
+
onClick: onToggle,
|
|
241
|
+
role: canExpand ? "button" : void 0,
|
|
242
|
+
tabIndex: canExpand ? 0 : void 0,
|
|
243
|
+
onKeyDown: (e) => {
|
|
244
|
+
if (!canExpand) return;
|
|
245
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
246
|
+
e.preventDefault();
|
|
247
|
+
onToggle();
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
252
|
+
"div",
|
|
253
|
+
{
|
|
254
|
+
className: `${prefixCls}-row-left`,
|
|
255
|
+
style: (gaps == null ? void 0 : gaps.rowLeft) !== void 0 ? { gap: gaps.rowLeft } : void 0
|
|
256
|
+
},
|
|
257
|
+
parentHasItemsCount && !showItemsCount ? /* @__PURE__ */ import_react.default.createElement(
|
|
258
|
+
"span",
|
|
259
|
+
{
|
|
260
|
+
className: `${prefixCls}-row-bullet`,
|
|
261
|
+
style: { color: "#667085", flexShrink: 0 },
|
|
262
|
+
"aria-hidden": true
|
|
263
|
+
},
|
|
264
|
+
"•"
|
|
265
|
+
) : null,
|
|
266
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
267
|
+
"span",
|
|
268
|
+
{
|
|
269
|
+
className: `${prefixCls}-row-label`,
|
|
270
|
+
style: parentHasItemsCount ? { ...cfg == null ? void 0 : cfg.labelTextStyle, color: "#667085", fontWeight: 400 } : cfg == null ? void 0 : cfg.labelTextStyle,
|
|
271
|
+
title: typeof item.label === "string" ? item.label : void 0
|
|
272
|
+
},
|
|
273
|
+
left
|
|
274
|
+
),
|
|
275
|
+
leftMeta,
|
|
276
|
+
/* @__PURE__ */ import_react.default.createElement("span", { style: { flex: 1, minWidth: 0 }, "aria-hidden": true })
|
|
277
|
+
),
|
|
278
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
279
|
+
"div",
|
|
280
|
+
{
|
|
281
|
+
className: `${prefixCls}-row-right`,
|
|
282
|
+
style: (gaps == null ? void 0 : gaps.rowRight) !== void 0 ? { gap: gaps.rowRight } : void 0
|
|
283
|
+
},
|
|
284
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
285
|
+
"span",
|
|
286
|
+
{
|
|
287
|
+
className: `${prefixCls}-row-value`,
|
|
288
|
+
style: parentHasItemsCount ? { ...cfg == null ? void 0 : cfg.valueTextStyle, color: "#667085", fontWeight: 400 } : cfg == null ? void 0 : cfg.valueTextStyle
|
|
289
|
+
},
|
|
290
|
+
right
|
|
291
|
+
),
|
|
292
|
+
item.extra ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-row-extra` }, item.extra) : null,
|
|
293
|
+
canExpand ? /* @__PURE__ */ import_react.default.createElement(
|
|
294
|
+
"span",
|
|
295
|
+
{
|
|
296
|
+
className: `${prefixCls}-row-expand-icon`,
|
|
297
|
+
"aria-label": expanded ? "collapse" : "expand",
|
|
298
|
+
style: (cfg == null ? void 0 : cfg.expandIconStyle) ? {
|
|
299
|
+
width: cfg.expandIconStyle.width ?? cfg.expandIconStyle.size ?? 24,
|
|
300
|
+
height: cfg.expandIconStyle.height ?? cfg.expandIconStyle.size ?? 24
|
|
301
|
+
} : void 0
|
|
302
|
+
},
|
|
303
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
304
|
+
import_icons.UpOutlined,
|
|
305
|
+
{
|
|
306
|
+
style: {
|
|
307
|
+
transform: expanded ? "rotate(0deg)" : "rotate(180deg)",
|
|
308
|
+
...((_b = cfg == null ? void 0 : cfg.expandIconStyle) == null ? void 0 : _b.color) ? { color: cfg.expandIconStyle.color } : null,
|
|
309
|
+
...((_c = cfg == null ? void 0 : cfg.expandIconStyle) == null ? void 0 : _c.size) ? { fontSize: cfg.expandIconStyle.size } : null
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
)
|
|
313
|
+
) : null
|
|
314
|
+
)
|
|
315
|
+
), hasChildren && expanded ? /* @__PURE__ */ import_react.default.createElement(
|
|
316
|
+
"div",
|
|
317
|
+
{
|
|
318
|
+
className: `${prefixCls}-children`,
|
|
319
|
+
style: { paddingLeft: 0, marginTop: 8 }
|
|
320
|
+
},
|
|
321
|
+
hasExpandedContent ? item.expandedContent : children.map((child, childIndex) => /* @__PURE__ */ import_react.default.createElement(
|
|
322
|
+
Row,
|
|
323
|
+
{
|
|
324
|
+
key: child.key ?? getKey(child, {
|
|
325
|
+
level: level + 1,
|
|
326
|
+
index: childIndex,
|
|
327
|
+
parentPathKeys: pathKeys
|
|
328
|
+
}),
|
|
329
|
+
...props,
|
|
330
|
+
item: child,
|
|
331
|
+
level: level + 1,
|
|
332
|
+
index: childIndex,
|
|
333
|
+
parentPathKeys: pathKeys,
|
|
334
|
+
parentHasItemsCount: showItemsCount || parentHasItemsCount
|
|
335
|
+
}
|
|
336
|
+
))
|
|
337
|
+
) : null);
|
|
338
|
+
});
|
|
339
|
+
Row.displayName = "PisellHierarchicalSummaryListRow";
|
|
340
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
341
|
+
0 && (module.exports = {
|
|
342
|
+
Row
|
|
343
|
+
});
|