fan-standard-comp 3.2.0 → 3.2.2

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 (293) hide show
  1. package/Readme.md +1 -33
  2. package/dist/09cd8e9be7081f2166444cce393fe968.svg +54 -0
  3. package/dist/e3378c145b7db195ad068735e15fb28a.svg +165 -0
  4. package/dist/fan-standard-comp.umd.js +166 -444
  5. package/dist/fonts/iconfont.ttf +0 -0
  6. package/dist/fonts/iconfont.woff +0 -0
  7. package/dist/fonts/lg.ttf +0 -0
  8. package/dist/fonts/lg.woff +0 -0
  9. package/dist/fonts/lg.woff2 +0 -0
  10. package/es/ButtonGroup/ButtonList.d.ts +2 -1
  11. package/es/ButtonGroup/ButtonMenu.d.ts +2 -1
  12. package/es/ButtonGroup/PopConfirmTitle.js +5 -5
  13. package/es/ButtonGroup/index.d.ts +3 -1
  14. package/es/ButtonGroup/index.js +147 -178
  15. package/es/ButtonGroup/style/index.less +4 -1
  16. package/es/CalendarCoordPicker/CalendarMonthPicker.d.ts +5 -0
  17. package/es/CalendarCoordPicker/CalendarMonthPicker.js +26 -0
  18. package/es/CalendarCoordPicker/index.d.ts +8 -0
  19. package/es/CalendarCoordPicker/index.js +296 -0
  20. package/es/CalendarCoordPicker/index.less +31 -0
  21. package/es/ConfigContext/index.d.ts +7 -0
  22. package/es/ConfigContext/index.js +12 -0
  23. package/es/DragContent/index.d.ts +1 -1
  24. package/es/DragContent/index.js +5 -5
  25. package/es/FormComp/ChunkUploader/api.js +14 -14
  26. package/es/FormComp/ChunkUploader/index.js +132 -139
  27. package/es/FormComp/ChunkUploader/lib.js +21 -21
  28. package/es/FormComp/ChunkUploader/upload-queue.class.js +64 -66
  29. package/es/FormComp/EditButton/index.d.ts +1 -1
  30. package/es/FormComp/EditButton/index.js +15 -17
  31. package/es/FormComp/FieldComponent/ReUpload.d.ts +1 -1
  32. package/es/FormComp/FieldComponent/ReUpload.js +37 -23
  33. package/es/FormComp/FieldComponent/RefactorTextarea.js +32 -0
  34. package/es/FormComp/FieldComponent/RefactorTreeSelect.js +72 -19
  35. package/es/FormComp/FieldComponent/TitleNode.d.ts +2 -1
  36. package/es/FormComp/FieldComponent/index.d.ts +1 -1
  37. package/es/FormComp/FieldComponent/index.js +33 -23
  38. package/es/FormComp/FieldComponent/setReadonlyValues.js +6 -6
  39. package/es/FormComp/RenderItemGroup/index.js +24 -8
  40. package/es/FormComp/Uploader/index.d.ts +3 -1
  41. package/es/FormComp/Uploader/index.js +243 -119
  42. package/es/FormComp/VarTemplate/index.js +57 -64
  43. package/es/ImageGallery/ImagePreview.d.ts +13 -0
  44. package/es/ImageGallery/ImagePreview.js +168 -0
  45. package/es/ImageGallery/PreviewStyles/ImagePreview.less +730 -0
  46. package/es/ImageGallery/PreviewStyles/fonts/lg.svg +54 -0
  47. package/es/ImageGallery/PreviewStyles/fonts/lg.ttf +0 -0
  48. package/es/ImageGallery/PreviewStyles/fonts/lg.woff +0 -0
  49. package/es/ImageGallery/PreviewStyles/fonts/lg.woff2 +0 -0
  50. package/es/ImageGallery/PreviewStyles/lg-thumbnail.css +108 -0
  51. package/es/ImageGallery/PreviewStyles/lg-video.css +144 -0
  52. package/es/ImageGallery/PreviewStyles/lg-zoom.css +116 -0
  53. package/es/ImageGallery/PreviewStyles/lightgallery.css +728 -0
  54. package/es/ImageGallery/SliderContent.d.ts +7 -0
  55. package/es/ImageGallery/SliderContent.js +699 -0
  56. package/es/ImageGallery/Thumbnail.d.ts +3 -0
  57. package/es/ImageGallery/Thumbnail.js +296 -0
  58. package/es/ImageGallery/hook/uniqueId.d.ts +1 -0
  59. package/es/ImageGallery/hook/uniqueId.js +10 -0
  60. package/es/ImageGallery/index.d.ts +4 -0
  61. package/es/ImageGallery/index.js +29 -0
  62. package/es/ImageGallery/style/index.less +5 -0
  63. package/es/ImageGallery/types.d.ts +5 -0
  64. package/es/ImageGallery/types.js +1 -0
  65. package/es/NavLeafScroll/index.js +94 -50
  66. package/es/RefactorTree/index.d.ts +1 -1
  67. package/es/RefactorTree/index.js +6 -6
  68. package/es/RefactorTree/indexTreeNode.d.ts +1 -1
  69. package/es/RefactorTree/indexTreeNode.js +19 -17
  70. package/es/RefactorTree/util.js +18 -18
  71. package/es/SpecIcon/fonts/demo_index.html +559 -5
  72. package/es/SpecIcon/fonts/iconfont.css +101 -3
  73. package/es/SpecIcon/fonts/iconfont.js +34 -27
  74. package/es/SpecIcon/fonts/iconfont.json +168 -0
  75. package/es/SpecIcon/fonts/iconfont.svg +163 -171
  76. package/es/SpecIcon/fonts/iconfont.ttf +0 -0
  77. package/es/SpecIcon/fonts/iconfont.woff +0 -0
  78. package/es/SpecIcon/fonts/iconfont.woff2 +0 -0
  79. package/es/SpecIcon/style/iconfont.less +106 -11
  80. package/es/SplitterLayout/Pane.d.ts +1 -1
  81. package/es/SplitterLayout/index.js +25 -26
  82. package/es/StandardContent/SplitterLayout/Pane.js +3 -3
  83. package/es/StandardContent/SplitterLayout/index.js +25 -26
  84. package/es/StandardContent/SubfieldContent.d.ts +1 -1
  85. package/es/StandardContent/WrapperContent.d.ts +1 -1
  86. package/es/StandardDragModal/index.d.ts +11 -3
  87. package/es/StandardDragModal/index.js +25 -3
  88. package/es/StandardFilter/index.d.ts +5 -16
  89. package/es/StandardFilter/index.js +212 -200
  90. package/es/StandardFilter/indexClass.d.ts +37 -0
  91. package/es/StandardFilter/indexClass.js +217 -0
  92. package/es/StandardFilter/style/index.less +82 -9
  93. package/es/StandardForm/StepForm.d.ts +1 -1
  94. package/es/StandardForm/StepForm.js +28 -22
  95. package/es/StandardForm/TabForm.d.ts +1 -1
  96. package/es/StandardForm/TabForm.js +41 -43
  97. package/es/StandardForm/index.d.ts +1 -1
  98. package/es/StandardForm/index.js +5 -5
  99. package/es/StandardModal/UpdateFormRef.js +0 -1
  100. package/es/StandardModal/index.d.ts +2 -1
  101. package/es/StandardModal/index.js +25 -39
  102. package/es/StandardPanel/index.d.ts +1 -1
  103. package/es/StandardPanel/index.js +7 -7
  104. package/es/StandardTable/index.d.ts +1 -0
  105. package/es/StandardTable/index.js +44 -26
  106. package/es/components/IconNode/index.d.ts +1 -1
  107. package/es/components/IconNode/index.js +0 -1
  108. package/es/data/general.config.js +31 -0
  109. package/es/index.d.ts +3 -1
  110. package/es/index.js +6 -2
  111. package/es/utils/filterPermission.js +7 -10
  112. package/es/utils/getParentNodes.js +101 -26
  113. package/es/utils/index.js +2 -3
  114. package/es/utils/urlUtils.js +76 -0
  115. package/lib/ButtonGroup/ButtonList.d.ts +2 -1
  116. package/lib/ButtonGroup/ButtonList.js +2 -3
  117. package/lib/ButtonGroup/ButtonMenu.d.ts +2 -1
  118. package/lib/ButtonGroup/ButtonMenu.js +2 -3
  119. package/lib/ButtonGroup/PopConfirmTitle.js +7 -8
  120. package/lib/ButtonGroup/index.d.ts +3 -1
  121. package/lib/ButtonGroup/index.js +151 -183
  122. package/lib/ButtonGroup/style/index.less +4 -1
  123. package/lib/CalendarCoordPicker/CalendarMonthPicker.d.ts +5 -0
  124. package/lib/CalendarCoordPicker/CalendarMonthPicker.js +36 -0
  125. package/lib/CalendarCoordPicker/index.d.ts +8 -0
  126. package/lib/CalendarCoordPicker/index.js +305 -0
  127. package/lib/CalendarCoordPicker/index.less +31 -0
  128. package/lib/ConfigContext/index.d.ts +7 -0
  129. package/lib/ConfigContext/index.js +17 -0
  130. package/lib/DragContent/DragBar.js +2 -3
  131. package/lib/DragContent/index.d.ts +1 -1
  132. package/lib/DragContent/index.js +9 -10
  133. package/lib/FormComp/ChunkUploader/api.js +15 -15
  134. package/lib/FormComp/ChunkUploader/index.js +135 -142
  135. package/lib/FormComp/ChunkUploader/lib.js +22 -22
  136. package/lib/FormComp/ChunkUploader/upload-queue.class.js +66 -69
  137. package/lib/FormComp/ChunkUploader/worker.js +1 -1
  138. package/lib/FormComp/EditButton/index.d.ts +1 -1
  139. package/lib/FormComp/EditButton/index.js +19 -22
  140. package/lib/FormComp/FieldComponent/ReUpload.d.ts +1 -1
  141. package/lib/FormComp/FieldComponent/ReUpload.js +40 -28
  142. package/lib/FormComp/FieldComponent/RefactorTextarea.js +42 -0
  143. package/lib/FormComp/FieldComponent/RefactorTreeSelect.js +75 -23
  144. package/lib/FormComp/FieldComponent/TitleNode.d.ts +2 -1
  145. package/lib/FormComp/FieldComponent/TitleNode.js +2 -3
  146. package/lib/FormComp/FieldComponent/index.d.ts +1 -1
  147. package/lib/FormComp/FieldComponent/index.js +38 -26
  148. package/lib/FormComp/FieldComponent/setReadonlyValues.js +15 -20
  149. package/lib/FormComp/RenderItemGroup/index.js +26 -11
  150. package/lib/FormComp/Uploader/index.d.ts +3 -1
  151. package/lib/FormComp/Uploader/index.js +244 -123
  152. package/lib/FormComp/VarTemplate/index.js +63 -71
  153. package/lib/FormComp/index.js +1 -1
  154. package/lib/ImageGallery/ImagePreview.d.ts +13 -0
  155. package/lib/ImageGallery/ImagePreview.js +178 -0
  156. package/lib/ImageGallery/PreviewStyles/ImagePreview.less +730 -0
  157. package/lib/ImageGallery/PreviewStyles/fonts/lg.svg +54 -0
  158. package/lib/ImageGallery/PreviewStyles/fonts/lg.ttf +0 -0
  159. package/lib/ImageGallery/PreviewStyles/fonts/lg.woff +0 -0
  160. package/lib/ImageGallery/PreviewStyles/fonts/lg.woff2 +0 -0
  161. package/lib/ImageGallery/PreviewStyles/lg-thumbnail.css +108 -0
  162. package/lib/ImageGallery/PreviewStyles/lg-video.css +144 -0
  163. package/lib/ImageGallery/PreviewStyles/lg-zoom.css +116 -0
  164. package/lib/ImageGallery/PreviewStyles/lightgallery.css +728 -0
  165. package/lib/ImageGallery/SliderContent.d.ts +7 -0
  166. package/lib/ImageGallery/SliderContent.js +708 -0
  167. package/lib/ImageGallery/Thumbnail.d.ts +3 -0
  168. package/lib/ImageGallery/Thumbnail.js +306 -0
  169. package/lib/ImageGallery/hook/uniqueId.d.ts +1 -0
  170. package/lib/ImageGallery/hook/uniqueId.js +17 -0
  171. package/lib/ImageGallery/index.d.ts +4 -0
  172. package/lib/ImageGallery/index.js +36 -0
  173. package/lib/ImageGallery/style/index.less +5 -0
  174. package/lib/ImageGallery/types.d.ts +5 -0
  175. package/lib/ImageGallery/types.js +5 -0
  176. package/lib/NavLeafScroll/index.js +98 -55
  177. package/lib/RefactorTree/index.d.ts +1 -1
  178. package/lib/RefactorTree/index.js +10 -11
  179. package/lib/RefactorTree/indexTreeNode.d.ts +1 -1
  180. package/lib/RefactorTree/indexTreeNode.js +23 -22
  181. package/lib/RefactorTree/util.js +18 -18
  182. package/lib/SpecIcon/fonts/demo_index.html +559 -5
  183. package/lib/SpecIcon/fonts/iconfont.css +101 -3
  184. package/lib/SpecIcon/fonts/iconfont.js +34 -27
  185. package/lib/SpecIcon/fonts/iconfont.json +168 -0
  186. package/lib/SpecIcon/fonts/iconfont.svg +163 -171
  187. package/lib/SpecIcon/fonts/iconfont.ttf +0 -0
  188. package/lib/SpecIcon/fonts/iconfont.woff +0 -0
  189. package/lib/SpecIcon/fonts/iconfont.woff2 +0 -0
  190. package/lib/SpecIcon/index.js +2 -3
  191. package/lib/SpecIcon/style/iconfont.less +106 -11
  192. package/lib/SplitterLayout/Pane.d.ts +1 -1
  193. package/lib/SplitterLayout/Pane.js +2 -3
  194. package/lib/SplitterLayout/index.js +27 -29
  195. package/lib/StandardContent/SplitterLayout/Pane.js +5 -6
  196. package/lib/StandardContent/SplitterLayout/index.js +27 -29
  197. package/lib/StandardContent/SubfieldContent.d.ts +1 -1
  198. package/lib/StandardContent/SubfieldContent.js +2 -3
  199. package/lib/StandardContent/WrapperContent.d.ts +1 -1
  200. package/lib/StandardContent/WrapperContent.js +2 -3
  201. package/lib/StandardDragModal/index.d.ts +11 -3
  202. package/lib/StandardDragModal/index.js +27 -33
  203. package/lib/StandardFilter/index.d.ts +5 -16
  204. package/lib/StandardFilter/index.js +215 -201
  205. package/lib/StandardFilter/indexClass.d.ts +37 -0
  206. package/lib/StandardFilter/indexClass.js +223 -0
  207. package/lib/StandardFilter/style/index.less +82 -9
  208. package/lib/StandardForm/ActionList.js +2 -3
  209. package/lib/StandardForm/StepForm.d.ts +1 -1
  210. package/lib/StandardForm/StepForm.js +32 -27
  211. package/lib/StandardForm/TabForm.d.ts +1 -1
  212. package/lib/StandardForm/TabForm.js +45 -48
  213. package/lib/StandardForm/index.d.ts +1 -1
  214. package/lib/StandardForm/index.js +9 -10
  215. package/lib/StandardModal/UpdateFormRef.js +3 -4
  216. package/lib/StandardModal/index.d.ts +2 -1
  217. package/lib/StandardModal/index.js +29 -43
  218. package/lib/StandardPanel/index.d.ts +1 -1
  219. package/lib/StandardPanel/index.js +11 -12
  220. package/lib/StandardTable/index.d.ts +1 -0
  221. package/lib/StandardTable/index.js +49 -29
  222. package/lib/components/IconNode/index.d.ts +1 -1
  223. package/lib/components/IconNode/index.js +2 -4
  224. package/lib/components/index.js +1 -1
  225. package/lib/data/func.code.js +2 -3
  226. package/lib/data/general.config.js +33 -3
  227. package/lib/data/index.js +1 -1
  228. package/lib/index.d.ts +3 -1
  229. package/lib/index.js +30 -10
  230. package/lib/utils/ValueFormat.js +1 -2
  231. package/lib/utils/filterPermission.js +11 -18
  232. package/lib/utils/getParentNodes.js +103 -29
  233. package/lib/utils/index.js +5 -27
  234. package/lib/utils/urlUtils.js +82 -0
  235. package/package.json +14 -9
  236. package/dist/f26952c118ab6cdcd23dc0028ee98c11.svg +0 -173
  237. package/dist/fonts/iconfont.eot +0 -0
  238. package/es/StandardDragModal/ChangeStandardModal.d.ts +0 -44
  239. package/es/StandardDragModal/ChangeStandardModal.js +0 -493
  240. package/es/StandardDragModal/DraggableModal.d.ts +0 -7
  241. package/es/StandardDragModal/DraggableModal.js +0 -31
  242. package/es/StandardDragModal/DraggableModalContext.d.ts +0 -9
  243. package/es/StandardDragModal/DraggableModalContext.js +0 -5
  244. package/es/StandardDragModal/DraggableModalInner.d.ts +0 -16
  245. package/es/StandardDragModal/DraggableModalInner.js +0 -114
  246. package/es/StandardDragModal/DraggableModalProvider.d.ts +0 -4
  247. package/es/StandardDragModal/DraggableModalProvider.js +0 -40
  248. package/es/StandardDragModal/Modal.d.ts +0 -11
  249. package/es/StandardDragModal/Modal.js +0 -24
  250. package/es/StandardDragModal/ResizeHandle.d.ts +0 -2
  251. package/es/StandardDragModal/ResizeHandle.js +0 -8
  252. package/es/StandardDragModal/clamp.d.ts +0 -1
  253. package/es/StandardDragModal/clamp.js +0 -3
  254. package/es/StandardDragModal/draggableModalReducer.d.ts +0 -66
  255. package/es/StandardDragModal/draggableModalReducer.js +0 -157
  256. package/es/StandardDragModal/getWindowSize.d.ts +0 -4
  257. package/es/StandardDragModal/getWindowSize.js +0 -6
  258. package/es/StandardDragModal/index.less +0 -65
  259. package/es/StandardDragModal/useDrag.d.ts +0 -5
  260. package/es/StandardDragModal/useDrag.js +0 -66
  261. package/es/StandardDragModal/usePrevious.d.ts +0 -1
  262. package/es/StandardDragModal/usePrevious.js +0 -8
  263. package/es/StandardDragModal/useResize.d.ts +0 -7
  264. package/es/StandardDragModal/useResize.js +0 -74
  265. package/es/utils/dictSelectUtil.js +0 -153
  266. package/lib/StandardDragModal/ChangeStandardModal.d.ts +0 -44
  267. package/lib/StandardDragModal/ChangeStandardModal.js +0 -502
  268. package/lib/StandardDragModal/DraggableModal.d.ts +0 -7
  269. package/lib/StandardDragModal/DraggableModal.js +0 -40
  270. package/lib/StandardDragModal/DraggableModalContext.d.ts +0 -9
  271. package/lib/StandardDragModal/DraggableModalContext.js +0 -15
  272. package/lib/StandardDragModal/DraggableModalInner.d.ts +0 -16
  273. package/lib/StandardDragModal/DraggableModalInner.js +0 -124
  274. package/lib/StandardDragModal/DraggableModalProvider.d.ts +0 -4
  275. package/lib/StandardDragModal/DraggableModalProvider.js +0 -48
  276. package/lib/StandardDragModal/Modal.d.ts +0 -11
  277. package/lib/StandardDragModal/Modal.js +0 -32
  278. package/lib/StandardDragModal/ResizeHandle.d.ts +0 -2
  279. package/lib/StandardDragModal/ResizeHandle.js +0 -18
  280. package/lib/StandardDragModal/clamp.d.ts +0 -1
  281. package/lib/StandardDragModal/clamp.js +0 -10
  282. package/lib/StandardDragModal/draggableModalReducer.d.ts +0 -66
  283. package/lib/StandardDragModal/draggableModalReducer.js +0 -167
  284. package/lib/StandardDragModal/getWindowSize.d.ts +0 -4
  285. package/lib/StandardDragModal/getWindowSize.js +0 -13
  286. package/lib/StandardDragModal/index.less +0 -65
  287. package/lib/StandardDragModal/useDrag.d.ts +0 -5
  288. package/lib/StandardDragModal/useDrag.js +0 -73
  289. package/lib/StandardDragModal/usePrevious.d.ts +0 -1
  290. package/lib/StandardDragModal/usePrevious.js +0 -15
  291. package/lib/StandardDragModal/useResize.d.ts +0 -7
  292. package/lib/StandardDragModal/useResize.js +0 -81
  293. package/lib/utils/dictSelectUtil.js +0 -161
