coolcare-lite-scada-component 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/es/app.js +52 -0
- package/es/componentIndex.js +7 -0
- package/es/components/BoxShadowPicker/index.css +22 -0
- package/es/components/BoxShadowPicker/index.js +114 -0
- package/es/components/BoxShadowPicker/index.less.d.ts +9 -0
- package/es/components/Button/index.js +6 -0
- package/es/components/ColorPalette/index.js +12 -0
- package/es/components/ColorPicker/index.css +38 -0
- package/es/components/ColorPicker/index.js +103 -0
- package/es/components/ColorPicker/util.js +31 -0
- package/es/components/DeviceSelect/DeviceTable.js +320 -0
- package/es/components/DeviceSelect/index.css +6 -0
- package/es/components/DeviceSelect/index.js +112 -0
- package/es/components/DialogExpression/ImagePicker/index.css +13 -0
- package/es/components/DialogExpression/ImagePicker/index.js +44 -0
- package/es/components/DialogExpression/index.css +9 -0
- package/es/components/DialogExpression/index.js +270 -0
- package/es/components/DialogHistory/index.css +10 -0
- package/es/components/DialogHistory/index.js +383 -0
- package/es/components/DialogIconPicker/data.js +179 -0
- package/es/components/DialogIconPicker/index.css +30 -0
- package/es/components/DialogIconPicker/index.js +101 -0
- package/es/components/DialogImagePicker/Gallery/index.css +0 -0
- package/es/components/DialogImagePicker/Gallery/index.js +96 -0
- package/es/components/DialogImagePicker/GroupPanel/index.css +3 -0
- package/es/components/DialogImagePicker/GroupPanel/index.js +89 -0
- package/es/components/DialogImagePicker/index.css +25 -0
- package/es/components/DialogImagePicker/index.js +85 -0
- package/es/components/DialogPointWrite/PointItem.js +91 -0
- package/es/components/DialogPointWrite/index.js +124 -0
- package/es/components/ECharts/index.css +5 -0
- package/es/components/ECharts/index.js +94 -0
- package/es/components/ExpressionFormat/index.css +22 -0
- package/es/components/ExpressionFormat/index.js +50 -0
- package/es/components/FontFamilySelect/index.js +25 -0
- package/es/components/FontFamilySelect/list.js +2194 -0
- package/es/components/FontStyleForm/index.css +3 -0
- package/es/components/FontStyleForm/index.js +170 -0
- package/es/components/FormBindPoint/FreedomScene.js +207 -0
- package/es/components/FormBindPoint/ProductionOrDeviceScene.js +172 -0
- package/es/components/FormBindPoint/index.css +0 -0
- package/es/components/FormBindPoint/index.js +17 -0
- package/es/components/FormIconSelect/index.js +62 -0
- package/es/components/FormNodeData/index.js +82 -0
- package/es/components/FormNodeData/utils/valueUtil.js +8 -0
- package/es/components/Icon/index.js +6 -0
- package/es/components/ImageUploader/index.js +172 -0
- package/es/components/LockBtn/index.css +4 -0
- package/es/components/LockBtn/index.js +45 -0
- package/es/components/Margin_Padding/index.css +3 -0
- package/es/components/Margin_Padding/index.js +155 -0
- package/es/components/MouseTooltip/index.css +7 -0
- package/es/components/MouseTooltip/index.js +57 -0
- package/es/components/NeedBindPointHint/index.css +12 -0
- package/es/components/NeedBindPointHint/index.js +15 -0
- package/es/components/PaddingPicker/index.css +22 -0
- package/es/components/PaddingPicker/index.js +95 -0
- package/es/components/PageLoading/index.css +29 -0
- package/es/components/PageLoading/index.js +30 -0
- package/es/components/PointEnumNameFormat/index.css +4 -0
- package/es/components/PointEnumNameFormat/index.js +9 -0
- package/es/components/PointInfoTip/index.css +3 -0
- package/es/components/PointInfoTip/index.js +193 -0
- package/es/components/PointSelect/DevicePointTable.js +128 -0
- package/es/components/PointSelect/ProductPointTable.js +98 -0
- package/es/components/PointSelect/index.css +9 -0
- package/es/components/PointSelect/index.js +278 -0
- package/es/components/Prompt/index.js +126 -0
- package/es/components/SliderWithInput/index.css +11 -0
- package/es/components/SliderWithInput/index.js +67 -0
- package/es/components/Switch/index.js +69 -0
- package/es/components/TranslateButton/index.js +26 -0
- package/es/constant.js +16 -0
- package/es/edge/EdgeLinePort/PropsSet/Flow.js +173 -0
- package/es/edge/EdgeLinePort/PropsSet/Line.js +73 -0
- package/es/edge/EdgeLinePort/PropsSet/Marker.js +81 -0
- package/es/edge/EdgeLinePort/PropsSet/index.js +25 -0
- package/es/edge/EdgeLinePort/index.js +91 -0
- package/es/edge/EdgePipe/PropsSet/Flow.js +173 -0
- package/es/edge/EdgePipe/PropsSet/Pipe.js +73 -0
- package/es/edge/EdgePipe/PropsSet/index.js +34 -0
- package/es/edge/EdgePipe/index.css +10 -0
- package/es/edge/EdgePipe/index.js +181 -0
- package/es/edge/register.js +6 -0
- package/es/element/BasicShape/Circle/index.js +81 -0
- package/es/element/BasicShape/CommentBox/index.js +77 -0
- package/es/element/BasicShape/CommentBox2/index.js +78 -0
- package/es/element/BasicShape/Ellipse/index.js +80 -0
- package/es/element/BasicShape/Heart/index.js +75 -0
- package/es/element/BasicShape/Lightning/index.js +75 -0
- package/es/element/BasicShape/PropsForm/index.css +0 -0
- package/es/element/BasicShape/PropsForm/index.js +80 -0
- package/es/element/BasicShape/Rectangle/index.js +78 -0
- package/es/element/BasicShape/Star/index.js +75 -0
- package/es/element/BorderBox/BorderBox1/Component.js +74 -0
- package/es/element/BorderBox/BorderBox1/index.css +27 -0
- package/es/element/BorderBox/BorderBox1/index.js +51 -0
- package/es/element/BorderBox/BorderBox10/Component.js +61 -0
- package/es/element/BorderBox/BorderBox10/index.css +28 -0
- package/es/element/BorderBox/BorderBox10/index.js +51 -0
- package/es/element/BorderBox/BorderBox12/Component.js +109 -0
- package/es/element/BorderBox/BorderBox12/index.css +17 -0
- package/es/element/BorderBox/BorderBox12/index.js +51 -0
- package/es/element/BorderBox/BorderBox13/Component.js +55 -0
- package/es/element/BorderBox/BorderBox13/index.css +17 -0
- package/es/element/BorderBox/BorderBox13/index.js +51 -0
- package/es/element/BorderBox/BorderBox2/Component.js +65 -0
- package/es/element/BorderBox/BorderBox2/index.css +21 -0
- package/es/element/BorderBox/BorderBox2/index.js +51 -0
- package/es/element/BorderBox/BorderBox3/Component.js +55 -0
- package/es/element/BorderBox/BorderBox3/index.css +26 -0
- package/es/element/BorderBox/BorderBox3/index.js +51 -0
- package/es/element/BorderBox/BorderBox4/Component.js +81 -0
- package/es/element/BorderBox/BorderBox4/index.css +66 -0
- package/es/element/BorderBox/BorderBox4/index.js +51 -0
- package/es/element/BorderBox/BorderBox5/Component.js +65 -0
- package/es/element/BorderBox/BorderBox5/index.css +35 -0
- package/es/element/BorderBox/BorderBox5/index.js +51 -0
- package/es/element/BorderBox/BorderBox6/Component.js +95 -0
- package/es/element/BorderBox/BorderBox6/index.css +21 -0
- package/es/element/BorderBox/BorderBox6/index.js +51 -0
- package/es/element/BorderBox/BorderBox7/Component.js +70 -0
- package/es/element/BorderBox/BorderBox7/index.css +27 -0
- package/es/element/BorderBox/BorderBox7/index.js +51 -0
- package/es/element/BorderBox/BorderBox8/Component.js +113 -0
- package/es/element/BorderBox/BorderBox8/index.css +17 -0
- package/es/element/BorderBox/BorderBox8/index.js +51 -0
- package/es/element/BorderBox/BorderBox9/Component.js +137 -0
- package/es/element/BorderBox/BorderBox9/index.css +17 -0
- package/es/element/BorderBox/BorderBox9/index.js +51 -0
- package/es/element/BorderBox/PropsSet/ColorSet.js +60 -0
- package/es/element/BorderBox/PropsSet/index.js +21 -0
- package/es/element/BorderBox/util/index.js +7 -0
- package/es/element/BorderBox/util/typings.d.ts +9 -0
- package/es/element/Decoration/Decoration1/Component.js +126 -0
- package/es/element/Decoration/Decoration1/index.css +7 -0
- package/es/element/Decoration/Decoration1/index.js +51 -0
- package/es/element/Decoration/Decoration10/Component.js +171 -0
- package/es/element/Decoration/Decoration10/index.css +5 -0
- package/es/element/Decoration/Decoration10/index.js +51 -0
- package/es/element/Decoration/Decoration2/Component.js +81 -0
- package/es/element/Decoration/Decoration2/index.css +10 -0
- package/es/element/Decoration/Decoration2/index.js +51 -0
- package/es/element/Decoration/Decoration3/Component.js +81 -0
- package/es/element/Decoration/Decoration3/index.css +7 -0
- package/es/element/Decoration/Decoration3/index.js +51 -0
- package/es/element/Decoration/Decoration4/Component.js +54 -0
- package/es/element/Decoration/Decoration4/index.css +43 -0
- package/es/element/Decoration/Decoration4/index.js +51 -0
- package/es/element/Decoration/Decoration5/Component.js +86 -0
- package/es/element/Decoration/Decoration5/index.css +4 -0
- package/es/element/Decoration/Decoration5/index.js +51 -0
- package/es/element/Decoration/Decoration6/Component.js +120 -0
- package/es/element/Decoration/Decoration6/index.css +7 -0
- package/es/element/Decoration/Decoration6/index.js +51 -0
- package/es/element/Decoration/Decoration8/Component.js +62 -0
- package/es/element/Decoration/Decoration8/index.css +5 -0
- package/es/element/Decoration/Decoration8/index.js +51 -0
- package/es/element/Decoration/PropsSet/ColorSet.js +60 -0
- package/es/element/Decoration/PropsSet/index.js +21 -0
- package/es/element/Decoration/util/index.js +33 -0
- package/es/element/Decoration/util/typings.d.ts +9 -0
- package/es/element/EleButton/Component.js +49 -0
- package/es/element/EleButton/PropsSet/TextPropsSet/index.js +27 -0
- package/es/element/EleButton/PropsSet/index.js +25 -0
- package/es/element/EleButton/index.css +15 -0
- package/es/element/EleButton/index.js +66 -0
- package/es/element/EleClock/Component.js +60 -0
- package/es/element/EleClock/PropsSet/index.js +46 -0
- package/es/element/EleClock/index.css +7 -0
- package/es/element/EleClock/index.js +55 -0
- package/es/element/EleContainer/Component.js +22 -0
- package/es/element/EleContainer/PropsSet/OtherPropsSet/index.js +63 -0
- package/es/element/EleContainer/PropsSet/index.js +29 -0
- package/es/element/EleContainer/index.css +4 -0
- package/es/element/EleContainer/index.js +54 -0
- package/es/element/EleDeviceName/Component.js +81 -0
- package/es/element/EleDeviceName/PropsSet/FormBindDevice/index.js +52 -0
- package/es/element/EleDeviceName/PropsSet/index.js +26 -0
- package/es/element/EleDeviceName/index.css +11 -0
- package/es/element/EleDeviceName/index.js +57 -0
- package/es/element/EleDeviceState/Component.js +103 -0
- package/es/element/EleDeviceState/PropsSet/FormBindDevice/index.js +53 -0
- package/es/element/EleDeviceState/PropsSet/index.js +26 -0
- package/es/element/EleDeviceState/index.css +13 -0
- package/es/element/EleDeviceState/index.js +62 -0
- package/es/element/EleDeviceUpdateTime/Component.js +94 -0
- package/es/element/EleDeviceUpdateTime/PropsSet/FormBindDateFormat/index.js +32 -0
- package/es/element/EleDeviceUpdateTime/PropsSet/FormBindDevice/index.js +52 -0
- package/es/element/EleDeviceUpdateTime/PropsSet/index.js +27 -0
- package/es/element/EleDeviceUpdateTime/index.css +9 -0
- package/es/element/EleDeviceUpdateTime/index.js +57 -0
- package/es/element/EleFan/Component.js +74 -0
- package/es/element/EleFan/PropsSet/FormBindDevice/index.js +46 -0
- package/es/element/EleFan/PropsSet/FormBindPoint/FaultQuestion.js +18 -0
- package/es/element/EleFan/PropsSet/FormBindPoint/FrostQuestion.js +18 -0
- package/es/element/EleFan/PropsSet/FormBindPoint/RefrigerationQuestion.js +18 -0
- package/es/element/EleFan/PropsSet/FormBindPoint/SwitchQuestion.js +12 -0
- package/es/element/EleFan/PropsSet/FormBindPoint/index.js +519 -0
- package/es/element/EleFan/PropsSet/index.js +66 -0
- package/es/element/EleFan/Tooltip.js +8 -0
- package/es/element/EleFan/index.css +25 -0
- package/es/element/EleFan/index.js +113 -0
- package/es/element/EleFanBySvg/PropsSet/FormBindPoint/FaultQuestion.js +18 -0
- package/es/element/EleFanBySvg/PropsSet/FormBindPoint/FrostQuestion.js +18 -0
- package/es/element/EleFanBySvg/PropsSet/FormBindPoint/RefrigerationQuestion.js +18 -0
- package/es/element/EleFanBySvg/PropsSet/FormBindPoint/SwitchQuestion.js +12 -0
- package/es/element/EleFanBySvg/PropsSet/FormBindPoint/index.js +473 -0
- package/es/element/EleFanBySvg/PropsSet/index.js +25 -0
- package/es/element/EleFanBySvg/Tooltip.js +8 -0
- package/es/element/EleFanBySvg/index.js +320 -0
- package/es/element/EleGauge/Component.js +128 -0
- package/es/element/EleGauge/PropsSet/OtherPropsSet/index.js +92 -0
- package/es/element/EleGauge/PropsSet/index.js +29 -0
- package/es/element/EleGauge/index.css +7 -0
- package/es/element/EleGauge/index.js +66 -0
- package/es/element/EleIcon/Component.js +53 -0
- package/es/element/EleIcon/PropsSet/IconPropsSet/index.js +105 -0
- package/es/element/EleIcon/PropsSet/index.js +29 -0
- package/es/element/EleIcon/index.css +13 -0
- package/es/element/EleIcon/index.js +58 -0
- package/es/element/EleImage/PropsSet/ImagePropsSet/index.js +56 -0
- package/es/element/EleImage/PropsSet/index.js +21 -0
- package/es/element/EleImage/index.js +61 -0
- package/es/element/EleIndicatorLight/Component.js +57 -0
- package/es/element/EleIndicatorLight/PropsSet/ColorPropsSet/index.js +63 -0
- package/es/element/EleIndicatorLight/PropsSet/index.js +29 -0
- package/es/element/EleIndicatorLight/index.css +4 -0
- package/es/element/EleIndicatorLight/index.js +66 -0
- package/es/element/ElePointImage/Component.js +60 -0
- package/es/element/ElePointImage/PropsSet/ImagePropsSet/index.js +84 -0
- package/es/element/ElePointImage/PropsSet/index.js +29 -0
- package/es/element/ElePointImage/index.css +9 -0
- package/es/element/ElePointImage/index.js +58 -0
- package/es/element/ElePointList/Component.js +142 -0
- package/es/element/ElePointList/PropsSet/index.js +25 -0
- package/es/element/ElePointList/index.css +22 -0
- package/es/element/ElePointList/index.js +67 -0
- package/es/element/ElePointState/Component.js +71 -0
- package/es/element/ElePointState/PropsSet/IconPropsSet/index.js +140 -0
- package/es/element/ElePointState/PropsSet/index.js +29 -0
- package/es/element/ElePointState/index.css +10 -0
- package/es/element/ElePointState/index.js +60 -0
- package/es/element/ElePointValue/Component.js +79 -0
- package/es/element/ElePointValue/PropsSet/GlobalPropSet/index.js +60 -0
- package/es/element/ElePointValue/PropsSet/TitlePropsSet/index.js +42 -0
- package/es/element/ElePointValue/PropsSet/UnitPropsSet/index.js +54 -0
- package/es/element/ElePointValue/PropsSet/ValuePropsSet/index.js +119 -0
- package/es/element/ElePointValue/PropsSet/index.js +41 -0
- package/es/element/ElePointValue/index.css +30 -0
- package/es/element/ElePointValue/index.js +63 -0
- package/es/element/EleShine/Component.js +61 -0
- package/es/element/EleShine/PropsSet/OtherPropsSet/index.js +63 -0
- package/es/element/EleShine/PropsSet/index.js +29 -0
- package/es/element/EleShine/index.css +15 -0
- package/es/element/EleShine/index.js +70 -0
- package/es/element/EleState/Tooltip.js +8 -0
- package/es/element/EleState/index.js +115 -0
- package/es/element/EleSvg/index.js +35 -0
- package/es/element/EleSwitch/Component.js +66 -0
- package/es/element/EleSwitch/PropsSet/OtherPropsSet/index.js +49 -0
- package/es/element/EleSwitch/PropsSet/index.js +25 -0
- package/es/element/EleSwitch/index.css +6 -0
- package/es/element/EleSwitch/index.js +62 -0
- package/es/element/EleText/Component.js +19 -0
- package/es/element/EleText/index.css +6 -0
- package/es/element/EleText/index.js +69 -0
- package/es/element/PipeNodes/NodeBL/index.js +74 -0
- package/es/element/PipeNodes/NodeBR/index.js +75 -0
- package/es/element/PipeNodes/NodeBottom/index.js +82 -0
- package/es/element/PipeNodes/NodeCenter/index.js +89 -0
- package/es/element/PipeNodes/NodeHorizontal/index.js +72 -0
- package/es/element/PipeNodes/NodeLeft/index.js +81 -0
- package/es/element/PipeNodes/NodeRight/index.js +81 -0
- package/es/element/PipeNodes/NodeTL/index.js +74 -0
- package/es/element/PipeNodes/NodeTL.TEMP/index.js +151 -0
- package/es/element/PipeNodes/NodeTR/index.js +74 -0
- package/es/element/PipeNodes/NodeTop/index.js +81 -0
- package/es/element/PipeNodes/NodeVertical/index.js +72 -0
- package/es/element/PipeNodes/portStyle.js +18 -0
- package/es/element/PointCard/PointCard1/Component.js +97 -0
- package/es/element/PointCard/PointCard1/PropsSet/IconPropsSet/index.js +147 -0
- package/es/element/PointCard/PointCard1/PropsSet/PointValuePropsSet/index.js +120 -0
- package/es/element/PointCard/PointCard1/PropsSet/TitlePropsSet/index.js +43 -0
- package/es/element/PointCard/PointCard1/PropsSet/index.js +37 -0
- package/es/element/PointCard/PointCard1/index.css +44 -0
- package/es/element/PointCard/PointCard1/index.js +88 -0
- package/es/element/PointCard/PointCard2/Component/PointItem.js +87 -0
- package/es/element/PointCard/PointCard2/Component/PointItemPlaceholder.js +33 -0
- package/es/element/PointCard/PointCard2/Component/index.css +30 -0
- package/es/element/PointCard/PointCard2/Component/index.js +53 -0
- package/es/element/PointCard/PointCard2/PropsSet/GlobalPropSet/index.js +14 -0
- package/es/element/PointCard/PointCard2/PropsSet/IconPropsSet/index.js +32 -0
- package/es/element/PointCard/PointCard2/PropsSet/PointItemSetDrawer/index.css +7 -0
- package/es/element/PointCard/PointCard2/PropsSet/PointItemSetDrawer/index.js +175 -0
- package/es/element/PointCard/PointCard2/PropsSet/TitlePropsSet/index.js +31 -0
- package/es/element/PointCard/PointCard2/PropsSet/index.js +52 -0
- package/es/element/PointCard/PointCard2/index.js +79 -0
- package/es/element/PointCard/PointCard3/Component.js +107 -0
- package/es/element/PointCard/PointCard3/PropsSet/IconPropsSet/index.js +178 -0
- package/es/element/PointCard/PointCard3/PropsSet/TitlePropsSet/index.js +43 -0
- package/es/element/PointCard/PointCard3/PropsSet/index.js +33 -0
- package/es/element/PointCard/PointCard3/index.css +26 -0
- package/es/element/PointCard/PointCard3/index.js +79 -0
- package/es/element/PointCard/PointListCard/Component.js +169 -0
- package/es/element/PointCard/PointListCard/PropsSet/GlobalPropSet/index.js +14 -0
- package/es/element/PointCard/PointListCard/PropsSet/LabelPropsSet/index.js +31 -0
- package/es/element/PointCard/PointListCard/PropsSet/TitlePropsSet/index.js +43 -0
- package/es/element/PointCard/PointListCard/PropsSet/ValuePropsSet/index.js +31 -0
- package/es/element/PointCard/PointListCard/PropsSet/index.js +41 -0
- package/es/element/PointCard/PointListCard/index.css +24 -0
- package/es/element/PointCard/PointListCard/index.js +87 -0
- package/es/element/PointControl/PointControl1/Component.js +110 -0
- package/es/element/PointControl/PointControl1/PropsSet/GlobalPropsSet/index.js +16 -0
- package/es/element/PointControl/PointControl1/PropsSet/PointValuePropsSet/index.js +31 -0
- package/es/element/PointControl/PointControl1/PropsSet/TitlePropsSet/index.js +43 -0
- package/es/element/PointControl/PointControl1/PropsSet/index.js +33 -0
- package/es/element/PointControl/PointControl1/index.css +21 -0
- package/es/element/PointControl/PointControl1/index.js +83 -0
- package/es/element/PointControl/PointControl3/Component.js +123 -0
- package/es/element/PointControl/PointControl3/PropsSet/IconPropsSet/index.js +147 -0
- package/es/element/PointControl/PointControl3/PropsSet/SubTitlePropsSet/index.js +53 -0
- package/es/element/PointControl/PointControl3/PropsSet/SwitchPropsSet/index.js +49 -0
- package/es/element/PointControl/PointControl3/PropsSet/TitlePropsSet/index.js +43 -0
- package/es/element/PointControl/PointControl3/PropsSet/index.js +41 -0
- package/es/element/PointControl/PointControl3/index.css +8 -0
- package/es/element/PointControl/PointControl3/index.js +94 -0
- package/es/element/nodeBase.js +48 -0
- package/es/element/reactShapeBase.js +47 -0
- package/es/element/register.js +131 -0
- package/es/element/type.d.ts +143 -0
- package/es/element/utils/getValueByExpression.js +22 -0
- package/es/element/utils/handleEleEvent.js +60 -0
- package/es/element/utils/index.js +4 -0
- package/es/element/utils/pointWrite.js +197 -0
- package/es/element/utils/shapeReactComponentShouldUpdate.js +7 -0
- package/es/global.css +162 -0
- package/es/graph/graphCore.js +501 -0
- package/es/graph/tools/ToolTipTool.js +139 -0
- package/es/graph/tools/registerX6Tool.js +1 -0
- package/es/hooks/index.js +7 -0
- package/es/hooks/useCMDKey.js +19 -0
- package/es/hooks/useEleEventHandle.js +36 -0
- package/es/hooks/useFirstMountState.js +9 -0
- package/es/hooks/useForceUpdate.js +23 -0
- package/es/hooks/useMittNamespace.js +7 -0
- package/es/hooks/usePointWatch.js +30 -0
- package/es/hooks/useQuery.js +6 -0
- package/es/models/useEditor.js +185 -0
- package/es/models/useElePanel.js +23 -0
- package/es/pages/display/Player/index.css +15 -0
- package/es/pages/display/Player/index.js +434 -0
- package/es/pages/display/components/Empty/index.css +9 -0
- package/es/pages/display/components/Empty/index.js +22 -0
- package/es/pages/display/components/Tools/index.js +86 -0
- package/es/pages/display/index.css +4 -0
- package/es/pages/display/index.js +231 -0
- package/es/pages/document.ejs +77 -0
- package/es/pages/editor/Palette/PaletteDropdown/index.css +9 -0
- package/es/pages/editor/Palette/PaletteDropdown/index.js +178 -0
- package/es/pages/editor/Palette/index.css +13 -0
- package/es/pages/editor/Palette/index.js +86 -0
- package/es/pages/editor/PanelLeft/BasicShapeList/index.js +32 -0
- package/es/pages/editor/PanelLeft/BasicShapeList/listData.js +63 -0
- package/es/pages/editor/PanelLeft/BorderBoxEleList/index.css +9 -0
- package/es/pages/editor/PanelLeft/BorderBoxEleList/index.js +19 -0
- package/es/pages/editor/PanelLeft/BorderBoxEleList/index.less.d.ts +7 -0
- package/es/pages/editor/PanelLeft/BorderBoxEleList/listData.js +49 -0
- package/es/pages/editor/PanelLeft/DecorationEleList/index.css +12 -0
- package/es/pages/editor/PanelLeft/DecorationEleList/index.js +21 -0
- package/es/pages/editor/PanelLeft/DecorationEleList/index.less.d.ts +7 -0
- package/es/pages/editor/PanelLeft/DecorationEleList/listData.js +65 -0
- package/es/pages/editor/PanelLeft/GroupManageDialog/index.css +32 -0
- package/es/pages/editor/PanelLeft/GroupManageDialog/index.js +300 -0
- package/es/pages/editor/PanelLeft/ImgConfigDialog/index.css +0 -0
- package/es/pages/editor/PanelLeft/ImgConfigDialog/index.js +220 -0
- package/es/pages/editor/PanelLeft/ImgGroup/index.css +62 -0
- package/es/pages/editor/PanelLeft/ImgGroup/index.js +317 -0
- package/es/pages/editor/PanelLeft/MetaEleList/index.js +37 -0
- package/es/pages/editor/PanelLeft/MetaEleList/listData.js +88 -0
- package/es/pages/editor/PanelLeft/MineImgGroup/index.css +0 -0
- package/es/pages/editor/PanelLeft/MineImgGroup/index.js +163 -0
- package/es/pages/editor/PanelLeft/PipeEleList/index.css +0 -0
- package/es/pages/editor/PanelLeft/PipeEleList/index.js +33 -0
- package/es/pages/editor/PanelLeft/PipeEleList/listData.js +69 -0
- package/es/pages/editor/PanelLeft/PointCardEleList/index.js +31 -0
- package/es/pages/editor/PanelLeft/PointCardEleList/listData.js +37 -0
- package/es/pages/editor/PanelLeft/RecommendEleList/index.js +37 -0
- package/es/pages/editor/PanelLeft/RecommendEleList/listData.js +27 -0
- package/es/pages/editor/PanelLeft/SystemImgGroupList/index.css +6 -0
- package/es/pages/editor/PanelLeft/SystemImgGroupList/index.js +119 -0
- package/es/pages/editor/PanelLeft/index.css +100 -0
- package/es/pages/editor/PanelLeft/index.js +200 -0
- package/es/pages/editor/PanelLeft/index.less.d.ts +11 -0
- package/es/pages/editor/PanelRight/components/FormBindEvent/index.js +202 -0
- package/es/pages/editor/PanelRight/components/FormEleBorderStyle/index.js +145 -0
- package/es/pages/editor/PanelRight/components/FormEleLayout/index.css +8 -0
- package/es/pages/editor/PanelRight/components/FormEleLayout/index.js +214 -0
- package/es/pages/editor/PanelRight/components/FormElePadding/index.js +11 -0
- package/es/pages/editor/PanelRight/components/FormFillStyle/index.js +92 -0
- package/es/pages/editor/PanelRight/components/FormFontStyle/index.js +186 -0
- package/es/pages/editor/PanelRight/components/FormLayer/index.js +222 -0
- package/es/pages/editor/PanelRight/index.css +26 -0
- package/es/pages/editor/PanelRight/index.js +164 -0
- package/es/pages/editor/PanelRight/index.less.d.ts +7 -0
- package/es/pages/editor/PanelTop/FullScreen/index.js +31 -0
- package/es/pages/editor/PanelTop/HistoryControl/index.js +78 -0
- package/es/pages/editor/PanelTop/HotKeyDescribe/index.css +35 -0
- package/es/pages/editor/PanelTop/HotKeyDescribe/index.js +114 -0
- package/es/pages/editor/PanelTop/HotKeyDescribe/index.less.d.ts +10 -0
- package/es/pages/editor/PanelTop/Save/index.js +179 -0
- package/es/pages/editor/PanelTop/ZoomControl/index.css +0 -0
- package/es/pages/editor/PanelTop/ZoomControl/index.js +100 -0
- package/es/pages/editor/PanelTop/index.css +57 -0
- package/es/pages/editor/PanelTop/index.js +321 -0
- package/es/pages/editor/index.css +39 -0
- package/es/pages/editor/index.js +298 -0
- package/es/provider/index.js +2 -0
- package/es/provider/mittMeat.js +4 -0
- package/es/services/common/Uploader.js +45 -0
- package/es/services/common/index.js +8 -0
- package/es/services/common/typings.d.ts +15 -0
- package/es/services/gateway/CompanyConfiguration.js +87 -0
- package/es/services/gateway/Device.js +437 -0
- package/es/services/gateway/DeviceAuthorizationApply.js +111 -0
- package/es/services/gateway/DeviceGroup.js +137 -0
- package/es/services/gateway/Gateway.js +442 -0
- package/es/services/gateway/GatewayGroup.js +112 -0
- package/es/services/gateway/Point.js +137 -0
- package/es/services/gateway/UserDevice.js +112 -0
- package/es/services/gateway/index.js +22 -0
- package/es/services/gateway/typings.d.ts +1674 -0
- package/es/services/master/Func.js +33 -0
- package/es/services/master/Role.js +153 -0
- package/es/services/master/User.js +244 -0
- package/es/services/master/index.js +12 -0
- package/es/services/master/typings.d.ts +362 -0
- package/es/services/product/ConfigurationImg.js +87 -0
- package/es/services/product/ConfigurationImgGroup.js +87 -0
- package/es/services/product/DeviceType.js +37 -0
- package/es/services/product/Identifier.js +33 -0
- package/es/services/product/PointEnum.js +87 -0
- package/es/services/product/PointGroup.js +112 -0
- package/es/services/product/Product.js +351 -0
- package/es/services/product/ProductCompany.js +183 -0
- package/es/services/product/index.js +22 -0
- package/es/services/product/typings.d.ts +1045 -0
- package/es/services/project/ProjectGateway.js +62 -0
- package/es/services/project/ProjectResource.js +205 -0
- package/es/services/project/ProjectRole.js +302 -0
- package/es/services/project/ProjectUserPermission.js +217 -0
- package/es/services/project/Subarea.js +236 -0
- package/es/services/project/UserSubarea.js +62 -0
- package/es/services/project/index.js +18 -0
- package/es/services/project/typings.d.ts +1609 -0
- package/es/services/request.js +196 -0
- package/es/shims.x6.d.ts +15 -0
- package/es/typings.d.ts +182 -0
- package/es/utils/auth.js +90 -0
- package/es/utils/cssStyle.js +11 -0
- package/es/utils/decomposeMatrix.js +46 -0
- package/es/utils/events.js +7 -0
- package/es/utils/getMittMeta.js +14 -0
- package/es/utils/index.js +163 -0
- package/es/utils/isInIframe.js +8 -0
- package/es/utils/queryToObject.js +19 -0
- package/es/utils/svg.js +46 -0
- package/es/utils/type.js +3 -0
- package/es/x6Reset.css +36 -0
- package/package.json +84 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { useRef, memo } from 'react';
|
|
9
|
+
import { useSize } from 'ahooks';
|
|
10
|
+
import { reactShapeNodeAreEqual } from "../../utils";
|
|
11
|
+
import { isValidColors } from "../util";
|
|
12
|
+
import "./index.css";
|
|
13
|
+
var defaultColor = ['rgba(128,128,128,0.3)', 'rgba(128,128,128,0.5)'];
|
|
14
|
+
var BorderBox = function BorderBox(_ref) {
|
|
15
|
+
var node = _ref.node;
|
|
16
|
+
var domRef = useRef(null);
|
|
17
|
+
var _ref2 = useSize(domRef) || {},
|
|
18
|
+
_ref2$height = _ref2.height,
|
|
19
|
+
height = _ref2$height === void 0 ? 0 : _ref2$height,
|
|
20
|
+
_ref2$width = _ref2.width,
|
|
21
|
+
width = _ref2$width === void 0 ? 0 : _ref2$width;
|
|
22
|
+
var payload = node === null || node === void 0 ? void 0 : node.getData();
|
|
23
|
+
var mergedColor = defaultColor;
|
|
24
|
+
var colors = (payload === null || payload === void 0 ? void 0 : payload.colors) || [];
|
|
25
|
+
if (colors && isValidColors(colors)) {
|
|
26
|
+
mergedColor = colors;
|
|
27
|
+
}
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
className: "dv-border-box-7",
|
|
30
|
+
ref: domRef,
|
|
31
|
+
style: _objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.fillStyles)
|
|
32
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
33
|
+
className: "dv-border-svg-container",
|
|
34
|
+
width: width,
|
|
35
|
+
height: height
|
|
36
|
+
}, /*#__PURE__*/React.createElement("polyline", {
|
|
37
|
+
className: "dv-bb7-line-width-2",
|
|
38
|
+
stroke: mergedColor[0],
|
|
39
|
+
points: "0, 25 0, 0 25, 0"
|
|
40
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
41
|
+
className: "dv-bb7-line-width-2",
|
|
42
|
+
stroke: mergedColor[0],
|
|
43
|
+
points: "".concat(width - 25, ", 0 ").concat(width, ", 0 ").concat(width, ", 25")
|
|
44
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
45
|
+
className: "dv-bb7-line-width-2",
|
|
46
|
+
stroke: mergedColor[0],
|
|
47
|
+
points: "".concat(width - 25, ", ").concat(height, " ").concat(width, ", ").concat(height, " ").concat(width, ", ").concat(height - 25)
|
|
48
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
49
|
+
className: "dv-bb7-line-width-2",
|
|
50
|
+
stroke: mergedColor[0],
|
|
51
|
+
points: "0, ".concat(height - 25, " 0, ").concat(height, " 25, ").concat(height)
|
|
52
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
53
|
+
className: "dv-bb7-line-width-5",
|
|
54
|
+
stroke: mergedColor[1],
|
|
55
|
+
points: "0, 10 0, 0 10, 0"
|
|
56
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
57
|
+
className: "dv-bb7-line-width-5",
|
|
58
|
+
stroke: mergedColor[1],
|
|
59
|
+
points: "".concat(width - 10, ", 0 ").concat(width, ", 0 ").concat(width, ", 10")
|
|
60
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
61
|
+
className: "dv-bb7-line-width-5",
|
|
62
|
+
stroke: mergedColor[1],
|
|
63
|
+
points: "".concat(width - 10, ", ").concat(height, " ").concat(width, ", ").concat(height, " ").concat(width, ", ").concat(height - 10)
|
|
64
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
65
|
+
className: "dv-bb7-line-width-5",
|
|
66
|
+
stroke: mergedColor[1],
|
|
67
|
+
points: "0, ".concat(height - 10, " 0, ").concat(height, " 10, ").concat(height)
|
|
68
|
+
})));
|
|
69
|
+
};
|
|
70
|
+
export default /*#__PURE__*/memo(BorderBox, reactShapeNodeAreEqual);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.dv-border-box-7 {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
}
|
|
6
|
+
.dv-border-box-7 .dv-border-svg-container {
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 0px;
|
|
9
|
+
left: 0px;
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
}
|
|
13
|
+
.dv-border-box-7 .dv-border-svg-container > polyline {
|
|
14
|
+
fill: none;
|
|
15
|
+
stroke-linecap: round;
|
|
16
|
+
}
|
|
17
|
+
.dv-border-box-7 .dv-bb7-line-width-2 {
|
|
18
|
+
stroke-width: 2;
|
|
19
|
+
}
|
|
20
|
+
.dv-border-box-7 .dv-bb7-line-width-5 {
|
|
21
|
+
stroke-width: 5;
|
|
22
|
+
}
|
|
23
|
+
.dv-border-box-7 .border-box-content {
|
|
24
|
+
position: relative;
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 100%;
|
|
27
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
11
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
+
import React from "react";
|
|
15
|
+
import { Graph } from '@antv/x6';
|
|
16
|
+
import EleBorderBox7Component from "./Component";
|
|
17
|
+
import { ReactShapeBase } from "../../reactShapeBase";
|
|
18
|
+
export var shapeName = 'ele-border-box7';
|
|
19
|
+
var EleBorderBox7 = /*#__PURE__*/function (_ReactShapeBase) {
|
|
20
|
+
_inherits(EleBorderBox7, _ReactShapeBase);
|
|
21
|
+
var _super = _createSuper(EleBorderBox7);
|
|
22
|
+
function EleBorderBox7() {
|
|
23
|
+
var _this;
|
|
24
|
+
_classCallCheck(this, EleBorderBox7);
|
|
25
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26
|
+
args[_key] = arguments[_key];
|
|
27
|
+
}
|
|
28
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
29
|
+
_this.shapeName = shapeName;
|
|
30
|
+
return _this;
|
|
31
|
+
}
|
|
32
|
+
return _createClass(EleBorderBox7);
|
|
33
|
+
}(ReactShapeBase);
|
|
34
|
+
EleBorderBox7.shapeName = shapeName;
|
|
35
|
+
/** 注册的 react 组件名称 */
|
|
36
|
+
var registerComponentName = "".concat(EleBorderBox7.shapeName, "-component");
|
|
37
|
+
export var defaultConfig = {
|
|
38
|
+
shape: EleBorderBox7.shapeName,
|
|
39
|
+
width: 250,
|
|
40
|
+
height: 150,
|
|
41
|
+
data: {
|
|
42
|
+
colors: ['rgba(128,128,128,0.3)', 'rgba(128,128,128,0.5)']
|
|
43
|
+
},
|
|
44
|
+
component: registerComponentName
|
|
45
|
+
};
|
|
46
|
+
EleBorderBox7.config(defaultConfig);
|
|
47
|
+
|
|
48
|
+
// 注册 react 组件
|
|
49
|
+
Graph.registerReactComponent(registerComponentName, /*#__PURE__*/React.createElement(EleBorderBox7Component, null));
|
|
50
|
+
export { EleBorderBox7Component };
|
|
51
|
+
export default EleBorderBox7;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { useMemo, useRef, useState, memo } from 'react';
|
|
9
|
+
import { useSize } from 'ahooks';
|
|
10
|
+
import { reactShapeNodeAreEqual } from "../../utils";
|
|
11
|
+
import { randomString } from "../../../utils";
|
|
12
|
+
import { isValidColors } from "../util";
|
|
13
|
+
import "./index.css";
|
|
14
|
+
var defaultColor = ['#235fa7', '#4fd2dd'];
|
|
15
|
+
var BorderBox = function BorderBox(_ref) {
|
|
16
|
+
var _payload$fillStyles, _payload$fillStyles$o, _payload$fillStyles2;
|
|
17
|
+
var _ref$dur = _ref.dur,
|
|
18
|
+
dur = _ref$dur === void 0 ? 3 : _ref$dur,
|
|
19
|
+
_ref$reverse = _ref.reverse,
|
|
20
|
+
reverse = _ref$reverse === void 0 ? false : _ref$reverse,
|
|
21
|
+
node = _ref.node;
|
|
22
|
+
var domRef = useRef(null);
|
|
23
|
+
var _useState = useState(function () {
|
|
24
|
+
var id = randomString(8);
|
|
25
|
+
return {
|
|
26
|
+
path: "border-box-8-path-".concat(id),
|
|
27
|
+
gradient: "border-box-8-gradient-".concat(id),
|
|
28
|
+
mask: "border-box-8-mask-".concat(id)
|
|
29
|
+
};
|
|
30
|
+
}),
|
|
31
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
32
|
+
_useState2$ = _useState2[0],
|
|
33
|
+
path = _useState2$.path,
|
|
34
|
+
gradient = _useState2$.gradient,
|
|
35
|
+
mask = _useState2$.mask;
|
|
36
|
+
var _ref2 = useSize(domRef) || {},
|
|
37
|
+
_ref2$height = _ref2.height,
|
|
38
|
+
height = _ref2$height === void 0 ? 0 : _ref2$height,
|
|
39
|
+
_ref2$width = _ref2.width,
|
|
40
|
+
width = _ref2$width === void 0 ? 0 : _ref2$width;
|
|
41
|
+
var pathD = useMemo(function () {
|
|
42
|
+
return reverse ? "M 2.5, 2.5 L 2.5, ".concat(height - 2.5, " L ").concat(width - 2.5, ", ").concat(height - 2.5, " L ").concat(width - 2.5, ", 2.5 L 2.5, 2.5") : "M2.5, 2.5 L".concat(width - 2.5, ", 2.5 L").concat(width - 2.5, ", ").concat(height - 2.5, " L2.5, ").concat(height - 2.5, " L2.5, 2.5");
|
|
43
|
+
}, [width, height, reverse]);
|
|
44
|
+
var length = useMemo(function () {
|
|
45
|
+
return (width + height - 5) * 2;
|
|
46
|
+
}, [width, height]);
|
|
47
|
+
var payload = node === null || node === void 0 ? void 0 : node.getData();
|
|
48
|
+
var backgroundColor = (payload === null || payload === void 0 ? void 0 : (_payload$fillStyles = payload.fillStyles) === null || _payload$fillStyles === void 0 ? void 0 : _payload$fillStyles.backgroundColor) || 'transparent';
|
|
49
|
+
var mergedColor = defaultColor;
|
|
50
|
+
var colors = (payload === null || payload === void 0 ? void 0 : payload.colors) || [];
|
|
51
|
+
if (colors && isValidColors(colors)) {
|
|
52
|
+
mergedColor = colors;
|
|
53
|
+
}
|
|
54
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
55
|
+
className: "dv-border-box-8",
|
|
56
|
+
ref: domRef,
|
|
57
|
+
style: {
|
|
58
|
+
opacity: (_payload$fillStyles$o = payload === null || payload === void 0 ? void 0 : (_payload$fillStyles2 = payload.fillStyles) === null || _payload$fillStyles2 === void 0 ? void 0 : _payload$fillStyles2.opacity) !== null && _payload$fillStyles$o !== void 0 ? _payload$fillStyles$o : 1
|
|
59
|
+
}
|
|
60
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
61
|
+
className: "dv-border-svg-container",
|
|
62
|
+
width: width,
|
|
63
|
+
height: height
|
|
64
|
+
}, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("path", {
|
|
65
|
+
id: path,
|
|
66
|
+
d: pathD,
|
|
67
|
+
fill: "transparent"
|
|
68
|
+
}), /*#__PURE__*/React.createElement("radialGradient", {
|
|
69
|
+
id: gradient,
|
|
70
|
+
cx: "50%",
|
|
71
|
+
cy: "50%",
|
|
72
|
+
r: "50%"
|
|
73
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
74
|
+
offset: "0%",
|
|
75
|
+
stopColor: "#fff",
|
|
76
|
+
stopOpacity: "1"
|
|
77
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
78
|
+
offset: "100%",
|
|
79
|
+
stopColor: "#fff",
|
|
80
|
+
stopOpacity: "0"
|
|
81
|
+
})), /*#__PURE__*/React.createElement("mask", {
|
|
82
|
+
id: mask
|
|
83
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
84
|
+
cx: "0",
|
|
85
|
+
cy: "0",
|
|
86
|
+
r: "150",
|
|
87
|
+
fill: "url(#".concat(gradient, ")")
|
|
88
|
+
}, /*#__PURE__*/React.createElement("animateMotion", {
|
|
89
|
+
dur: "".concat(dur, "s"),
|
|
90
|
+
path: pathD,
|
|
91
|
+
rotate: "auto",
|
|
92
|
+
repeatCount: "indefinite"
|
|
93
|
+
})))), /*#__PURE__*/React.createElement("polygon", {
|
|
94
|
+
fill: backgroundColor,
|
|
95
|
+
points: "5, 5 ".concat(width - 5, ", 5 ").concat(width - 5, " ").concat(height - 5, " 5, ").concat(height - 5)
|
|
96
|
+
}), /*#__PURE__*/React.createElement("use", {
|
|
97
|
+
stroke: mergedColor[0],
|
|
98
|
+
strokeWidth: "1",
|
|
99
|
+
href: "#".concat(path)
|
|
100
|
+
}), /*#__PURE__*/React.createElement("use", {
|
|
101
|
+
stroke: mergedColor[1],
|
|
102
|
+
strokeWidth: "3",
|
|
103
|
+
href: "#".concat(path),
|
|
104
|
+
mask: "url(#".concat(mask, ")")
|
|
105
|
+
}, /*#__PURE__*/React.createElement("animate", {
|
|
106
|
+
attributeName: "stroke-dasharray",
|
|
107
|
+
from: "0, ".concat(length),
|
|
108
|
+
to: "".concat(length, ", 0"),
|
|
109
|
+
dur: "".concat(dur, "s"),
|
|
110
|
+
repeatCount: "indefinite"
|
|
111
|
+
}))));
|
|
112
|
+
};
|
|
113
|
+
export default /*#__PURE__*/memo(BorderBox, reactShapeNodeAreEqual);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.dv-border-box-8 {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
}
|
|
6
|
+
.dv-border-box-8 .dv-border-svg-container {
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 0px;
|
|
9
|
+
left: 0px;
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
}
|
|
13
|
+
.dv-border-box-8 .border-box-content {
|
|
14
|
+
position: relative;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
11
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
+
import React from "react";
|
|
15
|
+
import { Graph } from '@antv/x6';
|
|
16
|
+
import EleBorderBox8Component from "./Component";
|
|
17
|
+
import { ReactShapeBase } from "../../reactShapeBase";
|
|
18
|
+
export var shapeName = 'ele-border-box8';
|
|
19
|
+
var EleBorderBox8 = /*#__PURE__*/function (_ReactShapeBase) {
|
|
20
|
+
_inherits(EleBorderBox8, _ReactShapeBase);
|
|
21
|
+
var _super = _createSuper(EleBorderBox8);
|
|
22
|
+
function EleBorderBox8() {
|
|
23
|
+
var _this;
|
|
24
|
+
_classCallCheck(this, EleBorderBox8);
|
|
25
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26
|
+
args[_key] = arguments[_key];
|
|
27
|
+
}
|
|
28
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
29
|
+
_this.shapeName = shapeName;
|
|
30
|
+
return _this;
|
|
31
|
+
}
|
|
32
|
+
return _createClass(EleBorderBox8);
|
|
33
|
+
}(ReactShapeBase);
|
|
34
|
+
EleBorderBox8.shapeName = shapeName;
|
|
35
|
+
/** 注册的 react 组件名称 */
|
|
36
|
+
var registerComponentName = "".concat(EleBorderBox8.shapeName, "-component");
|
|
37
|
+
export var defaultConfig = {
|
|
38
|
+
shape: EleBorderBox8.shapeName,
|
|
39
|
+
width: 250,
|
|
40
|
+
height: 150,
|
|
41
|
+
data: {
|
|
42
|
+
colors: ['#235fa7', '#4fd2dd']
|
|
43
|
+
},
|
|
44
|
+
component: registerComponentName
|
|
45
|
+
};
|
|
46
|
+
EleBorderBox8.config(defaultConfig);
|
|
47
|
+
|
|
48
|
+
// 注册 react 组件
|
|
49
|
+
Graph.registerReactComponent(registerComponentName, /*#__PURE__*/React.createElement(EleBorderBox8Component, null));
|
|
50
|
+
export { EleBorderBox8Component };
|
|
51
|
+
export default EleBorderBox8;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { useRef, useState, memo } from 'react';
|
|
9
|
+
import { useSize } from 'ahooks';
|
|
10
|
+
import { reactShapeNodeAreEqual } from "../../utils";
|
|
11
|
+
import { randomString } from "../../../utils";
|
|
12
|
+
import { isValidColors } from "../util";
|
|
13
|
+
import "./index.css";
|
|
14
|
+
var defaultColor = ['#11eefd', '#0078d2'];
|
|
15
|
+
var BorderBox = function BorderBox(_ref) {
|
|
16
|
+
var _payload$fillStyles, _payload$fillStyles$o, _payload$fillStyles2;
|
|
17
|
+
var node = _ref.node;
|
|
18
|
+
var domRef = useRef(null);
|
|
19
|
+
var _ref2 = useSize(domRef) || {},
|
|
20
|
+
_ref2$height = _ref2.height,
|
|
21
|
+
height = _ref2$height === void 0 ? 0 : _ref2$height,
|
|
22
|
+
_ref2$width = _ref2.width,
|
|
23
|
+
width = _ref2$width === void 0 ? 0 : _ref2$width;
|
|
24
|
+
var _useState = useState(function () {
|
|
25
|
+
var id = randomString(8);
|
|
26
|
+
return {
|
|
27
|
+
gradientId: "border-box-9-gradient-".concat(id),
|
|
28
|
+
maskId: "border-box-9-mask-".concat(id)
|
|
29
|
+
};
|
|
30
|
+
}),
|
|
31
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
32
|
+
_useState2$ = _useState2[0],
|
|
33
|
+
gradientId = _useState2$.gradientId,
|
|
34
|
+
maskId = _useState2$.maskId;
|
|
35
|
+
var payload = node === null || node === void 0 ? void 0 : node.getData();
|
|
36
|
+
var backgroundColor = (payload === null || payload === void 0 ? void 0 : (_payload$fillStyles = payload.fillStyles) === null || _payload$fillStyles === void 0 ? void 0 : _payload$fillStyles.backgroundColor) || 'transparent';
|
|
37
|
+
var mergedColor = defaultColor;
|
|
38
|
+
var colors = (payload === null || payload === void 0 ? void 0 : payload.colors) || [];
|
|
39
|
+
if (colors && isValidColors(colors)) {
|
|
40
|
+
mergedColor = colors;
|
|
41
|
+
}
|
|
42
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
className: "dv-border-box-9",
|
|
44
|
+
ref: domRef,
|
|
45
|
+
style: {
|
|
46
|
+
opacity: (_payload$fillStyles$o = payload === null || payload === void 0 ? void 0 : (_payload$fillStyles2 = payload.fillStyles) === null || _payload$fillStyles2 === void 0 ? void 0 : _payload$fillStyles2.opacity) !== null && _payload$fillStyles$o !== void 0 ? _payload$fillStyles$o : 1
|
|
47
|
+
}
|
|
48
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
49
|
+
className: "dv-border-svg-container",
|
|
50
|
+
width: width,
|
|
51
|
+
height: height
|
|
52
|
+
}, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
53
|
+
id: gradientId,
|
|
54
|
+
x1: "0%",
|
|
55
|
+
y1: "0%",
|
|
56
|
+
x2: "100%",
|
|
57
|
+
y2: "100%"
|
|
58
|
+
}, /*#__PURE__*/React.createElement("animate", {
|
|
59
|
+
attributeName: "x1",
|
|
60
|
+
values: "0%;100%;0%",
|
|
61
|
+
dur: "10s",
|
|
62
|
+
begin: "0s",
|
|
63
|
+
repeatCount: "indefinite"
|
|
64
|
+
}), /*#__PURE__*/React.createElement("animate", {
|
|
65
|
+
attributeName: "x2",
|
|
66
|
+
values: "100%;0%;100%",
|
|
67
|
+
dur: "10s",
|
|
68
|
+
begin: "0s",
|
|
69
|
+
repeatCount: "indefinite"
|
|
70
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
71
|
+
offset: "0%",
|
|
72
|
+
stopColor: mergedColor[0]
|
|
73
|
+
}, /*#__PURE__*/React.createElement("animate", {
|
|
74
|
+
attributeName: "stop-color",
|
|
75
|
+
values: "".concat(mergedColor[0], ";").concat(mergedColor[1], ";").concat(mergedColor[0]),
|
|
76
|
+
dur: "10s",
|
|
77
|
+
begin: "0s",
|
|
78
|
+
repeatCount: "indefinite"
|
|
79
|
+
})), /*#__PURE__*/React.createElement("stop", {
|
|
80
|
+
offset: "100%",
|
|
81
|
+
stopColor: mergedColor[1]
|
|
82
|
+
}, /*#__PURE__*/React.createElement("animate", {
|
|
83
|
+
attributeName: "stop-color",
|
|
84
|
+
values: "".concat(mergedColor[1], ";").concat(mergedColor[0], ";").concat(mergedColor[1]),
|
|
85
|
+
dur: "10s",
|
|
86
|
+
begin: "0s",
|
|
87
|
+
repeatCount: "indefinite"
|
|
88
|
+
}))), /*#__PURE__*/React.createElement("mask", {
|
|
89
|
+
id: maskId
|
|
90
|
+
}, /*#__PURE__*/React.createElement("polyline", {
|
|
91
|
+
stroke: "#fff",
|
|
92
|
+
strokeWidth: "3",
|
|
93
|
+
fill: "transparent",
|
|
94
|
+
points: "8, ".concat(height * 0.4, " 8, 3, ").concat(width * 0.4 + 7, ", 3")
|
|
95
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
96
|
+
fill: "#fff",
|
|
97
|
+
points: "8, ".concat(height * 0.15, " 8, 3, ").concat(width * 0.1 + 7, ", 3\n ").concat(width * 0.1, ", 8 14, 8 14, ").concat(height * 0.15 - 7, "\n ")
|
|
98
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
99
|
+
stroke: "#fff",
|
|
100
|
+
strokeWidth: "3",
|
|
101
|
+
fill: "transparent",
|
|
102
|
+
points: "".concat(width * 0.5, ", 3 ").concat(width - 3, ", 3, ").concat(width - 3, ", ").concat(height * 0.25)
|
|
103
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
104
|
+
fill: "#fff",
|
|
105
|
+
points: "\n ".concat(width * 0.52, ", 3 ").concat(width * 0.58, ", 3\n ").concat(width * 0.58 - 7, ", 9 ").concat(width * 0.52 + 7, ", 9\n ")
|
|
106
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
107
|
+
fill: "#fff",
|
|
108
|
+
points: "\n ".concat(width * 0.9, ", 3 ").concat(width - 3, ", 3 ").concat(width - 3, ", ").concat(height * 0.1, "\n ").concat(width - 9, ", ").concat(height * 0.1 - 7, " ").concat(width - 9, ", 9 ").concat(width * 0.9 + 7, ", 9\n ")
|
|
109
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
110
|
+
stroke: "#fff",
|
|
111
|
+
strokeWidth: "3",
|
|
112
|
+
fill: "transparent",
|
|
113
|
+
points: "8, ".concat(height * 0.5, " 8, ").concat(height - 3, " ").concat(width * 0.3 + 7, ", ").concat(height - 3)
|
|
114
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
115
|
+
fill: "#fff",
|
|
116
|
+
points: "\n 8, ".concat(height * 0.55, " 8, ").concat(height * 0.7, "\n 2, ").concat(height * 0.7 - 7, " 2, ").concat(height * 0.55 + 7, "\n ")
|
|
117
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
118
|
+
stroke: "#fff",
|
|
119
|
+
strokeWidth: "3",
|
|
120
|
+
fill: "transparent",
|
|
121
|
+
points: "".concat(width * 0.35, ", ").concat(height - 3, " ").concat(width - 3, ", ").concat(height - 3, " ").concat(width - 3, ", ").concat(height * 0.35)
|
|
122
|
+
}), /*#__PURE__*/React.createElement("polyline", {
|
|
123
|
+
fill: "#fff",
|
|
124
|
+
points: "\n ".concat(width * 0.92, ", ").concat(height - 3, " ").concat(width - 3, ", ").concat(height - 3, " ").concat(width - 3, ", ").concat(height * 0.8, "\n ").concat(width - 9, ", ").concat(height * 0.8 + 7, " ").concat(width - 9, ", ").concat(height - 9, " ").concat(width * 0.92 + 7, ", ").concat(height - 9, "\n ")
|
|
125
|
+
}))), /*#__PURE__*/React.createElement("polygon", {
|
|
126
|
+
fill: backgroundColor,
|
|
127
|
+
points: "\n 15, 9 ".concat(width * 0.1 + 1, ", 9 ").concat(width * 0.1 + 4, ", 6 ").concat(width * 0.52 + 2, ", 6\n ").concat(width * 0.52 + 6, ", 10 ").concat(width * 0.58 - 7, ", 10 ").concat(width * 0.58 - 2, ", 6\n ").concat(width * 0.9 + 2, ", 6 ").concat(width * 0.9 + 6, ", 10 ").concat(width - 10, ", 10 ").concat(width - 10, ", ").concat(height * 0.1 - 6, "\n ").concat(width - 6, ", ").concat(height * 0.1 - 1, " ").concat(width - 6, ", ").concat(height * 0.8 + 1, " ").concat(width - 10, ", ").concat(height * 0.8 + 6, "\n ").concat(width - 10, ", ").concat(height - 10, " ").concat(width * 0.92 + 7, ", ").concat(height - 10, " ").concat(width * 0.92 + 2, ", ").concat(height - 6, "\n 11, ").concat(height - 6, " 11, ").concat(height * 0.15 - 2, " 15, ").concat(height * 0.15 - 7, "\n ")
|
|
128
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
129
|
+
x: "0",
|
|
130
|
+
y: "0",
|
|
131
|
+
width: width,
|
|
132
|
+
height: height,
|
|
133
|
+
fill: "url(#".concat(gradientId, ")"),
|
|
134
|
+
mask: "url(#".concat(maskId, ")")
|
|
135
|
+
})));
|
|
136
|
+
};
|
|
137
|
+
export default /*#__PURE__*/memo(BorderBox, reactShapeNodeAreEqual);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.dv-border-box-9 {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
}
|
|
6
|
+
.dv-border-box-9 .dv-border-svg-container {
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 0px;
|
|
9
|
+
left: 0px;
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
}
|
|
13
|
+
.dv-border-box-9 .border-box-content {
|
|
14
|
+
position: relative;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
11
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
+
import React from "react";
|
|
15
|
+
import { Graph } from '@antv/x6';
|
|
16
|
+
import EleBorderBox9Component from "./Component";
|
|
17
|
+
import { ReactShapeBase } from "../../reactShapeBase";
|
|
18
|
+
export var shapeName = 'ele-border-box9';
|
|
19
|
+
var EleBorderBox9 = /*#__PURE__*/function (_ReactShapeBase) {
|
|
20
|
+
_inherits(EleBorderBox9, _ReactShapeBase);
|
|
21
|
+
var _super = _createSuper(EleBorderBox9);
|
|
22
|
+
function EleBorderBox9() {
|
|
23
|
+
var _this;
|
|
24
|
+
_classCallCheck(this, EleBorderBox9);
|
|
25
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26
|
+
args[_key] = arguments[_key];
|
|
27
|
+
}
|
|
28
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
29
|
+
_this.shapeName = shapeName;
|
|
30
|
+
return _this;
|
|
31
|
+
}
|
|
32
|
+
return _createClass(EleBorderBox9);
|
|
33
|
+
}(ReactShapeBase);
|
|
34
|
+
EleBorderBox9.shapeName = shapeName;
|
|
35
|
+
/** 注册的 react 组件名称 */
|
|
36
|
+
var registerComponentName = "".concat(EleBorderBox9.shapeName, "-component");
|
|
37
|
+
export var defaultConfig = {
|
|
38
|
+
shape: EleBorderBox9.shapeName,
|
|
39
|
+
width: 250,
|
|
40
|
+
height: 150,
|
|
41
|
+
data: {
|
|
42
|
+
colors: ['#11eefd', '#0078d2']
|
|
43
|
+
},
|
|
44
|
+
component: registerComponentName
|
|
45
|
+
};
|
|
46
|
+
EleBorderBox9.config(defaultConfig);
|
|
47
|
+
|
|
48
|
+
// 注册 react 组件
|
|
49
|
+
Graph.registerReactComponent(registerComponentName, /*#__PURE__*/React.createElement(EleBorderBox9Component, null));
|
|
50
|
+
export { EleBorderBox9Component };
|
|
51
|
+
export default EleBorderBox9;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { useEffect } from 'react';
|
|
9
|
+
import { Form } from 'antd';
|
|
10
|
+
import { useModel } from 'umi';
|
|
11
|
+
import ColorPicker from "../../../components/ColorPicker";
|
|
12
|
+
var ColorSet = function ColorSet() {
|
|
13
|
+
var _Form$useForm = Form.useForm(),
|
|
14
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
15
|
+
form = _Form$useForm2[0];
|
|
16
|
+
var _useModel = useModel('useEditor', function (model) {
|
|
17
|
+
return {
|
|
18
|
+
activeNode: model.activeNode
|
|
19
|
+
};
|
|
20
|
+
}),
|
|
21
|
+
activeNode = _useModel.activeNode;
|
|
22
|
+
useEffect(function () {
|
|
23
|
+
var payload = activeNode === null || activeNode === void 0 ? void 0 : activeNode.getData();
|
|
24
|
+
if (Array.isArray(payload === null || payload === void 0 ? void 0 : payload.colors) && (payload === null || payload === void 0 ? void 0 : payload.colors.length) === 2) {
|
|
25
|
+
var colors = payload.colors;
|
|
26
|
+
form.setFieldsValue({
|
|
27
|
+
color1: colors[0],
|
|
28
|
+
color2: colors[1]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}, [form, activeNode]);
|
|
32
|
+
var onFormChange = function onFormChange(changedValues, values) {
|
|
33
|
+
var color1 = values.color1,
|
|
34
|
+
color2 = values.color2;
|
|
35
|
+
activeNode === null || activeNode === void 0 ? void 0 : activeNode.setData({
|
|
36
|
+
colors: [color1, color2]
|
|
37
|
+
}, {
|
|
38
|
+
deep: false
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
return /*#__PURE__*/React.createElement(Form, {
|
|
42
|
+
layout: "vertical",
|
|
43
|
+
form: form,
|
|
44
|
+
size: "small",
|
|
45
|
+
onValuesChange: onFormChange
|
|
46
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
47
|
+
noStyle: true
|
|
48
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
49
|
+
className: "half-form-item",
|
|
50
|
+
name: "color1",
|
|
51
|
+
label: "\u989C\u82721"
|
|
52
|
+
}, /*#__PURE__*/React.createElement(ColorPicker, null)), /*#__PURE__*/React.createElement("span", {
|
|
53
|
+
className: "half-form-item-space"
|
|
54
|
+
}), /*#__PURE__*/React.createElement(Form.Item, {
|
|
55
|
+
className: "half-form-item",
|
|
56
|
+
name: "color2",
|
|
57
|
+
label: "\u989C\u82722"
|
|
58
|
+
}, /*#__PURE__*/React.createElement(ColorPicker, null))));
|
|
59
|
+
};
|
|
60
|
+
export default ColorSet;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Collapse } from 'antd';
|
|
3
|
+
import { CaretRightOutlined } from '@ant-design/icons';
|
|
4
|
+
import ColorSet from "./ColorSet";
|
|
5
|
+
var Panel = Collapse.Panel;
|
|
6
|
+
var PropsSet = function PropsSet() {
|
|
7
|
+
return /*#__PURE__*/React.createElement(Collapse, {
|
|
8
|
+
defaultActiveKey: ['1'],
|
|
9
|
+
ghost: true,
|
|
10
|
+
expandIcon: function expandIcon(_ref) {
|
|
11
|
+
var isActive = _ref.isActive;
|
|
12
|
+
return /*#__PURE__*/React.createElement(CaretRightOutlined, {
|
|
13
|
+
rotate: isActive ? 90 : 0
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}, /*#__PURE__*/React.createElement(Panel, {
|
|
17
|
+
header: "\u989C\u8272",
|
|
18
|
+
key: "1"
|
|
19
|
+
}, /*#__PURE__*/React.createElement(ColorSet, null)));
|
|
20
|
+
};
|
|
21
|
+
export default PropsSet;
|