fan-standard-comp 3.2.1 → 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 +146 -180
  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 +150 -185
  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
@@ -9,12 +9,12 @@ import _Row from "antd/es/row";
9
9
  import "antd/es/form/style";
10
10
  import _Form from "antd/es/form";
11
11
  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); }
12
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
13
13
  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."); }
14
- 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); }
15
- 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; }
16
- 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; } }
17
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ 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; } }
15
+ 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; }
16
+ 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; } }
17
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
18
18
  import { __rest } from "tslib";
19
19
  import React, { useEffect, useMemo, useState } from 'react';
20
20
  import { general } from '../data';
@@ -25,8 +25,8 @@ import TabForm from '../StandardForm/TabForm';
25
25
  import StepForm from '../StandardForm/StepForm';
26
26
  import ActionList from '../StandardForm/ActionList.js';
27
27
  import './style/index.less';
28
- // import { DraggableModal, DraggableModalProvider } from '../StandardDragModal/index'
29
- import StandardDragModal from '../StandardDragModal/Modal';
28
+ import { DraggableModal, DraggableModalProvider } from 'ant-design-draggable-modal';
29
+ import 'ant-design-draggable-modal/dist/index.css';
30
30
  var StandardModal = function StandardModal(props) {
31
31
  var children = props.children,
32
32
  className = props.className,
@@ -66,7 +66,8 @@ var StandardModal = function StandardModal(props) {
66
66
  var _useState3 = useState(0),
67
67
  _useState4 = _slicedToArray(_useState3, 2),
68
68
  bodyMaxHeight = _useState4[0],
69
- setBodyMaxHeight = _useState4[1]; // setTabFormChild
69
+ setBodyMaxHeight = _useState4[1];
70
+ // setTabFormChild
70
71
  var _useState5 = useState(),
71
72
  _useState6 = _slicedToArray(_useState5, 2),
72
73
  formChild = _useState6[0],
@@ -84,7 +85,9 @@ var StandardModal = function StandardModal(props) {
84
85
  return ((_b = activeTabInfo === null || activeTabInfo === void 0 ? void 0 : activeTabInfo.actions) === null || _b === void 0 ? void 0 : _b.length) > 0;
85
86
  }
86
87
  if (type === 'stepForm') {
87
- var currentStepInfo = formItemGroup[stepsConfig.current];
88
+ var currentStepInfo = formItemGroup.filter(function (fItem) {
89
+ return !fItem.hideStep;
90
+ })[stepsConfig.current];
88
91
  openLog && console.log('rule 0-2', ((_c = currentStepInfo === null || currentStepInfo === void 0 ? void 0 : currentStepInfo.actions) === null || _c === void 0 ? void 0 : _c.length) > 0);
89
92
  return ((_d = currentStepInfo === null || currentStepInfo === void 0 ? void 0 : currentStepInfo.actions) === null || _d === void 0 ? void 0 : _d.length) > 0;
90
93
  }
@@ -131,7 +134,8 @@ var StandardModal = function StandardModal(props) {
131
134
  // 设置限制弹窗高度
132
135
  var initBodyMaxHeight = function initBodyMaxHeight() {
133
136
  var title = props.title;
134
- var bodyHeight = document.body.offsetHeight;
137
+ // 最大高度基础值调整成页面视口高度
138
+ var bodyHeight = document.documentElement.clientHeight; // document.body.offsetHeight
135
139
  var baseReduce = 80 + 32; // 默认需要减去的高度(上下空白间距150及内部内容间距16*2
136
140
  // console.log('弹窗是否有按钮:', hasFooterBar ? '是' : '否')
137
141
  setBodyMaxHeight("".concat(bodyHeight - (title ? 55 : 0) - (hasFooterBar ? 55 : 0) - baseReduce, "px"));
@@ -169,7 +173,6 @@ var StandardModal = function StandardModal(props) {
169
173
  if (Object.prototype.hasOwnProperty.call(values, 'false')) {
170
174
  delete values.false; // 自定义结构会莫名的出来一个false字段
171
175
  }
172
-
173
176
  var resultValues = UtilValueFormat(values, formItemGroup);
174
177
  if (onSubmit) {
175
178
  onSubmit(Object.assign({}, resultValues));
@@ -189,7 +192,6 @@ var StandardModal = function StandardModal(props) {
189
192
  if (Object.prototype.hasOwnProperty.call(values, 'false')) {
190
193
  delete values.false; // 自定义结构会莫名的出来一个false字段
191
194
  }
192
-
193
195
  var resultValues = UtilValueFormat(values, formItemGroup);
194
196
  if (onSubmit) {
195
197
  onSubmit(Object.assign({}, resultValues));
@@ -214,7 +216,6 @@ var StandardModal = function StandardModal(props) {
214
216
  // modalForm.setFieldsValue(allFields) // 直接清空表单的赋值(initialValues传值如果没有前后赋值没有全部带上所有字段,则会默认又使用之前的部分未传参字段)
215
217
  modalForm.resetFields(); // 直接使用这个无效
216
218
  };
217
-
218
219
  var onAfterClose = function onAfterClose() {
219
220
  var afterClose = props.afterClose;
220
221
  if (type === 'form') clearAllFieldsValue();
@@ -246,6 +247,7 @@ var StandardModal = function StandardModal(props) {
246
247
  type: item.type,
247
248
  label: item.label,
248
249
  protoConfig: Object.assign({}, item.protoConfig)
250
+ // protoConfig: { className: '', ...item.protoConfig }
249
251
  }].concat(childrenFields);
250
252
  }
251
253
  return /*#__PURE__*/React.createElement(_Col, {
@@ -350,7 +352,6 @@ var StandardModal = function StandardModal(props) {
350
352
  }
351
353
  }));
352
354
  }
353
-
354
355
  if (typeof footerButtonGroup === 'function') {
355
356
  return footerButtonGroup(modalForm, props);
356
357
  }
@@ -370,7 +371,10 @@ var StandardModal = function StandardModal(props) {
370
371
  var renderFooter = function renderFooter() {
371
372
  var _a, _b;
372
373
  if (type === 'stepForm') {
373
- var currentStepInfo = formItemGroup[stepsConfig.current];
374
+ // 过滤隐藏掉的步骤表单
375
+ var currentStepInfo = formItemGroup.filter(function (fItem) {
376
+ return !fItem.hideStep;
377
+ })[stepsConfig.current];
374
378
  return ((_a = currentStepInfo === null || currentStepInfo === void 0 ? void 0 : currentStepInfo.actions) === null || _a === void 0 ? void 0 : _a.length) > 0 ? /*#__PURE__*/React.createElement(ActionList, {
375
379
  list: currentStepInfo.actions || [],
376
380
  onStep: handleStepType,
@@ -392,7 +396,7 @@ var StandardModal = function StandardModal(props) {
392
396
  };
393
397
  // 内容渲染
394
398
  var renderChildrenNodes = function renderChildrenNodes() {
395
- return /*#__PURE__*/React.createElement(React.Fragment, null, children, (type === 'form' || type === 'gridForm') && /*#__PURE__*/React.createElement(_Form, {
399
+ return /*#__PURE__*/React.createElement(React.Fragment, null, children, (type === 'form' || type === 'gridForm') && (/*#__PURE__*/React.createElement(_Form, {
396
400
  layout: formLayout,
397
401
  ref: setModalFormRef,
398
402
  form: modalForm,
@@ -401,7 +405,7 @@ var StandardModal = function StandardModal(props) {
401
405
  // initialValues={{ ...initialValues }}
402
406
  scrollToFirstError: true,
403
407
  className: "modalForm"
404
- }, formPrefix && /*#__PURE__*/React.createElement(_Row, null, formPrefix(modalForm, props, forceUpdateForm)), formItemGroup ? renderFormItemGroup() : null, formPostfix && /*#__PURE__*/React.createElement(_Row, null, formPostfix(modalForm, props, forceUpdateForm), " ")), type === 'tabForm' && /*#__PURE__*/React.createElement(TabForm, {
408
+ }, formPrefix && /*#__PURE__*/React.createElement(_Row, null, formPrefix(modalForm, props, forceUpdateForm)), formItemGroup ? renderFormItemGroup() : null, formPostfix && /*#__PURE__*/React.createElement(_Row, null, formPostfix(modalForm, props, forceUpdateForm), " "))), type === 'tabForm' && (/*#__PURE__*/React.createElement(TabForm, {
405
409
  grid: size,
406
410
  layout: formLayout,
407
411
  fieldStatus: fieldStatus,
@@ -416,7 +420,7 @@ var StandardModal = function StandardModal(props) {
416
420
  onSubmit: handleSubmit,
417
421
  initialValues: Object.assign({}, initialValues),
418
422
  displayLayout: displayLayout
419
- }), type === 'stepForm' && /*#__PURE__*/React.createElement(StepForm, {
423
+ })), type === 'stepForm' && (/*#__PURE__*/React.createElement(StepForm, {
420
424
  grid: size,
421
425
  layout: formLayout,
422
426
  fieldStatus: fieldStatus,
@@ -431,11 +435,11 @@ var StandardModal = function StandardModal(props) {
431
435
  onSubmit: handleSubmit,
432
436
  initialValues: Object.assign({}, initialValues),
433
437
  displayLayout: displayLayout
434
- }));
438
+ })));
435
439
  };
436
440
  // 可拖动及缩放
437
441
  if (dragAble) {
438
- return /*#__PURE__*/React.createElement(StandardDragModal, Object.assign({
442
+ return /*#__PURE__*/React.createElement(DraggableModalProvider, null, /*#__PURE__*/React.createElement(DraggableModal, Object.assign({
439
443
  destroyOnClose: true,
440
444
  initialWidth: otherProps.width || general.modalSize[size].width,
441
445
  initialHeight: otherProps.height,
@@ -448,26 +452,8 @@ var StandardModal = function StandardModal(props) {
448
452
  onOk: handleSubmit,
449
453
  title: title,
450
454
  footer: renderFooter()
451
- }), renderChildrenNodes());
452
- /* return <DraggableModalProvider>
453
- <DraggableModal destroyOnClose
454
- initialWidth={otherProps.width || general.modalSize[size].width}
455
- initialHeight={otherProps.height}
456
- zIndex={1001}
457
- {...otherProps}
458
- visible={visible}
459
- className={`standardModal ${className || ''} ${fieldStatus === 'viewOnly' ? 'is-view' : ''}`}
460
- onCancel={handleCancel}
461
- afterClose={onAfterClose}
462
- onOk={handleSubmit}
463
- title={title}
464
- footer={renderFooter()}
465
- >
466
- {renderChildrenNodes()}
467
- </DraggableModal>
468
- </DraggableModalProvider>*/
455
+ }), renderChildrenNodes()));
469
456
  }
470
-
471
457
  return /*#__PURE__*/React.createElement(_Modal, Object.assign({
472
458
  destroyOnClose: true,
473
459
  maskClosable: false,
@@ -24,5 +24,5 @@ interface badgesListProps {
24
24
  label?: string[] | any;
25
25
  color?: string;
26
26
  }
27
- declare const StandardPanel: (props: StandardPanelProps) => JSX.Element;
27
+ declare const StandardPanel: (props: StandardPanelProps) => React.JSX.Element;
28
28
  export default StandardPanel;
@@ -2,12 +2,12 @@ import "antd/es/popover/style";
2
2
  import _Popover from "antd/es/popover";
3
3
  import "antd/es/radio/style";
4
4
  import _Radio from "antd/es/radio";
5
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
6
6
  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."); }
7
- 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); }
8
- 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; }
9
- 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; } }
10
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ 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; } }
8
+ 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; }
9
+ 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; } }
10
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
11
11
  import React, { useState, useMemo, useRef, useEffect } from 'react';
12
12
  import classNames from 'classnames';
13
13
  import './style/index.less';
@@ -57,10 +57,10 @@ var StandardPanel = function StandardPanel(props) {
57
57
  };
58
58
  // 是否显示提示框
59
59
  var popoverShow = function popoverShow() {
60
- return title.content ? /*#__PURE__*/React.createElement(_Popover, {
60
+ return title.content ? (/*#__PURE__*/React.createElement(_Popover, {
61
61
  content: title.content,
62
62
  placement: title.placement
63
- }, " ", title.label, " ") : title;
63
+ }, " ", title.label, " ")) : title;
64
64
  };
65
65
  var panelHeaderRef = useRef();
66
66
  var bodyLimitStyle = useMemo(function () {
@@ -16,6 +16,7 @@ interface StandardTableProps {
16
16
  className?: string;
17
17
  rowSelection?: any;
18
18
  orderNumber?: object;
19
+ columnsConfig?: object;
19
20
  [k: string]: any;
20
21
  }
21
22
  declare const StandardTable: FC<StandardTableProps>;
@@ -3,26 +3,34 @@ import _Table from "antd/es/table";
3
3
  import "antd/es/card/style";
4
4
  import _Card from "antd/es/card";
5
5
  import { __rest } from "tslib";
6
- import React from 'react';
6
+ import React, { useContext } from 'react';
7
7
  import classNames from 'classnames';
8
8
  import ButtonGroup from '../ButtonGroup/index';
9
9
  import './style/index.less';
10
+ import { FanContext } from '../ConfigContext';
10
11
  var StandardTable = function StandardTable(props) {
12
+ var InitFanContext = useContext(FanContext);
13
+ var providerConfig = InitFanContext['StandardTable'] || {}; // 使用上下文(全局配置)设置扩展的配置项
11
14
  // const ref= React.createRef<Card>();
12
- var _props$data = props.data,
13
- data = _props$data === void 0 ? {} : _props$data,
14
- rowKey = props.rowKey,
15
- rowSelection = props.rowSelection,
16
- columns = props.columns,
17
- hideOrderNumber = props.hideOrderNumber,
18
- _props$orderNumber = props.orderNumber,
19
- orderNumber = _props$orderNumber === void 0 ? {} : _props$orderNumber,
20
- className = props.className,
21
- emptyText = props.emptyText,
22
- codes = props.codes,
23
- permissionCodes = props.permissionCodes,
24
- rest = __rest(props, ["data", "rowKey", "rowSelection", "columns", "hideOrderNumber", "orderNumber", "className", "emptyText", "codes", "permissionCodes"]); // 加上类型修复 TS:2322 报警
25
- var resetColumns = [Object.assign({
15
+ var _a = Object.assign(Object.assign({}, providerConfig), props),
16
+ _a$data = _a.data,
17
+ data = _a$data === void 0 ? {} : _a$data,
18
+ rowKey = _a.rowKey,
19
+ rowSelection = _a.rowSelection,
20
+ columns = _a.columns,
21
+ hideOrderNumber = _a.hideOrderNumber,
22
+ _a$orderNumber = _a.orderNumber,
23
+ orderNumber = _a$orderNumber === void 0 ? {} : _a$orderNumber,
24
+ className = _a.className,
25
+ emptyText = _a.emptyText,
26
+ codes = _a.codes,
27
+ permissionCodes = _a.permissionCodes,
28
+ _a$columnsConfig = _a.columnsConfig,
29
+ columnsConfig = _a$columnsConfig === void 0 ? {} : _a$columnsConfig,
30
+ rest = __rest(_a, ["data", "rowKey", "rowSelection", "columns", "hideOrderNumber", "orderNumber", "className", "emptyText", "codes", "permissionCodes", "columnsConfig"]);
31
+
32
+ // 加上类型修复 TS:2322 报警
33
+ var resetColumns = [Object.assign(Object.assign({
26
34
  width: 58,
27
35
  align: 'center',
28
36
  title: '序号',
@@ -32,7 +40,7 @@ var StandardTable = function StandardTable(props) {
32
40
  render: function render(text, record, index) {
33
41
  return index + 1;
34
42
  }
35
- }, orderNumber)];
43
+ }, (columnsConfig === null || columnsConfig === void 0 ? void 0 : columnsConfig.orderNumber) || {}), orderNumber)];
36
44
  var _data$list = data.list,
37
45
  list = _data$list === void 0 ? [] : _data$list,
38
46
  pagination = data.pagination;
@@ -46,12 +54,17 @@ var StandardTable = function StandardTable(props) {
46
54
  }
47
55
  }, pagination);
48
56
  if (columns) {
49
- columns.map(function (colItem) {
57
+ var recombinationColumns = columns.map(function (colItem) {
58
+ var action = columnsConfig.action,
59
+ otherColumn = columnsConfig.otherColumn;
50
60
  if (colItem.type === 'action') {
51
- colItem.width = colItem.width || (colItem.buttonGroup.length > 1 ? 120 : 80);
52
- colItem.align = 'center';
53
- colItem.title = colItem.title || '操作';
61
+ colItem.width = (colItem === null || colItem === void 0 ? void 0 : colItem.width) || (action === null || action === void 0 ? void 0 : action.width) || (colItem.buttonGroup.length > 1 ? 120 : 80);
62
+ colItem.align = (colItem === null || colItem === void 0 ? void 0 : colItem.align) || (action === null || action === void 0 ? void 0 : action.align) || 'center';
63
+ colItem.title = (colItem === null || colItem === void 0 ? void 0 : colItem.title) || (action === null || action === void 0 ? void 0 : action.title) || '操作';
54
64
  colItem.key = 'control';
65
+ colItem = Object.assign(Object.assign(Object.assign({}, action || {}), colItem), {
66
+ ellipsis: false
67
+ }); // Object.assign(action || {}, colItem, { ellipsis: false }) // 操作列不配置ellipsis
55
68
  // colItem.fixed = colItem.fixed || 'right'
56
69
  colItem.render = function (text, record, rowIndex) {
57
70
  // 按钮列表组
@@ -76,7 +89,9 @@ var StandardTable = function StandardTable(props) {
76
89
  record: record,
77
90
  rowIndex: rowIndex
78
91
  },
79
- dropdownConfig: colItem.buttonGroupConfig || {}
92
+ dropdownConfig: colItem.buttonGroupConfig || {},
93
+ moreText: colItem === null || colItem === void 0 ? void 0 : colItem.moreText,
94
+ moreIcon: colItem === null || colItem === void 0 ? void 0 : colItem.moreIcon
80
95
  });
81
96
  } else {
82
97
  return buttonGroup;
@@ -84,25 +99,28 @@ var StandardTable = function StandardTable(props) {
84
99
  };
85
100
  return /*#__PURE__*/React.createElement(React.Fragment, null, renderTableButtonGroup(colItem.buttonGroup));
86
101
  };
102
+ return Object.assign({}, colItem);
87
103
  } else if (!colItem.render) {
88
104
  // 若未配置render,则给加个默认的返回方法
89
105
  colItem.render = function (text, record, rowIndex) {
90
106
  return text || text === 0 ? text : '-';
91
107
  };
92
- return colItem;
108
+ // return Object.assign({ ellipsis: undefined, render: undefined }, { ...otherColumns, ...colItem }); // ellipsis要配置在render之前
109
+ return Object.assign(Object.assign({}, otherColumn), colItem);
93
110
  }
94
- return colItem;
111
+ // return Object.assign({ ellipsis: undefined, render: undefined }, { ...otherColumns, ...colItem }) // ellipsis要配置在render之前
112
+ return Object.assign(Object.assign({}, otherColumn), colItem);
95
113
  });
96
- resetColumns = hideOrderNumber ? columns : resetColumns.concat(columns);
114
+ resetColumns = hideOrderNumber ? recombinationColumns : resetColumns.concat(recombinationColumns);
97
115
  }
98
116
  return /*#__PURE__*/React.createElement(_Card, {
99
117
  className: classNames('standard-table', className),
100
118
  bordered: false
101
119
  }, /*#__PURE__*/React.createElement(_Table, Object.assign({
102
120
  rowKey: rowKey || 'id',
103
- rowSelection: rowSelection ? Object.assign(Object.assign({}, rowSelection), {
121
+ rowSelection: rowSelection ? Object.assign({
104
122
  columnWidth: 30
105
- }) : rowSelection,
123
+ }, rowSelection) : rowSelection,
106
124
  dataSource: list,
107
125
  pagination: !pagination ? false : paginationProps,
108
126
  columns: resetColumns,
@@ -12,5 +12,5 @@ import React from "react";
12
12
  interface IconNodeProps {
13
13
  icon?: string | string[] | React.ReactNode;
14
14
  }
15
- declare const IconNode: (props: IconNodeProps) => JSX.Element;
15
+ declare const IconNode: (props: IconNodeProps) => React.JSX.Element;
16
16
  export default IconNode;
@@ -18,7 +18,6 @@ var IconNode = function IconNode(props) {
18
18
  name: icon[1]
19
19
  }); // 预留 Array ['speci','plus']
20
20
  }
21
-
22
21
  return /*#__PURE__*/React.createElement(React.Fragment, null, icon);
23
22
  };
24
23
  export default IconNode;
@@ -72,6 +72,8 @@ export default {
72
72
  // 弹窗梯度大小及对应的表单栅格
73
73
  modalSize: {
74
74
  xs: {
75
+ columnNumber: 1,
76
+ // 栅格列数量
75
77
  width: 420,
76
78
  formLayout: {
77
79
  labelCol: {
@@ -91,6 +93,8 @@ export default {
91
93
  }
92
94
  },
93
95
  sm: {
96
+ columnNumber: 1,
97
+ // 栅格列数量
94
98
  width: 680,
95
99
  formLayout: {
96
100
  labelCol: {
@@ -110,6 +114,8 @@ export default {
110
114
  }
111
115
  },
112
116
  md: {
117
+ columnNumber: 2,
118
+ // 栅格列数量
113
119
  width: 780,
114
120
  formLayout: {
115
121
  labelCol: {
@@ -130,6 +136,8 @@ export default {
130
136
  },
131
137
  // 宽度大,1000px下
132
138
  lg: {
139
+ columnNumber: 3,
140
+ // 栅格列数量
133
141
  width: 1000,
134
142
  formLayout: {
135
143
  labelCol: {
@@ -150,6 +158,8 @@ export default {
150
158
  },
151
159
  // 超级宽度大,1200px下
152
160
  xlg: {
161
+ columnNumber: 3,
162
+ // 栅格列数量
153
163
  width: 1200,
154
164
  formLayout: {
155
165
  labelCol: {
@@ -167,6 +177,27 @@ export default {
167
177
  span: 21
168
178
  }
169
179
  }
180
+ },
181
+ xxlg: {
182
+ columnNumber: 4,
183
+ // 栅格列数量
184
+ width: 1400,
185
+ formLayout: {
186
+ labelCol: {
187
+ span: 8
188
+ },
189
+ wrapperCol: {
190
+ span: 16
191
+ }
192
+ },
193
+ formBlockLayout: {
194
+ labelCol: {
195
+ span: 2
196
+ },
197
+ wrapperCol: {
198
+ span: 22
199
+ }
200
+ }
170
201
  }
171
202
  }
172
203
  };
package/es/index.d.ts CHANGED
@@ -8,7 +8,6 @@ export { default as StepForm } from './StandardForm/StepForm';
8
8
  export { default as TabForm } from './StandardForm/TabForm';
9
9
  export { default as StandardFilter } from './StandardFilter';
10
10
  export { default as StandardModal } from './StandardModal';
11
- export { default as StandardDragModal } from './StandardDragModal/Modal';
12
11
  export { default as Uploader } from './FormComp/Uploader';
13
12
  export { default as EditButton } from './FormComp/EditButton';
14
13
  export { default as FieldComponent } from './FormComp/FieldComponent';
@@ -23,3 +22,6 @@ export { default as NavLeafScroll } from './NavLeafScroll';
23
22
  export * from './components';
24
23
  export * from './utils';
25
24
  export * from './data';
25
+ export * from './ConfigContext';
26
+ export { default as ImageGallery } from './ImageGallery/index';
27
+ export { default as ImagePreview } from './ImageGallery/ImagePreview';
package/es/index.js CHANGED
@@ -9,7 +9,6 @@ export { default as StepForm } from './StandardForm/StepForm';
9
9
  export { default as TabForm } from './StandardForm/TabForm';
10
10
  export { default as StandardFilter } from './StandardFilter';
11
11
  export { default as StandardModal } from './StandardModal';
12
- export { default as StandardDragModal } from './StandardDragModal/Modal';
13
12
  export { default as Uploader } from './FormComp/Uploader';
14
13
  export { default as EditButton } from './FormComp/EditButton';
15
14
  // 基础控件
@@ -29,4 +28,9 @@ export * from './components';
29
28
  // 工具类
30
29
  export * from './utils';
31
30
  // 数据类
32
- export * from './data';
31
+ export * from './data';
32
+ // 上下文
33
+ export * from './ConfigContext';
34
+ // 图集
35
+ export { default as ImageGallery } from './ImageGallery/index';
36
+ export { default as ImagePreview } from './ImageGallery/ImagePreview';
@@ -1,8 +1,8 @@
1
1
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
2
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
- 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; }
4
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
5
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
5
+ 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); }
6
6
  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); }
7
7
  import _ from "lodash";
8
8
  // 按钮方法
@@ -18,7 +18,6 @@ var btnClickFunc = function btnClickFunc(fn) {
18
18
  if (typeof fn === 'function') {
19
19
  return fn.apply(void 0, paramsArr); // 表格列返回的是方法
20
20
  }
21
-
22
21
  return fn;
23
22
  };
24
23
  // 按钮是否禁用
@@ -34,7 +33,6 @@ var btnIsDisabled = function btnIsDisabled(isDisabled) {
34
33
  if (typeof isDisabled === 'function') {
35
34
  return isDisabled.apply(void 0, paramsArr); // 表格列返回的是方法
36
35
  }
37
-
38
36
  return isDisabled;
39
37
  };
40
38
  // 按钮是否隐藏
@@ -50,14 +48,13 @@ var btnIsHide = function btnIsHide(isHide) {
50
48
  if (typeof isHide === 'function') {
51
49
  return isHide.apply(void 0, paramsArr); // 表格列返回的是方法
52
50
  }
53
-
54
51
  return isHide;
55
52
  };
56
53
  // 重新组合数据(排除不包含在permissionCodes内及isHide数据
57
- var removeNoPermission = function removeNoPermission(array, permissionCodes, codes, params) {
54
+ var _removeNoPermission = function removeNoPermission(array, permissionCodes, codes, params) {
58
55
  return Array.isArray(array) && array.filter(function (item) {
59
56
  if (item.children) {
60
- item.children = removeNoPermission(item.children, permissionCodes, codes, params);
57
+ item.children = _removeNoPermission(item.children, permissionCodes, codes, params);
61
58
  if (item.children.length === 0) return false; // 如果子集合过滤为空时,不返当前数据
62
59
  }
63
60
  // permissionCodes未定义,则直接返回不进行过滤
@@ -83,11 +80,11 @@ var removeNoPermission = function removeNoPermission(array, permissionCodes, cod
83
80
  var _codes$matchIndex;
84
81
  // 如果有配置code,则使用func.code.js里面配置的名称
85
82
  resultItem = _objectSpread(_objectSpread(_objectSpread({}, resultItem), codes[matchIndex]), {}, {
86
- icon: resultItem.icon || ((_codes$matchIndex = codes[matchIndex]) === null || _codes$matchIndex === void 0 ? void 0 : _codes$matchIndex.icon)
83
+ icon: resultItem.icon === '' || resultItem.icon === null ? resultItem.icon : resultItem.icon || ((_codes$matchIndex = codes[matchIndex]) === null || _codes$matchIndex === void 0 ? void 0 : _codes$matchIndex.icon)
87
84
  });
88
85
  }
89
86
  }
90
87
  return resultItem;
91
88
  });
92
89
  };
93
- export { removeNoPermission, btnIsHide, btnIsDisabled, btnClickFunc };
90
+ export { _removeNoPermission as removeNoPermission, btnIsHide, btnIsDisabled, btnClickFunc };