@@ -11,6 +11,8 @@ require("antd/es/button/style");
11
11
  var _button = _interopRequireDefault(require("antd/es/button"));
12
12
  require("antd/es/dropdown/style");
13
13
  var _dropdown = _interopRequireDefault(require("antd/es/dropdown"));
14
+ require("antd/es/menu/style");
15
+ var _menu = _interopRequireDefault(require("antd/es/menu"));
14
16
  var _tslib = require("tslib");
15
17
  var _react = _interopRequireWildcard(require("react"));
16
18
  var _index = require("../components/index");
@@ -18,21 +20,22 @@ var _index2 = _interopRequireDefault(require("../SpecIcon/index"));
18
20
  var _PopConfirmTitle = _interopRequireDefault(require("./PopConfirmTitle"));
19
21
  var _index3 = require("../data/index");
20
22
  var _icons = require("@ant-design/icons");
21
- var _filterPermission = require("../utils/filterPermission");
23
+ var _filterPermission = require("../utils/filterPermission.js");
24
+ var _lodash = _interopRequireDefault(require("lodash"));
22
25
  require("./style/index.less");
23
- 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); }
24
- 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; }
25
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
26
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
27
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
28
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
29
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
27
30
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
28
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
29
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
30
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
31
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
32
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
33
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
31
34
  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."); }
