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
@@ -28,5 +28,5 @@ export interface StandardFormProps {
28
28
  displayLayout?: any;
29
29
  [k: string]: any;
30
30
  }
31
- declare const StandardForm: React.ForwardRefExoticComponent<Pick<StandardFormProps, string | number> & React.RefAttributes<unknown>>;
31
+ declare const StandardForm: React.ForwardRefExoticComponent<Omit<StandardFormProps, "ref"> & React.RefAttributes<unknown>>;
32
32
  export default StandardForm;
@@ -16,15 +16,15 @@ var _RenderItemGroup = _interopRequireDefault(require("../FormComp/RenderItemGro
16
16
  var _data = require("../data");
17
17
  require("./style/index.less");
18
18
  var _ActionList = _interopRequireDefault(require("./ActionList"));
19
- 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); }
20
- 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; }
21
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
19
+ 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); }
20
+ 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; }
21
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
23
23
  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."); }
24
- 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); }
25
- 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; }
26
- 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; } }
27
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
+ 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; } }
25
+ 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; }
26
+ 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; } }
27
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
28
28
  var StandardForm = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
29
29
  var _props$formItemGroup = props.formItemGroup,
30
30
  formItemGroup = _props$formItemGroup === void 0 ? [] : _props$formItemGroup,
@@ -158,5 +158,4 @@ var StandardForm = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
158
158
  fieldStatus: fieldStatus
159
159
  }) : null, renderActionGroup()), postfix);
160
160
  });
161
- var _default = StandardForm;
162
- exports.default = _default;
161
+ var _default = exports.default = StandardForm;
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
- 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); }
10
- 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; }
9
+ 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); }
10
+ 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; }
11
11
  var updateModalForm = function updateModalForm(props) {
12
12
  var getFormAndFields = props.getFormAndFields,
13
13
  form = props.form;
@@ -20,5 +20,4 @@ var updateModalForm = function updateModalForm(props) {
20
20
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
21
21
  /* 如果是ReactNode则直接返回 */
22
22
  };
23
- var _default = updateModalForm;
24
- exports.default = _default;
23
+ var _default = exports.default = updateModalForm;
@@ -3,6 +3,7 @@ import { ModalProps } from 'antd/es/modal';
3
3
  import PropTypes from 'prop-types';
4
4
  import { ItemGroupProps } from '../StandardForm/index';
5
5
  import './style/index.less';
6
+ import 'ant-design-draggable-modal/dist/index.css';
6
7
  export interface StandardModalProps extends ModalProps {
7
8
  children?: React.ReactNode;
8
9
  title?: String;
@@ -39,5 +40,5 @@ export interface StandardModalProps extends ModalProps {
39
40
  dragAble?: boolean;
40
41
  [k: string]: any;
41
42
  }
42
- declare const StandardModal: (props: StandardModalProps) => JSX.Element;
43
+ declare const StandardModal: (props: StandardModalProps) => React.JSX.Element;
43
44
  export default StandardModal;
@@ -24,17 +24,18 @@ var _TabForm = _interopRequireDefault(require("../StandardForm/TabForm"));
24
24
  var _StepForm = _interopRequireDefault(require("../StandardForm/StepForm"));
25
25
  var _ActionList = _interopRequireDefault(require("../StandardForm/ActionList.js"));
26
26
  require("./style/index.less");
27
- var _Modal2 = _interopRequireDefault(require("../StandardDragModal/Modal"));
28
- 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); }
29
- 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; }
30
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
+ var _antDesignDraggableModal = require("ant-design-draggable-modal");
28
+ require("ant-design-draggable-modal/dist/index.css");
29
+ 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); }
30
+ 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; }
31
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
31
32
  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); }
