ztxkui 4.2.18-21 → 4.2.18-220

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 (416) hide show
  1. package/dist/App.js +315 -291
  2. package/dist/Demo.js +64 -43
  3. package/dist/DemoCom/BasicDemo.js +57 -56
  4. package/dist/DemoCom/CodeQueryDemo.js +3 -2
  5. package/dist/DemoCom/CollapseDemo.js +28 -27
  6. package/dist/DemoCom/DragSort.js +11 -10
  7. package/dist/DemoCom/FormDemo.js +36 -30
  8. package/dist/DemoCom/PrintContainerDemo.js +151 -150
  9. package/dist/DemoCom/PrintDemo.js +15 -14
  10. package/dist/DemoCom/SinaturesDemo.js +9 -8
  11. package/dist/DemoCom/SyhDemo.js +21 -20
  12. package/dist/DemoCom/TableAnalyse.js +34 -33
  13. package/dist/DemoCom/TableDemo.js +73 -69
  14. package/dist/DemoCom/TableDemo1.js +84 -34
  15. package/dist/DemoCom/TableDetail.d.ts +9 -0
  16. package/dist/DemoCom/TableDetail.js +259 -0
  17. package/dist/DemoCom/TestCom.js +22 -19
  18. package/dist/DemoCom/data.d.ts +110 -0
  19. package/dist/DemoCom/data.js +2308 -0
  20. package/dist/TableDemo/BasicTable.js +225 -25
  21. package/dist/TableDemo/EditableTable.js +146 -72
  22. package/dist/TableDemo/ModalTable.js +25 -24
  23. package/dist/TableDemo/ProEditableTable.js +30 -29
  24. package/dist/TableDemo/data.d.ts +34 -0
  25. package/dist/TableDemo/data.js +387 -10
  26. package/dist/TableDemo/index.js +3 -3
  27. package/dist/TreeDemo.js +8 -7
  28. package/dist/TreeSelectDemo.js +12 -8
  29. package/dist/UI/Form/index.d.ts +3 -0
  30. package/dist/UI/Form/index.js +347 -0
  31. package/dist/UI/Input/index.d.ts +17 -0
  32. package/dist/UI/Input/index.js +74 -0
  33. package/dist/UI/InputNumber/index.d.ts +3 -0
  34. package/dist/UI/InputNumber/index.js +45 -0
  35. package/dist/UI/OldForm/index.d.ts +9 -0
  36. package/dist/UI/OldForm/index.js +302 -0
  37. package/dist/UI/Select/EmpForQuitDemo.d.ts +15 -0
  38. package/dist/UI/Select/EmpForQuitDemo.js +120 -0
  39. package/dist/UI/Select/index.d.ts +10 -0
  40. package/dist/UI/Select/index.js +207 -0
  41. package/dist/UI/Table/BusinessListDemo.d.ts +15 -0
  42. package/dist/UI/Table/BusinessListDemo.js +227 -0
  43. package/dist/UI/Table/BusinessMemberDemo.d.ts +18 -0
  44. package/dist/UI/Table/BusinessMemberDemo.js +181 -0
  45. package/dist/UI/Table/index.d.ts +10 -0
  46. package/dist/UI/Table/index.js +850 -0
  47. package/dist/UI/TreeSelect/index.d.ts +3 -0
  48. package/dist/UI/TreeSelect/index.js +120 -0
  49. package/dist/UI/index.d.ts +2 -0
  50. package/dist/UI/index.js +34 -0
  51. package/dist/UploadDemo.js +27 -23
  52. package/dist/components/Button/button.d.ts +6 -0
  53. package/dist/components/Button/button.js +11 -4
  54. package/dist/components/Collapse/collapse.js +2 -1
  55. package/dist/components/DatePicker/data-picker.d.ts +3 -1
  56. package/dist/components/EnhanceSelect/index.d.ts +11 -1
  57. package/dist/components/EnhanceSelect/index.js +231 -49
  58. package/dist/components/EnhanceTree/index.js +4 -3
  59. package/dist/components/EnhanceTreeSelect/index.d.ts +5 -1
  60. package/dist/components/EnhanceTreeSelect/index.js +57 -7
  61. package/dist/components/Export/export.js +5 -4
  62. package/dist/components/Form/form.d.ts +11 -1
  63. package/dist/components/Form/form.js +5 -3
  64. package/dist/components/Input/input.d.ts +5 -3
  65. package/dist/components/Input/input.js +72 -3
  66. package/dist/components/InputNumber/input-number.js +3 -2
  67. package/dist/components/Layout/layout.d.ts +4 -4
  68. package/dist/components/Menu/menu.d.ts +1 -1
  69. package/dist/components/NumberCase/index.js +9 -7
  70. package/dist/components/Print/print.js +4 -3
  71. package/dist/components/PrintContainer/AttachPreviewModal.js +3 -2
  72. package/dist/components/PrintContainer/PrintModal.js +4 -3
  73. package/dist/components/PrintContainer/handle.d.ts +2 -4
  74. package/dist/components/PrintContainer/handle.js +3 -2
  75. package/dist/components/PrintContainer/lodop.js +2 -1
  76. package/dist/components/PrintContainer/print-container.js +74 -73
  77. package/dist/components/PrintContainer/service.js +5 -4
  78. package/dist/components/ProForm/hooks.d.ts +23 -0
  79. package/dist/components/ProForm/hooks.js +209 -0
  80. package/dist/components/ProForm/index.d.ts +9 -0
  81. package/dist/components/ProForm/index.js +168 -0
  82. package/dist/components/ProForm/interface.d.ts +200 -0
  83. package/dist/components/ProForm/interface.js +1 -0
  84. package/dist/components/ProForm/item.d.ts +13 -0
  85. package/dist/components/ProForm/item.js +222 -0
  86. package/dist/components/ProForm/items.d.ts +5 -0
  87. package/dist/components/ProForm/items.js +36 -0
  88. package/dist/components/ProForm/record-common-list.d.ts +18 -0
  89. package/dist/components/ProForm/record-common-list.js +83 -0
  90. package/dist/components/ProForm/search-drawer.d.ts +14 -0
  91. package/dist/components/ProForm/search-drawer.js +237 -0
  92. package/dist/components/ProForm/setting.d.ts +5 -0
  93. package/dist/components/ProForm/setting.js +12 -0
  94. package/dist/components/ProForm/useCommonSearch.d.ts +35 -0
  95. package/dist/components/ProForm/useCommonSearch.js +352 -0
  96. package/dist/components/ProFormList/index.d.ts +12 -0
  97. package/dist/components/ProFormList/index.js +34 -0
  98. package/dist/components/RangePicker/range-picker.js +5 -2
  99. package/dist/components/SortableCancel/sortable-cancel.d.ts +1 -0
  100. package/dist/components/SortableCancel/sortable-cancel.js +2 -2
  101. package/dist/components/Table/components/FillDown.js +2 -1
  102. package/dist/components/Table/components/FilterDropdown.d.ts +1 -0
  103. package/dist/components/Table/components/FilterDropdown.js +36 -12
  104. package/dist/components/Table/hooks/useColumns.d.ts +5 -0
  105. package/dist/components/Table/hooks/useColumns.js +396 -22
  106. package/dist/components/Table/hooks/useDropRef.js +2 -1
  107. package/dist/components/Table/hooks/useScuRfresh.d.ts +3 -0
  108. package/dist/components/Table/hooks/useScuRfresh.js +22 -0
  109. package/dist/components/Table/hooks/useSelectSubtotal.js +5 -1
  110. package/dist/components/Table/hooks/useVituralScrollBar.d.ts +10 -0
  111. package/dist/components/Table/hooks/useVituralScrollBar.js +234 -0
  112. package/dist/components/Table/index.d.ts +4 -0
  113. package/dist/components/Table/table-adddel-column.js +4 -3
  114. package/dist/components/Table/table-dynamic.d.ts +1 -0
  115. package/dist/components/Table/table-dynamic.js +447 -60
  116. package/dist/components/Table/table-enhance-cell.d.ts +3 -0
  117. package/dist/components/Table/table-enhance-cell.js +28 -8
  118. package/dist/components/Table/table-menu.d.ts +7 -0
  119. package/dist/components/Table/table-menu.js +359 -0
  120. package/dist/components/Table/table-resizable-title.js +1 -0
  121. package/dist/components/Table/table-sort.js +4 -3
  122. package/dist/components/Table/table.d.ts +16 -0
  123. package/dist/components/Table/table.js +241 -65
  124. package/dist/components/Table/utils/dom.js +2 -1
  125. package/dist/components/Table/utils/filterHandle.d.ts +1 -1
  126. package/dist/components/Table/utils/filterHandle.js +27 -12
  127. package/dist/components/Table/utils/getSummaryData.d.ts +1 -1
  128. package/dist/components/Table/utils/getSummaryData.js +279 -24
  129. package/dist/components/Table/utils/shallowEqual.js +2 -1
  130. package/dist/components/Table/utils/validate.js +25 -6
  131. package/dist/components/Tabs/tabs.d.ts +2 -0
  132. package/dist/components/Tabs/tabs.js +3 -1
  133. package/dist/components/TranslationButton/DownFile.d.ts +7 -0
  134. package/dist/components/TranslationButton/DownFile.js +95 -0
  135. package/dist/components/TranslationButton/PreviewFile.d.ts +5 -0
  136. package/dist/components/TranslationButton/PreviewFile.js +73 -0
  137. package/dist/components/TranslationButton/TranslationButton.d.ts +34 -0
  138. package/dist/components/TranslationButton/TranslationButton.js +245 -0
  139. package/dist/components/TranslationButton/hooks.d.ts +8 -0
  140. package/dist/components/TranslationButton/hooks.js +139 -0
  141. package/dist/components/TranslationButton/index.d.ts +4 -0
  142. package/dist/components/TranslationButton/index.js +4 -0
  143. package/dist/components/TreeSelect/index.d.ts +19 -0
  144. package/dist/components/TreeSelect/index.js +88 -0
  145. package/dist/components/Upload/upload-table.js +31 -26
  146. package/dist/components/Upload/upload.d.ts +20 -1
  147. package/dist/components/Upload/upload.js +172 -27
  148. package/dist/components/Upload/utils.d.ts +9 -2
  149. package/dist/components/Upload/utils.js +153 -38
  150. package/dist/components/UploadCustom/hooks/useDg.d.ts +6 -0
  151. package/dist/components/UploadCustom/hooks/useDg.js +55 -0
  152. package/dist/components/UploadSingle/upload-single.js +5 -4
  153. package/dist/components/Watermark/index.d.ts +2 -0
  154. package/dist/components/Watermark/index.js +2 -0
  155. package/dist/components/Watermark/interface.d.ts +20 -0
  156. package/dist/components/Watermark/interface.js +1 -0
  157. package/dist/components/Watermark/utils.d.ts +1 -0
  158. package/dist/components/Watermark/utils.js +70 -0
  159. package/dist/components/Watermark/water.d.ts +50 -0
  160. package/dist/components/Watermark/water.js +66 -0
  161. package/dist/components/Watermark/watermark-div.d.ts +4 -0
  162. package/dist/components/Watermark/watermark-div.js +41 -0
  163. package/dist/components/Watermark/watermark-shadow.d.ts +6 -0
  164. package/dist/components/Watermark/watermark-shadow.js +116 -0
  165. package/dist/components/Watermark/watermark.d.ts +3 -0
  166. package/dist/components/Watermark/watermark.js +102 -0
  167. package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.d.ts +9 -0
  168. package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.js +63 -0
  169. package/dist/components/WorkflowPrintContainer/component/Header.d.ts +12 -0
  170. package/dist/components/WorkflowPrintContainer/component/Header.js +109 -0
  171. package/dist/components/WorkflowPrintContainer/component/ProcessDetail.d.ts +18 -0
  172. package/dist/components/WorkflowPrintContainer/component/ProcessDetail.js +243 -0
  173. package/dist/components/WorkflowPrintContainer/component/Upload/index.d.ts +20 -0
  174. package/dist/components/WorkflowPrintContainer/component/Upload/index.js +59 -0
  175. package/dist/components/WorkflowPrintContainer/component/association/component/TableList.d.ts +10 -0
  176. package/dist/components/WorkflowPrintContainer/component/association/component/TableList.js +75 -0
  177. package/dist/components/WorkflowPrintContainer/component/association/index.d.ts +9 -0
  178. package/dist/components/WorkflowPrintContainer/component/association/index.js +92 -0
  179. package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.d.ts +9 -0
  180. package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.js +38 -0
  181. package/dist/components/WorkflowPrintContainer/component/attention/index.d.ts +10 -0
  182. package/dist/components/WorkflowPrintContainer/component/attention/index.js +95 -0
  183. package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.d.ts +8 -0
  184. package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.js +53 -0
  185. package/dist/components/WorkflowPrintContainer/component/audit/index.d.ts +7 -0
  186. package/dist/components/WorkflowPrintContainer/component/audit/index.js +88 -0
  187. package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.d.ts +9 -0
  188. package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.js +53 -0
  189. package/dist/components/WorkflowPrintContainer/component/previewTable/index.d.ts +11 -0
  190. package/dist/components/WorkflowPrintContainer/component/previewTable/index.js +60 -0
  191. package/dist/components/WorkflowPrintContainer/component/send/component/TableList.d.ts +9 -0
  192. package/dist/components/WorkflowPrintContainer/component/send/component/TableList.js +50 -0
  193. package/dist/components/WorkflowPrintContainer/component/send/index.d.ts +9 -0
  194. package/dist/components/WorkflowPrintContainer/component/send/index.js +92 -0
  195. package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.d.ts +12 -0
  196. package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.js +282 -0
  197. package/dist/components/WorkflowPrintContainer/component/trail/index.d.ts +11 -0
  198. package/dist/components/WorkflowPrintContainer/component/trail/index.js +56 -0
  199. package/dist/components/WorkflowPrintContainer/images.d.ts +2 -0
  200. package/dist/components/WorkflowPrintContainer/images.js +2 -0
  201. package/dist/components/WorkflowPrintContainer/index.d.ts +2 -0
  202. package/dist/components/WorkflowPrintContainer/index.js +2 -0
  203. package/dist/components/WorkflowPrintContainer/service.d.ts +14 -0
  204. package/dist/components/WorkflowPrintContainer/service.js +101 -0
  205. package/dist/components/WorkflowPrintContainer/usePagination.d.ts +14 -0
  206. package/dist/components/WorkflowPrintContainer/usePagination.js +22 -0
  207. package/dist/components/WorkflowPrintContainer/workflow-print-container.d.ts +100 -0
  208. package/dist/components/WorkflowPrintContainer/workflow-print-container.js +236 -0
  209. package/dist/components/ZtIcon/index.js +2 -0
  210. package/dist/components/business/Analyse/index.js +12 -11
  211. package/dist/components/business/CodeQuery/component/SearchForm.js +3 -2
  212. package/dist/components/business/CodeQuery/component/TableList.js +5 -4
  213. package/dist/components/business/CodeQuery/hooks.js +2 -1
  214. package/dist/components/business/CodeQuery/index.js +2 -1
  215. package/dist/components/business/Common/UserForgetPassword/index.js +36 -28
  216. package/dist/components/business/Common/UserInfo/component/MakingForm.js +11 -10
  217. package/dist/components/business/Common/UserInfo/index.js +5 -4
  218. package/dist/components/business/Common/UserPassword/index.js +14 -11
  219. package/dist/components/business/Common/validatePassword.d.ts +1 -1
  220. package/dist/components/business/Common/validatePassword.js +17 -7
  221. package/dist/components/business/DetailCard/index.js +7 -6
  222. package/dist/components/business/DetailHeader/index.js +7 -6
  223. package/dist/components/business/DetailList/index.js +5 -4
  224. package/dist/components/business/DgColumns/index.js +12 -11
  225. package/dist/components/business/ExportButton/index.js +6 -5
  226. package/dist/components/business/Footer/index.js +4 -1
  227. package/dist/components/business/GridList/item.d.ts +1 -1
  228. package/dist/components/business/List/item.d.ts +1 -1
  229. package/dist/components/business/NewList/item.d.ts +1 -1
  230. package/dist/components/business/NewList/item.js +1 -1
  231. package/dist/components/business/OperationBtnGroup/index.js +17 -16
  232. package/dist/components/business/SearchContainer/hooks/useDynamic.d.ts +2 -1
  233. package/dist/components/business/SearchContainer/hooks/useDynamic.js +6 -3
  234. package/dist/components/business/SearchContainer/hooks/useToggle.d.ts +1 -1
  235. package/dist/components/business/SearchContainer/hooks/useToggle.js +31 -12
  236. package/dist/components/business/SearchContainer/record-common-item.d.ts +14 -0
  237. package/dist/components/business/SearchContainer/record-common-item.js +83 -0
  238. package/dist/components/business/SearchContainer/record-common-list.d.ts +3 -0
  239. package/dist/components/business/SearchContainer/record-common-list.js +95 -0
  240. package/dist/components/business/SearchContainer/search-container.d.ts +22 -0
  241. package/dist/components/business/SearchContainer/search-container.js +66 -3
  242. package/dist/components/business/SearchContainer/search-drawer.d.ts +1 -0
  243. package/dist/components/business/SearchContainer/search-drawer.js +167 -13
  244. package/dist/components/business/SearchContainer/search-item.js +48 -5
  245. package/dist/components/business/SearchContainer/search-left.d.ts +8 -0
  246. package/dist/components/business/SearchContainer/search-left.js +105 -68
  247. package/dist/components/business/SearchContainer/search-right.d.ts +4 -0
  248. package/dist/components/business/SearchContainer/search-right.js +62 -5
  249. package/dist/components/business/SearchContainer/useRecordCommonInit.d.ts +18 -0
  250. package/dist/components/business/SearchContainer/useRecordCommonInit.js +258 -0
  251. package/dist/components/business/SearchContainer/useRecordCommonSearch.d.ts +8 -0
  252. package/dist/components/business/SearchContainer/useRecordCommonSearch.js +145 -0
  253. package/dist/components/business/SearchContainer/useRecordCommonSearchContext.d.ts +37 -0
  254. package/dist/components/business/SearchContainer/useRecordCommonSearchContext.js +8 -0
  255. package/dist/components/business/SearchContainer/useTemplate.d.ts +20 -0
  256. package/dist/components/business/SearchContainer/useTemplate.js +347 -0
  257. package/dist/components/business/Signatures/components/AttachOperation.js +7 -6
  258. package/dist/components/business/Signatures/components/CodeModal.d.ts +3 -0
  259. package/dist/components/business/Signatures/components/CodeModal.js +157 -0
  260. package/dist/components/business/Signatures/components/CompareResult.js +7 -6
  261. package/dist/components/business/Signatures/components/DetailTable.js +37 -34
  262. package/dist/components/business/Signatures/components/QunjSeal.js +5 -4
  263. package/dist/components/business/Signatures/components/SealCheckbox.js +3 -2
  264. package/dist/components/business/Signatures/components/TemplateAttach.js +2 -1
  265. package/dist/components/business/Signatures/index.js +64 -53
  266. package/dist/components/business/SortList/sort-drawer.js +5 -4
  267. package/dist/components/business/Template/index.js +11 -10
  268. package/dist/components/electron-signatures/content.d.ts +9 -0
  269. package/dist/components/electron-signatures/content.js +1146 -0
  270. package/dist/components/electron-signatures/demoComponents/coUseDetail.d.ts +8 -0
  271. package/dist/components/electron-signatures/demoComponents/coUseDetail.js +255 -0
  272. package/dist/components/electron-signatures/demoComponents/data.d.ts +58 -0
  273. package/dist/components/electron-signatures/demoComponents/data.js +1307 -0
  274. package/dist/components/electron-signatures/demoComponents/detail.d.ts +6 -0
  275. package/dist/components/electron-signatures/demoComponents/detail.js +283 -0
  276. package/dist/components/electron-signatures/demoComponents/index.d.ts +2 -0
  277. package/dist/components/electron-signatures/demoComponents/index.js +30 -0
  278. package/dist/components/electron-signatures/demoComponents/jgqrd.d.ts +6 -0
  279. package/dist/components/electron-signatures/demoComponents/jgqrd.js +135 -0
  280. package/dist/components/electron-signatures/demoComponents/making.d.ts +6 -0
  281. package/dist/components/electron-signatures/demoComponents/making.js +211 -0
  282. package/dist/components/electron-signatures/demoComponents/makingData.d.ts +675 -0
  283. package/dist/components/electron-signatures/demoComponents/makingData.js +1178 -0
  284. package/dist/components/electron-signatures/demoComponents/newDetail.d.ts +6 -0
  285. package/dist/components/electron-signatures/demoComponents/newDetail.js +283 -0
  286. package/dist/components/electron-signatures/demoComponents/preview.d.ts +3 -0
  287. package/dist/components/electron-signatures/demoComponents/preview.js +9 -0
  288. package/dist/components/electron-signatures/demoComponents/singleQjDetail.d.ts +6 -0
  289. package/dist/components/electron-signatures/demoComponents/singleQjDetail.js +530 -0
  290. package/dist/components/electron-signatures/demoComponents/singleQjMaking.d.ts +6 -0
  291. package/dist/components/electron-signatures/demoComponents/singleQjMaking.js +219 -0
  292. package/dist/components/electron-signatures/demoComponents/test.d.ts +6 -0
  293. package/dist/components/electron-signatures/demoComponents/test.js +119 -0
  294. package/dist/components/electron-signatures/dgComponents/contract-comparison.d.ts +39 -0
  295. package/dist/components/electron-signatures/dgComponents/contract-comparison.js +53 -0
  296. package/dist/components/electron-signatures/dgComponents/file-comparison-btn.d.ts +11 -0
  297. package/dist/components/electron-signatures/dgComponents/file-comparison-btn.js +180 -0
  298. package/dist/components/electron-signatures/dgComponents/new-contract-comparison.d.ts +45 -0
  299. package/dist/components/electron-signatures/dgComponents/new-contract-comparison.js +68 -0
  300. package/dist/components/electron-signatures/dgComponents/useContractColumns.d.ts +21 -0
  301. package/dist/components/electron-signatures/dgComponents/useContractColumns.js +171 -0
  302. package/dist/components/electron-signatures/electron-signatures-fragment.d.ts +8 -0
  303. package/dist/components/electron-signatures/electron-signatures-fragment.js +392 -0
  304. package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.d.ts +52 -0
  305. package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.js +509 -0
  306. package/dist/components/electron-signatures/electronComponents/electron-seal-detail.d.ts +8 -0
  307. package/dist/components/electron-signatures/electronComponents/electron-seal-detail.js +59 -0
  308. package/dist/components/electron-signatures/electronComponents/electron-seal-download.d.ts +16 -0
  309. package/dist/components/electron-signatures/electronComponents/electron-seal-download.js +85 -0
  310. package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.d.ts +9 -0
  311. package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.js +16 -0
  312. package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.d.ts +15 -0
  313. package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.js +16 -0
  314. package/dist/components/electron-signatures/electronComponents/electron-seal-item.d.ts +20 -0
  315. package/dist/components/electron-signatures/electronComponents/electron-seal-item.js +47 -0
  316. package/dist/components/electron-signatures/electronComponents/electron-seal-list.d.ts +11 -0
  317. package/dist/components/electron-signatures/electronComponents/electron-seal-list.js +191 -0
  318. package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.d.ts +35 -0
  319. package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.js +39 -0
  320. package/dist/components/electron-signatures/electronComponents/electron-seal-setting.d.ts +15 -0
  321. package/dist/components/electron-signatures/electronComponents/electron-seal-setting.js +10 -0
  322. package/dist/components/electron-signatures/electronComponents/last-qys-modal.d.ts +7 -0
  323. package/dist/components/electron-signatures/electronComponents/last-qys-modal.js +42 -0
  324. package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.d.ts +3 -0
  325. package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.js +43 -0
  326. package/dist/components/electron-signatures/electronComponents/useElectronColumns.d.ts +30 -0
  327. package/dist/components/electron-signatures/electronComponents/useElectronColumns.js +398 -0
  328. package/dist/components/electron-signatures/electronComponents/useFetchElectronData.d.ts +24 -0
  329. package/dist/components/electron-signatures/electronComponents/useFetchElectronData.js +254 -0
  330. package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.d.ts +3 -0
  331. package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.js +35 -0
  332. package/dist/components/electron-signatures/fileComponents/file-operation.d.ts +7 -0
  333. package/dist/components/electron-signatures/fileComponents/file-operation.js +67 -0
  334. package/dist/components/electron-signatures/fileComponents/file-type-select.d.ts +12 -0
  335. package/dist/components/electron-signatures/fileComponents/file-type-select.js +10 -0
  336. package/dist/components/electron-signatures/fileComponents/file-upload.d.ts +11 -0
  337. package/dist/components/electron-signatures/fileComponents/file-upload.js +146 -0
  338. package/dist/components/electron-signatures/fileComponents/fileUtils.d.ts +17 -0
  339. package/dist/components/electron-signatures/fileComponents/fileUtils.js +36 -0
  340. package/dist/components/electron-signatures/fileComponents/new-file-operation.d.ts +10 -0
  341. package/dist/components/electron-signatures/fileComponents/new-file-operation.js +73 -0
  342. package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.d.ts +13 -0
  343. package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.js +43 -0
  344. package/dist/components/electron-signatures/fileComponents/useFileColumns.d.ts +38 -0
  345. package/dist/components/electron-signatures/fileComponents/useFileColumns.js +329 -0
  346. package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.d.ts +19 -0
  347. package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.js +72 -0
  348. package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.d.ts +30 -0
  349. package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.js +132 -0
  350. package/dist/components/electron-signatures/hooks/useMergeRecords.d.ts +17 -0
  351. package/dist/components/electron-signatures/hooks/useMergeRecords.js +49 -0
  352. package/dist/components/electron-signatures/hooks/useParseElectronListData.d.ts +49 -0
  353. package/dist/components/electron-signatures/hooks/useParseElectronListData.js +111 -0
  354. package/dist/components/electron-signatures/hooks/useParseElectronSetting.d.ts +111 -0
  355. package/dist/components/electron-signatures/hooks/useParseElectronSetting.js +436 -0
  356. package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.d.ts +40 -0
  357. package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.js +139 -0
  358. package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.d.ts +36 -0
  359. package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.js +48 -0
  360. package/dist/components/electron-signatures/hooks/useParseQunjListData.d.ts +56 -0
  361. package/dist/components/electron-signatures/hooks/useParseQunjListData.js +204 -0
  362. package/dist/components/electron-signatures/hooks/useParseQunjSingleData.d.ts +34 -0
  363. package/dist/components/electron-signatures/hooks/useParseQunjSingleData.js +110 -0
  364. package/dist/components/electron-signatures/hooks/useParseRecords.d.ts +65 -0
  365. package/dist/components/electron-signatures/hooks/useParseRecords.js +165 -0
  366. package/dist/components/electron-signatures/index.d.ts +15 -0
  367. package/dist/components/electron-signatures/index.js +63 -0
  368. package/dist/components/electron-signatures/interface.d.ts +865 -0
  369. package/dist/components/electron-signatures/interface.js +57 -0
  370. package/dist/components/electron-signatures/qunjComponents/qunj-apply.d.ts +6 -0
  371. package/dist/components/electron-signatures/qunjComponents/qunj-apply.js +8 -0
  372. package/dist/components/electron-signatures/qunjComponents/qunj-check.d.ts +21 -0
  373. package/dist/components/electron-signatures/qunjComponents/qunj-check.js +41 -0
  374. package/dist/components/electron-signatures/qunjComponents/qunj-detail.d.ts +35 -0
  375. package/dist/components/electron-signatures/qunjComponents/qunj-detail.js +267 -0
  376. package/dist/components/electron-signatures/qunjComponents/qunj-list.d.ts +24 -0
  377. package/dist/components/electron-signatures/qunjComponents/qunj-list.js +355 -0
  378. package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.d.ts +20 -0
  379. package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.js +66 -0
  380. package/dist/components/electron-signatures/qunjComponents/useQunjColumns.d.ts +36 -0
  381. package/dist/components/electron-signatures/qunjComponents/useQunjColumns.js +321 -0
  382. package/dist/components/electron-signatures/translateComponents/TranslateButton.d.ts +10 -0
  383. package/dist/components/electron-signatures/translateComponents/TranslateButton.js +44 -0
  384. package/dist/components/electron-signatures/translateComponents/useTranslateCom.d.ts +22 -0
  385. package/dist/components/electron-signatures/translateComponents/useTranslateCom.js +50 -0
  386. package/dist/components/electron-signatures/utils.d.ts +26 -0
  387. package/dist/components/electron-signatures/utils.js +67 -0
  388. package/dist/components/utils/MyStorage.d.ts +36 -0
  389. package/dist/components/utils/MyStorage.js +120 -0
  390. package/dist/components/utils/ZtxkContext.d.ts +67 -0
  391. package/dist/components/utils/ZtxkContext.js +20 -0
  392. package/dist/components/utils/checkSealCoUse.d.ts +16 -0
  393. package/dist/components/utils/checkSealCoUse.js +83 -0
  394. package/dist/components/utils/fetch.d.ts +10 -0
  395. package/dist/components/utils/fetch.js +119 -0
  396. package/dist/components/utils/index.d.ts +9 -0
  397. package/dist/components/utils/index.js +11 -0
  398. package/dist/components/utils/processNumber.d.ts +12 -0
  399. package/dist/components/utils/processNumber.js +106 -0
  400. package/dist/components/utils/upload.js +6 -3
  401. package/dist/components/utils/useBaseContext.d.ts +23 -0
  402. package/dist/components/utils/useBaseContext.js +31 -0
  403. package/dist/components/utils/useMemoizedFn.d.ts +4 -0
  404. package/dist/components/utils/useMemoizedFn.js +19 -0
  405. package/dist/components/utils/usePrevious.d.ts +3 -0
  406. package/dist/components/utils/usePrevious.js +13 -0
  407. package/dist/constants.d.ts +1 -1
  408. package/dist/constants.js +1 -1
  409. package/dist/index.css +2205 -58
  410. package/dist/index.css.map +1 -1
  411. package/dist/index.d.ts +12 -1
  412. package/dist/index.js +255 -86
  413. package/dist/locales/en-US.json +828 -0
  414. package/dist/locales/zh-CN.json +828 -0
  415. package/dist/request.js +7 -6
  416. package/package.json +13 -4
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { ISearchLayout } from './interface';
3
+ export declare const COMMON_SEARCH_KEY = "ztxk_form_common_record_search_key";
4
+ interface ICommonSearch {
5
+ /**
6
+ * 当前表单用哪个key来存储数据
7
+ */
8
+ commonSearchKey: string;
9
+ isCommonSearchEnabled?: boolean;
10
+ }
11
+ export declare function useCommonSearch(options: ICommonSearch): {
12
+ commonSearchList: any[];
13
+ setCommonSearchList: React.Dispatch<React.SetStateAction<any[]>>;
14
+ currentCommonSearchKey: string;
15
+ setCurrentCommonSearchKey: React.Dispatch<React.SetStateAction<string>>;
16
+ reTransformData: (data: any, timeKeys?: any) => any;
17
+ setData: (data: any) => Promise<void>;
18
+ deleteData: (localIndex: number) => Promise<void>;
19
+ setReplaceData: (data: any) => Promise<any>;
20
+ updateServerData: () => Promise<void>;
21
+ };
22
+ interface ICommonSearchModal {
23
+ commonSearchList?: any[];
24
+ currentCommonSearchKey?: string;
25
+ setCurrentCommonSearchKey?: any;
26
+ form?: any;
27
+ setData?: any;
28
+ isCommonSearchEnabled?: boolean;
29
+ currentDynamicList?: ISearchLayout[];
30
+ setCurrentDynamicList?: (list: ISearchLayout[]) => void;
31
+ }
32
+ export declare function useCommonSearchModal(options: ICommonSearchModal): {
33
+ onCommonSearchHandle: () => void;
34
+ };
35
+ export {};
@@ -0,0 +1,352 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (_) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ import i18next from 'ztxkutils/dist/i18next';
49
+ import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, } from 'react';
50
+ import { Modal, message, Input } from '../../index';
51
+ import MyStorage from '../utils/MyStorage';
52
+ import dayjs from 'dayjs';
53
+ import { catchHandle } from '../utils/fetch';
54
+ export var COMMON_SEARCH_KEY = 'ztxk_form_common_record_search_key';
55
+ // 常用搜索hooks
56
+ export function useCommonSearch(options) {
57
+ var _this = this;
58
+ var commonSearchKey = options.commonSearchKey, isCommonSearchEnabled = options.isCommonSearchEnabled;
59
+ // 常用搜索列表存储实例
60
+ var storageRef = useRef(isCommonSearchEnabled
61
+ ? new MyStorage({ tableKey: COMMON_SEARCH_KEY })
62
+ : null);
63
+ // 常用搜索列表
64
+ var _a = useState([]), commonSearchList = _a[0], setCommonSearchList = _a[1];
65
+ // 当前选中的常用搜索key值
66
+ var _b = useState(''), currentCommonSearchKey = _b[0], setCurrentCommonSearchKey = _b[1];
67
+ // 初始化常用搜索列表
68
+ useEffect(function () {
69
+ if (commonSearchKey && storageRef.current) {
70
+ storageRef.current
71
+ .getItem(commonSearchKey)
72
+ .then(function (res) { return setCommonSearchList(res || []); });
73
+ }
74
+ }, []);
75
+ /**
76
+ * description: 数据转换。主要是将时间对象转成字符串
77
+ */
78
+ var transformData = function (data) {
79
+ // 处理数据,将数据中的时间对象做一下转换
80
+ var dataValue = data;
81
+ var newDataValue = {}; // 为了不影响之前的数据
82
+ var timeKeys = [];
83
+ if (dataValue) {
84
+ Object.keys(dataValue).forEach(function (key) {
85
+ var value = dataValue[key];
86
+ if (Array.isArray(value)) {
87
+ newDataValue[key] = [];
88
+ value.forEach(function (item) {
89
+ if (dayjs.isDayjs(item)) {
90
+ timeKeys.push(key);
91
+ newDataValue[key].push(dayjs(item).format('YYYY-MM-DD HH:mm:ss'));
92
+ }
93
+ else {
94
+ newDataValue[key].push(item);
95
+ }
96
+ });
97
+ }
98
+ else {
99
+ var itemIsDayjs = dayjs.isDayjs(value);
100
+ if (itemIsDayjs) {
101
+ timeKeys.push(key);
102
+ }
103
+ newDataValue[key] = itemIsDayjs
104
+ ? dayjs(value).format('YYYY-MM-DD HH:mm:ss')
105
+ : value;
106
+ }
107
+ });
108
+ }
109
+ return {
110
+ newDataValue: newDataValue,
111
+ timeKeys: timeKeys,
112
+ };
113
+ };
114
+ /**
115
+ * @description: 数据转换。主要是将时间字符串转成时间对象。
116
+ */
117
+ var reTransformData = function (data, timeKeys) {
118
+ if (timeKeys === void 0) { timeKeys = []; }
119
+ // 处理数据,将数据中的时间对象做一下转换
120
+ var dataValue = data;
121
+ var newDataValue = {}; // 为了不影响之前的数据
122
+ if (dataValue) {
123
+ Object.keys(dataValue).forEach(function (key) {
124
+ var value = dataValue[key];
125
+ if (Array.isArray(value)) {
126
+ newDataValue[key] = [];
127
+ value.forEach(function (item) {
128
+ if (timeKeys.includes(key)) {
129
+ newDataValue[key].push(dayjs(item));
130
+ }
131
+ else {
132
+ newDataValue[key].push(item);
133
+ }
134
+ });
135
+ }
136
+ else {
137
+ newDataValue[key] = timeKeys.includes(key) ? dayjs(value) : value;
138
+ }
139
+ });
140
+ }
141
+ return newDataValue;
142
+ };
143
+ /**
144
+ * description: 存储数据
145
+ * @param {*} data 常用搜索数据
146
+ * @param {*} localIndex 本地存储索引 如果传了索引 就是修改
147
+ */
148
+ var setData = function (data) { return __awaiter(_this, void 0, void 0, function () {
149
+ var localKey, _a, newDataValue, timeKeys, saveData;
150
+ var _b;
151
+ return __generator(this, function (_c) {
152
+ localKey = commonSearchKey;
153
+ _a = transformData(data.value), newDataValue = _a.newDataValue, timeKeys = _a.timeKeys;
154
+ saveData = __assign(__assign({}, data), { value: newDataValue, timeKeys: timeKeys });
155
+ return [2 /*return*/, (_b = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _b === void 0 ? void 0 : _b.getItem(localKey).then(function (res) {
156
+ var _a, _b;
157
+ // 处理数据,将数据中的时间对象做一下转换
158
+ var result = res;
159
+ if (!result) {
160
+ result = [saveData];
161
+ }
162
+ else if (Array.isArray(result)) {
163
+ var index = result.findIndex(function (item) { return item.key === saveData.key; });
164
+ if (index !== -1) {
165
+ result[index] = saveData;
166
+ }
167
+ else {
168
+ result.unshift(saveData);
169
+ }
170
+ }
171
+ setCommonSearchList(result);
172
+ return (_b = (_a = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _a === void 0 ? void 0 : _a.setItem(localKey, result)) === null || _b === void 0 ? void 0 : _b.then(function () {
173
+ return updateServerData();
174
+ });
175
+ })];
176
+ });
177
+ }); };
178
+ /**
179
+ * description: 删除数据
180
+ * @param {*} localIndex 本地存储索引
181
+ */
182
+ var deleteData = function (localIndex) { return __awaiter(_this, void 0, void 0, function () {
183
+ var localKey;
184
+ var _a;
185
+ return __generator(this, function (_b) {
186
+ localKey = commonSearchKey;
187
+ return [2 /*return*/, (_a = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _a === void 0 ? void 0 : _a.getItem(localKey).then(function (res) {
188
+ var _a, _b;
189
+ if (Array.isArray(res)) {
190
+ res.splice(localIndex, 1);
191
+ (_b = (_a = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _a === void 0 ? void 0 : _a.setItem(localKey, res)) === null || _b === void 0 ? void 0 : _b.then(function () {
192
+ return updateServerData();
193
+ });
194
+ setCommonSearchList(res);
195
+ }
196
+ })];
197
+ });
198
+ }); };
199
+ /**
200
+ * description: 直接替换原有数据
201
+ * @param {*} data 常用搜索数据
202
+ */
203
+ var setReplaceData = function (data) { return __awaiter(_this, void 0, void 0, function () {
204
+ var localKey;
205
+ var _a;
206
+ return __generator(this, function (_b) {
207
+ localKey = commonSearchKey;
208
+ setCommonSearchList(data);
209
+ return [2 /*return*/, (_a = storageRef === null || storageRef === void 0 ? void 0 : storageRef.current) === null || _a === void 0 ? void 0 : _a.setItem(localKey, data)];
210
+ });
211
+ }); };
212
+ /**
213
+ * 直接更新服务器数据
214
+ */
215
+ var updateServerData = function () { return __awaiter(_this, void 0, void 0, function () {
216
+ var _this = this;
217
+ var _a, _b;
218
+ return __generator(this, function (_c) {
219
+ return [2 /*return*/, (_b = (_a = storageRef.current) === null || _a === void 0 ? void 0 : _a.getAllItems()) === null || _b === void 0 ? void 0 : _b.then(function (res) { return __awaiter(_this, void 0, void 0, function () {
220
+ var error_1;
221
+ return __generator(this, function (_a) {
222
+ switch (_a.label) {
223
+ case 0:
224
+ _a.trys.push([0, 2, , 3]);
225
+ return [4 /*yield*/, (catchHandle === null || catchHandle === void 0 ? void 0 : catchHandle({
226
+ customKey: COMMON_SEARCH_KEY,
227
+ customValue: JSON.stringify(res),
228
+ mark: i18next.t('常用搜索用户配置'),
229
+ }))];
230
+ case 1:
231
+ _a.sent();
232
+ return [3 /*break*/, 3];
233
+ case 2:
234
+ error_1 = _a.sent();
235
+ console.error(i18next.t('更新服务器数据失败!'), error_1);
236
+ return [3 /*break*/, 3];
237
+ case 3: return [2 /*return*/];
238
+ }
239
+ });
240
+ }); })];
241
+ });
242
+ }); };
243
+ return {
244
+ commonSearchList: commonSearchList,
245
+ setCommonSearchList: setCommonSearchList,
246
+ currentCommonSearchKey: currentCommonSearchKey,
247
+ setCurrentCommonSearchKey: setCurrentCommonSearchKey,
248
+ reTransformData: reTransformData,
249
+ setData: setData,
250
+ deleteData: deleteData,
251
+ setReplaceData: setReplaceData,
252
+ updateServerData: updateServerData,
253
+ };
254
+ }
255
+ export function useCommonSearchModal(options) {
256
+ var commonSearchList = options.commonSearchList, currentCommonSearchKey = options.currentCommonSearchKey, form = options.form, setData = options.setData, isCommonSearchEnabled = options.isCommonSearchEnabled, setCurrentCommonSearchKey = options.setCurrentCommonSearchKey, currentDynamicList = options.currentDynamicList;
257
+ var iptRef = useRef(null);
258
+ useEffect(function () {
259
+ var _a;
260
+ if (!isCommonSearchEnabled) {
261
+ return;
262
+ }
263
+ if (!(commonSearchList === null || commonSearchList === void 0 ? void 0 : commonSearchList.length)) {
264
+ return;
265
+ }
266
+ var currentCommon = commonSearchList.find(function (item) { return item.key === currentCommonSearchKey; });
267
+ if (currentCommon) {
268
+ (_a = iptRef.current) === null || _a === void 0 ? void 0 : _a.setValue(currentCommon.title);
269
+ }
270
+ }, [currentCommonSearchKey, commonSearchList, isCommonSearchEnabled]);
271
+ /**
272
+ * 保存为常用搜索事件
273
+ */
274
+ var onCommonSearchHandle = function () {
275
+ if (!form) {
276
+ message.info(i18next.t('组件需要接受表单实例form'));
277
+ return;
278
+ }
279
+ Modal.confirm({
280
+ icon: null,
281
+ // title: currentCommonSearchKey ? "更新常用搜索" : "保存为常用搜索",
282
+ title: i18next.t('保存为常用搜索'),
283
+ content: React.createElement(MyInput, { ref: iptRef }),
284
+ onOk: function () {
285
+ var _a, _b;
286
+ return __awaiter(this, void 0, void 0, function () {
287
+ var currentCommonName, currentData, data, err_1;
288
+ return __generator(this, function (_c) {
289
+ switch (_c.label) {
290
+ case 0:
291
+ currentCommonName = (_a = iptRef.current) === null || _a === void 0 ? void 0 : _a.getValue();
292
+ if (!currentCommonName) {
293
+ message.info(i18next.t('请输入常用搜索名称!'));
294
+ return [2 /*return*/, Promise.reject(new Error(i18next.t('请输入常用搜索名称!')))];
295
+ }
296
+ currentData = form.getFieldsValue();
297
+ console.log(i18next.t('当前表单数据'), currentData);
298
+ data = {
299
+ title: currentCommonName,
300
+ value: currentData,
301
+ // key: currentCommonSearchKey || Date.now(),
302
+ key: Date.now(),
303
+ dynamicList: currentDynamicList,
304
+ };
305
+ _c.label = 1;
306
+ case 1:
307
+ _c.trys.push([1, 3, , 4]);
308
+ return [4 /*yield*/, (setData === null || setData === void 0 ? void 0 : setData(data))];
309
+ case 2:
310
+ _c.sent();
311
+ setCurrentCommonSearchKey === null || setCurrentCommonSearchKey === void 0 ? void 0 : setCurrentCommonSearchKey(data.key);
312
+ message.info(i18next.t('保存成功!'));
313
+ (_b = iptRef.current) === null || _b === void 0 ? void 0 : _b.setValue('');
314
+ return [3 /*break*/, 4];
315
+ case 3:
316
+ err_1 = _c.sent();
317
+ message.info(i18next.t('保存常用搜索失败!'));
318
+ return [2 /*return*/, Promise.reject(new Error(i18next.t('保存常用搜索失败!')))];
319
+ case 4: return [2 /*return*/];
320
+ }
321
+ });
322
+ });
323
+ },
324
+ onCancel: function () {
325
+ console.log('Cancel');
326
+ },
327
+ });
328
+ setTimeout(function () {
329
+ if (!(commonSearchList === null || commonSearchList === void 0 ? void 0 : commonSearchList.length)) {
330
+ return;
331
+ }
332
+ var currentCommon = commonSearchList.find(function (item) { return item.key === currentCommonSearchKey; });
333
+ if (currentCommon) {
334
+ // iptRef.current?.setValue(currentCommon.title);
335
+ }
336
+ }, 0);
337
+ };
338
+ return {
339
+ onCommonSearchHandle: onCommonSearchHandle,
340
+ };
341
+ }
342
+ var MyInput = forwardRef(function (props, ref) {
343
+ var _a = useState(''), value = _a[0], setValue = _a[1];
344
+ var onChange = function (e) {
345
+ setValue(e.target.value);
346
+ };
347
+ useImperativeHandle(ref, function () { return ({
348
+ getValue: function () { return value; },
349
+ setValue: setValue,
350
+ }); });
351
+ return (React.createElement(Input, { placeholder: i18next.t('请输入常用搜索名称!'), value: value, onChange: onChange }));
352
+ });
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { IProps as IListProps } from '../business/NewList/list';
3
+ import { IProps as IItemProps } from '../business/NewList/item';
4
+ export interface IProItemProps extends IItemProps {
5
+ label?: React.ReactNode;
6
+ }
7
+ export interface IProps extends IListProps {
8
+ items: IProItemProps[];
9
+ }
10
+ declare function ProFormList(props: IProps): JSX.Element;
11
+ declare const _default: React.MemoExoticComponent<typeof ProFormList>;
12
+ export default _default;
@@ -0,0 +1,34 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React, { memo } from 'react';
24
+ import FormList from '../business/NewList';
25
+ function ProFormList(props) {
26
+ var items = props.items, restProps = __rest(props, ["items"]);
27
+ return (React.createElement(FormList, __assign({}, restProps), Array.isArray(items)
28
+ ? items.map(function (item, index) {
29
+ var _a = item.span, span = _a === void 0 ? 6 : _a, label = item.label, restItems = __rest(item, ["span", "label"]);
30
+ return (React.createElement(FormList.FormItem, __assign({ key: index + '' }, restItems, { span: span }), label));
31
+ })
32
+ : null));
33
+ }
34
+ export default memo(ProFormList);
@@ -20,6 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
+ import i18next from 'ztxkutils/dist/i18next';
23
24
  /**
24
25
  * 包含至今的范围选择器
25
26
  */
@@ -106,13 +107,15 @@ function RangePicker(_a) {
106
107
  };
107
108
  /**至今组件 */
108
109
  var renderExtraFooterHandle = function () {
109
- return (React.createElement(Checkbox, { checked: checked, onChange: onFarChangeHandle }, "\u81F3\u4ECA"));
110
+ return (React.createElement(Checkbox, { checked: checked, onChange: onFarChangeHandle }, i18next.t('至今')));
110
111
  };
111
112
  /**
112
113
  * @description 如果是至今转换参数
113
114
  */
114
115
  var formatHandle = function (value) {
115
- return value.format(formatString) + " -> \u81F3\u4ECA";
116
+ return i18next.t('{{slot0}} -> 至今', {
117
+ slot0: value.format(formatString),
118
+ });
116
119
  };
117
120
  /**
118
121
  * @description 单独传递参数
@@ -9,6 +9,7 @@ interface ISortableCancel {
9
9
  };
10
10
  className?: string;
11
11
  style?: any;
12
+ tipTitle?: string;
12
13
  }
13
14
  declare const SortableCancel: React.FC<ISortableCancel>;
14
15
  export default SortableCancel;
@@ -13,7 +13,7 @@ import React, { memo } from 'react';
13
13
  import classNames from 'classnames';
14
14
  import { useDrag, useDrop } from 'react-dnd';
15
15
  var SortableCancel = memo(function SortableCancel(_a) {
16
- var type = _a.type, id = _a.id, onMoveItem = _a.onMoveItem, onFindItem = _a.onFindItem, children = _a.children, className = _a.className, style = _a.style;
16
+ var type = _a.type, id = _a.id, onMoveItem = _a.onMoveItem, onFindItem = _a.onFindItem, children = _a.children, className = _a.className, style = _a.style, tipTitle = _a.tipTitle;
17
17
  var originalIndex = onFindItem(id).index;
18
18
  var _b = useDrag(function () { return ({
19
19
  type: type,
@@ -42,6 +42,6 @@ var SortableCancel = memo(function SortableCancel(_a) {
42
42
  }); }, [onFindItem, onMoveItem]), drop = _c[1];
43
43
  var classes = classNames('zt-sortable', className, {});
44
44
  var opacity = isDragging ? 0 : 1;
45
- return (React.createElement("div", { ref: function (node) { return drag(drop(node)); }, className: classes, style: __assign(__assign({}, style), { opacity: opacity }) }, children));
45
+ return (React.createElement("div", { ref: function (node) { return drag(drop(node)); }, className: classes, style: __assign(__assign({}, style), { opacity: opacity }), title: tipTitle || '' }, children));
46
46
  });
47
47
  export default SortableCancel;
@@ -1,10 +1,11 @@
1
+ import i18next from 'ztxkutils/dist/i18next';
1
2
  import React from 'react';
2
3
  import { VerticalAlignBottomOutlined } from '@ant-design/icons';
3
4
  var FillDown = function (_a) {
4
5
  var title = _a.title, field = _a.field, onClick = _a.onClick;
5
6
  return (React.createElement("div", { className: "zt-table_fillDown" },
6
7
  React.createElement("div", { className: "fillDown_title" }, typeof title === 'function' ? title() : title),
7
- React.createElement("div", { className: "fillDown_icon", title: "\u5F80\u4E0B\u586B\u5145", onClick: function (e) { return (onClick === null || onClick === void 0 ? void 0 : onClick.current) && onClick.current({ field: field }); } },
8
+ React.createElement("div", { className: "fillDown_icon", title: i18next.t('往下填充'), onClick: function (e) { return (onClick === null || onClick === void 0 ? void 0 : onClick.current) && onClick.current({ field: field }); } },
8
9
  React.createElement(VerticalAlignBottomOutlined, null))));
9
10
  };
10
11
  export default FillDown;
@@ -9,6 +9,7 @@ interface IProps {
9
9
  handleSearch?: any;
10
10
  handleReset?: any;
11
11
  dataSourceRef?: any;
12
+ column?: any;
12
13
  }
13
14
  declare const FilterDropdown: React.FC<IProps>;
14
15
  export default FilterDropdown;
@@ -3,12 +3,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
3
3
  to[j] = from[i];
4
4
  return to;
5
5
  };
6
+ import i18next from 'ztxkutils/dist/i18next';
6
7
  import React, { useState, useMemo } from 'react';
7
8
  import { Input } from 'antd';
8
- import { Button, Tooltip, Checkbox } from '../../../index';
9
- import { QuestionCircleOutlined } from '@ant-design/icons';
9
+ import { Button, Checkbox } from '../../../index';
10
10
  var FilterDropdown = function (_a) {
11
- var searchInputRef = _a.searchInputRef, setSelectedKeys = _a.setSelectedKeys, selectedKeys = _a.selectedKeys, confirm = _a.confirm, clearFilters = _a.clearFilters, dataIndex = _a.dataIndex, handleSearch = _a.handleSearch, handleReset = _a.handleReset, dataSourceRef = _a.dataSourceRef;
11
+ var searchInputRef = _a.searchInputRef, setSelectedKeys = _a.setSelectedKeys, selectedKeys = _a.selectedKeys, confirm = _a.confirm, clearFilters = _a.clearFilters, dataIndex = _a.dataIndex, handleSearch = _a.handleSearch, handleReset = _a.handleReset, dataSourceRef = _a.dataSourceRef, column = _a.column;
12
12
  var _b = useState(''), v = _b[0], setV = _b[1];
13
13
  var _c = useState([]), cV = _c[0], setCV = _c[1];
14
14
  var currentData = useMemo(function () {
@@ -18,14 +18,22 @@ var FilterDropdown = function (_a) {
18
18
  if (typeof dataIndex !== 'string') {
19
19
  return [];
20
20
  }
21
- var newArr = dataSourceRef.current.map(function (item) {
22
- var _a;
23
- return (_a = item[dataIndex]) !== null && _a !== void 0 ? _a : '';
21
+ // 将render中的结果作为字段返回
22
+ var newArr = dataSourceRef.current.map(function (item, itemIndex) {
23
+ var _a, _b;
24
+ try {
25
+ var renderResult = (_a = column === null || column === void 0 ? void 0 : column.render) === null || _a === void 0 ? void 0 : _a.call(column, item[dataIndex], item, itemIndex);
26
+ if (typeof renderResult === 'string') {
27
+ return renderResult;
28
+ }
29
+ }
30
+ catch (err) { }
31
+ return (_b = item[dataIndex]) !== null && _b !== void 0 ? _b : '';
24
32
  });
25
33
  // 记录出现次数
26
34
  var resultArr = [];
27
35
  newArr
28
- .filter(function (item) { return item !== ''; })
36
+ .filter(function (item) { return item !== '' && typeof item !== 'object'; })
29
37
  .forEach(function (item) {
30
38
  var index = resultArr.findIndex(function (i) { return i.value === item; });
31
39
  if (index === -1) {
@@ -39,6 +47,25 @@ var FilterDropdown = function (_a) {
39
47
  }
40
48
  });
41
49
  return resultArr;
50
+ // const newArr = dataSourceRef.current.map((item) => {
51
+ // return item[dataIndex] ?? '';
52
+ // });
53
+ // // 记录出现次数
54
+ // const resultArr: any = [];
55
+ // newArr
56
+ // .filter((item) => item !== '')
57
+ // .forEach((item) => {
58
+ // const index = resultArr.findIndex((i) => i.value === item);
59
+ // if (index === -1) {
60
+ // resultArr.push({
61
+ // value: item,
62
+ // count: 1,
63
+ // });
64
+ // } else {
65
+ // resultArr[index].count++;
66
+ // }
67
+ // });
68
+ // return resultArr;
42
69
  }, [dataIndex, dataSourceRef]);
43
70
  return (React.createElement("div", { style: { padding: 6 }, onKeyDown: function (e) { return e.stopPropagation(); } },
44
71
  React.createElement(Input, { ref: searchInputRef, value: v, onChange: function (e) {
@@ -56,14 +83,11 @@ var FilterDropdown = function (_a) {
56
83
  React.createElement("div", null,
57
84
  React.createElement(Button, { type: "primary", onClick: function () {
58
85
  return handleSearch(selectedKeys, confirm, dataIndex);
59
- } },
60
- "\u641C\u7D22",
61
- React.createElement(Tooltip, { placement: "bottomLeft", title: "\u5BF9\u4E8E\u6570\u5B57\u5217\u53EF\u4EE5\u5C1D\u8BD5\u8F93\u5165\u4E00\u4E9B\u8868\u8FBE\u5F0F: $0 + 1 > 2\u3001 >= 10\u3001 $0 + 1 == 2" },
62
- React.createElement(QuestionCircleOutlined, null))),
86
+ } }, i18next.t('搜索')),
63
87
  React.createElement(Button, { onClick: function () {
64
88
  setV('');
65
89
  setCV([]);
66
90
  clearFilters && handleReset(clearFilters);
67
- }, style: { marginLeft: 10 } }, "\u91CD\u7F6E"))));
91
+ }, style: { marginLeft: 10 } }, i18next.t('重置')))));
68
92
  };
69
93
  export default FilterDropdown;
@@ -42,7 +42,12 @@ interface IProps<RecordType> {
42
42
  customOrder?: any;
43
43
  setCustomOrder?: any;
44
44
  isSort?: boolean;
45
+ isFilter?: boolean;
45
46
  onFillDownChangeRef?: any;
47
+ isModalInput?: boolean;
48
+ isNumberInputThousandth?: boolean;
49
+ isNumberInputAlignRight?: boolean;
50
+ autoDecimalFieldsRef?: any;
46
51
  }
47
52
  export declare const getTableLayoutFullData: (columns: any, tableLayout: any) => any;
48
53
  export declare const LOCALSTORAGE_KEY = "ztui_dynamic_table_key";