32
- 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); }
33
- 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; }
34
- 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; } }
35
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
35
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
36
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
37
+ 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; } }
38
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
36
39
  var ButtonGroup = function ButtonGroup(props) {
37
40
  var _props$type = props.type,
38
41
  type = _props$type === void 0 ? 'button' : _props$type,
@@ -42,16 +45,17 @@ var ButtonGroup = function ButtonGroup(props) {
42
45
  record: undefined,
43
46
  rowIndex: undefined
44
47
  } : _props$rowParams,
45
- _props$codes = props.codes,
46
- codes = _props$codes === void 0 ? _index3.funcCode.btnFuncCodes : _props$codes,
48
+ codes = props.codes,
47
49
  permissionCodes = props.permissionCodes,
48
50
  _props$dropdownConfig = props.dropdownConfig,
49
- dropdownConfig = _props$dropdownConfig === void 0 ? {} : _props$dropdownConfig;
51
+ dropdownConfig = _props$dropdownConfig === void 0 ? {} : _props$dropdownConfig,
52
+ _props$moreText = props.moreText,
53
+ moreText = _props$moreText === void 0 ? '更多' : _props$moreText,
54
+ moreIcon = props.moreIcon;
50
55
  var _props$options = props.options,
51
56
  options = _props$options === void 0 ? [] : _props$options,
52
57
  _props$min = props.min,
53
58
  min = _props$min === void 0 ? 3 : _props$min; // 最小展示长度不能小于2
54
- var moreText = '更多';
55
59
  if (!options) return null; // 没有配置list返回null
56
60
  var _useState = (0, _react.useState)(-1),
57
61
  _useState2 = _slicedToArray(_useState, 2),
@@ -66,8 +70,11 @@ var ButtonGroup = function ButtonGroup(props) {
66
70
  resetList = _useState6[0],
67
71
  setResetList = _useState6[1];
68
72
  (0, _react.useEffect)(function () {
73
+ // codes在方法内,再合并默认的权限配置
74
+ // 合并本地的codes
75
+ var codesConcat = _lodash.default.unionBy(codes || [], _index3.funcCode.btnFuncCodes, 'code');
69
76
  // 重组选项options集合数据,排除:无权限(有配置code,并且不包含permissionCodes内)的数据及,isHide 为true的数据
70
- setResetList(_toConsumableArray((0, _filterPermission.removeNoPermission)(options, permissionCodes, codes, rowParams)) || []);
77
+ setResetList(_toConsumableArray((0, _filterPermission.removeNoPermission)(options, permissionCodes, codesConcat, rowParams)) || []);
71
78
  return function () {
72
79
  setResetList([]);
73
80
  };
@@ -75,111 +82,35 @@ var ButtonGroup = function ButtonGroup(props) {
75
82
  (0, _react.useEffect)(function () {
76
83
  setPopVisibleIndex(-1);
77
84
  }, [rowParams]);
78
- /* // 渲染按钮多层级形式 (用于筛选)
79
- const buttonMenu = (group: any) => {
80
- return (<Menu>
81
- {
82
- group.map((item: any, index: number) => {
83
- if (item.children) {
84
- return <Menu.SubMenu title={item.exName || item.name} key={index}>
85
- {
86
- item.children.map((child: any, childIndex: number) => {
87
- return (<Menu.Item key={childIndex}>
88
- <a onClick={child.fn ? () => child.fn(child) : null}
89
- >
90
- <IconNode icon={child.icon}/> {child.exName || child.name}
91
- </a>
92
- </Menu.Item>)
93
- })
94
- }
95
- </Menu.SubMenu>
96
- }
97
- return (
98
- <Menu.Item key={index}>
99
- <a onClick={item.fn ? () => item.fn(item) : null}>
100
- <IconNode icon={item.icon}/> {item.exName || item.name}
101
- </a>
102
- </Menu.Item>
103
- )
104
- })
105
- }
106
- </Menu>)
107
- };
108
- // 渲染文本形式多级菜单列表(用于表格)
109
- const textMenu = (group: any[]) => {
110
- return (
111
- <Menu className="spec-button-text-dropdown">
112
- {
113
- group.map((gItem: any, gIndex: number) => {
114
-
115
- if (gItem.children) {
116
- return <Menu.SubMenu title={gItem.exName || gItem.name} key={gItem}>
117
- {
118
- gItem.children.map((child: any, childIndex: number) => <Menu.Item key={childIndex}>
119
- <a onClick={child.fn ? () => child.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}>
120
- {child.render ? child.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (child.exName || child.name)}
121
- </a>
122
- </Menu.Item>)
123
- }
124
- </Menu.SubMenu>
125
- }
126
- return <Menu.Item key={gIndex}
127
- disabled={btnIsDisabled(gItem.disabled, rowParams)}>
128
- {
129
- gItem.hasOwnProperty('confirmText') || gItem.hasOwnProperty('confirmConfig') ?
130
- // @ts-ignore
131
- <a disabled={btnIsDisabled(gItem.disabled, rowParams)}
132
- onClick={gItem.fn ? () => {
133
- setPopVisibleIndex(rowParams.rowIndex)
134
- setPopRow(gItem)
135
- } : null}>
136
- {gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
137
- </a>
138
- : <a className="spec-button-group-text"
139
- onClick={gItem.fn ? () => gItem.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}
140
- // @ts-ignore
141
- disabled={btnIsDisabled(gItem.disabled, rowParams)}>
142
- {gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
143
- </a>
144
- }
145
- </Menu.Item>
146
- })
147
- }
148
- </Menu>
149
- )
150
- };*/
151
- // 递归转换原来的数组结构
152
- var deepTransButtonMenus = function deepTransButtonMenus(groupArray) {
153
- if (!Array.isArray(groupArray)) {
154
- return [];
155
- }
156
- return groupArray.map(function (vItem, i) {
157
- var code = vItem.code,
158
- fn = vItem.fn,
159
- exName = vItem.exName,
160
- name = vItem.name,
161
- children = vItem.children,
162
- icon = vItem.icon,
163
- others = (0, _tslib.__rest)(vItem, ["code", "fn", "exName", "name", "children", "icon"]);
164
- return Object.assign(Object.assign({}, others), {
165
- key: code ? code + i : i,
166
- icon: /*#__PURE__*/_react.default.createElement(_index.IconNode, {
167
- icon: icon
168
- }),
169
- label: /*#__PURE__*/_react.default.createElement("a", {
170
- onClick: function onClick() {
171
- return fn && fn(vItem);
172
- }
173
- }, exName || name),
174
- children: children && children.length > 0 ? deepTransButtonMenus(children) : undefined
175
- });
176
- });
177
- };
178
- // 自定义渲染显示的文本
179
- var renderCustomLabel = function renderCustomLabel(gItem) {
180
- return gItem.render ? gItem.render.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
181
- return rowParams[pItem];
182
- }))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, gItem.icon ? ' ' : '', gItem.exName || gItem.name);
85
+ // 渲染按钮多层级形式 (用于筛选)
86
+ var buttonMenu = function buttonMenu(group) {
87
+ return /*#__PURE__*/_react.default.createElement(_menu.default, null, group.map(function (item, index) {
88
+ if (item.children) {
89
+ return /*#__PURE__*/_react.default.createElement(_menu.default.SubMenu, {
90
+ title: item.exName || item.name,
91
+ key: index
92
+ }, item.children.map(function (child, childIndex) {
93
+ return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
94
+ key: child.name + childIndex
95
+ }, /*#__PURE__*/_react.default.createElement("a", {
96
+ onClick: child.fn ? function () {
97
+ return child.fn(child);
98
+ } : null
99
+ }, /*#__PURE__*/_react.default.createElement(_index.IconNode, {
100
+ icon: child.icon
101
+ }), " ", child.exName || child.name));
102
+ }));
103
+ }
104
+ return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
105
+ key: item.name + index
106
+ }, /*#__PURE__*/_react.default.createElement("a", {
107
+ onClick: item.fn ? function () {
108
+ return item.fn(item);
109
+ } : null
110
+ }, /*#__PURE__*/_react.default.createElement(_index.IconNode, {
111
+ icon: item.icon
112
+ }), " ", item.exName || item.name));
113
+ }));
183
114
  };