32
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
33
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
33
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."); }
34
- 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); }
35
- 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; }
36
- 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; } }
37
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import { DraggableModal, DraggableModalProvider } from '../StandardDragModal/index'
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; }
38
39
  var StandardModal = function StandardModal(props) {
39
40
  var children = props.children,
40
41
  className = props.className,
@@ -74,7 +75,8 @@ var StandardModal = function StandardModal(props) {
74
75
  var _useState3 = (0, _react.useState)(0),
75
76
  _useState4 = _slicedToArray(_useState3, 2),
76
77
  bodyMaxHeight = _useState4[0],
77
- setBodyMaxHeight = _useState4[1]; // setTabFormChild
78
+ setBodyMaxHeight = _useState4[1];
79
+ // setTabFormChild
78
80
  var _useState5 = (0, _react.useState)(),
79
81
  _useState6 = _slicedToArray(_useState5, 2),
80
82
  formChild = _useState6[0],
@@ -92,7 +94,9 @@ var StandardModal = function StandardModal(props) {
92
94
  return ((_b = activeTabInfo === null || activeTabInfo === void 0 ? void 0 : activeTabInfo.actions) === null || _b === void 0 ? void 0 : _b.length) > 0;
93
95
  }
94
96
  if (type === 'stepForm') {
95
- var currentStepInfo = formItemGroup[stepsConfig.current];
97
+ var currentStepInfo = formItemGroup.filter(function (fItem) {
98
+ return !fItem.hideStep;
99
+ })[stepsConfig.current];
96
100
  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);
97
101
  return ((_d = currentStepInfo === null || currentStepInfo === void 0 ? void 0 : currentStepInfo.actions) === null || _d === void 0 ? void 0 : _d.length) > 0;
98
102
  }
@@ -139,7 +143,8 @@ var StandardModal = function StandardModal(props) {
139
143
  // 设置限制弹窗高度
140
144
  var initBodyMaxHeight = function initBodyMaxHeight() {
141
145
  var title = props.title;
142
- var bodyHeight = document.body.offsetHeight;
146
+ // 最大高度基础值调整成页面视口高度
147
+ var bodyHeight = document.documentElement.clientHeight; // document.body.offsetHeight
143
148
  var baseReduce = 80 + 32; // 默认需要减去的高度(上下空白间距150及内部内容间距16*2
144
149
  // console.log('弹窗是否有按钮:', hasFooterBar ? '是' : '否')
145
150
  setBodyMaxHeight("".concat(bodyHeight - (title ? 55 : 0) - (hasFooterBar ? 55 : 0) - baseReduce, "px"));
@@ -177,7 +182,6 @@ var StandardModal = function StandardModal(props) {
177
182
  if (Object.prototype.hasOwnProperty.call(values, 'false')) {
178
183
  delete values.false; // 自定义结构会莫名的出来一个false字段
179
184
  }
180
-
181
185
  var resultValues = (0, _ValueFormat.default)(values, formItemGroup);
182
186
  if (onSubmit) {
183
187
  onSubmit(Object.assign({}, resultValues));
@@ -197,7 +201,6 @@ var StandardModal = function StandardModal(props) {
197
201
  if (Object.prototype.hasOwnProperty.call(values, 'false')) {
198
202
  delete values.false; // 自定义结构会莫名的出来一个false字段
199
203
  }
200
-
201
204
  var resultValues = (0, _ValueFormat.default)(values, formItemGroup);
202
205
  if (onSubmit) {
203
206
  onSubmit(Object.assign({}, resultValues));
@@ -222,7 +225,6 @@ var StandardModal = function StandardModal(props) {
222
225
  // modalForm.setFieldsValue(allFields) // 直接清空表单的赋值(initialValues传值如果没有前后赋值没有全部带上所有字段,则会默认又使用之前的部分未传参字段)
223
226
  modalForm.resetFields(); // 直接使用这个无效
224
227
  };
225
-
226
228
  var onAfterClose = function onAfterClose() {
227
229
  var afterClose = props.afterClose;
228
230
  if (type === 'form') clearAllFieldsValue();
@@ -254,6 +256,7 @@ var StandardModal = function StandardModal(props) {
254
256
  type: item.type,
255
257
  label: item.label,
256
258
  protoConfig: Object.assign({}, item.protoConfig)
259
+ // protoConfig: { className: '', ...item.protoConfig }
257
260
  }].concat(childrenFields);
258
261
  }
259
262
  return /*#__PURE__*/_react.default.createElement(_col.default, {
@@ -358,7 +361,6 @@ var StandardModal = function StandardModal(props) {
358
361
  }
359
362
  }));
360
363
  }
361
-
362
364
  if (typeof footerButtonGroup === 'function') {
363
365
  return footerButtonGroup(modalForm, props);
364
366
  }
@@ -378,7 +380,10 @@ var StandardModal = function StandardModal(props) {
378
380
  var renderFooter = function renderFooter() {
379
381
  var _a, _b;
380
382
  if (type === 'stepForm') {
381
- var currentStepInfo = formItemGroup[stepsConfig.current];
383
+ // 过滤隐藏掉的步骤表单
384
+ var currentStepInfo = formItemGroup.filter(function (fItem) {
385
+ return !fItem.hideStep;
386
+ })[stepsConfig.current];
382
387
  return ((_a = currentStepInfo === null || currentStepInfo === void 0 ? void 0 : currentStepInfo.actions) === null || _a === void 0 ? void 0 : _a.length) > 0 ? /*#__PURE__*/_react.default.createElement(_ActionList.default, {
383
388
  list: currentStepInfo.actions || [],
384
389
  onStep: handleStepType,
@@ -400,7 +405,7 @@ var StandardModal = function StandardModal(props) {
400
405
  };
401
406
  // 内容渲染
402
407
  var renderChildrenNodes = function renderChildrenNodes() {
403
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children, (type === 'form' || type === 'gridForm') && /*#__PURE__*/_react.default.createElement(_form.default, {
408
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children, (type === 'form' || type === 'gridForm') && (/*#__PURE__*/_react.default.createElement(_form.default, {
404
409
  layout: formLayout,
405
410
  ref: setModalFormRef,
406
411
  form: modalForm,
@@ -409,7 +414,7 @@ var StandardModal = function StandardModal(props) {
409
414
  // initialValues={{ ...initialValues }}
410
415
  scrollToFirstError: true,
411
416
  className: "modalForm"
412
- }, formPrefix && /*#__PURE__*/_react.default.createElement(_row.default, null, formPrefix(modalForm, props, forceUpdateForm)), formItemGroup ? renderFormItemGroup() : null, formPostfix && /*#__PURE__*/_react.default.createElement(_row.default, null, formPostfix(modalForm, props, forceUpdateForm), " ")), type === 'tabForm' && /*#__PURE__*/_react.default.createElement(_TabForm.default, {
417
+ }, formPrefix && /*#__PURE__*/_react.default.createElement(_row.default, null, formPrefix(modalForm, props, forceUpdateForm)), formItemGroup ? renderFormItemGroup() : null, formPostfix && /*#__PURE__*/_react.default.createElement(_row.default, null, formPostfix(modalForm, props, forceUpdateForm), " "))), type === 'tabForm' && (/*#__PURE__*/_react.default.createElement(_TabForm.default, {
413
418
  grid: size,
414
419
  layout: formLayout,
415
420
  fieldStatus: fieldStatus,
@@ -424,7 +429,7 @@ var StandardModal = function StandardModal(props) {
424
429
  onSubmit: handleSubmit,
425
430
  initialValues: Object.assign({}, initialValues),
426
431
  displayLayout: displayLayout
427
- }), type === 'stepForm' && /*#__PURE__*/_react.default.createElement(_StepForm.default, {
432
+ })), type === 'stepForm' && (/*#__PURE__*/_react.default.createElement(_StepForm.default, {
428
433
  grid: size,
429
434
  layout: formLayout,
430
435
  fieldStatus: fieldStatus,
@@ -439,11 +444,11 @@ var StandardModal = function StandardModal(props) {
439
444
  onSubmit: handleSubmit,
440
445
  initialValues: Object.assign({}, initialValues),
441
446
  displayLayout: displayLayout
442
- }));
447
+ })));
443
448
  };
444
449
  // 可拖动及缩放
445
450
  if (dragAble) {
446
- return /*#__PURE__*/_react.default.createElement(_Modal2.default, Object.assign({
451
+ return /*#__PURE__*/_react.default.createElement(_antDesignDraggableModal.DraggableModalProvider, null, /*#__PURE__*/_react.default.createElement(_antDesignDraggableModal.DraggableModal, Object.assign({
447
452
  destroyOnClose: true,
448
453
  initialWidth: otherProps.width || _data.general.modalSize[size].width,
449
454
  initialHeight: otherProps.height,
@@ -456,26 +461,8 @@ var StandardModal = function StandardModal(props) {
456
461
  onOk: handleSubmit,
457
462
  title: title,
458
463
  footer: renderFooter()
459
- }), renderChildrenNodes());
460
- /* return <DraggableModalProvider>
461
- <DraggableModal destroyOnClose
462
- initialWidth={otherProps.width || general.modalSize[size].width}
463
- initialHeight={otherProps.height}
464
- zIndex={1001}
465
- {...otherProps}
466
- visible={visible}
467
- className={`standardModal ${className || ''} ${fieldStatus === 'viewOnly' ? 'is-view' : ''}`}
468
- onCancel={handleCancel}
469
- afterClose={onAfterClose}
470
- onOk={handleSubmit}
471
- title={title}
472
- footer={renderFooter()}
473
- >
474
- {renderChildrenNodes()}
475
- </DraggableModal>
476
- </DraggableModalProvider>*/
464
+ }), renderChildrenNodes()));
477
465
  }
478
-
479
466
  return /*#__PURE__*/_react.default.createElement(_modal.default, Object.assign({
480
467
  destroyOnClose: true,
481
468
  maskClosable: false,
@@ -497,5 +484,4 @@ var StandardModal = function StandardModal(props) {
497
484
  onOk: handleSubmit
498
485
  }), renderChildrenNodes());
499
486
  };
500
- var _default = StandardModal;
501
- exports.default = _default;
487
+ var _default = exports.default = StandardModal;
@@ -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;
@@ -12,15 +12,15 @@ var _radio = _interopRequireDefault(require("antd/es/radio"));
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
  var _classnames = _interopRequireDefault(require("classnames"));
14
14
  require("./style/index.less");
15
- 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); }
16
- 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; }
17
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
+ 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); }
16
+ 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; }
17
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
19
19
  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."); }
20
- 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); }
21
- 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; }
22
- 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; } }
23
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
+ 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; } }
21
+ 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; }
22
+ 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; } }
23
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
24
24
  var StandardPanel = function StandardPanel(props) {
25
25
  var className = props.className,
26
26
  style = props.style,
@@ -67,10 +67,10 @@ var StandardPanel = function StandardPanel(props) {
67
67
  };
68
68
  // 是否显示提示框
69
69
  var popoverShow = function popoverShow() {
70
- return title.content ? /*#__PURE__*/_react.default.createElement(_popover.default, {
70
+ return title.content ? (/*#__PURE__*/_react.default.createElement(_popover.default, {
71
71
  content: title.content,
72
72
  placement: title.placement
73
- }, " ", title.label, " ") : title;
73
+ }, " ", title.label, " ")) : title;
74
74
  };
75
75
  var panelHeaderRef = (0, _react.useRef)();
76
76
  var bodyLimitStyle = (0, _react.useMemo)(function () {
@@ -125,5 +125,4 @@ var StandardPanel = function StandardPanel(props) {
125
125
  style: Object.assign({}, bodyLimitStyle)
126
126
  }, children));
127
127
  };
