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.
Files changed (471) hide show
  1. package/README.md +21 -0
  2. package/es/app.js +52 -0
  3. package/es/componentIndex.js +7 -0
  4. package/es/components/BoxShadowPicker/index.css +22 -0
  5. package/es/components/BoxShadowPicker/index.js +114 -0
  6. package/es/components/BoxShadowPicker/index.less.d.ts +9 -0
  7. package/es/components/Button/index.js +6 -0
  8. package/es/components/ColorPalette/index.js +12 -0
  9. package/es/components/ColorPicker/index.css +38 -0
  10. package/es/components/ColorPicker/index.js +103 -0
  11. package/es/components/ColorPicker/util.js +31 -0
  12. package/es/components/DeviceSelect/DeviceTable.js +320 -0
  13. package/es/components/DeviceSelect/index.css +6 -0
  14. package/es/components/DeviceSelect/index.js +112 -0
  15. package/es/components/DialogExpression/ImagePicker/index.css +13 -0
  16. package/es/components/DialogExpression/ImagePicker/index.js +44 -0
  17. package/es/components/DialogExpression/index.css +9 -0
  18. package/es/components/DialogExpression/index.js +270 -0
  19. package/es/components/DialogHistory/index.css +10 -0
  20. package/es/components/DialogHistory/index.js +383 -0
  21. package/es/components/DialogIconPicker/data.js +179 -0
  22. package/es/components/DialogIconPicker/index.css +30 -0
  23. package/es/components/DialogIconPicker/index.js +101 -0
  24. package/es/components/DialogImagePicker/Gallery/index.css +0 -0
  25. package/es/components/DialogImagePicker/Gallery/index.js +96 -0
  26. package/es/components/DialogImagePicker/GroupPanel/index.css +3 -0
  27. package/es/components/DialogImagePicker/GroupPanel/index.js +89 -0
  28. package/es/components/DialogImagePicker/index.css +25 -0
  29. package/es/components/DialogImagePicker/index.js +85 -0
  30. package/es/components/DialogPointWrite/PointItem.js +91 -0
  31. package/es/components/DialogPointWrite/index.js +124 -0
  32. package/es/components/ECharts/index.css +5 -0
  33. package/es/components/ECharts/index.js +94 -0
  34. package/es/components/ExpressionFormat/index.css +22 -0
  35. package/es/components/ExpressionFormat/index.js +50 -0
  36. package/es/components/FontFamilySelect/index.js +25 -0
  37. package/es/components/FontFamilySelect/list.js +2194 -0
  38. package/es/components/FontStyleForm/index.css +3 -0
  39. package/es/components/FontStyleForm/index.js +170 -0
  40. package/es/components/FormBindPoint/FreedomScene.js +207 -0
  41. package/es/components/FormBindPoint/ProductionOrDeviceScene.js +172 -0
  42. package/es/components/FormBindPoint/index.css +0 -0
  43. package/es/components/FormBindPoint/index.js +17 -0
  44. package/es/components/FormIconSelect/index.js +62 -0
  45. package/es/components/FormNodeData/index.js +82 -0
  46. package/es/components/FormNodeData/utils/valueUtil.js +8 -0
  47. package/es/components/Icon/index.js +6 -0
  48. package/es/components/ImageUploader/index.js +172 -0
  49. package/es/components/LockBtn/index.css +4 -0
  50. package/es/components/LockBtn/index.js +45 -0
  51. package/es/components/Margin_Padding/index.css +3 -0
  52. package/es/components/Margin_Padding/index.js +155 -0
  53. package/es/components/MouseTooltip/index.css +7 -0
  54. package/es/components/MouseTooltip/index.js +57 -0
  55. package/es/components/NeedBindPointHint/index.css +12 -0
  56. package/es/components/NeedBindPointHint/index.js +15 -0
  57. package/es/components/PaddingPicker/index.css +22 -0
  58. package/es/components/PaddingPicker/index.js +95 -0
  59. package/es/components/PageLoading/index.css +29 -0
  60. package/es/components/PageLoading/index.js +30 -0
  61. package/es/components/PointEnumNameFormat/index.css +4 -0
  62. package/es/components/PointEnumNameFormat/index.js +9 -0
  63. package/es/components/PointInfoTip/index.css +3 -0
  64. package/es/components/PointInfoTip/index.js +193 -0
  65. package/es/components/PointSelect/DevicePointTable.js +128 -0
  66. package/es/components/PointSelect/ProductPointTable.js +98 -0
  67. package/es/components/PointSelect/index.css +9 -0
  68. package/es/components/PointSelect/index.js +278 -0
  69. package/es/components/Prompt/index.js +126 -0
  70. package/es/components/SliderWithInput/index.css +11 -0
  71. package/es/components/SliderWithInput/index.js +67 -0
  72. package/es/components/Switch/index.js +69 -0
  73. package/es/components/TranslateButton/index.js +26 -0
  74. package/es/constant.js +16 -0
  75. package/es/edge/EdgeLinePort/PropsSet/Flow.js +173 -0
  76. package/es/edge/EdgeLinePort/PropsSet/Line.js +73 -0
  77. package/es/edge/EdgeLinePort/PropsSet/Marker.js +81 -0
  78. package/es/edge/EdgeLinePort/PropsSet/index.js +25 -0
  79. package/es/edge/EdgeLinePort/index.js +91 -0
  80. package/es/edge/EdgePipe/PropsSet/Flow.js +173 -0
  81. package/es/edge/EdgePipe/PropsSet/Pipe.js +73 -0
  82. package/es/edge/EdgePipe/PropsSet/index.js +34 -0
  83. package/es/edge/EdgePipe/index.css +10 -0
  84. package/es/edge/EdgePipe/index.js +181 -0
  85. package/es/edge/register.js +6 -0
  86. package/es/element/BasicShape/Circle/index.js +81 -0
  87. package/es/element/BasicShape/CommentBox/index.js +77 -0
  88. package/es/element/BasicShape/CommentBox2/index.js +78 -0
  89. package/es/element/BasicShape/Ellipse/index.js +80 -0
  90. package/es/element/BasicShape/Heart/index.js +75 -0
  91. package/es/element/BasicShape/Lightning/index.js +75 -0
  92. package/es/element/BasicShape/PropsForm/index.css +0 -0
  93. package/es/element/BasicShape/PropsForm/index.js +80 -0
  94. package/es/element/BasicShape/Rectangle/index.js +78 -0
  95. package/es/element/BasicShape/Star/index.js +75 -0
  96. package/es/element/BorderBox/BorderBox1/Component.js +74 -0
  97. package/es/element/BorderBox/BorderBox1/index.css +27 -0
  98. package/es/element/BorderBox/BorderBox1/index.js +51 -0
  99. package/es/element/BorderBox/BorderBox10/Component.js +61 -0
  100. package/es/element/BorderBox/BorderBox10/index.css +28 -0
  101. package/es/element/BorderBox/BorderBox10/index.js +51 -0
  102. package/es/element/BorderBox/BorderBox12/Component.js +109 -0
  103. package/es/element/BorderBox/BorderBox12/index.css +17 -0
  104. package/es/element/BorderBox/BorderBox12/index.js +51 -0
  105. package/es/element/BorderBox/BorderBox13/Component.js +55 -0
  106. package/es/element/BorderBox/BorderBox13/index.css +17 -0
  107. package/es/element/BorderBox/BorderBox13/index.js +51 -0
  108. package/es/element/BorderBox/BorderBox2/Component.js +65 -0
  109. package/es/element/BorderBox/BorderBox2/index.css +21 -0
  110. package/es/element/BorderBox/BorderBox2/index.js +51 -0
  111. package/es/element/BorderBox/BorderBox3/Component.js +55 -0
  112. package/es/element/BorderBox/BorderBox3/index.css +26 -0
  113. package/es/element/BorderBox/BorderBox3/index.js +51 -0
  114. package/es/element/BorderBox/BorderBox4/Component.js +81 -0
  115. package/es/element/BorderBox/BorderBox4/index.css +66 -0
  116. package/es/element/BorderBox/BorderBox4/index.js +51 -0
  117. package/es/element/BorderBox/BorderBox5/Component.js +65 -0
  118. package/es/element/BorderBox/BorderBox5/index.css +35 -0
  119. package/es/element/BorderBox/BorderBox5/index.js +51 -0
  120. package/es/element/BorderBox/BorderBox6/Component.js +95 -0
  121. package/es/element/BorderBox/BorderBox6/index.css +21 -0
  122. package/es/element/BorderBox/BorderBox6/index.js +51 -0
  123. package/es/element/BorderBox/BorderBox7/Component.js +70 -0
  124. package/es/element/BorderBox/BorderBox7/index.css +27 -0
  125. package/es/element/BorderBox/BorderBox7/index.js +51 -0
  126. package/es/element/BorderBox/BorderBox8/Component.js +113 -0
  127. package/es/element/BorderBox/BorderBox8/index.css +17 -0
  128. package/es/element/BorderBox/BorderBox8/index.js +51 -0
  129. package/es/element/BorderBox/BorderBox9/Component.js +137 -0
  130. package/es/element/BorderBox/BorderBox9/index.css +17 -0
  131. package/es/element/BorderBox/BorderBox9/index.js +51 -0
  132. package/es/element/BorderBox/PropsSet/ColorSet.js +60 -0
  133. package/es/element/BorderBox/PropsSet/index.js +21 -0
  134. package/es/element/BorderBox/util/index.js +7 -0
  135. package/es/element/BorderBox/util/typings.d.ts +9 -0
  136. package/es/element/Decoration/Decoration1/Component.js +126 -0
  137. package/es/element/Decoration/Decoration1/index.css +7 -0
  138. package/es/element/Decoration/Decoration1/index.js +51 -0
  139. package/es/element/Decoration/Decoration10/Component.js +171 -0
  140. package/es/element/Decoration/Decoration10/index.css +5 -0
  141. package/es/element/Decoration/Decoration10/index.js +51 -0
  142. package/es/element/Decoration/Decoration2/Component.js +81 -0
  143. package/es/element/Decoration/Decoration2/index.css +10 -0
  144. package/es/element/Decoration/Decoration2/index.js +51 -0
  145. package/es/element/Decoration/Decoration3/Component.js +81 -0
  146. package/es/element/Decoration/Decoration3/index.css +7 -0
  147. package/es/element/Decoration/Decoration3/index.js +51 -0
  148. package/es/element/Decoration/Decoration4/Component.js +54 -0
  149. package/es/element/Decoration/Decoration4/index.css +43 -0
  150. package/es/element/Decoration/Decoration4/index.js +51 -0
  151. package/es/element/Decoration/Decoration5/Component.js +86 -0
  152. package/es/element/Decoration/Decoration5/index.css +4 -0
  153. package/es/element/Decoration/Decoration5/index.js +51 -0
  154. package/es/element/Decoration/Decoration6/Component.js +120 -0
  155. package/es/element/Decoration/Decoration6/index.css +7 -0
  156. package/es/element/Decoration/Decoration6/index.js +51 -0
  157. package/es/element/Decoration/Decoration8/Component.js +62 -0
  158. package/es/element/Decoration/Decoration8/index.css +5 -0
  159. package/es/element/Decoration/Decoration8/index.js +51 -0
  160. package/es/element/Decoration/PropsSet/ColorSet.js +60 -0
  161. package/es/element/Decoration/PropsSet/index.js +21 -0
  162. package/es/element/Decoration/util/index.js +33 -0
  163. package/es/element/Decoration/util/typings.d.ts +9 -0
  164. package/es/element/EleButton/Component.js +49 -0
  165. package/es/element/EleButton/PropsSet/TextPropsSet/index.js +27 -0
  166. package/es/element/EleButton/PropsSet/index.js +25 -0
  167. package/es/element/EleButton/index.css +15 -0
  168. package/es/element/EleButton/index.js +66 -0
  169. package/es/element/EleClock/Component.js +60 -0
  170. package/es/element/EleClock/PropsSet/index.js +46 -0
  171. package/es/element/EleClock/index.css +7 -0
  172. package/es/element/EleClock/index.js +55 -0
  173. package/es/element/EleContainer/Component.js +22 -0
  174. package/es/element/EleContainer/PropsSet/OtherPropsSet/index.js +63 -0
  175. package/es/element/EleContainer/PropsSet/index.js +29 -0
  176. package/es/element/EleContainer/index.css +4 -0
  177. package/es/element/EleContainer/index.js +54 -0
  178. package/es/element/EleDeviceName/Component.js +81 -0
  179. package/es/element/EleDeviceName/PropsSet/FormBindDevice/index.js +52 -0
  180. package/es/element/EleDeviceName/PropsSet/index.js +26 -0
  181. package/es/element/EleDeviceName/index.css +11 -0
  182. package/es/element/EleDeviceName/index.js +57 -0
  183. package/es/element/EleDeviceState/Component.js +103 -0
  184. package/es/element/EleDeviceState/PropsSet/FormBindDevice/index.js +53 -0
  185. package/es/element/EleDeviceState/PropsSet/index.js +26 -0
  186. package/es/element/EleDeviceState/index.css +13 -0
  187. package/es/element/EleDeviceState/index.js +62 -0
  188. package/es/element/EleDeviceUpdateTime/Component.js +94 -0
  189. package/es/element/EleDeviceUpdateTime/PropsSet/FormBindDateFormat/index.js +32 -0
  190. package/es/element/EleDeviceUpdateTime/PropsSet/FormBindDevice/index.js +52 -0
  191. package/es/element/EleDeviceUpdateTime/PropsSet/index.js +27 -0
  192. package/es/element/EleDeviceUpdateTime/index.css +9 -0
  193. package/es/element/EleDeviceUpdateTime/index.js +57 -0
  194. package/es/element/EleFan/Component.js +74 -0
  195. package/es/element/EleFan/PropsSet/FormBindDevice/index.js +46 -0
  196. package/es/element/EleFan/PropsSet/FormBindPoint/FaultQuestion.js +18 -0
  197. package/es/element/EleFan/PropsSet/FormBindPoint/FrostQuestion.js +18 -0
  198. package/es/element/EleFan/PropsSet/FormBindPoint/RefrigerationQuestion.js +18 -0
  199. package/es/element/EleFan/PropsSet/FormBindPoint/SwitchQuestion.js +12 -0
  200. package/es/element/EleFan/PropsSet/FormBindPoint/index.js +519 -0
  201. package/es/element/EleFan/PropsSet/index.js +66 -0
  202. package/es/element/EleFan/Tooltip.js +8 -0
  203. package/es/element/EleFan/index.css +25 -0
  204. package/es/element/EleFan/index.js +113 -0
  205. package/es/element/EleFanBySvg/PropsSet/FormBindPoint/FaultQuestion.js +18 -0
  206. package/es/element/EleFanBySvg/PropsSet/FormBindPoint/FrostQuestion.js +18 -0
  207. package/es/element/EleFanBySvg/PropsSet/FormBindPoint/RefrigerationQuestion.js +18 -0
  208. package/es/element/EleFanBySvg/PropsSet/FormBindPoint/SwitchQuestion.js +12 -0
  209. package/es/element/EleFanBySvg/PropsSet/FormBindPoint/index.js +473 -0
  210. package/es/element/EleFanBySvg/PropsSet/index.js +25 -0
  211. package/es/element/EleFanBySvg/Tooltip.js +8 -0
  212. package/es/element/EleFanBySvg/index.js +320 -0
  213. package/es/element/EleGauge/Component.js +128 -0
  214. package/es/element/EleGauge/PropsSet/OtherPropsSet/index.js +92 -0
  215. package/es/element/EleGauge/PropsSet/index.js +29 -0
  216. package/es/element/EleGauge/index.css +7 -0
  217. package/es/element/EleGauge/index.js +66 -0
  218. package/es/element/EleIcon/Component.js +53 -0
  219. package/es/element/EleIcon/PropsSet/IconPropsSet/index.js +105 -0
  220. package/es/element/EleIcon/PropsSet/index.js +29 -0
  221. package/es/element/EleIcon/index.css +13 -0
  222. package/es/element/EleIcon/index.js +58 -0
  223. package/es/element/EleImage/PropsSet/ImagePropsSet/index.js +56 -0
  224. package/es/element/EleImage/PropsSet/index.js +21 -0
  225. package/es/element/EleImage/index.js +61 -0
  226. package/es/element/EleIndicatorLight/Component.js +57 -0
  227. package/es/element/EleIndicatorLight/PropsSet/ColorPropsSet/index.js +63 -0
  228. package/es/element/EleIndicatorLight/PropsSet/index.js +29 -0
  229. package/es/element/EleIndicatorLight/index.css +4 -0
  230. package/es/element/EleIndicatorLight/index.js +66 -0
  231. package/es/element/ElePointImage/Component.js +60 -0
  232. package/es/element/ElePointImage/PropsSet/ImagePropsSet/index.js +84 -0
  233. package/es/element/ElePointImage/PropsSet/index.js +29 -0
  234. package/es/element/ElePointImage/index.css +9 -0
  235. package/es/element/ElePointImage/index.js +58 -0
  236. package/es/element/ElePointList/Component.js +142 -0
  237. package/es/element/ElePointList/PropsSet/index.js +25 -0
  238. package/es/element/ElePointList/index.css +22 -0
  239. package/es/element/ElePointList/index.js +67 -0
  240. package/es/element/ElePointState/Component.js +71 -0
  241. package/es/element/ElePointState/PropsSet/IconPropsSet/index.js +140 -0
  242. package/es/element/ElePointState/PropsSet/index.js +29 -0
  243. package/es/element/ElePointState/index.css +10 -0
  244. package/es/element/ElePointState/index.js +60 -0
  245. package/es/element/ElePointValue/Component.js +79 -0
  246. package/es/element/ElePointValue/PropsSet/GlobalPropSet/index.js +60 -0
  247. package/es/element/ElePointValue/PropsSet/TitlePropsSet/index.js +42 -0
  248. package/es/element/ElePointValue/PropsSet/UnitPropsSet/index.js +54 -0
  249. package/es/element/ElePointValue/PropsSet/ValuePropsSet/index.js +119 -0
  250. package/es/element/ElePointValue/PropsSet/index.js +41 -0
  251. package/es/element/ElePointValue/index.css +30 -0
  252. package/es/element/ElePointValue/index.js +63 -0
  253. package/es/element/EleShine/Component.js +61 -0
  254. package/es/element/EleShine/PropsSet/OtherPropsSet/index.js +63 -0
  255. package/es/element/EleShine/PropsSet/index.js +29 -0
  256. package/es/element/EleShine/index.css +15 -0
  257. package/es/element/EleShine/index.js +70 -0
  258. package/es/element/EleState/Tooltip.js +8 -0
  259. package/es/element/EleState/index.js +115 -0
  260. package/es/element/EleSvg/index.js +35 -0
  261. package/es/element/EleSwitch/Component.js +66 -0
  262. package/es/element/EleSwitch/PropsSet/OtherPropsSet/index.js +49 -0
  263. package/es/element/EleSwitch/PropsSet/index.js +25 -0
  264. package/es/element/EleSwitch/index.css +6 -0
  265. package/es/element/EleSwitch/index.js +62 -0
  266. package/es/element/EleText/Component.js +19 -0
  267. package/es/element/EleText/index.css +6 -0
  268. package/es/element/EleText/index.js +69 -0
  269. package/es/element/PipeNodes/NodeBL/index.js +74 -0
  270. package/es/element/PipeNodes/NodeBR/index.js +75 -0
  271. package/es/element/PipeNodes/NodeBottom/index.js +82 -0
  272. package/es/element/PipeNodes/NodeCenter/index.js +89 -0
  273. package/es/element/PipeNodes/NodeHorizontal/index.js +72 -0
  274. package/es/element/PipeNodes/NodeLeft/index.js +81 -0
  275. package/es/element/PipeNodes/NodeRight/index.js +81 -0
  276. package/es/element/PipeNodes/NodeTL/index.js +74 -0
  277. package/es/element/PipeNodes/NodeTL.TEMP/index.js +151 -0
  278. package/es/element/PipeNodes/NodeTR/index.js +74 -0
  279. package/es/element/PipeNodes/NodeTop/index.js +81 -0
  280. package/es/element/PipeNodes/NodeVertical/index.js +72 -0
  281. package/es/element/PipeNodes/portStyle.js +18 -0
  282. package/es/element/PointCard/PointCard1/Component.js +97 -0
  283. package/es/element/PointCard/PointCard1/PropsSet/IconPropsSet/index.js +147 -0
  284. package/es/element/PointCard/PointCard1/PropsSet/PointValuePropsSet/index.js +120 -0
  285. package/es/element/PointCard/PointCard1/PropsSet/TitlePropsSet/index.js +43 -0
  286. package/es/element/PointCard/PointCard1/PropsSet/index.js +37 -0
  287. package/es/element/PointCard/PointCard1/index.css +44 -0
  288. package/es/element/PointCard/PointCard1/index.js +88 -0
  289. package/es/element/PointCard/PointCard2/Component/PointItem.js +87 -0
  290. package/es/element/PointCard/PointCard2/Component/PointItemPlaceholder.js +33 -0
  291. package/es/element/PointCard/PointCard2/Component/index.css +30 -0
  292. package/es/element/PointCard/PointCard2/Component/index.js +53 -0
  293. package/es/element/PointCard/PointCard2/PropsSet/GlobalPropSet/index.js +14 -0
  294. package/es/element/PointCard/PointCard2/PropsSet/IconPropsSet/index.js +32 -0
  295. package/es/element/PointCard/PointCard2/PropsSet/PointItemSetDrawer/index.css +7 -0
  296. package/es/element/PointCard/PointCard2/PropsSet/PointItemSetDrawer/index.js +175 -0
  297. package/es/element/PointCard/PointCard2/PropsSet/TitlePropsSet/index.js +31 -0
  298. package/es/element/PointCard/PointCard2/PropsSet/index.js +52 -0
  299. package/es/element/PointCard/PointCard2/index.js +79 -0
  300. package/es/element/PointCard/PointCard3/Component.js +107 -0
  301. package/es/element/PointCard/PointCard3/PropsSet/IconPropsSet/index.js +178 -0
  302. package/es/element/PointCard/PointCard3/PropsSet/TitlePropsSet/index.js +43 -0
  303. package/es/element/PointCard/PointCard3/PropsSet/index.js +33 -0
  304. package/es/element/PointCard/PointCard3/index.css +26 -0
  305. package/es/element/PointCard/PointCard3/index.js +79 -0
  306. package/es/element/PointCard/PointListCard/Component.js +169 -0
  307. package/es/element/PointCard/PointListCard/PropsSet/GlobalPropSet/index.js +14 -0
  308. package/es/element/PointCard/PointListCard/PropsSet/LabelPropsSet/index.js +31 -0
  309. package/es/element/PointCard/PointListCard/PropsSet/TitlePropsSet/index.js +43 -0
  310. package/es/element/PointCard/PointListCard/PropsSet/ValuePropsSet/index.js +31 -0
  311. package/es/element/PointCard/PointListCard/PropsSet/index.js +41 -0
  312. package/es/element/PointCard/PointListCard/index.css +24 -0
  313. package/es/element/PointCard/PointListCard/index.js +87 -0
  314. package/es/element/PointControl/PointControl1/Component.js +110 -0
  315. package/es/element/PointControl/PointControl1/PropsSet/GlobalPropsSet/index.js +16 -0
  316. package/es/element/PointControl/PointControl1/PropsSet/PointValuePropsSet/index.js +31 -0
  317. package/es/element/PointControl/PointControl1/PropsSet/TitlePropsSet/index.js +43 -0
  318. package/es/element/PointControl/PointControl1/PropsSet/index.js +33 -0
  319. package/es/element/PointControl/PointControl1/index.css +21 -0
  320. package/es/element/PointControl/PointControl1/index.js +83 -0
  321. package/es/element/PointControl/PointControl3/Component.js +123 -0
  322. package/es/element/PointControl/PointControl3/PropsSet/IconPropsSet/index.js +147 -0
  323. package/es/element/PointControl/PointControl3/PropsSet/SubTitlePropsSet/index.js +53 -0
  324. package/es/element/PointControl/PointControl3/PropsSet/SwitchPropsSet/index.js +49 -0
  325. package/es/element/PointControl/PointControl3/PropsSet/TitlePropsSet/index.js +43 -0
  326. package/es/element/PointControl/PointControl3/PropsSet/index.js +41 -0
  327. package/es/element/PointControl/PointControl3/index.css +8 -0
  328. package/es/element/PointControl/PointControl3/index.js +94 -0
  329. package/es/element/nodeBase.js +48 -0
  330. package/es/element/reactShapeBase.js +47 -0
  331. package/es/element/register.js +131 -0
  332. package/es/element/type.d.ts +143 -0
  333. package/es/element/utils/getValueByExpression.js +22 -0
  334. package/es/element/utils/handleEleEvent.js +60 -0
  335. package/es/element/utils/index.js +4 -0
  336. package/es/element/utils/pointWrite.js +197 -0
  337. package/es/element/utils/shapeReactComponentShouldUpdate.js +7 -0
  338. package/es/global.css +162 -0
  339. package/es/graph/graphCore.js +501 -0
  340. package/es/graph/tools/ToolTipTool.js +139 -0
  341. package/es/graph/tools/registerX6Tool.js +1 -0
  342. package/es/hooks/index.js +7 -0
  343. package/es/hooks/useCMDKey.js +19 -0
  344. package/es/hooks/useEleEventHandle.js +36 -0
  345. package/es/hooks/useFirstMountState.js +9 -0
  346. package/es/hooks/useForceUpdate.js +23 -0
  347. package/es/hooks/useMittNamespace.js +7 -0
  348. package/es/hooks/usePointWatch.js +30 -0
  349. package/es/hooks/useQuery.js +6 -0
  350. package/es/models/useEditor.js +185 -0
  351. package/es/models/useElePanel.js +23 -0
  352. package/es/pages/display/Player/index.css +15 -0
  353. package/es/pages/display/Player/index.js +434 -0
  354. package/es/pages/display/components/Empty/index.css +9 -0
  355. package/es/pages/display/components/Empty/index.js +22 -0
  356. package/es/pages/display/components/Tools/index.js +86 -0
  357. package/es/pages/display/index.css +4 -0
  358. package/es/pages/display/index.js +231 -0
  359. package/es/pages/document.ejs +77 -0
  360. package/es/pages/editor/Palette/PaletteDropdown/index.css +9 -0
  361. package/es/pages/editor/Palette/PaletteDropdown/index.js +178 -0
  362. package/es/pages/editor/Palette/index.css +13 -0
  363. package/es/pages/editor/Palette/index.js +86 -0
  364. package/es/pages/editor/PanelLeft/BasicShapeList/index.js +32 -0
  365. package/es/pages/editor/PanelLeft/BasicShapeList/listData.js +63 -0
  366. package/es/pages/editor/PanelLeft/BorderBoxEleList/index.css +9 -0
  367. package/es/pages/editor/PanelLeft/BorderBoxEleList/index.js +19 -0
  368. package/es/pages/editor/PanelLeft/BorderBoxEleList/index.less.d.ts +7 -0
  369. package/es/pages/editor/PanelLeft/BorderBoxEleList/listData.js +49 -0
  370. package/es/pages/editor/PanelLeft/DecorationEleList/index.css +12 -0
  371. package/es/pages/editor/PanelLeft/DecorationEleList/index.js +21 -0
  372. package/es/pages/editor/PanelLeft/DecorationEleList/index.less.d.ts +7 -0
  373. package/es/pages/editor/PanelLeft/DecorationEleList/listData.js +65 -0
  374. package/es/pages/editor/PanelLeft/GroupManageDialog/index.css +32 -0
  375. package/es/pages/editor/PanelLeft/GroupManageDialog/index.js +300 -0
  376. package/es/pages/editor/PanelLeft/ImgConfigDialog/index.css +0 -0
  377. package/es/pages/editor/PanelLeft/ImgConfigDialog/index.js +220 -0
  378. package/es/pages/editor/PanelLeft/ImgGroup/index.css +62 -0
  379. package/es/pages/editor/PanelLeft/ImgGroup/index.js +317 -0
  380. package/es/pages/editor/PanelLeft/MetaEleList/index.js +37 -0
  381. package/es/pages/editor/PanelLeft/MetaEleList/listData.js +88 -0
  382. package/es/pages/editor/PanelLeft/MineImgGroup/index.css +0 -0
  383. package/es/pages/editor/PanelLeft/MineImgGroup/index.js +163 -0
  384. package/es/pages/editor/PanelLeft/PipeEleList/index.css +0 -0
  385. package/es/pages/editor/PanelLeft/PipeEleList/index.js +33 -0
  386. package/es/pages/editor/PanelLeft/PipeEleList/listData.js +69 -0
  387. package/es/pages/editor/PanelLeft/PointCardEleList/index.js +31 -0
  388. package/es/pages/editor/PanelLeft/PointCardEleList/listData.js +37 -0
  389. package/es/pages/editor/PanelLeft/RecommendEleList/index.js +37 -0
  390. package/es/pages/editor/PanelLeft/RecommendEleList/listData.js +27 -0
  391. package/es/pages/editor/PanelLeft/SystemImgGroupList/index.css +6 -0
  392. package/es/pages/editor/PanelLeft/SystemImgGroupList/index.js +119 -0
  393. package/es/pages/editor/PanelLeft/index.css +100 -0
  394. package/es/pages/editor/PanelLeft/index.js +200 -0
  395. package/es/pages/editor/PanelLeft/index.less.d.ts +11 -0
  396. package/es/pages/editor/PanelRight/components/FormBindEvent/index.js +202 -0
  397. package/es/pages/editor/PanelRight/components/FormEleBorderStyle/index.js +145 -0
  398. package/es/pages/editor/PanelRight/components/FormEleLayout/index.css +8 -0
  399. package/es/pages/editor/PanelRight/components/FormEleLayout/index.js +214 -0
  400. package/es/pages/editor/PanelRight/components/FormElePadding/index.js +11 -0
  401. package/es/pages/editor/PanelRight/components/FormFillStyle/index.js +92 -0
  402. package/es/pages/editor/PanelRight/components/FormFontStyle/index.js +186 -0
  403. package/es/pages/editor/PanelRight/components/FormLayer/index.js +222 -0
  404. package/es/pages/editor/PanelRight/index.css +26 -0
  405. package/es/pages/editor/PanelRight/index.js +164 -0
  406. package/es/pages/editor/PanelRight/index.less.d.ts +7 -0
  407. package/es/pages/editor/PanelTop/FullScreen/index.js +31 -0
  408. package/es/pages/editor/PanelTop/HistoryControl/index.js +78 -0
  409. package/es/pages/editor/PanelTop/HotKeyDescribe/index.css +35 -0
  410. package/es/pages/editor/PanelTop/HotKeyDescribe/index.js +114 -0
  411. package/es/pages/editor/PanelTop/HotKeyDescribe/index.less.d.ts +10 -0
  412. package/es/pages/editor/PanelTop/Save/index.js +179 -0
  413. package/es/pages/editor/PanelTop/ZoomControl/index.css +0 -0
  414. package/es/pages/editor/PanelTop/ZoomControl/index.js +100 -0
  415. package/es/pages/editor/PanelTop/index.css +57 -0
  416. package/es/pages/editor/PanelTop/index.js +321 -0
  417. package/es/pages/editor/index.css +39 -0
  418. package/es/pages/editor/index.js +298 -0
  419. package/es/provider/index.js +2 -0
  420. package/es/provider/mittMeat.js +4 -0
  421. package/es/services/common/Uploader.js +45 -0
  422. package/es/services/common/index.js +8 -0
  423. package/es/services/common/typings.d.ts +15 -0
  424. package/es/services/gateway/CompanyConfiguration.js +87 -0
  425. package/es/services/gateway/Device.js +437 -0
  426. package/es/services/gateway/DeviceAuthorizationApply.js +111 -0
  427. package/es/services/gateway/DeviceGroup.js +137 -0
  428. package/es/services/gateway/Gateway.js +442 -0
  429. package/es/services/gateway/GatewayGroup.js +112 -0
  430. package/es/services/gateway/Point.js +137 -0
  431. package/es/services/gateway/UserDevice.js +112 -0
  432. package/es/services/gateway/index.js +22 -0
  433. package/es/services/gateway/typings.d.ts +1674 -0
  434. package/es/services/master/Func.js +33 -0
  435. package/es/services/master/Role.js +153 -0
  436. package/es/services/master/User.js +244 -0
  437. package/es/services/master/index.js +12 -0
  438. package/es/services/master/typings.d.ts +362 -0
  439. package/es/services/product/ConfigurationImg.js +87 -0
  440. package/es/services/product/ConfigurationImgGroup.js +87 -0
  441. package/es/services/product/DeviceType.js +37 -0
  442. package/es/services/product/Identifier.js +33 -0
  443. package/es/services/product/PointEnum.js +87 -0
  444. package/es/services/product/PointGroup.js +112 -0
  445. package/es/services/product/Product.js +351 -0
  446. package/es/services/product/ProductCompany.js +183 -0
  447. package/es/services/product/index.js +22 -0
  448. package/es/services/product/typings.d.ts +1045 -0
  449. package/es/services/project/ProjectGateway.js +62 -0
  450. package/es/services/project/ProjectResource.js +205 -0
  451. package/es/services/project/ProjectRole.js +302 -0
  452. package/es/services/project/ProjectUserPermission.js +217 -0
  453. package/es/services/project/Subarea.js +236 -0
  454. package/es/services/project/UserSubarea.js +62 -0
  455. package/es/services/project/index.js +18 -0
  456. package/es/services/project/typings.d.ts +1609 -0
  457. package/es/services/request.js +196 -0
  458. package/es/shims.x6.d.ts +15 -0
  459. package/es/typings.d.ts +182 -0
  460. package/es/utils/auth.js +90 -0
  461. package/es/utils/cssStyle.js +11 -0
  462. package/es/utils/decomposeMatrix.js +46 -0
  463. package/es/utils/events.js +7 -0
  464. package/es/utils/getMittMeta.js +14 -0
  465. package/es/utils/index.js +163 -0
  466. package/es/utils/isInIframe.js +8 -0
  467. package/es/utils/queryToObject.js +19 -0
  468. package/es/utils/svg.js +46 -0
  469. package/es/utils/type.js +3 -0
  470. package/es/x6Reset.css +36 -0
  471. package/package.json +84 -0