184
115
  // 渲染按钮形式 (用于筛选)
185
116
  var RenderButtonList = function RenderButtonList(item) {
@@ -196,15 +127,12 @@ var ButtonGroup = function ButtonGroup(props) {
196
127
  rowParams = item.rowParams,
197
128
  others = (0, _tslib.__rest)(item, ["exName", "name", "type", "icon", "ghost", "danger", "disabled", "loading", "fn", "code", "rowParams"]);
198
129
  if (Array.isArray(item.children) && item.children.length > 0) {
199
- // overlay={buttonMenu(item.children)}
200
130
  return /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
201
- menu: {
202
- items: deepTransButtonMenus(item.children)
203
- },
131
+ overlay: buttonMenu(item.children),
204
132
  placement: "bottomRight"
205
133
  }, (item === null || item === void 0 ? void 0 : item.dropdownConfig) || dropdownConfig || {}), /*#__PURE__*/_react.default.createElement(_button.default, {
206
134
  type: "primary"
207
- }, item.exName || item.name || item.label, " ", /*#__PURE__*/_react.default.createElement(_index2.default, {
135
+ }, item.exName || item.name, " ", /*#__PURE__*/_react.default.createElement(_index2.default, {
208
136
  name: "down"
209
137
  })));
210
138
  }