128
- var _default = StandardPanel;
129
- exports.default = _default;
128
+ var _default = exports.default = StandardPanel;
@@ -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>;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
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); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -9,27 +10,37 @@ var _table = _interopRequireDefault(require("antd/es/table"));
9
10
  require("antd/es/card/style");
10
11
  var _card = _interopRequireDefault(require("antd/es/card"));
11
12
  var _tslib = require("tslib");
12
- var _react = _interopRequireDefault(require("react"));
13
+ var _react = _interopRequireWildcard(require("react"));
13
14
  var _classnames = _interopRequireDefault(require("classnames"));
14
15
  var _index = _interopRequireDefault(require("../ButtonGroup/index"));
15
16
  require("./style/index.less");
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+ var _ConfigContext = require("../ConfigContext");
18
+ 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); }
19
+ 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; }
20
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
21
  var StandardTable = function StandardTable(props) {
22
+ var InitFanContext = (0, _react.useContext)(_ConfigContext.FanContext);
23
+ var providerConfig = InitFanContext['StandardTable'] || {}; // 使用上下文(全局配置)设置扩展的配置项
18
24
  // const ref= React.createRef<Card>();
19
- var _props$data = props.data,
20
- data = _props$data === void 0 ? {} : _props$data,
21
- rowKey = props.rowKey,
22
- rowSelection = props.rowSelection,
23
- columns = props.columns,
24
- hideOrderNumber = props.hideOrderNumber,
25
- _props$orderNumber = props.orderNumber,
26
- orderNumber = _props$orderNumber === void 0 ? {} : _props$orderNumber,
27
- className = props.className,
28
- emptyText = props.emptyText,
29
- codes = props.codes,
30
- permissionCodes = props.permissionCodes,
31
- rest = (0, _tslib.__rest)(props, ["data", "rowKey", "rowSelection", "columns", "hideOrderNumber", "orderNumber", "className", "emptyText", "codes", "permissionCodes"]); // 加上类型修复 TS:2322 报警
32
- var resetColumns = [Object.assign({
25
+ var _a = Object.assign(Object.assign({}, providerConfig), props),
26
+ _a$data = _a.data,
27
+ data = _a$data === void 0 ? {} : _a$data,
28
+ rowKey = _a.rowKey,
29
+ rowSelection = _a.rowSelection,
30
+ columns = _a.columns,
31
+ hideOrderNumber = _a.hideOrderNumber,
32
+ _a$orderNumber = _a.orderNumber,
33
+ orderNumber = _a$orderNumber === void 0 ? {} : _a$orderNumber,
34
+ className = _a.className,
35
+ emptyText = _a.emptyText,
36
+ codes = _a.codes,
37
+ permissionCodes = _a.permissionCodes,
38
+ _a$columnsConfig = _a.columnsConfig,
39
+ columnsConfig = _a$columnsConfig === void 0 ? {} : _a$columnsConfig,
40
+ rest = (0, _tslib.__rest)(_a, ["data", "rowKey", "rowSelection", "columns", "hideOrderNumber", "orderNumber", "className", "emptyText", "codes", "permissionCodes", "columnsConfig"]);
41
+
42
+ // 加上类型修复 TS:2322 报警
43
+ var resetColumns = [Object.assign(Object.assign({
33
44
  width: 58,
34
45
  align: 'center',
35
46
  title: '序号',
@@ -39,7 +50,7 @@ var StandardTable = function StandardTable(props) {
39
50
  render: function render(text, record, index) {
40
51
  return index + 1;
41
52
  }
42
- }, orderNumber)];
53
+ }, (columnsConfig === null || columnsConfig === void 0 ? void 0 : columnsConfig.orderNumber) || {}), orderNumber)];
43
54
  var _data$list = data.list,
44
55
  list = _data$list === void 0 ? [] : _data$list,
45
56
  pagination = data.pagination;
@@ -53,12 +64,17 @@ var StandardTable = function StandardTable(props) {
53
64
  }
54
65
  }, pagination);
