fan-standard-comp 3.2.1 → 4.0.1

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 (380) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -0
  3. package/dist/fan-standard-comp.min.css +1 -0
  4. package/dist/fan-standard-comp.min.js +1 -0
  5. package/es/ButtonGroup/PopConfirmTitle.d.ts +1 -1
  6. package/es/ButtonGroup/PopConfirmTitle.js +2 -2
  7. package/es/ButtonGroup/index.d.ts +5 -3
  8. package/es/ButtonGroup/index.js +259 -189
  9. package/es/ButtonGroup/styles/index.d.ts +8 -0
  10. package/es/ButtonGroup/styles/index.js +61 -0
  11. package/es/ButtonGroup/testStyles/index(antd-style).d.ts +11 -0
  12. package/es/ButtonGroup/testStyles/index(antd-style).js +28 -0
  13. package/es/ButtonGroup/testStyles/index(cssinjs).js +133 -0
  14. package/es/ButtonGroup/testStyles/index.d.ts +11 -0
  15. package/es/ButtonGroup/testStyles/index.js +23 -0
  16. package/es/CalendarCoordPicker/CalendarMonthPicker.d.ts +5 -0
  17. package/es/CalendarCoordPicker/CalendarMonthPicker.js +32 -0
  18. package/es/CalendarCoordPicker/index.d.ts +7 -0
  19. package/es/CalendarCoordPicker/index.js +314 -0
  20. package/es/CalendarCoordPicker/styles/index.d.ts +6 -0
  21. package/es/CalendarCoordPicker/styles/index.js +28 -0
  22. package/es/CalendarCoordPicker/styles/index.less +37 -0
  23. package/es/ConfigContext/index.d.ts +7 -0
  24. package/es/ConfigContext/index.js +20 -0
  25. package/es/DragContent/DragBar.d.ts +3 -0
  26. package/es/DragContent/DragBar.js +0 -1
  27. package/es/DragContent/index.d.ts +1 -1
  28. package/es/DragContent/index.js +20 -6
  29. package/es/DragContent/styles/index.d.ts +6 -0
  30. package/es/DragContent/styles/index.js +52 -0
  31. package/es/FormComp/ChunkUploader/api.js +11 -11
  32. package/es/FormComp/ChunkUploader/index.js +125 -132
  33. package/es/FormComp/ChunkUploader/lib.js +19 -19
  34. package/es/FormComp/ChunkUploader/upload-queue.class.js +51 -51
  35. package/es/FormComp/EditButton/index.d.ts +1 -1
  36. package/es/FormComp/EditButton/index.js +18 -17
  37. package/es/FormComp/FieldComponent/ReUpload.d.ts +1 -1
  38. package/es/FormComp/FieldComponent/ReUpload.js +45 -37
  39. package/es/FormComp/FieldComponent/RefactorTreeSelect.js +28 -19
  40. package/es/FormComp/FieldComponent/TitleNode.d.ts +2 -1
  41. package/es/FormComp/FieldComponent/UploaderViewer.d.ts +2 -0
  42. package/es/FormComp/FieldComponent/UploaderViewer.js +92 -0
  43. package/es/FormComp/FieldComponent/index.d.ts +1 -1
  44. package/es/FormComp/FieldComponent/index.js +88 -109
  45. package/es/FormComp/FieldComponent/setReadonlyValues.js +21 -15
  46. package/es/FormComp/FieldComponent/style/TreeSelect.d.ts +6 -0
  47. package/es/FormComp/FieldComponent/style/TreeSelect.js +42 -0
  48. package/es/FormComp/FieldComponent/style/UploaderStyle.d.ts +6 -0
  49. package/es/FormComp/FieldComponent/style/UploaderStyle.js +25 -0
  50. package/es/FormComp/FieldComponent/style/index.less +26 -21
  51. package/es/FormComp/RenderItemGroup/index.d.ts +4 -0
  52. package/es/FormComp/RenderItemGroup/index.js +183 -66
  53. package/es/FormComp/RenderItemGroup/style/index.d.ts +6 -0
  54. package/es/FormComp/RenderItemGroup/style/index.js +40 -0
  55. package/es/FormComp/Uploader/index.js +94 -75
  56. package/es/FormComp/Uploader/style/index.less +14 -14
  57. package/es/FormComp/Uploader/util.d.ts +2 -2
  58. package/es/FormComp/VarTemplate/index.js +32 -40
  59. package/es/FormComp/index.js +1 -1
  60. package/es/NavLeafScroll/Main.js +443 -0
  61. package/es/NavLeafScroll/index.d.ts +2 -0
  62. package/es/NavLeafScroll/index.js +21 -395
  63. package/es/NavLeafScroll/style/index.d.ts +6 -0
  64. package/es/NavLeafScroll/style/index.js +56 -0
  65. package/es/NavLeafScroll/style/index.less +22 -22
  66. package/es/RefactorTree/index.d.ts +1 -1
  67. package/es/RefactorTree/index.js +21 -19
  68. package/es/RefactorTree/style/index.js +1 -1
  69. package/es/RefactorTree/style/index.less +22 -22
  70. package/es/RefactorTree/util.d.ts +2 -2
  71. package/es/RefactorTree/util.js +30 -15
  72. package/es/SpecIcon/fonts/demo_index.html +559 -5
  73. package/es/SpecIcon/fonts/iconfont.css +101 -3
  74. package/es/SpecIcon/fonts/iconfont.js +34 -27
  75. package/es/SpecIcon/fonts/iconfont.json +168 -0
  76. package/es/SpecIcon/fonts/iconfont.svg +163 -171
  77. package/es/SpecIcon/fonts/iconfont.ttf +0 -0
  78. package/es/SpecIcon/fonts/iconfont.woff +0 -0
  79. package/es/SpecIcon/fonts/iconfont.woff2 +0 -0
  80. package/es/SpecIcon/index.d.ts +0 -1
  81. package/es/SpecIcon/index.js +33 -12
  82. package/es/SpecIcon/styles/index(antd-style).d.ts +6 -0
  83. package/es/SpecIcon/styles/index(antd-style).js +13 -0
  84. package/es/SpecIcon/styles/index.d.ts +6 -0
  85. package/es/SpecIcon/styles/index.js +93 -0
  86. package/es/StandardContent/SplitterLayout/Pane.js +3 -3
  87. package/es/StandardContent/SplitterLayout/index.js +7 -6
  88. package/es/StandardContent/SplitterLayout/index.less +0 -1
  89. package/es/StandardContent/SubfieldContent.d.ts +3 -2
  90. package/es/StandardContent/SubfieldContent.js +24 -12
  91. package/es/StandardContent/WrapperContent.d.ts +2 -2
  92. package/es/StandardContent/WrapperContent.js +22 -11
  93. package/es/StandardContent/styles/Subfield.d.ts +6 -0
  94. package/es/StandardContent/styles/Subfield.js +30 -0
  95. package/es/StandardContent/styles/Wrapper.d.ts +6 -0
  96. package/es/StandardContent/styles/Wrapper.js +28 -0
  97. package/es/StandardContent/styles/index.less +67 -0
  98. package/es/StandardDragModal/ChangeStandardModal.d.ts +2 -2
  99. package/es/StandardDragModal/ChangeStandardModal.js +84 -71
  100. package/es/StandardDragModal/DraggableModal.js +7 -4
  101. package/es/StandardDragModal/DraggableModalContext.d.ts +1 -1
  102. package/es/StandardDragModal/DraggableModalInner.d.ts +2 -2
  103. package/es/StandardDragModal/DraggableModalInner.js +31 -21
  104. package/es/StandardDragModal/DraggableModalProvider.js +5 -5
  105. package/es/StandardDragModal/Modal.d.ts +1 -1
  106. package/es/StandardDragModal/Modal.js +8 -5
  107. package/es/StandardDragModal/ResizeHandle.js +2 -1
  108. package/es/StandardDragModal/draggableModalReducer.d.ts +4 -4
  109. package/es/StandardDragModal/draggableModalReducer.js +31 -22
  110. package/es/StandardDragModal/index.js +3 -3
  111. package/es/StandardDragModal/useDrag.js +2 -2
  112. package/es/StandardDragModal/useResize.js +2 -2
  113. package/es/StandardFilter/index.d.ts +8 -17
  114. package/es/StandardFilter/index.js +279 -206
  115. package/es/StandardFilter/style/FilterStyle.d.ts +6 -0
  116. package/es/StandardFilter/style/FilterStyle.js +50 -0
  117. package/es/StandardFilter/style/index.less +85 -36
  118. package/es/StandardForm/ActionList.d.ts +9 -0
  119. package/es/StandardForm/ActionList.js +5 -5
  120. package/es/StandardForm/StepForm.d.ts +1 -1
  121. package/es/StandardForm/StepForm.js +47 -40
  122. package/es/StandardForm/TabForm.d.ts +2 -1
  123. package/es/StandardForm/TabForm.js +50 -41
  124. package/es/StandardForm/index.d.ts +2 -1
  125. package/es/StandardForm/index.js +40 -22
  126. package/es/StandardForm/style/index.d.ts +6 -0
  127. package/es/StandardForm/style/index.js +49 -0
  128. package/es/StandardForm/style/index.less +23 -12
  129. package/es/StandardModal/UpdateFormRef.js +0 -1
  130. package/es/StandardModal/index.d.ts +4 -3
  131. package/es/StandardModal/index.js +153 -133
  132. package/es/StandardModal/style/index.d.ts +6 -0
  133. package/es/StandardModal/style/index.js +46 -0
  134. package/es/StandardModal/style/index.less +29 -29
  135. package/es/StandardPanel/index.d.ts +1 -1
  136. package/es/StandardPanel/index.js +28 -17
  137. package/es/StandardPanel/style/index.d.ts +6 -0
  138. package/es/StandardPanel/style/index.js +87 -0
  139. package/es/StandardPanel/style/index.less +30 -32
  140. package/es/StandardTable/index.d.ts +6 -1
  141. package/es/StandardTable/index.js +92 -40
  142. package/es/StandardTable/style/index.d.ts +6 -1
  143. package/es/StandardTable/style/index.js +113 -1
  144. package/es/StandardTable/style/index.less +89 -80
  145. package/es/components/IconNode/index.d.ts +1 -1
  146. package/es/components/IconNode/index.js +12 -1
  147. package/es/components/index.js +1 -1
  148. package/es/data/func.code.d.ts +16 -0
  149. package/es/data/general.config.d.ts +191 -0
  150. package/es/data/general.config.js +32 -1
  151. package/es/data/index.d.ts +3 -0
  152. package/es/data/index.js +2 -2
  153. package/es/index.d.ts +7 -6
  154. package/es/index.js +32 -26
  155. package/es/theme/index.d.ts +27 -0
  156. package/es/theme/index.js +29 -0
  157. package/es/theme/utils/genStyleHook.d.ts +1 -0
  158. package/es/theme/utils/genStyleHook.js +32 -0
  159. package/es/utils/ValueFormat.d.ts +3 -0
  160. package/es/utils/ValueFormat.js +17 -4
  161. package/es/utils/dictSelectUtil.d.ts +36 -0
  162. package/es/utils/dictSelectUtil.js +3 -3
  163. package/es/utils/filterPermission.d.ts +5 -0
  164. package/es/utils/filterPermission.js +4 -6
  165. package/es/utils/getParentNodes.d.ts +79 -0
  166. package/es/utils/getParentNodes.js +89 -13
  167. package/es/utils/index.d.ts +5 -0
  168. package/es/utils/index.js +5 -4
  169. package/es/utils/transferFile.d.ts +4 -0
  170. package/es/utils/transferFile.js +56 -0
  171. package/es/utils/urlUtils.d.ts +14 -0
  172. package/es/utils/urlUtils.js +77 -0
  173. package/lib/ButtonGroup/PopConfirmTitle.d.ts +1 -1
  174. package/lib/ButtonGroup/PopConfirmTitle.js +3 -4
  175. package/lib/ButtonGroup/index.d.ts +5 -3
  176. package/lib/ButtonGroup/index.js +261 -194
  177. package/lib/ButtonGroup/styles/index.d.ts +8 -0
  178. package/lib/ButtonGroup/styles/index.js +68 -0
  179. package/lib/ButtonGroup/testStyles/index(antd-style).d.ts +11 -0
  180. package/lib/ButtonGroup/testStyles/index(antd-style).js +34 -0
  181. package/lib/ButtonGroup/testStyles/index(cssinjs).js +134 -0
  182. package/lib/ButtonGroup/testStyles/index.d.ts +11 -0
  183. package/lib/ButtonGroup/testStyles/index.js +29 -0
  184. package/lib/CalendarCoordPicker/CalendarMonthPicker.d.ts +5 -0
  185. package/lib/CalendarCoordPicker/CalendarMonthPicker.js +41 -0
  186. package/lib/CalendarCoordPicker/index.d.ts +7 -0
  187. package/lib/CalendarCoordPicker/index.js +323 -0
  188. package/lib/CalendarCoordPicker/styles/index.d.ts +6 -0
  189. package/lib/CalendarCoordPicker/styles/index.js +34 -0
  190. package/lib/CalendarCoordPicker/styles/index.less +37 -0
  191. package/lib/ConfigContext/index.d.ts +7 -0
  192. package/lib/ConfigContext/index.js +25 -0
  193. package/lib/DragContent/DragBar.d.ts +3 -0
  194. package/lib/DragContent/DragBar.js +1 -3
  195. package/lib/DragContent/index.d.ts +1 -1
  196. package/lib/DragContent/index.js +22 -9
  197. package/lib/DragContent/styles/index.d.ts +6 -0
  198. package/lib/DragContent/styles/index.js +58 -0
  199. package/lib/FormComp/ChunkUploader/api.js +11 -11
  200. package/lib/FormComp/ChunkUploader/index.js +123 -130
  201. package/lib/FormComp/ChunkUploader/lib.js +19 -19
  202. package/lib/FormComp/ChunkUploader/upload-queue.class.js +52 -53
  203. package/lib/FormComp/EditButton/index.d.ts +1 -1
  204. package/lib/FormComp/EditButton/index.js +22 -22
  205. package/lib/FormComp/FieldComponent/ReUpload.d.ts +1 -1
  206. package/lib/FormComp/FieldComponent/ReUpload.js +47 -41
  207. package/lib/FormComp/FieldComponent/RefactorTreeSelect.js +29 -21
  208. package/lib/FormComp/FieldComponent/TitleNode.d.ts +2 -1
  209. package/lib/FormComp/FieldComponent/TitleNode.js +1 -2
  210. package/lib/FormComp/FieldComponent/UploaderViewer.d.ts +2 -0
  211. package/lib/FormComp/FieldComponent/UploaderViewer.js +102 -0
  212. package/lib/FormComp/FieldComponent/index.d.ts +1 -1
  213. package/lib/FormComp/FieldComponent/index.js +83 -107
  214. package/lib/FormComp/FieldComponent/setReadonlyValues.js +29 -28
  215. package/lib/FormComp/FieldComponent/style/TreeSelect.d.ts +6 -0
  216. package/lib/FormComp/FieldComponent/style/TreeSelect.js +48 -0
  217. package/lib/FormComp/FieldComponent/style/UploaderStyle.d.ts +6 -0
  218. package/lib/FormComp/FieldComponent/style/UploaderStyle.js +31 -0
  219. package/lib/FormComp/FieldComponent/style/index.less +26 -21
  220. package/lib/FormComp/RenderItemGroup/index.d.ts +4 -0
  221. package/lib/FormComp/RenderItemGroup/index.js +182 -65
  222. package/lib/FormComp/RenderItemGroup/style/index.d.ts +6 -0
  223. package/lib/FormComp/RenderItemGroup/style/index.js +46 -0
  224. package/lib/FormComp/Uploader/index.js +95 -80
  225. package/lib/FormComp/Uploader/style/index.less +14 -14
  226. package/lib/FormComp/Uploader/util.d.ts +2 -2
  227. package/lib/FormComp/VarTemplate/index.js +38 -48
  228. package/lib/NavLeafScroll/Main.js +451 -0
  229. package/lib/NavLeafScroll/index.d.ts +2 -0
  230. package/lib/NavLeafScroll/index.js +21 -398
  231. package/lib/NavLeafScroll/style/index.d.ts +6 -0
  232. package/lib/NavLeafScroll/style/index.js +62 -0
  233. package/lib/NavLeafScroll/style/index.less +22 -22
  234. package/lib/RefactorTree/index.d.ts +1 -1
  235. package/lib/RefactorTree/index.js +21 -21
  236. package/lib/RefactorTree/style/index.less +22 -22
  237. package/lib/RefactorTree/util.d.ts +2 -2
  238. package/lib/RefactorTree/util.js +30 -15
  239. package/lib/SpecIcon/fonts/demo_index.html +559 -5
  240. package/lib/SpecIcon/fonts/iconfont.css +101 -3
  241. package/lib/SpecIcon/fonts/iconfont.js +34 -27
  242. package/lib/SpecIcon/fonts/iconfont.json +168 -0
  243. package/lib/SpecIcon/fonts/iconfont.svg +163 -171
  244. package/lib/SpecIcon/fonts/iconfont.ttf +0 -0
  245. package/lib/SpecIcon/fonts/iconfont.woff +0 -0
  246. package/lib/SpecIcon/fonts/iconfont.woff2 +0 -0
  247. package/lib/SpecIcon/index.d.ts +0 -1
  248. package/lib/SpecIcon/index.js +34 -14
  249. package/lib/SpecIcon/styles/index(antd-style).d.ts +6 -0
  250. package/lib/SpecIcon/styles/index(antd-style).js +19 -0
  251. package/lib/SpecIcon/styles/index.d.ts +6 -0
  252. package/lib/SpecIcon/styles/index.js +100 -0
  253. package/lib/StandardContent/SplitterLayout/Pane.js +3 -4
  254. package/lib/StandardContent/SplitterLayout/index.js +6 -6
  255. package/lib/StandardContent/SplitterLayout/index.less +0 -1
  256. package/lib/StandardContent/SubfieldContent.d.ts +3 -2
  257. package/lib/StandardContent/SubfieldContent.js +24 -13
  258. package/lib/StandardContent/WrapperContent.d.ts +2 -2
  259. package/lib/StandardContent/WrapperContent.js +23 -13
  260. package/lib/StandardContent/styles/Subfield.d.ts +6 -0
  261. package/lib/StandardContent/styles/Subfield.js +36 -0
  262. package/lib/StandardContent/styles/Wrapper.d.ts +6 -0
  263. package/lib/StandardContent/styles/Wrapper.js +34 -0
  264. package/lib/StandardContent/styles/index.less +67 -0
  265. package/lib/StandardDragModal/ChangeStandardModal.d.ts +2 -2
  266. package/lib/StandardDragModal/ChangeStandardModal.js +85 -72
  267. package/lib/StandardDragModal/DraggableModal.js +11 -8
  268. package/lib/StandardDragModal/DraggableModalContext.d.ts +1 -1
  269. package/lib/StandardDragModal/DraggableModalContext.js +3 -4
  270. package/lib/StandardDragModal/DraggableModalInner.d.ts +2 -2
  271. package/lib/StandardDragModal/DraggableModalInner.js +38 -30
  272. package/lib/StandardDragModal/DraggableModalProvider.js +10 -10
  273. package/lib/StandardDragModal/Modal.d.ts +1 -1
  274. package/lib/StandardDragModal/Modal.js +7 -5
  275. package/lib/StandardDragModal/ResizeHandle.js +6 -6
  276. package/lib/StandardDragModal/clamp.js +2 -3
  277. package/lib/StandardDragModal/draggableModalReducer.d.ts +4 -4
  278. package/lib/StandardDragModal/draggableModalReducer.js +34 -29
  279. package/lib/StandardDragModal/getWindowSize.js +2 -3
  280. package/lib/StandardDragModal/useDrag.js +4 -5
  281. package/lib/StandardDragModal/usePrevious.js +2 -3
  282. package/lib/StandardDragModal/useResize.js +4 -5
  283. package/lib/StandardFilter/index.d.ts +8 -17
  284. package/lib/StandardFilter/index.js +281 -207
  285. package/lib/StandardFilter/style/FilterStyle.d.ts +6 -0
  286. package/lib/StandardFilter/style/FilterStyle.js +56 -0
  287. package/lib/StandardFilter/style/index.less +85 -36
  288. package/lib/StandardForm/ActionList.d.ts +9 -0
  289. package/lib/StandardForm/ActionList.js +6 -7
  290. package/lib/StandardForm/StepForm.d.ts +1 -1
  291. package/lib/StandardForm/StepForm.js +46 -41
  292. package/lib/StandardForm/TabForm.d.ts +2 -1
  293. package/lib/StandardForm/TabForm.js +48 -41
  294. package/lib/StandardForm/index.d.ts +2 -1
  295. package/lib/StandardForm/index.js +39 -23
  296. package/lib/StandardForm/style/index.d.ts +6 -0
  297. package/lib/StandardForm/style/index.js +55 -0
  298. package/lib/StandardForm/style/index.less +23 -12
  299. package/lib/StandardModal/UpdateFormRef.js +3 -4
  300. package/lib/StandardModal/index.d.ts +4 -3
  301. package/lib/StandardModal/index.js +152 -133
  302. package/lib/StandardModal/style/index.d.ts +6 -0
  303. package/lib/StandardModal/style/index.js +52 -0
  304. package/lib/StandardModal/style/index.less +29 -29
  305. package/lib/StandardPanel/index.d.ts +1 -1
  306. package/lib/StandardPanel/index.js +29 -20
  307. package/lib/StandardPanel/style/index.d.ts +6 -0
  308. package/lib/StandardPanel/style/index.js +93 -0
  309. package/lib/StandardPanel/style/index.less +30 -32
  310. package/lib/StandardTable/index.d.ts +6 -1
  311. package/lib/StandardTable/index.js +93 -40
  312. package/lib/StandardTable/style/index.d.ts +6 -1
  313. package/lib/StandardTable/style/index.js +117 -1
  314. package/lib/StandardTable/style/index.less +89 -80
  315. package/lib/components/IconNode/index.d.ts +1 -1
  316. package/lib/components/IconNode/index.js +13 -3
  317. package/lib/data/func.code.d.ts +16 -0
  318. package/lib/data/func.code.js +2 -3
  319. package/lib/data/general.config.d.ts +191 -0
  320. package/lib/data/general.config.js +34 -4
  321. package/lib/data/index.d.ts +3 -0
  322. package/lib/index.d.ts +7 -6
  323. package/lib/index.js +24 -12
  324. package/lib/theme/index.d.ts +27 -0
  325. package/lib/theme/index.js +35 -0
  326. package/lib/theme/utils/genStyleHook.d.ts +1 -0
  327. package/lib/theme/utils/genStyleHook.js +38 -0
  328. package/lib/utils/ValueFormat.d.ts +3 -0
  329. package/lib/utils/ValueFormat.js +20 -6
  330. package/lib/utils/dictSelectUtil.d.ts +36 -0
  331. package/lib/utils/dictSelectUtil.js +3 -3
  332. package/lib/utils/filterPermission.d.ts +5 -0
  333. package/lib/utils/filterPermission.js +9 -16
  334. package/lib/utils/getParentNodes.d.ts +79 -0
  335. package/lib/utils/getParentNodes.js +91 -16
  336. package/lib/utils/index.d.ts +5 -0
  337. package/lib/utils/index.js +42 -32
  338. package/lib/utils/transferFile.d.ts +4 -0
  339. package/lib/utils/transferFile.js +63 -0
  340. package/lib/utils/urlUtils.d.ts +14 -0
  341. package/lib/utils/urlUtils.js +84 -0
  342. package/package.json +80 -33
  343. package/Readme.md +0 -49
  344. package/dist/f26952c118ab6cdcd23dc0028ee98c11.svg +0 -173
  345. package/dist/fan-standard-comp.umd.js +0 -602
  346. package/dist/fonts/iconfont.eot +0 -0
  347. package/dist/fonts/iconfont.ttf +0 -0
  348. package/dist/fonts/iconfont.woff +0 -0
  349. package/es/ButtonGroup/ButtonList.d.ts +0 -2
  350. package/es/ButtonGroup/ButtonList.js +0 -34
  351. package/es/ButtonGroup/ButtonMenu.d.ts +0 -2
  352. package/es/ButtonGroup/ButtonMenu.js +0 -35
  353. package/es/ButtonGroup/style/index.less +0 -36
  354. package/es/RefactorTree/indexTreeNode.d.ts +0 -39
  355. package/es/RefactorTree/indexTreeNode.js +0 -204
  356. package/es/SpecIcon/style/iconfont.less +0 -213
  357. package/es/SpecIcon/style/index.less +0 -98
  358. package/es/SplitterLayout/Pane.d.ts +0 -13
  359. package/es/SplitterLayout/Pane.js +0 -33
  360. package/es/SplitterLayout/index.js +0 -325
  361. package/es/SplitterLayout/index.less +0 -58
  362. package/es/StandardContent/style/index.less +0 -80
  363. package/es/theme/spec-variable.less +0 -48
  364. package/lib/ButtonGroup/ButtonList.d.ts +0 -2
  365. package/lib/ButtonGroup/ButtonList.js +0 -43
  366. package/lib/ButtonGroup/ButtonMenu.d.ts +0 -2
  367. package/lib/ButtonGroup/ButtonMenu.js +0 -44
  368. package/lib/ButtonGroup/style/index.less +0 -36
  369. package/lib/RefactorTree/indexTreeNode.d.ts +0 -39
  370. package/lib/RefactorTree/indexTreeNode.js +0 -214
  371. package/lib/SpecIcon/style/iconfont.less +0 -213
  372. package/lib/SpecIcon/style/index.less +0 -98
  373. package/lib/SplitterLayout/Pane.d.ts +0 -13
  374. package/lib/SplitterLayout/Pane.js +0 -41
  375. package/lib/SplitterLayout/index.js +0 -332
  376. package/lib/SplitterLayout/index.less +0 -58
  377. package/lib/StandardContent/style/index.less +0 -80
  378. package/lib/theme/spec-variable.less +0 -48
  379. /package/es/{styles/index.less → ButtonGroup/testStyles/index(cssinjs).d.ts} +0 -0
  380. /package/lib/{styles/index.less → ButtonGroup/testStyles/index(cssinjs).d.ts} +0 -0