@@ -212,6 +140,7 @@ var ButtonGroup = function ButtonGroup(props) {
212
140
  type: type || 'primary',
213
141
  danger: danger,
214
142
  ghost: ghost,
143
+ loading: loading,
215
144
  onClick: fn ? function () {
216
145
  return fn(item);
217
146
  } : null
@@ -220,51 +149,95 @@ var ButtonGroup = function ButtonGroup(props) {
220
149
  icon: icon
221
150
  }),
222
151
  disabled: (0, _filterPermission.btnIsDisabled)(disabled, rowParams)
223
- }), exName || name || others.label);
152
+ }), exName || name);
224
153
  };
225
- // 递归转换原来的数组结构
226
- var deepTransTextMenus = function deepTransTextMenus(groupArray) {
227
- if (!Array.isArray(groupArray)) {
228
- return [];
229
- }
230
- return groupArray.map(function (vItem, i) {
231
- var code = vItem.code,
232
- fn = vItem.fn,
233
- exName = vItem.exName,
234
- name = vItem.name,
235
- children = vItem.children,
236
- icon = vItem.icon,
237
- confirmText = vItem.confirmText,
238
- confirmConfig = vItem.confirmConfig,
239
- others = (0, _tslib.__rest)(vItem, ["code", "fn", "exName", "name", "children", "icon", "confirmText", "confirmConfig"]);
154
+ /*const textMenuItems = (group) => {
155
+ return (group || []).map((gItem: any, gIndex) => {
240
156
  return {
241
- danger: others.danger,
242
- disabled: (0, _filterPermission.btnIsDisabled)(others.disabled, rowParams),
243
- key: code ? code + i : i,
244
- // icon: <IconNode icon={icon}/>, // 不显示图标
245
- label: /*#__PURE__*/_react.default.createElement("a", {
246
- onClick: function onClick() {
247
- // 配置二次确认
248
- if (vItem.hasOwnProperty('confirmText') || vItem.hasOwnProperty('confirmConfig')) {
249
- fn ? (setPopVisibleIndex(rowParams.rowIndex), setPopRow(vItem)) : null;
250
- } else {
251
- fn && fn(vItem);
252
- }
157
+ disabled: btnIsDisabled(gItem.disabled, rowParams),
158
+ label: gItem.hasOwnProperty('confirmText') || gItem.hasOwnProperty('confirmConfig') ?
159
+ // @ts-ignore
160
+ <a disabled={btnIsDisabled(gItem.disabled, rowParams)}
161
+ onClick={gItem.fn ? () => {
162
+ setPopVisibleIndex(rowParams.rowIndex)
163
+ setPopRow(gItem)
164
+ } : null}>
165
+ {gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
166
+ </a>
167
+ : <a className="spec-button-group-text"
168
+ onClick={gItem.fn ? () => gItem.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}
169
+ // @ts-ignore
170
+ disabled={btnIsDisabled(gItem.disabled, rowParams)}>
171
+ {gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
172
+ </a>,
173
+ key: gIndex + (gItem.exName || gItem.name),
174
+ children: gItem.children ? (gItem.children || []).map((child: any, childIndex: number) => {
175
+ return {
176
+ label: <a onClick={child.fn ? () => child.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}>
177
+ {child.render ? child.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (child.exName || child.name)}
178
+ </a>,
179
+ key: childIndex
253
180
  }
254
- }, renderCustomLabel(vItem)),
255
- title: vItem.exName || vItem.name,
256
- children: children && children.length > 0 ? deepTransTextMenus(children) : undefined
257
- };
258
- });
181
+ }) : undefined
182
+ }
183
+ })
184
+ }*/
185
+ // 渲染文本形式多级菜单列表(用于表格)
186
+ var textMenu = function textMenu(group) {
187
+ return /*#__PURE__*/_react.default.createElement(_menu.default, {
188
+ className: "spec-button-text-dropdown"
189
+ }, group.map(function (gItem, gIndex) {
190
+ if (gItem.children) {
191
+ return /*#__PURE__*/_react.default.createElement(_menu.default.SubMenu, {
192
+ title: gItem.exName || gItem.name,
193
+ key: gItem.name + gIndex
194
+ }, gItem.children.map(function (child, childIndex) {
195
+ return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
196
+ key: child.name + childIndex
197
+ }, /*#__PURE__*/_react.default.createElement("a", {
198
+ onClick: child.fn ? function () {
199
+ return child.fn.apply(child, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
200
+ return rowParams[pItem];
201
+ })));
202
+ } : null
203
+ }, child.render ? child.render.apply(child, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
204
+ return rowParams[pItem];
205
+ }))) : child.exName || child.name));
206
+ }));
207
+ }
208
+ return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
209
+ key: gIndex,
210
+ disabled: (0, _filterPermission.btnIsDisabled)(gItem.disabled, rowParams)
211
+ }, gItem.hasOwnProperty('confirmText') || gItem.hasOwnProperty('confirmConfig') ?
212
+ /*#__PURE__*/
213
+ // @ts-ignore
214
+ _react.default.createElement("a", {
215
+ disabled: (0, _filterPermission.btnIsDisabled)(gItem.disabled, rowParams),
216
+ onClick: gItem.fn ? function () {
217
+ setPopVisibleIndex(rowParams.rowIndex);
218
+ setPopRow(gItem);
219
+ } : null
220
+ }, gItem.render ? gItem.render.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
221
+ return rowParams[pItem];
222
+ }))) : gItem.exName || gItem.name) : /*#__PURE__*/_react.default.createElement("a", {
223
+ className: "spec-button-group-text",
224
+ onClick: gItem.fn ? function () {
225
+ return gItem.fn.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
226
+ return rowParams[pItem];
227
+ })));
228
+ } : null,
229
+ // @ts-ignore
230
+ disabled: (0, _filterPermission.btnIsDisabled)(gItem.disabled, rowParams)
231
+ }, gItem.render ? gItem.render.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
232
+ return rowParams[pItem];
233
+ }))) : gItem.exName || gItem.name));
234
+ }));
259
235
  };