55
66
  if (columns) {
56
- columns.map(function (colItem) {
67
+ var recombinationColumns = columns.map(function (colItem) {
68
+ var action = columnsConfig.action,
69
+ otherColumn = columnsConfig.otherColumn;
57
70
  if (colItem.type === 'action') {
58
- colItem.width = colItem.width || (colItem.buttonGroup.length > 1 ? 120 : 80);
59
- colItem.align = 'center';
60
- colItem.title = colItem.title || '操作';
71
+ 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);
72
+ colItem.align = (colItem === null || colItem === void 0 ? void 0 : colItem.align) || (action === null || action === void 0 ? void 0 : action.align) || 'center';
73
+ colItem.title = (colItem === null || colItem === void 0 ? void 0 : colItem.title) || (action === null || action === void 0 ? void 0 : action.title) || '操作';
61
74
  colItem.key = 'control';
75
+ colItem = Object.assign(Object.assign(Object.assign({}, action || {}), colItem), {
76
+ ellipsis: false
77
+ }); // Object.assign(action || {}, colItem, { ellipsis: false }) // 操作列不配置ellipsis
62
78
  // colItem.fixed = colItem.fixed || 'right'
63
79
  colItem.render = function (text, record, rowIndex) {
64
80
  // 按钮列表组
@@ -83,7 +99,9 @@ var StandardTable = function StandardTable(props) {
83
99
  record: record,
84
100
  rowIndex: rowIndex
85
101
  },
86
- dropdownConfig: colItem.buttonGroupConfig || {}
102
+ dropdownConfig: colItem.buttonGroupConfig || {},
103
+ moreText: colItem === null || colItem === void 0 ? void 0 : colItem.moreText,
104
+ moreIcon: colItem === null || colItem === void 0 ? void 0 : colItem.moreIcon
87
105
  });
88
106
  } else {
89
107
  return buttonGroup;
@@ -91,25 +109,28 @@ var StandardTable = function StandardTable(props) {
91
109
  };
92
110
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderTableButtonGroup(colItem.buttonGroup));
93
111
  };
112
+ return Object.assign({}, colItem);
94
113
  } else if (!colItem.render) {
95
114
  // 若未配置render,则给加个默认的返回方法
96
115
  colItem.render = function (text, record, rowIndex) {
97
116
  return text || text === 0 ? text : '-';
98
117
  };
99
- return colItem;
118
+ // return Object.assign({ ellipsis: undefined, render: undefined }, { ...otherColumns, ...colItem }); // ellipsis要配置在render之前
119
+ return Object.assign(Object.assign({}, otherColumn), colItem);
100
120
  }
101
- return colItem;
121
+ // return Object.assign({ ellipsis: undefined, render: undefined }, { ...otherColumns, ...colItem }) // ellipsis要配置在render之前
122
+ return Object.assign(Object.assign({}, otherColumn), colItem);
102
123
  });