@@ -4,403 +4,26 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- require("antd/es/badge/style");
8
- var _badge = _interopRequireDefault(require("antd/es/badge"));
9
- var _react = _interopRequireWildcard(require("react"));
10
- var _index = _interopRequireDefault(require("../SpecIcon/index"));
11
- var _lodash = _interopRequireDefault(require("lodash"));
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _Main = _interopRequireDefault(require("./Main.js"));
9
+ var _style = _interopRequireDefault(require("./style"));
12
10
  var _classnames = _interopRequireDefault(require("classnames"));
13
- require("./style/index.less");
14
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
18
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
- 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); } }
20
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
21
- 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); }
22
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
23
- 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); }; }
24
- 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); }
25
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
26
- 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; } }
27
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
28
- 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; }
29
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
30
- 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); } // @ts-ignore
31
- var NavLeafScroll = /*#__PURE__*/function (_Component) {
32
- _inherits(NavLeafScroll, _Component);
33
- var _super = _createSuper(NavLeafScroll);
34
- function NavLeafScroll(props) {
35
- var _this;
36
- _classCallCheck(this, NavLeafScroll);
37
- _this = _super.call(this, props);
38
- _defineProperty(_assertThisInitialized(_this), "initFloorValues", function () {
39
- var _this$props = _this.props,
40
- baseItemHeight = _this$props.baseItemHeight,
41
- baseItemWidth = _this$props.baseItemWidth,
42
- activeKey = _this$props.activeKey,
43
- navList = _this$props.navList,
44
- _this$props$optionNam = _this$props.optionName,
45
- optionName = _this$props$optionNam === void 0 ? {
46
- key: 'id',
47
- title: 'title',
48
- count: 'count'
49
- } : _this$props$optionNam,
50
- type = _this$props.type; // 元素个数占用的高度是否不超过内容区域
51
- var isInsideEnough = navList.length * baseItemHeight <= _this.mainWrap.current.clientHeight;
52
- var wrapHeight = _this.mainWrap.current.clientHeight - (isInsideEnough ? 0 : 32 * 2); // 每次需要移动的偏移量 32是上下切换角占用的高度
53
- var floorHeight = _this.leafNav.current.clientHeight; // 所有楼层占用的高度
54
- // const isEnough = wrapHeight % baseItemHeight === 0; // 剩余的是否足够容纳一个单元格
55
- var isInsideEnoughWidth = navList.length * baseItemWidth <= _this.mainWrap.current.clientWidth;
56
- var wrapWidth = _this.mainWrap.current.clientWidth - (isInsideEnoughWidth ? 0 : 30 * 2);
57
- var floorWidth = _this.leafNav.current.clientWidth; // 所有楼层占用的宽度
58
- if (type === 'horizontal') {
59
- // 判断有效区域与单元格高度:若小于,则直接使用单元格高度,否则将内容区高度去除不足一个单元格高度
60
- if (_this.mainWrap.current.clientWidth - (isInsideEnoughWidth ? 0 : 30 * 2) >= baseItemWidth) {
61
- wrapWidth -= wrapWidth % baseItemWidth; // 判断是否除不尽,如果还有余数,则当前 区域有效区域要去除一个单元格的高度
62
- } else {
63
- wrapWidth = baseItemWidth;
64
- }
65
- } else {
66
- // 判断有效区域与单元格高度:若小于,则直接使用单元格高度,否则将内容区高度去除不足一个单元格高度
67
- if (_this.mainWrap.current.clientHeight - (isInsideEnough ? 0 : 32 * 2) >= baseItemHeight) {
68
- wrapHeight -= wrapHeight % baseItemHeight; // 判断是否除不尽,如果还有余数,则当前 区域有效区域要去除一个单元格的高度
69
- } else {
70
- wrapHeight = baseItemHeight;
71
- }
72
- }
73
- var stepSize = type === 'horizontal' ? wrapWidth / baseItemWidth : wrapHeight / baseItemHeight; // - (isEnough ? 0 : 1) // 当前一页可容纳的单元格数量
74
- _this.setState({
75
- floorRelatedSize: {
76
- wrapHeight: wrapHeight,
77
- // 有效内容区域的
78
- floorHeight: floorHeight,
79
- // 楼层列表占用的高度
80
- wrapWidth: wrapWidth,
81
- floorWidth: floorWidth
82
- },
83
- stepSize: stepSize,
84
- showArrow: type === 'horizontal' ? isInsideEnoughWidth ? false : floorWidth > wrapWidth : isInsideEnough ? false : floorHeight > wrapHeight
85
- });
86
- if (activeKey && navList.length > 0) {
87
- var matchIndex = _lodash.default.findIndex(navList, function (item) {
88
- return item[(optionName === null || optionName === void 0 ? void 0 : optionName.key) || 'id'] === activeKey;
89
- });
90
- var stepNo = type === 'horizontal' ? wrapWidth === 0 ? 0 : Math.floor(matchIndex / (wrapWidth / baseItemWidth)) : wrapHeight === 0 ? 0 : Math.floor(matchIndex / (wrapHeight / baseItemHeight)); // 当前所在的切换页数,从0开始
91
- var stepTotalSize = Math.ceil(navList.length / stepSize) || 0; // 当前所有单元格占用的页总数
92
- _this.setState({
93
- leafNavScrollX: matchIndex !== -1 && stepNo !== 0 ? -wrapWidth * stepNo : 0,
94
- leafNavScrollY: matchIndex !== -1 && stepNo !== 0 ? -wrapHeight * stepNo : 0,
95
- // 如果当前默认传值有楼层节点,则需要判断其所在的位置
96
- arrowPermit: {
97
- prev: matchIndex !== -1 && stepNo !== 0,
98
- left: matchIndex !== -1 && stepNo !== 0,
99
- next: floorHeight > wrapHeight && stepNo + 1 !== stepTotalSize,
100
- right: floorWidth > wrapWidth && stepNo + 1 !== stepTotalSize
101
- }
102
- });
103
- } else {
104
- _this.setState({
105
- leafNavScrollX: 0,
106
- leafNavScrollY: 0,
107
- arrowPermit: {
108
- prev: false,
109
- left: false,
110
- next: floorHeight > wrapHeight,
111
- right: floorWidth > wrapWidth
112
- }
113
- });
114
- }
115
- });
116
- _defineProperty(_assertThisInitialized(_this), "handleLeafControl", function (method) {
117
- var type = _this.props.type;
118
- var _this$state = _this.state,
119
- floorRelatedSize = _this$state.floorRelatedSize,
120
- leafNavScrollY = _this$state.leafNavScrollY,
121
- leafNavScrollX = _this$state.leafNavScrollX;
122
- var wrapHeight = floorRelatedSize.wrapHeight,
123
- floorHeight = floorRelatedSize.floorHeight,
124
- wrapWidth = floorRelatedSize.wrapWidth,
125
- floorWidth = floorRelatedSize.floorWidth;
126
- if (type === 'horizontal') {
127
- var maxNextPosition = -(wrapWidth * (Math.ceil(floorWidth / wrapWidth) - 1)); // 向右滚动的最大值
128
- var scrollX = method === 'right' ? leafNavScrollX - wrapWidth : leafNavScrollX + wrapWidth;
129
- _this.setState({
130
- arrowPermit: {
131
- left: method === 'left' ? scrollX !== 0 : true,
132
- right: method === 'left' ? true : scrollX !== maxNextPosition // 滚动大小与最大滚动值一致时,向右滚动禁用,
133
- },
134
-
135
- leafNavScrollX: scrollX
136
- });
137
- } else {
138
- var _maxNextPosition = -(wrapHeight * (Math.ceil(floorHeight / wrapHeight) - 1)); // 向下滚动的最大值
139
- var scrollY = method === 'next' ? leafNavScrollY - wrapHeight : leafNavScrollY + wrapHeight;
140
- _this.setState({
141
- arrowPermit: {
142
- prev: method === 'prev' ? scrollY !== 0 : true,
143
- next: method === 'prev' ? true : scrollY !== _maxNextPosition // 滚动大小与最大滚动值一致时,向下滚动禁用,
144
- },
145
-
146
- leafNavScrollY: scrollY
147
- });
148
- }
149
- });
150
- _defineProperty(_assertThisInitialized(_this), "handleItemControl", function (key, data) {
151
- var onClick = _this.props.onClick;
152
- onClick && onClick(key, data);
153
- });
154
- _defineProperty(_assertThisInitialized(_this), "mouseEnter", function (e) {
155
- var onMouseEnter = _this.props.onMouseEnter;
156
- _this.setState({
157
- isMouseEnter: true
158
- });
159
- onMouseEnter && onMouseEnter(e);
160
- });
161
- _defineProperty(_assertThisInitialized(_this), "mouseLeave", function (e) {
162
- var onMouseLeave = _this.props.onMouseLeave;
163
- _this.setState({
164
- isMouseEnter: false
165
- });
166
- onMouseLeave && onMouseLeave(e);
167
- });
168
- _defineProperty(_assertThisInitialized(_this), "mouseWheel", function (e) {
169
- var type = _this.props.type;
170
- var _this$state2 = _this.state,
171
- isMouseEnter = _this$state2.isMouseEnter,
172
- arrowPermit = _this$state2.arrowPermit;
173
- if (!isMouseEnter) return; // 鼠标没有经过内容区域,则不会滚轮监听
174
- e.preventDefault();
175
- if (e.deltaY <= 0) {
176
- // 向上滚动(向左滚动)
177
- type === 'horizontal' ? arrowPermit.left && _this.handleLeafControl('left') : arrowPermit.prev && _this.handleLeafControl('prev');
178
- } else {
179
- type === 'horizontal' ? arrowPermit.right && _this.handleLeafControl('right') : arrowPermit.next && _this.handleLeafControl('next'); // 向下滚动(向右滚动)
180
- }
181
- });
182
- _this.state = {
183
- isMouseEnter: false,
184
- leafNavScrollX: 0,
185
- // 水平滚动区域
186
- leafNavScrollY: 0,
187
- // 垂直滚动区域
188
- showArrow: false,
189
- arrowPermit: {
190
- prev: false,
191
- next: false
192
- },
193
- floorRelatedSize: {
194
- wrapHeight: 0,
195
- // 有效内容区域的
196
- floorHeight: 0 // 楼层列表占用的高度
197
- },
198
-
199
- stepSize: 0 // 当前一页可容纳的单元格数量
200
- };
201
-
202
- _this.mainWrap = /*#__PURE__*/_react.default.createRef();
203
- _this.leafWrap = /*#__PURE__*/_react.default.createRef();
204
- _this.leafNav = /*#__PURE__*/_react.default.createRef();
205
- _this.initFloorValues = _this.initFloorValues.bind(_assertThisInitialized(_this));
206
- return _this;
207
- }
208
- _createClass(NavLeafScroll, [{
209
- key: "componentDidMount",
210
- value: function componentDidMount() {
211
- var forbidScroll = this.props.forbidScroll;
212
- window.addEventListener('resize', this.initFloorValues);
213
- if (!forbidScroll) {
214
- // 禁用时,不启动滚动监听
215
- this.mainWrap.current.addEventListener('wheel', this.mouseWheel, {
216
- passive: false
217
- });
218
- }
219
- this.initFloorValues();
220
- }
221
- }, {
222
- key: "componentWillUnmount",
223
- value: function componentWillUnmount() {
224
- var forbidScroll = this.props.forbidScroll;
225
- window.removeEventListener('resize', this.initFloorValues);
226
- if (!forbidScroll) {
227
- // 禁用时,不启动滚动监听
228
- this.mainWrap.current.addEventListener('wheel', this.mouseWheel, {
229
- passive: false
230
- });
231
- }
232
- this.mainWrap.current.removeEventListener('wheel', this.mouseWheel);
233
- }
234
- }, {
235
- key: "componentDidUpdate",
236
- value: function componentDidUpdate(prevProps) {
237
- var _this$props2 = this.props,
238
- baseItemHeight = _this$props2.baseItemHeight,
239
- baseItemWidth = _this$props2.baseItemWidth,
240
- type = _this$props2.type,
241
- navList = _this$props2.navList,
242
- activeKey = _this$props2.activeKey,
243
- _this$props2$optionNa = _this$props2.optionName,
244
- optionName = _this$props2$optionNa === void 0 ? {
245
- key: 'id',
246
- title: 'title',
247
- count: 'count'
248
- } : _this$props2$optionNa,
249
- forbidScroll = _this$props2.forbidScroll;
250
- var _this$state3 = this.state,
251
- _this$state3$floorRel = _this$state3.floorRelatedSize,
252
- wrapHeight = _this$state3$floorRel.wrapHeight,
253
- floorHeight = _this$state3$floorRel.floorHeight,
254
- wrapWidth = _this$state3$floorRel.wrapWidth,
255
- floorWidth = _this$state3$floorRel.floorWidth,
256
- stepSize = _this$state3.stepSize;
257
- if (type === 'horizontal') {}
258
- if (JSON.stringify(navList) !== JSON.stringify(prevProps.navList) || (type === 'horizontal' ? baseItemWidth !== prevProps.baseItemWidth : baseItemHeight !== prevProps.baseItemHeight)) {
259
- this.initFloorValues();
260
- }
261
- if (forbidScroll !== prevProps.forbidScroll) {
262
- // 禁用时,不启动滚动监听
263
- if (!forbidScroll) {
264
- // 禁用时,不启动滚动监听
265
- this.mainWrap.current.addEventListener('wheel', this.mouseWheel, {
266
- passive: false
267
- });
268
- } else {
269
- this.mainWrap.current.removeEventListener('wheel', this.mouseWheel);
270
- }
271
- }
272
- if (activeKey !== prevProps.activeKey) {
273
- var matchIndex = _lodash.default.findIndex(navList, function (item) {
274
- return item[optionName.key] === activeKey;
275
- });
276
- var stepNo = Math.floor(matchIndex / (type === 'horizontal' ? wrapWidth / baseItemWidth : wrapHeight / baseItemHeight)); // 当前所在的切换页数,从0开始
277
- var stepTotalSize = Array.isArray(navList) && Math.ceil(navList.length / stepSize) || 0; // 当前所有单元格占用的页总数
278
- console.log('stepTotalSize', stepTotalSize);
279
- this.setState({
280
- leafNavScrollX: matchIndex !== -1 && stepNo !== 0 ? -wrapWidth * stepNo : 0,
281
- leafNavScrollY: matchIndex !== -1 && stepNo !== 0 ? -wrapHeight * stepNo : 0,
282
- // 如果当前默认传值有楼层节点,则需要判断其所在的位置
283
- arrowPermit: {
284
- prev: matchIndex !== -1 && stepNo !== 0,
285
- next: floorHeight > wrapHeight && stepNo + 1 !== stepTotalSize,
286
- left: matchIndex !== -1 && stepNo !== 0,
287
- right: floorWidth > wrapWidth && stepNo + 1 !== stepTotalSize
288
- },
289
- isMouseEnter: true
290
- });
291
- }
292
- } // 初始化楼层相关的值,如:是否允许触发滚动,默认滚动区间高度等
293
- // 点击节点事件
294
- // 鼠标滚轮监听
295
- }, {
296
- key: "render",
297
- value: function render() {
298
- var _this2 = this;
299
- var _this$props3 = this.props,
300
- className = _this$props3.className,
301
- width = _this$props3.width,
302
- activeKey = _this$props3.activeKey,
303
- customLeafNode = _this$props3.customLeafNode,
304
- noArrowPadding = _this$props3.noArrowPadding,
305
- navList = _this$props3.navList,
306
- _this$props3$optionNa = _this$props3.optionName,
307
- optionName = _this$props3$optionNa === void 0 ? {
308
- key: 'id',
309
- title: 'title',
310
- count: 'count'
311
- } : _this$props3$optionNa,
312
- _this$props3$emptyNod = _this$props3.emptyNode,
313
- emptyNode = _this$props3$emptyNod === void 0 ? null : _this$props3$emptyNod,
314
- type = _this$props3.type,
315
- height = _this$props3.height;
316
- var _this$state4 = this.state,
317
- showArrow = _this$state4.showArrow,
318
- arrowPermit = _this$state4.arrowPermit,
319
- leafNavScrollY = _this$state4.leafNavScrollY,
320
- leafNavScrollX = _this$state4.leafNavScrollX;
321
- return /*#__PURE__*/_react.default.createElement("div", {
322
- className: (0, _classnames.default)(className, "nav-leaf", type === 'horizontal' ? 'nav-leaf-horizontal' : ''),
323
- style: {
324
- width: width ? "".concat(width, "px") : '',
325
- height: height ? "".concat(height, "px") : ''
326
- },
327
- ref: this.mainWrap
328
- // onWheel={this.mouseWheel}
329
- ,
330
- onMouseEnter: this.mouseEnter,
331
- onMouseLeave: this.mouseLeave
332
- }, /*#__PURE__*/_react.default.createElement("div", {
333
- className: "nav-leaf-container nav-leaf-container-scroll",
334
- style: !showArrow || noArrowPadding ? {
335
- padding: 0
336
- } : {},
337
- "data-prev": showArrow
338
- }, type === 'horizontal' ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
339
- className: (0, _classnames.default)("nav-leaf-arrow nav-leaf-btn-left", showArrow ? '' : 'is-hide', arrowPermit.left ? '' : 'is-disabled'),
340
- onClick: function onClick() {
341
- return arrowPermit.left ? _this2.handleLeafControl('left') : '';
342
- }
343
- }, /*#__PURE__*/_react.default.createElement(_index.default, {
344
- name: "caret-left"
345
- })), /*#__PURE__*/_react.default.createElement("span", {
346
- className: (0, _classnames.default)("nav-leaf-arrow nav-leaf-btn-right", showArrow ? '' : 'is-hide', arrowPermit.right ? '' : 'is-disabled'),
347
- onClick: function onClick() {
348
- return arrowPermit.right ? _this2.handleLeafControl('right') : '';
349
- }
350
- }, /*#__PURE__*/_react.default.createElement(_index.default, {
351
- name: "caret-right"
352
- }))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
353
- className: (0, _classnames.default)("nav-leaf-arrow nav-leaf-btn-prev", showArrow ? '' : 'is-hide', arrowPermit.prev ? '' : 'is-disabled'),
354
- onClick: function onClick() {
355
- return arrowPermit.prev ? _this2.handleLeafControl('prev') : '';
356
- }
357
- }, /*#__PURE__*/_react.default.createElement(_index.default, {
358
- name: "caret-up"
359
- })), /*#__PURE__*/_react.default.createElement("span", {
360
- className: (0, _classnames.default)("nav-leaf-arrow nav-leaf-btn-next", showArrow ? '' : 'is-hide', arrowPermit.next ? '' : 'is-disabled'),
361
- onClick: function onClick() {
362
- return arrowPermit.next ? _this2.handleLeafControl('next') : '';
363
- }
364
- }, /*#__PURE__*/_react.default.createElement(_index.default, {
365
- name: "caret-down"
366
- }))), /*#__PURE__*/_react.default.createElement("div", {
367
- className: "nav-leaf-wrap",
368
- ref: this.leafWrap
369
- }, /*#__PURE__*/_react.default.createElement("div", {
370
- className: "nav-leaf-scroll"
371
- }, /*#__PURE__*/_react.default.createElement("div", {
372
- className: "nav-leaf-nav",
373
- ref: this.leafNav,
374
- style: {
375
- transform: "translate3d(".concat(type === 'horizontal' ? leafNavScrollX : 0, "px, ").concat(type === 'horizontal' ? 0 : leafNavScrollY, "px, 0px)")
376
- }
377
- }, navList && navList.length > 0 ? navList.map(function (item, i) {
378
- var _this2$props, _this2$props2;
379
- return /*#__PURE__*/_react.default.createElement("div", {
380
- key: item[optionName.key],
381
- className: (0, _classnames.default)('nav-leaf-item', activeKey && activeKey === item[optionName.key] ? 'is-active' : ''),
382
- style: type === 'horizontal' ? {
383
- width: "".concat(((_this2$props = _this2.props) === null || _this2$props === void 0 ? void 0 : _this2$props.baseItemWidth) || 60, "px")
384
- } : {
385
- height: "".concat(((_this2$props2 = _this2.props) === null || _this2$props2 === void 0 ? void 0 : _this2$props2.baseItemHeight) || 40, "px")
386
- },
387
- onClick: function onClick() {
388
- return _this2.handleItemControl(item[optionName.key], item);
389
- }
390
- }, customLeafNode ? customLeafNode(item) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, item[optionName.title] && /*#__PURE__*/_react.default.createElement("span", {
391
- className: "leaf-title"
392
- }, "".concat(item[optionName.title]), " "), item[optionName.count] ? /*#__PURE__*/_react.default.createElement("span", {
393
- className: "leaf-extra"
394
- }, " ", /*#__PURE__*/_react.default.createElement(_index.default, {
395
- name: "warn-fill"
396
- }), /*#__PURE__*/_react.default.createElement(_badge.default, {
397
- className: "warning-count",
398
- count: item[optionName.count]
399
- })) : null));
400
- }) : emptyNode)))));
401
- }
402
- }]);
403
- return NavLeafScroll;
404
- }(_react.Component);
405
- var _default = NavLeafScroll;
406
- exports.default = _default;
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
14
+ 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."); }
15
+ 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); }
16
+ 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; }
17
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
18
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // @ts-ignore
19
+ var Index = function Index(props) {
20
+ var componentName = 'spec-nav-leaf';
21
+ var _useStyle = (0, _style.default)(componentName),
22
+ _useStyle2 = _slicedToArray(_useStyle, 2),
23
+ wrapSSR = _useStyle2[0],
24
+ hashId = _useStyle2[1];
25
+ return wrapSSR( /*#__PURE__*/_react.default.createElement(_Main.default, _extends({}, props, {
26
+ className: (0, _classnames.default)(componentName, hashId, props === null || props === void 0 ? void 0 : props.className)
27
+ })));
28
+ };
29
+ var _default = exports.default = Index;
@@ -0,0 +1,6 @@
1
+ import { GlobalToken } from "antd";
2
+ export interface NavLeafScrollTokenType extends GlobalToken {
3
+ [k: string]: any;
4
+ }
5
+ declare const NavLeafScrollStyleFunc: (prefix: string) => any;
6
+ export default NavLeafScrollStyleFunc;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _genStyleHook = require("../../theme/utils/genStyleHook");
8
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
9
+ 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; }
10
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
11
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
+ var NavLeafScrollStyleFunc = function NavLeafScrollStyleFunc(prefix) {
13
+ var prepareComponentToken = function prepareComponentToken(token) {
14
+ return {
15
+ fontWeight: 400
16
+ };
17
+ };
18
+ return (0, _genStyleHook.createStyleHook)(prefix, function (token) {
19
+ var prefixCls = ".".concat(prefix);
20
+ return [_defineProperty({}, prefixCls, {
21
+ '&.nav-leaf': {
22
+ '.nav-leaf-arrow': {
23
+ color: token.colorText,
24
+ '&:hover': {
25
+ color: token.colorPrimary
26
+ },
27
+ '&.is-disabled': {
28
+ color: "".concat(token.colorPrimaryBg, " !important"),
29
+ '.spec-icon': {
30
+ color: "".concat(token.colorPrimaryBg, " !important")
31
+ }
32
+ }
33
+ },
34
+ '.nav-leaf-item': {
35
+ color: token.colorTextSecondary,
36
+ '&:hover': {
37
+ color: token.colorPrimary
38
+ },
39
+ '&.is-active': {
40
+ color: token.colorPrimary,
41
+ background: token.colorBgLayout,
42
+ // '@background-color-base',
43
+ borderColor: token.colorPrimary
44
+ },
45
+ '.leaf-extra': {
46
+ color: token.colorError,
47
+ 'i': {
48
+ color: token.colorError
49
+ },
50
+ '.warning-count': {
51
+ '.ant-badge-multiple-words': {
52
+ boxShadow: "0 1px 4px ".concat(token.colorPrimaryBorderHover)
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+ })];
59
+ }, prepareComponentToken // 当前组件扩展的变量
60
+ );
61
+ };
62
+ var _default = exports.default = NavLeafScrollStyleFunc;
@@ -1,9 +1,9 @@
1
- @root-entry-name: default;
2
- @import (reference) '~antd/es/style/themes/index';
3
-
4
1
  .nav-leaf {
5
2
  width: 110px;
6
3
  height: 100%;
4
+ & * {
5
+ box-sizing: border-box;
6
+ }
7
7
  &.nav-leaf-horizontal {
8
8
  width: 100%;
9
9
  .nav-leaf-container.nav-leaf-container-scroll {
@@ -61,17 +61,17 @@
61
61
  position: absolute;
62
62
  width: 100%;
63
63
  height: 32px;
64
- color: @text-color;
64
+ //color: @text-color;
65
65
  text-align: center;
66
66
  cursor: pointer;
67
- &:hover {
68
- color: @primary-color;
69
- }
67
+ //&:hover {
68
+ // color: @primary-color;
69
+ //}
70
70
  &.is-hide {
71
71
  display: none;
72
72
  }
73
73
  &.is-disabled {
74
- color: fade(@primary-color, 30%) !important;
74
+ //color: fade(@primary-color, 30%) !important;
75
75
  cursor: not-allowed !important;
76
76
  }
77
77
  &.nav-leaf-btn-left {
@@ -100,19 +100,19 @@
100
100
  .nav-leaf-item {
101
101
  height: 40px;
102
102
  padding: 5px 10px 5px 10px;
103
- color: @text-color-secondary;
103
+ //color: @text-color-secondary;
104
104
  line-height: 30px;
105
105
  border-top-left-radius: 20px;
106
106
  border-bottom-left-radius: 20px;
107
107
  cursor: pointer;
108
- &:hover {
109
- color: @primary-color;
110
- }
111
- &.is-active {
112
- color: @primary-color;
113
- background: @background-color-base;
114
- border-color: @primary-color;
115
- }
108
+ //&:hover {
109
+ // color: @primary-color;
110
+ //}
111
+ //&.is-active {
112
+ // color: @primary-color;
113
+ // background: @background-color-base;
114
+ // border-color: @primary-color;
115
+ //}
116
116
  .leaf-title {
117
117
  display: inline-block;
118
118
  min-width: 30px;
@@ -122,17 +122,17 @@
122
122
  display: inline-block;
123
123
  width: 18px;
124
124
  margin-left: 4px;
125
- color: @error-color;
125
+ //color: @error-color;
126
126
  text-align: center;
127
- i {
128
- color: @error-color;
129
- }
127
+ //i {
128
+ // color: @error-color;
129
+ //}
130
130
  .warning-count {
131
131
  position: absolute;
132
132
  top: -1px;
133
133
  left: 20px;
134
134
  .ant-badge-multiple-words {
135
- box-shadow: 0 1px 4px fade(@primary-color, 45%)
135
+ //box-shadow: 0 1px 4px fade(@primary-color, 45%)
136
136
  }
137
137
  }
138
138
  }
@@ -36,5 +36,5 @@ interface RefactorTreeProps extends TreeProps {
36
36
  value: any;
37
37
  }[];
38
38
  }
39
- declare const RefactorTree: (props: RefactorTreeProps) => JSX.Element;
39
+ declare const RefactorTree: (props: RefactorTreeProps) => React.JSX.Element;
40
40
  export default RefactorTree;