fan-standard-comp 3.2.1 → 3.2.3

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 +2 -32
  2. package/dist/09cd8e9be7081f2166444cce393fe968.svg +54 -0
  3. package/dist/e3378c145b7db195ad068735e15fb28a.svg +165 -0
  4. package/dist/fan-standard-comp.umd.js +183 -439
  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 +37 -26
  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 +9 -2
  41. package/es/FormComp/Uploader/index.js +325 -156
  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 +41 -28
  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 +9 -2
  151. package/lib/FormComp/Uploader/index.js +325 -159
  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 +15 -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
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  // 一些排版等基本配置值项 (后期可参考是否放入 locales内)
8
- var _default = {
8
+ var _default = exports.default = {
9
9
  // 表单 响应式排版
10
10
  formLayout: {
11
11
  labelCol: {
@@ -78,6 +78,8 @@ var _default = {
78
78
  // 弹窗梯度大小及对应的表单栅格
79
79
  modalSize: {
80
80
  xs: {
81
+ columnNumber: 1,
82
+ // 栅格列数量
81
83
  width: 420,
82
84
  formLayout: {
83
85
  labelCol: {
@@ -97,6 +99,8 @@ var _default = {
97
99
  }
98
100
  },
99
101
  sm: {
102
+ columnNumber: 1,
103
+ // 栅格列数量
100
104
  width: 680,
101
105
  formLayout: {
102
106
  labelCol: {
@@ -116,6 +120,8 @@ var _default = {
116
120
  }
117
121
  },
118
122
  md: {
123
+ columnNumber: 2,
124
+ // 栅格列数量
119
125
  width: 780,
120
126
  formLayout: {
121
127
  labelCol: {
@@ -136,6 +142,8 @@ var _default = {
136
142
  },
137
143
  // 宽度大,1000px下
138
144
  lg: {
145
+ columnNumber: 3,
146
+ // 栅格列数量
139
147
  width: 1000,
140
148
  formLayout: {
141
149
  labelCol: {
@@ -156,6 +164,8 @@ var _default = {
156
164
  },
157
165
  // 超级宽度大,1200px下
158
166
  xlg: {
167
+ columnNumber: 3,
168
+ // 栅格列数量
159
169
  width: 1200,
160
170
  formLayout: {
161
171
  labelCol: {
@@ -173,7 +183,27 @@ var _default = {
173
183
  span: 21
174
184
  }
175
185
  }
186
+ },
187
+ xxlg: {
188
+ columnNumber: 4,
189
+ // 栅格列数量
190
+ width: 1400,
191
+ formLayout: {
192
+ labelCol: {
193
+ span: 8
194
+ },
195
+ wrapperCol: {
196
+ span: 16
197
+ }
198
+ },
199
+ formBlockLayout: {
200
+ labelCol: {
201
+ span: 2
202
+ },
203
+ wrapperCol: {
204
+ span: 22
205
+ }
206
+ }
176
207
  }
177
208
  }
178
- };
179
- exports.default = _default;
209
+ };
package/lib/data/index.js CHANGED
@@ -17,4 +17,4 @@ Object.defineProperty(exports, "general", {
17
17
  });
18
18
  var _general = _interopRequireDefault(require("./general.config"));
19
19
  var _func = _interopRequireDefault(require("./func.code"));
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
package/lib/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/lib/index.js CHANGED
@@ -14,7 +14,6 @@ var _exportNames = {
14
14
  TabForm: true,
15
15
  StandardFilter: true,
16
16
  StandardModal: true,
17
- StandardDragModal: true,
18
17
  Uploader: true,
19
18
  EditButton: true,
20
19
  FieldComponent: true,
@@ -25,7 +24,9 @@ var _exportNames = {
25
24
  WrapperContent: true,
26
25
  DragContent: true,
27
26
  SplitterLayout: true,
28
- NavLeafScroll: true
27
+ NavLeafScroll: true,
28
+ ImageGallery: true,
29
+ ImagePreview: true
29
30
  };
30
31
  Object.defineProperty(exports, "ButtonGroup", {
31
32
  enumerable: true,
@@ -57,6 +58,18 @@ Object.defineProperty(exports, "FieldComponent", {
57
58
  return _FieldComponent.default;
58
59
  }
59
60
  });
61
+ Object.defineProperty(exports, "ImageGallery", {
62
+ enumerable: true,
63
+ get: function get() {
64
+ return _index.default;
65
+ }
66
+ });
67
+ Object.defineProperty(exports, "ImagePreview", {
68
+ enumerable: true,
69
+ get: function get() {
70
+ return _ImagePreview.default;
71
+ }
72
+ });
60
73
  Object.defineProperty(exports, "ItemGroup", {
61
74
  enumerable: true,
62
75
  get: function get() {
@@ -93,12 +106,6 @@ Object.defineProperty(exports, "SplitterLayout", {
93
106
  return _SplitterLayout.default;
94
107
  }
95
108
  });
96
- Object.defineProperty(exports, "StandardDragModal", {
97
- enumerable: true,
98
- get: function get() {
99
- return _Modal.default;
100
- }
101
- });
102
109
  Object.defineProperty(exports, "StandardFilter", {
103
110
  enumerable: true,
104
111
  get: function get() {
@@ -169,7 +176,6 @@ var _StepForm = _interopRequireDefault(require("./StandardForm/StepForm"));
169
176
  var _TabForm = _interopRequireDefault(require("./StandardForm/TabForm"));
170
177
  var _StandardFilter = _interopRequireDefault(require("./StandardFilter"));
171
178
  var _StandardModal = _interopRequireDefault(require("./StandardModal"));
172
- var _Modal = _interopRequireDefault(require("./StandardDragModal/Modal"));
173
179
  var _Uploader = _interopRequireDefault(require("./FormComp/Uploader"));
174
180
  var _EditButton = _interopRequireDefault(require("./FormComp/EditButton"));
175
181
  var _FieldComponent = _interopRequireDefault(require("./FormComp/FieldComponent"));
@@ -215,4 +221,18 @@ Object.keys(_data).forEach(function (key) {
215
221
  }
216
222
  });
217
223
  });
218
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
224
+ var _ConfigContext = require("./ConfigContext");
225
+ Object.keys(_ConfigContext).forEach(function (key) {
226
+ if (key === "default" || key === "__esModule") return;
227
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
228
+ if (key in exports && exports[key] === _ConfigContext[key]) return;
229
+ Object.defineProperty(exports, key, {
230
+ enumerable: true,
231
+ get: function get() {
232
+ return _ConfigContext[key];
233
+ }
234
+ });
235
+ });
236
+ var _index = _interopRequireDefault(require("./ImageGallery/index"));
237
+ var _ImagePreview = _interopRequireDefault(require("./ImageGallery/ImagePreview"));
238
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -44,5 +44,4 @@ var UtilValueFormat = function UtilValueFormat(fieldsValue, formItemGroup) {
44
44
  });
45
45
  return fieldsValue;
46
46
  };
47
- var _default = UtilValueFormat;
48
- exports.default = _default;
47
+ var _default = exports.default = UtilValueFormat;
@@ -5,15 +5,15 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.removeNoPermission = exports.btnIsHide = exports.btnIsDisabled = exports.btnClickFunc = void 0;
7
7
  var _lodash = _interopRequireDefault(require("lodash"));
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  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; }
10
10
  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; }
11
- 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; }
12
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
- 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); }
11
+ 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; }
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
13
+ 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); }
14
14
  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); }
15
15
  // 按钮方法
16
- var btnClickFunc = function btnClickFunc(fn) {
16
+ var btnClickFunc = exports.btnClickFunc = function btnClickFunc(fn) {
17
17
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
18
18
  if (!fn) return null;
19
19
  var paramsArr = [];
@@ -25,12 +25,10 @@ var btnClickFunc = function btnClickFunc(fn) {
25
25
  if (typeof fn === 'function') {
26
26
  return fn.apply(void 0, paramsArr); // 表格列返回的是方法
27
27
  }
28
-
29
28
  return fn;
30
29
  };
31
30
  // 按钮是否禁用
32
- exports.btnClickFunc = btnClickFunc;
33
- var btnIsDisabled = function btnIsDisabled(isDisabled) {
31
+ var btnIsDisabled = exports.btnIsDisabled = function btnIsDisabled(isDisabled) {
34
32
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
35
33
  if (!isDisabled) return false;
36
34
  var paramsArr = [];
@@ -42,12 +40,10 @@ var btnIsDisabled = function btnIsDisabled(isDisabled) {
42
40
  if (typeof isDisabled === 'function') {
43
41
  return isDisabled.apply(void 0, paramsArr); // 表格列返回的是方法
44
42
  }
45
-
46
43
  return isDisabled;
47
44
  };
48
45
  // 按钮是否隐藏
49
- exports.btnIsDisabled = btnIsDisabled;
50
- var btnIsHide = function btnIsHide(isHide) {
46
+ var btnIsHide = exports.btnIsHide = function btnIsHide(isHide) {
51
47
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
52
48
  if (!isHide) return false;
53
49
  var paramsArr = [];
@@ -59,15 +55,13 @@ var btnIsHide = function btnIsHide(isHide) {
59
55
  if (typeof isHide === 'function') {
60
56
  return isHide.apply(void 0, paramsArr); // 表格列返回的是方法
61
57
  }
62
-
63
58
  return isHide;
64
59
  };
65
60
  // 重新组合数据(排除不包含在permissionCodes内及isHide数据
66
- exports.btnIsHide = btnIsHide;
67
- var removeNoPermission = function removeNoPermission(array, permissionCodes, codes, params) {
61
+ var _removeNoPermission = exports.removeNoPermission = function removeNoPermission(array, permissionCodes, codes, params) {
68
62
  return Array.isArray(array) && array.filter(function (item) {
69
63
  if (item.children) {
70
- item.children = removeNoPermission(item.children, permissionCodes, codes, params);
64
+ item.children = _removeNoPermission(item.children, permissionCodes, codes, params);
71
65
  if (item.children.length === 0) return false; // 如果子集合过滤为空时,不返当前数据
72
66
  }
73
67
  // permissionCodes未定义,则直接返回不进行过滤
@@ -93,11 +87,10 @@ var removeNoPermission = function removeNoPermission(array, permissionCodes, cod
93
87
  var _codes$matchIndex;
94
88
  // 如果有配置code,则使用func.code.js里面配置的名称
95
89
  resultItem = _objectSpread(_objectSpread(_objectSpread({}, resultItem), codes[matchIndex]), {}, {
96
- icon: resultItem.icon || ((_codes$matchIndex = codes[matchIndex]) === null || _codes$matchIndex === void 0 ? void 0 : _codes$matchIndex.icon)
90
+ icon: resultItem.icon === '' || resultItem.icon === null ? resultItem.icon : resultItem.icon || ((_codes$matchIndex = codes[matchIndex]) === null || _codes$matchIndex === void 0 ? void 0 : _codes$matchIndex.icon)
97
91
  });
98
92
  }
99
93
  }
100
94
  return resultItem;
101
95
  });
102
- };
103
- exports.removeNoPermission = removeNoPermission;
96
+ };
@@ -3,7 +3,13 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getParentNodes = exports.getNodePaths = exports.getChildrenNodes = void 0;
6
+ exports.getParentNodes = exports.getNodePaths = exports.getChildrenNodes = exports.convertToArray = exports.arrayToTree = void 0;
7
+ 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); }
8
+ 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; }
9
+ 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; }
10
+ 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; }
11
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
12
+ 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); }
7
13
  /**
8
14
  * @description 递归查看父级节点数据集合及当前节点数据
9
15
  * @params {Array} list 当前需要过滤查看的数据集合、
@@ -16,7 +22,7 @@ exports.getParentNodes = exports.getNodePaths = exports.getChildrenNodes = void
16
22
  * @result {Array} parentKeys 当前传入nodeKey值所有上级别父级数据关键字数据集合(keyParam)(倒序排列,根节点在最后一条)
17
23
  * @result {Array} matchNode 当前传入nodeKey值所在的数据对象集合
18
24
  * */
19
- var getParentNodes = function getParentNodes(list, nodeKey) {
25
+ var getParentNodes = exports.getParentNodes = function getParentNodes(list, nodeKey) {
20
26
  var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
21
27
  childrenParam: 'children',
22
28
  keyParam: 'value'
@@ -36,7 +42,7 @@ var getParentNodes = function getParentNodes(list, nodeKey) {
36
42
  }
37
43
  return null;
38
44
  };
39
- var deepFind = function deepFind(array, nodeId) {
45
+ var _deepFind = function deepFind(array, nodeId) {
40
46
  for (var i = 0; i < array.length; i += 1) {
41
47
  var node = array[i];
42
48
  if (node[params.keyParam] === nodeId) {
@@ -45,7 +51,7 @@ var getParentNodes = function getParentNodes(list, nodeKey) {
45
51
  }
46
52
  // 如果是单个
47
53
  if (node[params.childrenParam] && node[params.childrenParam].length > 0) {
48
- deepFind(node[params.childrenParam] || node[params.childrenParam], nodeId);
54
+ _deepFind(node[params.childrenParam] || node[params.childrenParam], nodeId);
49
55
  nodeParent.push(node); // 将当前节点数据存储到父节点数据中
50
56
  if (matchNode.length > 0) {
51
57
  break; // 在子节点查找到了,需要跳出
@@ -82,12 +88,11 @@ var getParentNodes = function getParentNodes(list, nodeKey) {
82
88
  }
83
89
  }*/
84
90
  }
85
-
86
91
  return matchNode; // 返回查找到的节点数据(格式为数组)
87
92
  };
88
93
 
89
94
  // 查找单个节点
90
- var findMatchItem = function findMatchItem(arrList, key) {
95
+ var _findMatchItem = function findMatchItem(arrList, key) {
91
96
  var matchItem;
92
97
  for (var i = 0; i < arrList.length; i += 1) {
93
98
  var node = arrList[i];
@@ -96,7 +101,7 @@ var getParentNodes = function getParentNodes(list, nodeKey) {
96
101
  break;
97
102
  }
98
103
  if (node[params.childrenParam]) {
99
- matchItem = findMatchItem(node[params.childrenParam], key);
104
+ matchItem = _findMatchItem(node[params.childrenParam], key);
100
105
  }
101
106
  }
102
107
  return matchItem;
@@ -106,11 +111,11 @@ var getParentNodes = function getParentNodes(list, nodeKey) {
106
111
  // const {showCheckedStrategy} = extraProps;
107
112
  // TODO 需要判断 showCheckedStrategy 值为 SHOW_PARENT、 SHOW_CHILD 、SHOW_ALL不同情况展示
108
113
  nodeKey.map(function (key) {
109
- var matchItem = findMatchItem(list, key);
110
- if (matchItem) matchNode.push(findMatchItem(list, key));
114
+ var matchItem = _findMatchItem(list, key);
115
+ if (matchItem) matchNode.push(_findMatchItem(list, key));
111
116
  });
112
117
  } else {
113
- deepFind(list, nodeKey);
118
+ _deepFind(list, nodeKey);
114
119
  }
115
120
  nodeParent.forEach(function (par) {
116
121
  return parentKeys.push(par[params.keyParam]);
@@ -123,43 +128,47 @@ var getParentNodes = function getParentNodes(list, nodeKey) {
123
128
  };
124
129
 
125
130
  /**
126
- * @description 递归查找树的所有节点及id
131
+ * @description 递归查找指定ID所有的子菜单与子功能集合
127
132
  * @params {Array} childNode 当前需要过滤查看的数据集合、
128
133
  * @params {Object} params 指定当前数据中,筛选对应子集合字段名及匹配标识值字段名
129
- * @value { String } childrenParam:指当前子集合数据字段名(字符串表示单个,数组表示当前多个子集合字段名)
130
- * @value { String } keyParam: 指当前匹配标识值字段名)
134
+ * (childrenParam:指当前子集合数据字段名(字符串表示单个,数组表示当前多个子集合字段名),keyParam: 指当前匹配标识值字段名)
135
+ * @params {Object} extra
131
136
  *
132
137
  * @result {Array} childKeys 所有子项的id
133
- * @result {Array} nodeChildren 所有节点数据对象集合
134
- *
135
- * @usage:
136
- * getChildrenNodes(childNode, params)
138
+ * @result {Array} nodeChildren 当前传入nodeKey值所在的数据对象集合
137
139
  * */
138
- exports.getParentNodes = getParentNodes;
139
- var getChildrenNodes = function getChildrenNodes(childNode) {
140
+
141
+ var getChildrenNodes = exports.getChildrenNodes = function getChildrenNodes(childNode) {
140
142
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
141
143
  childrenParam: 'children',
142
144
  keyParam: 'value'
143
145
  };
144
146
  var childKeys = [];
145
147
  var nodeChildren = []; // 存储:authId, types
146
- var deepFindChild = function deepFindChild(cList) {
148
+ var _deepFindChild = function deepFindChild(cList) {
147
149
  Array.isArray(cList) && cList.forEach(function (item) {
148
150
  childKeys.push(item[params.keyParam]);
149
151
  nodeChildren.push(item);
150
- if (item[params.childrenParam]) deepFindChild(item[params.childrenParam]);
152
+ if (item[params.childrenParam]) _deepFindChild(item[params.childrenParam]);
151
153
  });
152
154
  };
153
- deepFindChild(childNode);
155
+ _deepFindChild(childNode);
154
156
  return {
155
157
  childKeys: childKeys,
156
158
  nodeChildren: nodeChildren
157
159
  };
158
160
  };
159
161
 
160
- // 查找节点路径
161
- exports.getChildrenNodes = getChildrenNodes;
162
- var getNodePaths = function getNodePaths(list, nodeKey) {
162
+ /**
163
+ * @description 查找节点路径
164
+ * @params {Array} list 查询的数据源
165
+ * @params {Array} nodeKey 需要查询的key集合
166
+ * @params {Object} params 指定当前数据中,筛选对应子集合字段名及匹配标识值字段名
167
+ * (childrenParam:指当前子集合数据字段名(字符串表示单个,数组表示当前多个子集合字段名),keyParam: 指当前匹配标识值字段名)
168
+ *
169
+ * @result {Array} 所有匹配到的层级数据
170
+ * */
171
+ var getNodePaths = exports.getNodePaths = function getNodePaths(list, nodeKey) {
163
172
  var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
164
173
  childrenParam: 'children',
165
174
  keyParam: 'value'
@@ -167,7 +176,7 @@ var getNodePaths = function getNodePaths(list, nodeKey) {
167
176
  var extraProps = arguments.length > 3 ? arguments[3] : undefined;
168
177
  // 获取指定节点的路径数组
169
178
  var getPathByKey = function getPathByKey(value, arr) {
170
- var findNodePath = function findNodePath(node, value, nodePathArray) {
179
+ var _findNodePath = function findNodePath(node, value, nodePathArray) {
171
180
  // 这里可以自定义push的内容,而不是整个node,而且这里node也包含了children
172
181
  nodePathArray.push(node);
173
182
  // 找到符合条件的节点,通过throw终止掉递归
@@ -177,7 +186,7 @@ var getNodePaths = function getNodePaths(list, nodeKey) {
177
186
  }
178
187
  if (node[params.childrenParam] && node[params.childrenParam].length > 0) {
179
188
  for (var i = 0; i < node[params.childrenParam].length; i++) {
180
- findNodePath(node[params.childrenParam][i], value, nodePathArray);
189
+ _findNodePath(node[params.childrenParam][i], value, nodePathArray);
181
190
  }
182
191
  // 当前节点的子节点遍历完依旧没找到,则删除路径中的该节点
183
192
  nodePathArray.pop();
@@ -191,7 +200,7 @@ var getNodePaths = function getNodePaths(list, nodeKey) {
191
200
  var nodePathArray = [];
192
201
  try {
193
202
  for (var i = 0; i < arr.length; i++) {
194
- findNodePath(arr[i], value, nodePathArray);
203
+ _findNodePath(arr[i], value, nodePathArray);
195
204
  }
196
205
  } catch (e) {
197
206
  return nodePathArray;
@@ -206,4 +215,69 @@ var getNodePaths = function getNodePaths(list, nodeKey) {
206
215
  }
207
216
  return pathNode;
208
217
  };
209
- exports.getNodePaths = getNodePaths;
218
+
219
+ /**
220
+ * 数组转树形结构
221
+ * @param {array} list 被转换的数组
222
+ * @param {number|string} root 根节点(最外层节点)的 id
223
+ * @param {object} params 字段值(默认 { keyParam: 'id', parentParam: 'parentId' })
224
+ * @return array
225
+ */
226
+ /**
227
+ * 数组转树形结构
228
+ * @param {array} list 被转换的数组
229
+ * @param {number|string} root 根节点(最外层节点)的 id
230
+ * @param {object} params 字段值(默认 { keyParam: 'id', parentParam: 'parentId' })
231
+ * @return array
232
+ */
233
+ var _arrayToTree = exports.arrayToTree = function arrayToTree(list, rootId) {
234
+ var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
235
+ _ref$keyParam = _ref.keyParam,
236
+ keyParam = _ref$keyParam === void 0 ? "id" : _ref$keyParam,
237
+ _ref$parentParam = _ref.parentParam,
238
+ parentParam = _ref$parentParam === void 0 ? "parentId" : _ref$parentParam,
239
+ _ref$childrenParam = _ref.childrenParam,
240
+ childrenParam = _ref$childrenParam === void 0 ? "children" : _ref$childrenParam;
241
+ var res = [];
242
+ list.forEach(function (item) {
243
+ if (item[parentParam] === rootId) {
244
+ var itemChildren = _arrayToTree(list, item[keyParam]);
245
+ if (itemChildren.length) item[childrenParam] = itemChildren;
246
+ res.push(item);
247
+ }
248
+ });
249
+ return res;
250
+ };
251
+ /**
252
+ * 多根树转换成数组
253
+ * @param {array} tree 被转换的树(仅限于只有一个根的树
254
+ * @return array
255
+ */
256
+
257
+ var convertToArray = exports.convertToArray = function convertToArray(tree) {
258
+ var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
259
+ _ref2$keyParam = _ref2.keyParam,
260
+ keyParam = _ref2$keyParam === void 0 ? "id" : _ref2$keyParam,
261
+ _ref2$parentParam = _ref2.parentParam,
262
+ parentParam = _ref2$parentParam === void 0 ? "parentId" : _ref2$parentParam,
263
+ _ref2$childrenParam = _ref2.childrenParam,
264
+ childrenParam = _ref2$childrenParam === void 0 ? "children" : _ref2$childrenParam;
265
+ var result = []; // 存放结果的数组
266
+ var sortCount = 0;
267
+ tree.forEach(function (item) {
268
+ var _loop = function loop(data) {
269
+ sortCount++;
270
+ result.push(_objectSpread(_objectSpread({}, data), {}, {
271
+ sort: sortCount
272
+ }));
273
+ var child = data[childrenParam];
274
+ if (child) {
275
+ for (var i = 0; i < child.length; i++) {
276
+ _loop(child[i]);
277
+ }
278
+ }
279
+ };
280
+ _loop(item);
281
+ });
282
+ return result;
283
+ };
@@ -4,10 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  var _exportNames = {
7
- UtilValueFormat: true,
8
- getParentNodes: true,
9
- getChildrenNodes: true,
10
- getNodePaths: true
7
+ UtilValueFormat: true
11
8
  };
12
9
  Object.defineProperty(exports, "UtilValueFormat", {
13
10
  enumerable: true,
@@ -15,36 +12,17 @@ Object.defineProperty(exports, "UtilValueFormat", {
15
12
  return _ValueFormat.default;
16
13
  }
17
14
  });
18
- Object.defineProperty(exports, "getChildrenNodes", {
19
- enumerable: true,
20
- get: function get() {
21
- return _getParentNodes.getChildrenNodes;
22
- }
23
- });
24
- Object.defineProperty(exports, "getNodePaths", {
25
- enumerable: true,
26
- get: function get() {
27
- return _getParentNodes.getNodePaths;
28
- }
29
- });
30
- Object.defineProperty(exports, "getParentNodes", {
31
- enumerable: true,
32
- get: function get() {
33
- return _getParentNodes.getParentNodes;
34
- }
35
- });
36
15
  var _ValueFormat = _interopRequireDefault(require("./ValueFormat"));
37
16
  var _getParentNodes = require("./getParentNodes");
38
- var _dictSelectUtil = require("./dictSelectUtil");
39
- Object.keys(_dictSelectUtil).forEach(function (key) {
17
+ Object.keys(_getParentNodes).forEach(function (key) {
40
18
  if (key === "default" || key === "__esModule") return;
41
19
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
42
- if (key in exports && exports[key] === _dictSelectUtil[key]) return;
20
+ if (key in exports && exports[key] === _getParentNodes[key]) return;
43
21
  Object.defineProperty(exports, key, {
44
22
  enumerable: true,
45
23
  get: function get() {
46
- return _dictSelectUtil[key];
24
+ return _getParentNodes[key];
47
25
  }
48
26
  });
49
27
  });
50
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
28
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isUrl = exports.getUrlSearch = exports.getJumpUrlBySearch = void 0;
7
+ var _qs = require("qs");
8
+ /**
9
+ * 获取url的search,并有条件:`^{变量名}`的条件取本地存储的数据 // 参数格式:^{变量名} 变量名支持数字、字母、下划线
10
+ * */
11
+ var getUrlSearch = exports.getUrlSearch = function getUrlSearch(href) {
12
+ var searchKeys = {};
13
+ if (isUrl(href)) {
14
+ var url = new URL(href);
15
+ searchKeys = (0, _qs.parse)(url.search, {
16
+ ignoreQueryPrefix: true // 去除第一个字符'?'
17
+ });
18
+ } else {
19
+ searchKeys = (0, _qs.parse)(href.split('?')[1], {
20
+ ignoreQueryPrefix: true // 去除第一个字符'?'
21
+ });
22
+ }
23
+ // 有带参数,取本地的数据
24
+ Object.keys(searchKeys).forEach(function (item) {
25
+ var _searchKeys$item;
26
+ // 取变量名对应本地的值
27
+ if (((_searchKeys$item = searchKeys[item]) === null || _searchKeys$item === void 0 ? void 0 : _searchKeys$item.indexOf('^{')) !== -1) {
28
+ // 清除"^{"与"}"取当前的
29
+ var keyParam = searchKeys[item].replace('^{', '').substring(0, searchKeys[item].replace('^{', '').lastIndexOf('}'));
30
+ searchKeys[item] = localStorage.getItem(keyParam) || undefined;
31
+ }
32
+ });
33
+ return searchKeys;
34
+ };
35
+
36
+ /**
37
+ * 获取url的search,并有条件:`^{变量名}`的条件取本地存储的数据 // 参数格式:^{变量名} 变量名支持数字、字母、下划线
38
+ * 根据url上的参数变量,重新调整跳转链接
39
+ * */
40
+ var getJumpUrlBySearch = exports.getJumpUrlBySearch = function getJumpUrlBySearch(href) {
41
+ var searchKeys = {};
42
+ var getPath;
43
+ if (isUrl(href)) {
44
+ var url = new URL(href);
45
+ searchKeys = (0, _qs.parse)(url.search, {
46
+ ignoreQueryPrefix: true // 去除第一个字符'?'
47
+ });
48
+ getPath = url.origin + url.pathname; // 取条件参数外的地址
49
+ } else {
50
+ searchKeys = (0, _qs.parse)(href.split('?')[1], {
51
+ ignoreQueryPrefix: true // 去除第一个字符'?'
52
+ });
53
+ getPath = href.split('?').length > 0 ? href.split('?')[0] : ''; // 取条件参数外的地址
54
+ }
55
+ // 有带参数,取本地的数据,然后拼接给地址
56
+ Object.keys(searchKeys).forEach(function (item, index) {
57
+ var _searchKeys$item2;
58
+ // 取变量名
59
+ if (((_searchKeys$item2 = searchKeys[item]) === null || _searchKeys$item2 === void 0 ? void 0 : _searchKeys$item2.indexOf('^{')) !== -1) {
60
+ // 清除"^{"与"}"取当前的
61
+ var keyParam = searchKeys[item].replace('^{', '').substring(0, searchKeys[item].replace('^{', '').lastIndexOf('}'));
62
+ searchKeys[item] = localStorage.getItem(keyParam) || '';
63
+ }
64
+ getPath += (index === 0 ? "?" : '&') + item + "=" + searchKeys[item];
65
+ });
66
+ return getPath;
67
+ };
68
+ /**
69
+ * 是否是完整的URL
70
+ *
71
+ * */
72
+ var isUrl = exports.isUrl = function isUrl(path) {
73
+ if (!path.startsWith('http')) {
74
+ return false;
75
+ }
76
+ try {
77
+ var url = new URL(path);
78
+ return !!url;
79
+ } catch (error) {
80
+ return false;
81
+ }
82
+ };