103
- resetColumns = hideOrderNumber ? columns : resetColumns.concat(columns);
124
+ resetColumns = hideOrderNumber ? recombinationColumns : resetColumns.concat(recombinationColumns);
104
125
  }
105
126
  return /*#__PURE__*/_react.default.createElement(_card.default, {
106
127
  className: (0, _classnames.default)('standard-table', className),
107
128
  bordered: false
108
129
  }, /*#__PURE__*/_react.default.createElement(_table.default, Object.assign({
109
130
  rowKey: rowKey || 'id',
110
- rowSelection: rowSelection ? Object.assign(Object.assign({}, rowSelection), {
131
+ rowSelection: rowSelection ? Object.assign({
111
132
  columnWidth: 30
112
- }) : rowSelection,
133
+ }, rowSelection) : rowSelection,
113
134
  dataSource: list,
114
135
  pagination: !pagination ? false : paginationProps,
115
136
  columns: resetColumns,
@@ -120,5 +141,4 @@ var StandardTable = function StandardTable(props) {
120
141
  }
121
142
  }, rest)));
122
143
  };
123
- var _default = StandardTable;
124
- exports.default = _default;
144
+ var _default = exports.default = StandardTable;
@@ -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;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _index = _interopRequireDefault(require("../../SpecIcon/index"));
8
8
  var _react = _interopRequireDefault(require("react"));
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  var IconNode = function IconNode(props) {
11
11
  var icon = props.icon;
12
12
  if (!icon) return null;
@@ -25,8 +25,6 @@ var IconNode = function IconNode(props) {
25
25
  name: icon[1]
26
26
  }); // 预留 Array ['speci','plus']
27
27
  }
28
-
29
28
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, icon);
30
29
  };
31
- var _default = IconNode;
32
- exports.default = _default;
30
+ var _default = exports.default = IconNode;
@@ -10,4 +10,4 @@ Object.defineProperty(exports, "IconNode", {
10
10
  }
11
11
  });
12
12
  var _index = _interopRequireDefault(require("./IconNode/index"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  // 存储当前页面中所有菜单的涉及的功能代码,包括页面及按钮
8
- var _default = {
8
+ var _default = exports.default = {
9
9
  btnFuncCodes: [{
10
10
  name: '详情',
11
11
  code: 'codeBtnDetail',
@@ -115,5 +115,4 @@ var _default = {
115
115
  name: '详情',
116
116
  code: 'codePageDetail'
117
117
  }]
118
- };
119
- exports.default = _default;
118
+ };