260
236
  // 渲染文本形式 列表(用于表格)
261
237
  var RenderTextList = function RenderTextList(item) {
262
238
  if (Array.isArray(item.children) && item.children.length > 0) {
263
- // overlay={textMenu(item.children)}
264
239
  return /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
265
- menu: {
266
- items: deepTransTextMenus(item.children)
267
- },
240
+ overlay: textMenu(item.children),
268
241
  placement: "bottomRight"
269
242
  }, (item === null || item === void 0 ? void 0 : item.dropdownConfig) || dropdownConfig || {}), /*#__PURE__*/_react.default.createElement("a", {
270
243
  className: "spec-button-group-text"
@@ -307,7 +280,9 @@ var ButtonGroup = function ButtonGroup(props) {
307
280
  title: item.exName || item.name,
308
281
  // @ts-ignore
309
282
  disabled: (0, _filterPermission.btnIsDisabled)(item.disabled, rowParams)
310
- }, renderCustomLabel(item))) : /*#__PURE__*/_react.default.createElement("a", {
283
+ }, item.render ? item.render.apply(item, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
284
+ return rowParams[pItem];
285
+ }))) : item.exName || item.name)) : /*#__PURE__*/_react.default.createElement("a", {
311
286
  className: "spec-button-group-text",
312
287
  title: item.exName || item.name,
313
288
  key: item.index,
@@ -318,7 +293,9 @@ var ButtonGroup = function ButtonGroup(props) {
318
293
  return rowParams[pItem];
319
294
  })));