@@ -0,0 +1,53 @@
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 { memo } from 'react';
9
+ import { Tooltip } from 'antd';
10
+ import Icon from "../../components/Icon";
11
+ import { usePointWatch, useEleEventHandle } from "../../hooks";
12
+ import { reactShapeNodeAreEqual } from "../utils";
13
+ import { getValueByExpression } from "../utils";
14
+ import styles from "./index.css";
15
+ var EleIconComponent = function EleIconComponent(_ref) {
16
+ var _payload$pointList, _payload$mittMeta$nam, _payload$mittMeta, _payload$mittMeta2;
17
+ var node = _ref.node;
18
+ var payload = node === null || node === void 0 ? void 0 : node.getData();
19
+ var configPoint = payload === null || payload === void 0 ? void 0 : (_payload$pointList = payload.pointList) === null || _payload$pointList === void 0 ? void 0 : _payload$pointList[0];
20
+ var eventHandles = useEleEventHandle({
21
+ events: payload === null || payload === void 0 ? void 0 : payload.events,
22
+ payload: {
23
+ points: [{
24
+ identifierName: configPoint === null || configPoint === void 0 ? void 0 : configPoint.identifierName,
25
+ deviceId: configPoint && 'deviceId' in configPoint ? configPoint.deviceId : undefined
26
+ }],
27
+ namespace: (_payload$mittMeta$nam = payload === null || payload === void 0 ? void 0 : (_payload$mittMeta = payload.mittMeta) === null || _payload$mittMeta === void 0 ? void 0 : _payload$mittMeta.namespace) !== null && _payload$mittMeta$nam !== void 0 ? _payload$mittMeta$nam : 0
28
+ }
29
+ });
30
+ var pointData = usePointWatch(configPoint, payload === null || payload === void 0 ? void 0 : (_payload$mittMeta2 = payload.mittMeta) === null || _payload$mittMeta2 === void 0 ? void 0 : _payload$mittMeta2.namespace);
31
+ var color = getValueByExpression(pointData === null || pointData === void 0 ? void 0 : pointData.value, payload === null || payload === void 0 ? void 0 : payload.colorExpressions);
32
+ var tooltipTitle = null;
33
+ if (configPoint) {
34
+ var _pointData$value, _pointData$unit;
35
+ tooltipTitle = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, "\u70B9\u4F4D\u540D\u79F0\uFF1A", (pointData === null || pointData === void 0 ? void 0 : pointData.pointName) || '-'), /*#__PURE__*/React.createElement("div", null, "\u70B9\u4F4D\u503C\uFF1A", (_pointData$value = pointData === null || pointData === void 0 ? void 0 : pointData.value) !== null && _pointData$value !== void 0 ? _pointData$value : '-', " ", (_pointData$unit = pointData === null || pointData === void 0 ? void 0 : pointData.unit) !== null && _pointData$unit !== void 0 ? _pointData$unit : '-'), /*#__PURE__*/React.createElement("div", null, "\u66F4\u65B0\u65F6\u95F4\uFF1A", (pointData === null || pointData === void 0 ? void 0 : pointData.updateTime) || '-'));
36
+ }
37
+ return /*#__PURE__*/React.createElement(Tooltip, {
38
+ title: tooltipTitle
39
+ }, /*#__PURE__*/React.createElement("div", {
40
+ style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.fontStyles), payload === null || payload === void 0 ? void 0 : payload.borderStyles), payload === null || payload === void 0 ? void 0 : payload.fillStyles), payload === null || payload === void 0 ? void 0 : payload.margin_padding),
41
+ onClick: eventHandles.onClick,
42
+ onContextMenu: eventHandles.onContextMenu,
43
+ onMouseEnter: eventHandles.onMouseEnter,
44
+ onMouseLeave: eventHandles.onMouseLeave,
45
+ className: styles['ele-icon-wrap']
46
+ }, /*#__PURE__*/React.createElement(Icon, {
47
+ type: "icon-".concat((payload === null || payload === void 0 ? void 0 : payload.iconName) || 'smile'),
48
+ style: {
49
+ color: color && typeof color === 'string' ? color : (payload === null || payload === void 0 ? void 0 : payload.iconColor) || 'invalid-value'
50
+ }
51
+ })));
52
+ };
53
+ export default /*#__PURE__*/memo(EleIconComponent, reactShapeNodeAreEqual);
@@ -0,0 +1,105 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(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 { Form, Button } from 'antd';
9
+ import { useState } from 'react';
10
+ import { useModel } from 'umi';
11
+ import { SettingOutlined } from '@ant-design/icons';
12
+ import ColorPicker from "../../../../components/ColorPicker";
13
+ import TranslateButton from "../../../../components/TranslateButton";
14
+ import DialogIconPicker from "../../../../components/DialogIconPicker";
15
+ import DialogExpression from "../../../../components/DialogExpression";
16
+ import Icon from "../../../../components/Icon";
17
+ var IconDataSet = function IconDataSet() {
18
+ var _useState = useState(false),
19
+ _useState2 = _slicedToArray(_useState, 2),
20
+ visibleDialogIconPicker = _useState2[0],
21
+ setVisibleDialogIconPicker = _useState2[1];
22
+ var _useState3 = useState(false),
23
+ _useState4 = _slicedToArray(_useState3, 2),
24
+ visibleDialogColorExpression = _useState4[0],
25
+ setVisibleDialogColorExpression = _useState4[1];
26
+ var _useModel = useModel('useEditor', function (model) {
27
+ return {
28
+ activeNode: model.activeNode
29
+ };
30
+ }),
31
+ activeNode = _useModel.activeNode;
32
+ var payload = activeNode === null || activeNode === void 0 ? void 0 : activeNode.getData();
33
+ var handleColorChange = function handleColorChange(color) {
34
+ activeNode === null || activeNode === void 0 ? void 0 : activeNode.setData({
35
+ iconColor: color
36
+ }, {
37
+ deep: false
38
+ });
39
+ };
40
+ var handleIconChange = function handleIconChange(iconName) {
41
+ activeNode === null || activeNode === void 0 ? void 0 : activeNode.setData({
42
+ iconName: iconName
43
+ }, {
44
+ deep: false
45
+ });
46
+ };
47
+ var handleColorExpressionChange = function handleColorExpressionChange(expressions) {
48
+ activeNode === null || activeNode === void 0 ? void 0 : activeNode.setData({
49
+ colorExpressions: expressions
50
+ }, {
51
+ deep: false
52
+ });
53
+ };
54
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form, {
55
+ size: "small",
56
+ labelCol: {
57
+ span: 7
58
+ }
59
+ }, /*#__PURE__*/React.createElement(Form.Item, {
60
+ label: "\u56FE\u6807"
61
+ }, /*#__PURE__*/React.createElement(Icon, {
62
+ type: "icon-".concat(payload === null || payload === void 0 ? void 0 : payload.iconName),
63
+ style: {
64
+ fontSize: 16,
65
+ color: '#5b6b73'
66
+ }
67
+ }), /*#__PURE__*/React.createElement(Button, {
68
+ style: {
69
+ padding: '0 4px',
70
+ float: 'right'
71
+ },
72
+ onClick: function onClick() {
73
+ setVisibleDialogIconPicker(true);
74
+ },
75
+ type: "link",
76
+ className: "btn-hover-effect"
77
+ }, /*#__PURE__*/React.createElement(SettingOutlined, null))), /*#__PURE__*/React.createElement(Form.Item, {
78
+ label: "\u989C\u8272"
79
+ }, /*#__PURE__*/React.createElement("div", {
80
+ className: "flex"
81
+ }, /*#__PURE__*/React.createElement(ColorPicker, {
82
+ value: payload.iconColor,
83
+ onChange: handleColorChange
84
+ }), /*#__PURE__*/React.createElement(TranslateButton, {
85
+ onClick: function onClick() {
86
+ return setVisibleDialogColorExpression(true);
87
+ },
88
+ className: "mx-1"
89
+ })))), /*#__PURE__*/React.createElement(DialogIconPicker, {
90
+ visible: visibleDialogIconPicker,
91
+ onChange: handleIconChange,
92
+ onCancel: function onCancel() {
93
+ setVisibleDialogIconPicker(false);
94
+ }
95
+ }), /*#__PURE__*/React.createElement(DialogExpression, {
96
+ valueType: "color",
97
+ visible: visibleDialogColorExpression,
98
+ expressions: (payload === null || payload === void 0 ? void 0 : payload.colorExpressions) || [],
99
+ onCancel: function onCancel() {
100
+ setVisibleDialogColorExpression(false);
101
+ },
102
+ onChange: handleColorExpressionChange
103
+ }));
104
+ };
105
+ export default IconDataSet;
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ import { Collapse } from 'antd';
3
+ import { CaretRightOutlined } from '@ant-design/icons';
4
+ import FormBindPoint from "../../../components/FormBindPoint";
5
+ import { useForceUpdate } from "../../../hooks";
6
+ import IconPropsSet from "./IconPropsSet";
7
+ var Panel = Collapse.Panel;
8
+ var PropsSet = function PropsSet() {
9
+ var forceUpdate = useForceUpdate();
10
+ return /*#__PURE__*/React.createElement(Collapse, {
11
+ defaultActiveKey: ['1', '2'],
12
+ ghost: true,
13
+ expandIcon: function expandIcon(_ref) {
14
+ var isActive = _ref.isActive;
15
+ return /*#__PURE__*/React.createElement(CaretRightOutlined, {
16
+ rotate: isActive ? 90 : 0
17
+ });
18
+ }
19
+ }, /*#__PURE__*/React.createElement(Panel, {
20
+ header: "\u7ED1\u5B9A\u70B9\u4F4D",
21
+ key: "1"
22
+ }, /*#__PURE__*/React.createElement(FormBindPoint, {
23
+ onChange: forceUpdate
24
+ })), /*#__PURE__*/React.createElement(Panel, {
25
+ header: "\u56FE\u6807",
26
+ key: "2"
27
+ }, /*#__PURE__*/React.createElement(IconPropsSet, null)));
28
+ };
29
+ export default PropsSet;
@@ -0,0 +1,13 @@
1
+ .ele-icon-wrap {
2
+ width: 100%;
3
+ height: 100%;
4
+ }
5
+ .ele-icon-wrap :global .anticon {
6
+ width: 100%;
7
+ height: 100%;
8
+ vertical-align: 0;
9
+ }
10
+ .ele-icon-wrap :global svg {
11
+ width: 100% !important;
12
+ height: 100% !important;
13
+ }
@@ -0,0 +1,58 @@
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 EleIconComponent from "./Component";
17
+ import { ReactShapeBase } from "../reactShapeBase";
18
+ export var shapeName = 'ele-icon';
19
+ var EleIcon = /*#__PURE__*/function (_ReactShapeBase) {
20
+ _inherits(EleIcon, _ReactShapeBase);
21
+ var _super = _createSuper(EleIcon);
22
+ function EleIcon() {
23
+ var _this;
24
+ _classCallCheck(this, EleIcon);
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(EleIcon);
33
+ }(ReactShapeBase);
34
+ EleIcon.shapeName = shapeName;
35
+ /** 注册的 react 组件名称 */
36
+ var registerComponentName = "".concat(EleIcon.shapeName, "-component");
37
+ export var defaultConfig = {
38
+ shape: EleIcon.shapeName,
39
+ width: 16,
40
+ height: 16,
41
+ data: {
42
+ pointListLimit: 1,
43
+ keepRatio: true,
44
+ iconName: 'smile',
45
+ iconColor: '#000000',
46
+ events: [{
47
+ type: 'click',
48
+ action: 'show-point-history'
49
+ }]
50
+ },
51
+ component: registerComponentName
52
+ };
53
+ EleIcon.config(defaultConfig);
54
+
55
+ // 注册 react 组件
56
+ Graph.registerReactComponent(registerComponentName, /*#__PURE__*/React.createElement(EleIconComponent, null));
57
+ export { EleIconComponent };
58
+ export default EleIcon;
@@ -0,0 +1,56 @@
1
+ import React from "react";
2
+ import { Form, Checkbox } from 'antd';
3
+ import { useModel } from 'umi';
4
+ import ImagePicker from "../../../../components/DialogExpression/ImagePicker";
5
+ import { useForceUpdate } from "../../../../hooks";
6
+ var OtherDataSet = function OtherDataSet() {
7
+ var forceUpdate = useForceUpdate();
8
+ var _useModel = useModel('useEditor', function (model) {
9
+ return {
10
+ activeNode: model.activeNode
11
+ };
12
+ }),
13
+ activeNode = _useModel.activeNode;
14
+ var payload = activeNode === null || activeNode === void 0 ? void 0 : activeNode.getData();
15
+ var handleDefaultImgChange = function handleDefaultImgChange(val, size) {
16
+ if (size) {
17
+ var nodeSize = activeNode.getSize();
18
+ activeNode.setSize({
19
+ width: nodeSize.width,
20
+ height: nodeSize.width / (size.width / size.height)
21
+ });
22
+ }
23
+ activeNode.setAttrByPath(['image', 'xlinkHref'], val);
24
+ forceUpdate();
25
+ };
26
+ var handleKeepRatioChange = function handleKeepRatioChange(checked) {
27
+ var _window$graph, _window$graph2;
28
+ activeNode.setData({
29
+ keepRatio: checked
30
+ }, {
31
+ deep: false
32
+ });
33
+ (_window$graph = window.graph) === null || _window$graph === void 0 ? void 0 : _window$graph.unselect(activeNode);
34
+ (_window$graph2 = window.graph) === null || _window$graph2 === void 0 ? void 0 : _window$graph2.select(activeNode);
35
+ };
36
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form, {
37
+ size: "small",
38
+ labelCol: {
39
+ span: 8
40
+ },
41
+ autoComplete: "off"
42
+ }, /*#__PURE__*/React.createElement(Form.Item, {
43
+ label: "\u56FE\u7247"
44
+ }, /*#__PURE__*/React.createElement(ImagePicker, {
45
+ value: activeNode === null || activeNode === void 0 ? void 0 : activeNode.getAttrByPath(['image', 'xlinkHref']),
46
+ onChange: handleDefaultImgChange
47
+ })), /*#__PURE__*/React.createElement(Form.Item, {
48
+ label: "\u9501\u5B9A\u6BD4\u4F8B"
49
+ }, /*#__PURE__*/React.createElement(Checkbox, {
50
+ onChange: function onChange(e) {
51
+ return handleKeepRatioChange(e.target.checked);
52
+ },
53
+ defaultChecked: payload.keepRatio
54
+ }))));
55
+ };
56
+ export default OtherDataSet;
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { Collapse } from 'antd';
3
+ import { CaretRightOutlined } from '@ant-design/icons';
4
+ import ImagePropsSet from "./ImagePropsSet";
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: "\u56FE\u7247",
18
+ key: "1"
19
+ }, /*#__PURE__*/React.createElement(ImagePropsSet, null)));
20
+ };
21
+ export default PropsSet;
@@ -0,0 +1,61 @@
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 { Shape } from '@antv/x6';
15
+ export var shapeName = 'ele-image';
16
+ var EleImage = /*#__PURE__*/function (_Shape$Image) {
17
+ _inherits(EleImage, _Shape$Image);
18
+ var _super = _createSuper(EleImage);
19
+ function EleImage() {
20
+ var _this;
21
+ _classCallCheck(this, EleImage);
22
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
23
+ args[_key] = arguments[_key];
24
+ }
25
+ _this = _super.call.apply(_super, [this].concat(args));
26
+ _this.shapeName = shapeName;
27
+ return _this;
28
+ }
29
+ return _createClass(EleImage);
30
+ }(Shape.Image);
31
+ EleImage.shapeName = shapeName;
32
+ export var defaultConfig = {
33
+ shape: shapeName,
34
+ width: 36,
35
+ height: 29,
36
+ markup: [{
37
+ tagName: 'image',
38
+ selector: 'image'
39
+ }],
40
+ attrs: {
41
+ image: {
42
+ preserveAspectRatio: 'none',
43
+ // https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/preserveAspectRatio
44
+ refWidth: '100%',
45
+ refHeight: '100%',
46
+ xlinkHref: 'https://cdn.sinocold.net/%E5%B9%B3%E9%9D%A2%E5%9B%BE/%E5%85%83%E7%B4%A0%E5%9B%BE%E7%89%87/%E5%9B%BE%E7%89%87.svg'
47
+ }
48
+ },
49
+ data: {
50
+ natureWidth: 36,
51
+ natureHeight: 29,
52
+ keepRatio: true,
53
+ pointListLimit: 0,
54
+ events: [{
55
+ type: 'click',
56
+ action: 'show-point-history'
57
+ }]
58
+ }
59
+ };
60
+ EleImage.config(defaultConfig);
61
+ export default EleImage;
@@ -0,0 +1,57 @@
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 { memo } from 'react';
9
+ import { Tooltip } from 'antd';
10
+ import { getValueByExpression } from "../utils";
11
+ import { reactShapeNodeAreEqual } from "../utils";
12
+ import { usePointWatch, useEleEventHandle } from "../../hooks";
13
+ import styles from "./index.css";
14
+ var EleIndicatorLightComponent = function EleIndicatorLightComponent(_ref) {
15
+ var _payload$pointList, _payload$mittMeta$nam, _payload$mittMeta, _payload$mittMeta2;
16
+ var node = _ref.node;
17
+ var payload = node === null || node === void 0 ? void 0 : node.getData();
18
+ var configPoint = payload === null || payload === void 0 ? void 0 : (_payload$pointList = payload.pointList) === null || _payload$pointList === void 0 ? void 0 : _payload$pointList[0];
19
+ var eventHandles = useEleEventHandle({
20
+ events: payload === null || payload === void 0 ? void 0 : payload.events,
21
+ payload: {
22
+ points: [{
23
+ identifierName: configPoint === null || configPoint === void 0 ? void 0 : configPoint.identifierName,
24
+ deviceId: configPoint && 'deviceId' in configPoint ? configPoint.deviceId : undefined
25
+ }],
26
+ namespace: (_payload$mittMeta$nam = payload === null || payload === void 0 ? void 0 : (_payload$mittMeta = payload.mittMeta) === null || _payload$mittMeta === void 0 ? void 0 : _payload$mittMeta.namespace) !== null && _payload$mittMeta$nam !== void 0 ? _payload$mittMeta$nam : 0
27
+ }
28
+ });
29
+ var pointData = usePointWatch(configPoint, payload === null || payload === void 0 ? void 0 : (_payload$mittMeta2 = payload.mittMeta) === null || _payload$mittMeta2 === void 0 ? void 0 : _payload$mittMeta2.namespace);
30
+ var tooltipTitle = null;
31
+ if (!configPoint) {
32
+ tooltipTitle = '未绑定点位';
33
+ } else {
34
+ var _pointData$value, _pointData$unit;
35
+ tooltipTitle = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, "\u70B9\u4F4D\u540D\u79F0\uFF1A", (pointData === null || pointData === void 0 ? void 0 : pointData.pointName) || '-'), /*#__PURE__*/React.createElement("div", null, "\u70B9\u4F4D\u503C\uFF1A", (_pointData$value = pointData === null || pointData === void 0 ? void 0 : pointData.value) !== null && _pointData$value !== void 0 ? _pointData$value : '-', " ", (_pointData$unit = pointData === null || pointData === void 0 ? void 0 : pointData.unit) !== null && _pointData$unit !== void 0 ? _pointData$unit : '-'), /*#__PURE__*/React.createElement("div", null, "\u66F4\u65B0\u65F6\u95F4\uFF1A", (pointData === null || pointData === void 0 ? void 0 : pointData.updateTime) || '-'));
36
+ }
37
+
38
+ /** 指示灯颜色 */
39
+ var backgroundColor = getValueByExpression(pointData === null || pointData === void 0 ? void 0 : pointData.value, payload === null || payload === void 0 ? void 0 : payload.colorExpressions);
40
+ if (typeof backgroundColor !== 'string') {
41
+ var _payload$fillStyles;
42
+ backgroundColor = (payload === null || payload === void 0 ? void 0 : (_payload$fillStyles = payload.fillStyles) === null || _payload$fillStyles === void 0 ? void 0 : _payload$fillStyles.backgroundColor) || '#1890ff';
43
+ }
44
+ return /*#__PURE__*/React.createElement(Tooltip, {
45
+ title: tooltipTitle
46
+ }, /*#__PURE__*/React.createElement("div", {
47
+ style: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.fontStyles), payload === null || payload === void 0 ? void 0 : payload.borderStyles), payload === null || payload === void 0 ? void 0 : payload.fillStyles), payload === null || payload === void 0 ? void 0 : payload.margin_padding), {}, {
48
+ backgroundColor: backgroundColor
49
+ }),
50
+ onClick: eventHandles.onClick,
51
+ onContextMenu: eventHandles.onContextMenu,
52
+ onMouseEnter: eventHandles.onMouseEnter,
53
+ onMouseLeave: eventHandles.onMouseLeave,
54
+ className: styles.wrap
55
+ }));
56
+ };
57
+ export default /*#__PURE__*/memo(EleIndicatorLightComponent, reactShapeNodeAreEqual);
@@ -0,0 +1,63 @@
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 { Form } from 'antd';
9
+ import { useState } from 'react';
10
+ import { useModel } from 'umi';
11
+ import DialogExpression from "../../../../components/DialogExpression";
12
+ import ExpressionFormat from "../../../../components/ExpressionFormat";
13
+ import NeedBindPointHint from "../../../../components/NeedBindPointHint";
14
+ import TranslateButton from "../../../../components/TranslateButton";
15
+ var ColorDataSet = function ColorDataSet() {
16
+ var _payload$pointList;
17
+ var _useState = useState(false),
18
+ _useState2 = _slicedToArray(_useState, 2),
19
+ visibleDialogExpression = _useState2[0],
20
+ setVisibleDialogExpression = _useState2[1];
21
+ var _useModel = useModel('useEditor', function (model) {
22
+ return {
23
+ activeNode: model.activeNode
24
+ };
25
+ }),
26
+ activeNode = _useModel.activeNode;
27
+ var payload = activeNode === null || activeNode === void 0 ? void 0 : activeNode.getData();
28
+ var bindPoint = (_payload$pointList = payload.pointList) === null || _payload$pointList === void 0 ? void 0 : _payload$pointList[0];
29
+ var handleExpressionChange = function handleExpressionChange(expressions) {
30
+ activeNode === null || activeNode === void 0 ? void 0 : activeNode.setData({
31
+ colorExpressions: expressions
32
+ }, {
33
+ deep: false
34
+ });
35
+ };
36
+ if (!bindPoint) {
37
+ return /*#__PURE__*/React.createElement(NeedBindPointHint, null);
38
+ }
39
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form, {
40
+ size: "small",
41
+ labelCol: {
42
+ span: 7
43
+ }
44
+ }, /*#__PURE__*/React.createElement(Form.Item, {
45
+ label: "\u989C\u8272"
46
+ }, /*#__PURE__*/React.createElement(TranslateButton, {
47
+ onClick: function onClick() {
48
+ return setVisibleDialogExpression(true);
49
+ }
50
+ }), /*#__PURE__*/React.createElement(ExpressionFormat, {
51
+ expressions: payload.colorExpressions || [],
52
+ valueType: "color"
53
+ }))), /*#__PURE__*/React.createElement(DialogExpression, {
54
+ valueType: "color",
55
+ visible: visibleDialogExpression,
56
+ expressions: (payload === null || payload === void 0 ? void 0 : payload.colorExpressions) || [],
57
+ onCancel: function onCancel() {
58
+ setVisibleDialogExpression(false);
59
+ },
60
+ onChange: handleExpressionChange
61
+ }));
62
+ };
63
+ export default ColorDataSet;
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ import { Collapse } from 'antd';
3
+ import { CaretRightOutlined } from '@ant-design/icons';
4
+ import FormBindPoint from "../../../components/FormBindPoint";
5
+ import ColorPropsSet from "./ColorPropsSet";
6
+ import { useForceUpdate } from "../../../hooks";
7
+ var Panel = Collapse.Panel;
8
+ var PropsSet = function PropsSet() {
9
+ var forceUpdate = useForceUpdate();
10
+ return /*#__PURE__*/React.createElement(Collapse, {
11
+ defaultActiveKey: ['1', '2'],
12
+ ghost: true,
13
+ expandIcon: function expandIcon(_ref) {
14
+ var isActive = _ref.isActive;
15
+ return /*#__PURE__*/React.createElement(CaretRightOutlined, {
16
+ rotate: isActive ? 90 : 0
17
+ });
18
+ }
19
+ }, /*#__PURE__*/React.createElement(Panel, {
20
+ header: "\u7ED1\u5B9A\u70B9\u4F4D",
21
+ key: "1"
22
+ }, /*#__PURE__*/React.createElement(FormBindPoint, {
23
+ onChange: forceUpdate
24
+ })), /*#__PURE__*/React.createElement(Panel, {
25
+ header: "\u6307\u793A\u706F\u989C\u8272",
26
+ key: "2"
27
+ }, /*#__PURE__*/React.createElement(ColorPropsSet, null)));
28
+ };
29
+ export default PropsSet;
@@ -0,0 +1,4 @@
1
+ .wrap {
2
+ width: 100%;
3
+ height: 100%;
4
+ }
@@ -0,0 +1,66 @@
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 EleIndicatorLightComponent from "./Component";
17
+ import { ReactShapeBase } from "../reactShapeBase";
18
+ export var shapeName = 'ele-indicator-light';
19
+ var EleIndicatorLight = /*#__PURE__*/function (_ReactShapeBase) {
20
+ _inherits(EleIndicatorLight, _ReactShapeBase);
21
+ var _super = _createSuper(EleIndicatorLight);
22
+ function EleIndicatorLight() {
23
+ var _this;
24
+ _classCallCheck(this, EleIndicatorLight);
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(EleIndicatorLight);
33
+ }(ReactShapeBase);
34
+ EleIndicatorLight.shapeName = shapeName;
35
+ /** 注册的 react 组件名称 */
36
+ var registerComponentName = "".concat(EleIndicatorLight.shapeName, "-component");
37
+ export var defaultConfig = {
38
+ shape: EleIndicatorLight.shapeName,
39
+ width: 20,
40
+ height: 20,
41
+ data: {
42
+ pointList: [],
43
+ pointListLimit: 1,
44
+ keepRatio: true,
45
+ borderStyles: {
46
+ borderRadius: '50%',
47
+ borderColor: '#ffffff',
48
+ borderStyle: 'solid',
49
+ borderWidth: 3
50
+ },
51
+ fillStyles: {
52
+ backgroundColor: '#1890ff'
53
+ },
54
+ events: [{
55
+ type: 'click',
56
+ action: 'show-point-history'
57
+ }]
58
+ },
59
+ component: registerComponentName
60
+ };
61
+ EleIndicatorLight.config(defaultConfig);
62
+
63
+ // 注册 react 组件
64
+ Graph.registerReactComponent(registerComponentName, /*#__PURE__*/React.createElement(EleIndicatorLightComponent, null));
65
+ export { EleIndicatorLightComponent };
66
+ export default EleIndicatorLight;