320
295
  } : null
321
- }, renderCustomLabel(item)));
296
+ }, item.render ? item.render.apply(item, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
297
+ return rowParams[pItem];
298
+ }))) : item.exName || item.name));
322
299
  };
323
300
  // 渲染展示的按钮列表
324
301
  var renderDisplayButton = function renderDisplayButton(item, index) {
@@ -345,26 +322,21 @@ var ButtonGroup = function ButtonGroup(props) {
345
322
  if (resetList.length === 0) {
346
323
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, type !== 'button' ? '-' : null);
347
324
  }
348
- // 数量超出时渲染
349
325
  if (resetList.length > min) {
350
- var forGroup = resetList.slice(0, min - 1); // 平铺组合内
351
- var forDrop = resetList.slice(min - 1); // 下拉组合内
326
+ var forGroup = resetList.slice(0, min - 1);
327
+ var forDrop = resetList.slice(min - 1);
352
328
  return /*#__PURE__*/_react.default.createElement("span", {
353
329
  className: "spec-button-group"
354
330
  }, forGroup.map(function (item, index) {
355
331
  return index < min - 1 ? renderDisplayButton(item, index) : null;
356
332
  }), type === 'button' ? /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
357
- menu: {
358
- items: deepTransButtonMenus(forDrop)
359
- },
333
+ overlay: buttonMenu(forDrop),
360
334
  placement: "bottomRight"
361
335
  }, dropdownConfig), /*#__PURE__*/_react.default.createElement(_button.default, {
362
336
  type: "primary"
363
- }, moreText, " ", /*#__PURE__*/_react.default.createElement(_index2.default, {
364
- name: "down"
365
- }))) : /*#__PURE__*/_react.default.createElement(_popconfirm.default, Object.assign({
337
+ }, moreText || '更多', moreIcon || /*#__PURE__*/_react.default.createElement(_icons.DownOutlined, null))) : /*#__PURE__*/_react.default.createElement(_popconfirm.default, Object.assign({
366
338
  placement: "topRight",
367
- open: popVisibleIndex === rowParams.rowIndex,
339
+ visible: popVisibleIndex === rowParams.rowIndex,
368
340
  icon: /*#__PURE__*/_react.default.createElement(_icons.QuestionCircleOutlined, null),
369
341
  trigger: "click"
370
342
  }, popRow.hasOwnProperty('confirmConfig') ? popRow.confirmConfig : {}, {
@@ -396,20 +368,16 @@ var ButtonGroup = function ButtonGroup(props) {
396
368
  }
397
369
  }
398
370
  }), /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
399
- menu: {
400
- items: deepTransTextMenus(forDrop)
401
- },
371
+ overlay: textMenu(forDrop),
402
372
  placement: "bottomRight"
403
373
  }, dropdownConfig), /*#__PURE__*/_react.default.createElement("a", {
404
374
  className: "spec-button-group-text"
405
- }, moreText, " ", /*#__PURE__*/_react.default.createElement(_icons.DownOutlined, null)))));
375
+ }, moreText || '更多', moreIcon || /*#__PURE__*/_react.default.createElement(_icons.DownOutlined, null)))));
406
376
  }
407
- // 数量不超出时渲染
408
377
  return /*#__PURE__*/_react.default.createElement("span", {
409
378
  className: "spec-button-group"
410
379
  }, resetList.map(function (item, index) {
411
380
  return renderDisplayButton(item, index);
412
381
  }));
413
382
  };
414
- var _default = ButtonGroup;
415
- exports.default = _default;
383
+ var _default = exports.default = ButtonGroup;
@@ -8,6 +8,9 @@
8
8
  .ant-btn + .ant-btn {
9
9
  margin-left: @padding-sm;
10
10
  }
11
+ .spec-button-group-text {
12
+ display: inline-block;
13
+ }
11
14
  .spec-button-group-text + .spec-button-group-text {
12
15
  position: relative;
13
16
  margin-left: @padding-sm;
@@ -15,7 +18,7 @@
15
18
  position: absolute;
16
19
  content: '';
17
20
  top: 50%;
18
- left: -(@padding-sm/2);
21
+ left: calc(-@padding-sm/2);
19
22
  transform: translate(0, -50%);
20
23
  display: inline-block;
21
24
  height: .9em;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ import 'moment/locale/zh-cn';
4
+ declare const CalendarMonthPicker: (props: any) => React.JSX.Element;
5
+ export default CalendarMonthPicker;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ 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); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ require("antd/es/calendar/style");
9
+ var _calendar = _interopRequireDefault(require("antd/es/calendar"));
10
+ var _tslib = require("tslib");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ require("./index.less");
13
+ var _moment = _interopRequireDefault(require("moment"));
14
+ require("moment/locale/zh-cn");
15
+ var _zh_CN = _interopRequireDefault(require("antd/es/date-picker/locale/zh_CN"));
16
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
17
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
+ var CalendarMonthPicker = function CalendarMonthPicker(props) {
20
+ var year = props.year,
21
+ month = props.month,
22
+ others = (0, _tslib.__rest)(props, ["year", "month"]);
23
+ var monthRangeDays = (0, _react.useMemo)(function () {
24
+ var time = (year || (0, _moment.default)().year()) + '-01';
25
+ var startTime = (0, _moment.default)(time).month(month - 1).date(1).startOf("month"); //.format('YYYY-MM-DD')
26
+ var endTime = (0, _moment.default)(time).month(month - 1).date(1).endOf("month"); //.format('YYYY-MM-DD')
27
+ return [startTime, endTime];
28
+ }, [year]);
29
+ return /*#__PURE__*/_react.default.createElement(_calendar.default, Object.assign({
30
+ fullscreen: false,
31
+ value: (0, _moment.default)((year || (0, _moment.default)().year()) + '-' + month),
32
+ validRange: monthRangeDays,
33
+ locale: _zh_CN.default
34
+ }, others));
35
+ };
36
+ var _default = exports.default = CalendarMonthPicker;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface CalendarCoordPickerProps {
4
+ type: string;
5
+ year?: number;
6
+ }
7
+ declare const CalendarCoordPicker: (props: CalendarCoordPickerProps) => React.JSX.Element;
8
+ export default CalendarCoordPicker;