@spacecorexdev/core 0.0.5 → 0.2.0

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 (414) hide show
  1. package/dist/api/index.js +1 -0
  2. package/dist/contract.js +1 -0
  3. package/dist/hooks/index.js +1 -0
  4. package/dist/index.js +7 -0
  5. package/{src → dist}/styles/ant-table.css +5 -26
  6. package/{src → dist}/styles/index.css +8 -8
  7. package/dist/types/index.js +1 -0
  8. package/dist/ui/index.js +1 -0
  9. package/dist/utils/index.js +7 -0
  10. package/package.json +67 -70
  11. package/types/api/project.d.ts +10 -1
  12. package/types/index.d.ts +4 -4
  13. package/types/types/index.d.ts +1 -3
  14. package/types/types/project/base.d.ts +6 -1
  15. package/types/types/project/index.d.ts +1 -0
  16. package/types/types/project/member.d.ts +1 -1
  17. package/types/types/{projectRole.d.ts → project/projectRole.d.ts} +2 -2
  18. package/types/ui/ResizableTable/index.d.ts +7 -0
  19. package/types/ui/RoleSelector/index.d.ts +7 -1
  20. package/types/ui/UIFileUpload.d.ts +2 -2
  21. package/types/ui/index.d.ts +1 -10
  22. package/types/ui/upload/index.d.ts +6 -0
  23. package/types/utils/CacheIndexedDB.d.ts +9 -0
  24. package/types/utils/index.d.ts +2 -2
  25. package/types/utils/mailto.d.ts +12 -0
  26. package/public/cmaps/78-EUC-H.bcmap +0 -0
  27. package/public/cmaps/78-EUC-V.bcmap +0 -0
  28. package/public/cmaps/78-H.bcmap +0 -0
  29. package/public/cmaps/78-RKSJ-H.bcmap +0 -0
  30. package/public/cmaps/78-RKSJ-V.bcmap +0 -0
  31. package/public/cmaps/78-V.bcmap +0 -0
  32. package/public/cmaps/78ms-RKSJ-H.bcmap +0 -0
  33. package/public/cmaps/78ms-RKSJ-V.bcmap +0 -0
  34. package/public/cmaps/83pv-RKSJ-H.bcmap +0 -0
  35. package/public/cmaps/90ms-RKSJ-H.bcmap +0 -0
  36. package/public/cmaps/90ms-RKSJ-V.bcmap +0 -0
  37. package/public/cmaps/90msp-RKSJ-H.bcmap +0 -0
  38. package/public/cmaps/90msp-RKSJ-V.bcmap +0 -0
  39. package/public/cmaps/90pv-RKSJ-H.bcmap +0 -0
  40. package/public/cmaps/90pv-RKSJ-V.bcmap +0 -0
  41. package/public/cmaps/Add-H.bcmap +0 -0
  42. package/public/cmaps/Add-RKSJ-H.bcmap +0 -0
  43. package/public/cmaps/Add-RKSJ-V.bcmap +0 -0
  44. package/public/cmaps/Add-V.bcmap +0 -0
  45. package/public/cmaps/Adobe-CNS1-0.bcmap +0 -0
  46. package/public/cmaps/Adobe-CNS1-1.bcmap +0 -0
  47. package/public/cmaps/Adobe-CNS1-2.bcmap +0 -0
  48. package/public/cmaps/Adobe-CNS1-3.bcmap +0 -0
  49. package/public/cmaps/Adobe-CNS1-4.bcmap +0 -0
  50. package/public/cmaps/Adobe-CNS1-5.bcmap +0 -0
  51. package/public/cmaps/Adobe-CNS1-6.bcmap +0 -0
  52. package/public/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  53. package/public/cmaps/Adobe-GB1-0.bcmap +0 -0
  54. package/public/cmaps/Adobe-GB1-1.bcmap +0 -0
  55. package/public/cmaps/Adobe-GB1-2.bcmap +0 -0
  56. package/public/cmaps/Adobe-GB1-3.bcmap +0 -0
  57. package/public/cmaps/Adobe-GB1-4.bcmap +0 -0
  58. package/public/cmaps/Adobe-GB1-5.bcmap +0 -0
  59. package/public/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  60. package/public/cmaps/Adobe-Japan1-0.bcmap +0 -0
  61. package/public/cmaps/Adobe-Japan1-1.bcmap +0 -0
  62. package/public/cmaps/Adobe-Japan1-2.bcmap +0 -0
  63. package/public/cmaps/Adobe-Japan1-3.bcmap +0 -0
  64. package/public/cmaps/Adobe-Japan1-4.bcmap +0 -0
  65. package/public/cmaps/Adobe-Japan1-5.bcmap +0 -0
  66. package/public/cmaps/Adobe-Japan1-6.bcmap +0 -0
  67. package/public/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  68. package/public/cmaps/Adobe-Korea1-0.bcmap +0 -0
  69. package/public/cmaps/Adobe-Korea1-1.bcmap +0 -0
  70. package/public/cmaps/Adobe-Korea1-2.bcmap +0 -0
  71. package/public/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  72. package/public/cmaps/B5-H.bcmap +0 -0
  73. package/public/cmaps/B5-V.bcmap +0 -0
  74. package/public/cmaps/B5pc-H.bcmap +0 -0
  75. package/public/cmaps/B5pc-V.bcmap +0 -0
  76. package/public/cmaps/CNS-EUC-H.bcmap +0 -0
  77. package/public/cmaps/CNS-EUC-V.bcmap +0 -0
  78. package/public/cmaps/CNS1-H.bcmap +0 -0
  79. package/public/cmaps/CNS1-V.bcmap +0 -0
  80. package/public/cmaps/CNS2-H.bcmap +0 -0
  81. package/public/cmaps/CNS2-V.bcmap +0 -3
  82. package/public/cmaps/ETHK-B5-H.bcmap +0 -0
  83. package/public/cmaps/ETHK-B5-V.bcmap +0 -0
  84. package/public/cmaps/ETen-B5-H.bcmap +0 -0
  85. package/public/cmaps/ETen-B5-V.bcmap +0 -0
  86. package/public/cmaps/ETenms-B5-H.bcmap +0 -3
  87. package/public/cmaps/ETenms-B5-V.bcmap +0 -0
  88. package/public/cmaps/EUC-H.bcmap +0 -0
  89. package/public/cmaps/EUC-V.bcmap +0 -0
  90. package/public/cmaps/Ext-H.bcmap +0 -0
  91. package/public/cmaps/Ext-RKSJ-H.bcmap +0 -0
  92. package/public/cmaps/Ext-RKSJ-V.bcmap +0 -0
  93. package/public/cmaps/Ext-V.bcmap +0 -0
  94. package/public/cmaps/GB-EUC-H.bcmap +0 -0
  95. package/public/cmaps/GB-EUC-V.bcmap +0 -0
  96. package/public/cmaps/GB-H.bcmap +0 -4
  97. package/public/cmaps/GB-V.bcmap +0 -0
  98. package/public/cmaps/GBK-EUC-H.bcmap +0 -0
  99. package/public/cmaps/GBK-EUC-V.bcmap +0 -0
  100. package/public/cmaps/GBK2K-H.bcmap +0 -0
  101. package/public/cmaps/GBK2K-V.bcmap +0 -0
  102. package/public/cmaps/GBKp-EUC-H.bcmap +0 -0
  103. package/public/cmaps/GBKp-EUC-V.bcmap +0 -0
  104. package/public/cmaps/GBT-EUC-H.bcmap +0 -0
  105. package/public/cmaps/GBT-EUC-V.bcmap +0 -0
  106. package/public/cmaps/GBT-H.bcmap +0 -0
  107. package/public/cmaps/GBT-V.bcmap +0 -0
  108. package/public/cmaps/GBTpc-EUC-H.bcmap +0 -0
  109. package/public/cmaps/GBTpc-EUC-V.bcmap +0 -0
  110. package/public/cmaps/GBpc-EUC-H.bcmap +0 -0
  111. package/public/cmaps/GBpc-EUC-V.bcmap +0 -0
  112. package/public/cmaps/H.bcmap +0 -0
  113. package/public/cmaps/HKdla-B5-H.bcmap +0 -0
  114. package/public/cmaps/HKdla-B5-V.bcmap +0 -0
  115. package/public/cmaps/HKdlb-B5-H.bcmap +0 -0
  116. package/public/cmaps/HKdlb-B5-V.bcmap +0 -0
  117. package/public/cmaps/HKgccs-B5-H.bcmap +0 -0
  118. package/public/cmaps/HKgccs-B5-V.bcmap +0 -0
  119. package/public/cmaps/HKm314-B5-H.bcmap +0 -0
  120. package/public/cmaps/HKm314-B5-V.bcmap +0 -0
  121. package/public/cmaps/HKm471-B5-H.bcmap +0 -0
  122. package/public/cmaps/HKm471-B5-V.bcmap +0 -0
  123. package/public/cmaps/HKscs-B5-H.bcmap +0 -0
  124. package/public/cmaps/HKscs-B5-V.bcmap +0 -0
  125. package/public/cmaps/Hankaku.bcmap +0 -0
  126. package/public/cmaps/Hiragana.bcmap +0 -0
  127. package/public/cmaps/KSC-EUC-H.bcmap +0 -0
  128. package/public/cmaps/KSC-EUC-V.bcmap +0 -0
  129. package/public/cmaps/KSC-H.bcmap +0 -0
  130. package/public/cmaps/KSC-Johab-H.bcmap +0 -0
  131. package/public/cmaps/KSC-Johab-V.bcmap +0 -0
  132. package/public/cmaps/KSC-V.bcmap +0 -0
  133. package/public/cmaps/KSCms-UHC-H.bcmap +0 -0
  134. package/public/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  135. package/public/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  136. package/public/cmaps/KSCms-UHC-V.bcmap +0 -0
  137. package/public/cmaps/KSCpc-EUC-H.bcmap +0 -0
  138. package/public/cmaps/KSCpc-EUC-V.bcmap +0 -0
  139. package/public/cmaps/Katakana.bcmap +0 -0
  140. package/public/cmaps/LICENSE +0 -36
  141. package/public/cmaps/NWP-H.bcmap +0 -0
  142. package/public/cmaps/NWP-V.bcmap +0 -0
  143. package/public/cmaps/RKSJ-H.bcmap +0 -0
  144. package/public/cmaps/RKSJ-V.bcmap +0 -0
  145. package/public/cmaps/Roman.bcmap +0 -0
  146. package/public/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  147. package/public/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  148. package/public/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  149. package/public/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  150. package/public/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  151. package/public/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  152. package/public/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  153. package/public/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  154. package/public/cmaps/UniGB-UCS2-H.bcmap +0 -0
  155. package/public/cmaps/UniGB-UCS2-V.bcmap +0 -0
  156. package/public/cmaps/UniGB-UTF16-H.bcmap +0 -0
  157. package/public/cmaps/UniGB-UTF16-V.bcmap +0 -0
  158. package/public/cmaps/UniGB-UTF32-H.bcmap +0 -0
  159. package/public/cmaps/UniGB-UTF32-V.bcmap +0 -0
  160. package/public/cmaps/UniGB-UTF8-H.bcmap +0 -0
  161. package/public/cmaps/UniGB-UTF8-V.bcmap +0 -0
  162. package/public/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  163. package/public/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  164. package/public/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  165. package/public/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  166. package/public/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  167. package/public/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  168. package/public/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  169. package/public/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  170. package/public/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  171. package/public/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  172. package/public/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  173. package/public/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  174. package/public/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  175. package/public/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  176. package/public/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  177. package/public/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  178. package/public/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  179. package/public/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  180. package/public/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  181. package/public/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  182. package/public/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  183. package/public/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  184. package/public/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  185. package/public/cmaps/UniKS-UCS2-H.bcmap +0 -0
  186. package/public/cmaps/UniKS-UCS2-V.bcmap +0 -0
  187. package/public/cmaps/UniKS-UTF16-H.bcmap +0 -0
  188. package/public/cmaps/UniKS-UTF16-V.bcmap +0 -0
  189. package/public/cmaps/UniKS-UTF32-H.bcmap +0 -0
  190. package/public/cmaps/UniKS-UTF32-V.bcmap +0 -0
  191. package/public/cmaps/UniKS-UTF8-H.bcmap +0 -0
  192. package/public/cmaps/UniKS-UTF8-V.bcmap +0 -0
  193. package/public/cmaps/V.bcmap +0 -0
  194. package/public/cmaps/WP-Symbol.bcmap +0 -0
  195. package/public/polyfills/polyfills.js +0 -802
  196. package/public/vendor/docx/docx.worker.js +0 -5
  197. package/public/vendor/docx/jszip.min.js +0 -13
  198. package/public/vendor/libarchive/libarchive.wasm +0 -0
  199. package/public/vendor/libarchive/worker-bundle.js +0 -6
  200. package/public/vendor/pptx/pptx.worker.js +0 -26
  201. package/public/wasm/cad/0.8.2/dwfv-render.wasm +0 -0
  202. package/public/wasm/cad/0.8.2/dwg-worker.js +0 -24
  203. package/public/wasm/cad/0.8.2/dwg-worker.js.map +0 -1
  204. package/public/wasm/cad/0.8.2/libredwg-web.js +0 -2
  205. package/public/wasm/cad/0.8.2/libredwg-web.wasm +0 -0
  206. package/public/wasm/cad/dwfv-render.wasm +0 -0
  207. package/public/wasm/cad/dwg-worker.js +0 -24
  208. package/public/wasm/cad/dwg-worker.js.map +0 -1
  209. package/public/wasm/cad/libredwg-web.js +0 -2
  210. package/public/wasm/cad/libredwg-web.wasm +0 -0
  211. package/public/wasm/data/sql-wasm.wasm +0 -0
  212. package/public/wasm/hdiff.wasm +0 -0
  213. package/public/wasm/model/LICENSE.occt-import-js.txt +0 -504
  214. package/public/wasm/model/LICENSE.occt.txt +0 -502
  215. package/public/wasm/model/occt-import-js.js +0 -19
  216. package/public/wasm/model/occt-import-js.wasm +0 -0
  217. package/public/wasm/model/occt-worker.js +0 -83
  218. package/public/wasm/typst/fonts/DejaVuSansMono-Bold.ttf +0 -0
  219. package/public/wasm/typst/fonts/DejaVuSansMono-BoldOblique.ttf +0 -0
  220. package/public/wasm/typst/fonts/DejaVuSansMono-Oblique.ttf +0 -0
  221. package/public/wasm/typst/fonts/DejaVuSansMono.ttf +0 -0
  222. package/public/wasm/typst/fonts/LibertinusSerif-Bold.otf +0 -0
  223. package/public/wasm/typst/fonts/LibertinusSerif-BoldItalic.otf +0 -0
  224. package/public/wasm/typst/fonts/LibertinusSerif-Italic.otf +0 -0
  225. package/public/wasm/typst/fonts/LibertinusSerif-Regular.otf +0 -0
  226. package/public/wasm/typst/fonts/LibertinusSerif-Semibold.otf +0 -0
  227. package/public/wasm/typst/fonts/LibertinusSerif-SemiboldItalic.otf +0 -0
  228. package/public/wasm/typst/fonts/NewCM10-Bold.otf +0 -0
  229. package/public/wasm/typst/fonts/NewCM10-BoldItalic.otf +0 -0
  230. package/public/wasm/typst/fonts/NewCM10-Italic.otf +0 -0
  231. package/public/wasm/typst/fonts/NewCM10-Regular.otf +0 -0
  232. package/public/wasm/typst/fonts/NewCMMath-Bold.otf +0 -0
  233. package/public/wasm/typst/fonts/NewCMMath-Book.otf +0 -0
  234. package/public/wasm/typst/fonts/NewCMMath-Regular.otf +0 -0
  235. package/public/wasm/typst/fonts/README.md +0 -7
  236. package/public/wasm/typst/typst_ts_renderer_bg.wasm +0 -0
  237. package/public/wasm/typst/typst_ts_web_compiler_bg.wasm +0 -0
  238. package/scripts/patch-docx-grid.cjs +0 -412
  239. package/src/api/_base.ts +0 -243
  240. package/src/api/index.ts +0 -17
  241. package/src/api/project.ts +0 -1345
  242. package/src/api/user.ts +0 -1174
  243. package/src/contract.ts +0 -50
  244. package/src/hooks/index.ts +0 -2
  245. package/src/hooks/useLongPress.ts +0 -137
  246. package/src/hooks/useOnlineStatus.ts +0 -22
  247. package/src/index.ts +0 -14
  248. package/src/types/id.ts +0 -2
  249. package/src/types/index.ts +0 -5
  250. package/src/types/project/base.ts +0 -63
  251. package/src/types/project/contract.ts +0 -79
  252. package/src/types/project/contractStatus.tsx +0 -15
  253. package/src/types/project/index.ts +0 -5
  254. package/src/types/project/member.ts +0 -46
  255. package/src/types/project/progress.ts +0 -43
  256. package/src/types/projectRole.ts +0 -17
  257. package/src/types/theme.ts +0 -1
  258. package/src/types/user/index.ts +0 -1
  259. package/src/types/user/role.ts +0 -7
  260. package/src/ui/CommentTimeline/index.tsx +0 -330
  261. package/src/ui/FileManager/FileContextMenu.tsx +0 -628
  262. package/src/ui/FileManager/FileGridView.tsx +0 -529
  263. package/src/ui/FileManager/FileTableView.tsx +0 -405
  264. package/src/ui/FileManager/FileToolbar.tsx +0 -119
  265. package/src/ui/FileManager/FileVersionHistoryModal.tsx +0 -175
  266. package/src/ui/FileManager/MoveCopyToProjectModal.tsx +0 -119
  267. package/src/ui/FileManager/ShareToWechatModal.tsx +0 -419
  268. package/src/ui/FileManager/hooks/useFileManagerActions.ts +0 -2532
  269. package/src/ui/FileManager/hooks/useFileManagerState.ts +0 -419
  270. package/src/ui/FileManager/index.tsx +0 -580
  271. package/src/ui/FileManager/projectFileManagerApi.ts +0 -57
  272. package/src/ui/FileManager/types.ts +0 -184
  273. package/src/ui/FileManager/utils/fileDeltaWorker.ts +0 -193
  274. package/src/ui/FileManager/utils/fileTree.ts +0 -178
  275. package/src/ui/FileManager/utils/fileUpload.ts +0 -714
  276. package/src/ui/FileManager/utils/fileUtils.ts +0 -65
  277. package/src/ui/InvoiceRecordsList/index.tsx +0 -813
  278. package/src/ui/MyFileSelectorModal.tsx +0 -261
  279. package/src/ui/ProjectSelector/index.tsx +0 -472
  280. package/src/ui/ProjectSelector/projectCache.ts +0 -40
  281. package/src/ui/RoleSelector/index.tsx +0 -473
  282. package/src/ui/RoleSelector/roleCache.ts +0 -40
  283. package/src/ui/UIAlert.tsx +0 -399
  284. package/src/ui/UIAlertExample.tsx +0 -129
  285. package/src/ui/UIConfirm.tsx +0 -335
  286. package/src/ui/UIConfirmExample.tsx +0 -165
  287. package/src/ui/UIDatePicker.tsx +0 -146
  288. package/src/ui/UIDateRangePicker.tsx +0 -38
  289. package/src/ui/UIFilePreview/ExcelEditor/index.tsx +0 -617
  290. package/src/ui/UIFilePreview/ExcelEditor/types.ts +0 -24
  291. package/src/ui/UIFilePreview/ExportDropdown.css +0 -85
  292. package/src/ui/UIFilePreview/ExportDropdown.tsx +0 -109
  293. package/src/ui/UIFilePreview/IndexedDBUtils.ts +0 -564
  294. package/src/ui/UIFilePreview/MarkdownEditor/exportMarkdownPdf.ts +0 -576
  295. package/src/ui/UIFilePreview/MarkdownEditor/index.tsx +0 -677
  296. package/src/ui/UIFilePreview/MarkdownEditor/markdownEditor.css +0 -1005
  297. package/src/ui/UIFilePreview/MarkdownEditor/types.ts +0 -15
  298. package/src/ui/UIFilePreview/PPTXEditor/index.tsx +0 -602
  299. package/src/ui/UIFilePreview/RichDocEditor/exportRDocMarkdown.ts +0 -77
  300. package/src/ui/UIFilePreview/RichDocEditor/exportRDocPdf.ts +0 -374
  301. package/src/ui/UIFilePreview/RichDocEditor/index.tsx +0 -730
  302. package/src/ui/UIFilePreview/RichDocEditor/richdoc-editor.css +0 -59
  303. package/src/ui/UIFilePreview/UIFilePreview.tsx +0 -611
  304. package/src/ui/UIFilePreview/WordEditor/index.tsx +0 -3933
  305. package/src/ui/UIFilePreview/WordEditor/style.ts +0 -1213
  306. package/src/ui/UIFilePreview/WordEditor/word-editor.css +0 -999
  307. package/src/ui/UIFilePreview/filePreview.css +0 -193
  308. package/src/ui/UIFilePreview/filetypes/archive.tsx +0 -66
  309. package/src/ui/UIFilePreview/filetypes/cad.tsx +0 -287
  310. package/src/ui/UIFilePreview/filetypes/excel.tsx +0 -355
  311. package/src/ui/UIFilePreview/filetypes/image.tsx +0 -20
  312. package/src/ui/UIFilePreview/filetypes/imageLoader.ts +0 -63
  313. package/src/ui/UIFilePreview/filetypes/pdf.tsx +0 -156
  314. package/src/ui/UIFilePreview/filetypes/ppt.tsx +0 -535
  315. package/src/ui/UIFilePreview/filetypes/pptExportPdf.ts +0 -523
  316. package/src/ui/UIFilePreview/filetypes/video.tsx +0 -482
  317. package/src/ui/UIFilePreview/filetypes/word.tsx +0 -245
  318. package/src/ui/UIFilePreview/filetypes/wordExportMarkdown.ts +0 -86
  319. package/src/ui/UIFilePreview/filetypes/wordExportPdf.tsx +0 -427
  320. package/src/ui/UIFilePreview/index.ts +0 -35
  321. package/src/ui/UIFilePreview/pdfPagination.ts +0 -143
  322. package/src/ui/UIFilePreview/previewUtils.tsx +0 -531
  323. package/src/ui/UIFileUpload.tsx +0 -382
  324. package/src/ui/UIImageUpload.tsx +0 -195
  325. package/src/ui/UILoading.tsx +0 -255
  326. package/src/ui/UILoadingExample.tsx +0 -139
  327. package/src/ui/UISelect.tsx +0 -105
  328. package/src/ui/UIToast.tsx +0 -381
  329. package/src/ui/UIToastExample.tsx +0 -69
  330. package/src/ui/UIToastSingle.tsx +0 -279
  331. package/src/ui/UIViewToggle.tsx +0 -64
  332. package/src/ui/UserSelector/index.tsx +0 -583
  333. package/src/ui/index.ts +0 -84
  334. package/src/ui/upload/image.ts +0 -135
  335. package/src/ui/upload/index.ts +0 -73
  336. package/src/ui/upload/submitFile.ts +0 -106
  337. package/src/ui/upload/submitForm.ts +0 -124
  338. package/src/ui/upload/upload.err.ts +0 -15
  339. package/src/ui/upload/upload.ts +0 -250
  340. package/src/utils/CacheDepartmentInfo.ts +0 -372
  341. package/src/utils/CacheFileContent.ts +0 -315
  342. package/src/utils/CachePermissionInfo.ts +0 -235
  343. package/src/utils/CacheRoleInfo.ts +0 -303
  344. package/src/utils/CacheUserInfo.ts +0 -818
  345. package/src/utils/CacheViewToggleInfo.ts +0 -182
  346. package/src/utils/MessageContentUtils.ts +0 -268
  347. package/src/utils/clipboard.ts +0 -70
  348. package/src/utils/companyEmail.ts +0 -19
  349. package/src/utils/forbidDebugger.ts +0 -59
  350. package/src/utils/formatters.ts +0 -94
  351. package/src/utils/htmlUtils.tsx +0 -59
  352. package/src/utils/index.ts +0 -18
  353. package/src/utils/keyboard.ts +0 -114
  354. package/src/utils/mammothApi.ts +0 -16
  355. package/src/utils/polyfills.ts +0 -928
  356. package/src/utils/regex.ts +0 -14
  357. package/src/utils/storage.ts +0 -95
  358. package/src/utils/workerBootstrap.ts +0 -87
  359. package/types/hooks.d.ts +0 -5
  360. package/types/types/user/index.d.ts +0 -1
  361. package/types/types/user/role.d.ts +0 -7
  362. package/types/ui/FileManager/FileContextMenu.d.ts +0 -50
  363. package/types/ui/FileManager/FileGridView.d.ts +0 -51
  364. package/types/ui/FileManager/FileTableView.d.ts +0 -49
  365. package/types/ui/FileManager/FileToolbar.d.ts +0 -16
  366. package/types/ui/FileManager/FileVersionHistoryModal.d.ts +0 -9
  367. package/types/ui/FileManager/MoveCopyToProjectModal.d.ts +0 -17
  368. package/types/ui/FileManager/ShareToWechatModal.d.ts +0 -10
  369. package/types/ui/FileManager/hooks/useFileManagerActions.d.ts +0 -143
  370. package/types/ui/FileManager/hooks/useFileManagerState.d.ts +0 -146
  371. package/types/ui/FileManager/index.d.ts +0 -16
  372. package/types/ui/FileManager/projectFileManagerApi.d.ts +0 -6
  373. package/types/ui/FileManager/types.d.ts +0 -178
  374. package/types/ui/FileManager/utils/fileDeltaWorker.d.ts +0 -14
  375. package/types/ui/FileManager/utils/fileTree.d.ts +0 -7
  376. package/types/ui/FileManager/utils/fileUpload.d.ts +0 -60
  377. package/types/ui/FileManager/utils/fileUtils.d.ts +0 -26
  378. package/types/ui/InvoiceRecordsList/index.d.ts +0 -43
  379. package/types/ui/MyFileSelectorModal.d.ts +0 -16
  380. package/types/ui/UIFilePreview/ExcelEditor/index.d.ts +0 -20
  381. package/types/ui/UIFilePreview/ExcelEditor/types.d.ts +0 -29
  382. package/types/ui/UIFilePreview/ExportDropdown.d.ts +0 -26
  383. package/types/ui/UIFilePreview/IndexedDBUtils.d.ts +0 -109
  384. package/types/ui/UIFilePreview/MarkdownEditor/exportMarkdownPdf.d.ts +0 -27
  385. package/types/ui/UIFilePreview/MarkdownEditor/index.d.ts +0 -34
  386. package/types/ui/UIFilePreview/MarkdownEditor/types.d.ts +0 -14
  387. package/types/ui/UIFilePreview/PPTXEditor/index.d.ts +0 -19
  388. package/types/ui/UIFilePreview/RichDocEditor/exportRDocMarkdown.d.ts +0 -23
  389. package/types/ui/UIFilePreview/RichDocEditor/exportRDocPdf.d.ts +0 -22
  390. package/types/ui/UIFilePreview/RichDocEditor/index.d.ts +0 -39
  391. package/types/ui/UIFilePreview/UIFilePreview.d.ts +0 -34
  392. package/types/ui/UIFilePreview/WordEditor/index.d.ts +0 -20
  393. package/types/ui/UIFilePreview/WordEditor/style.d.ts +0 -81
  394. package/types/ui/UIFilePreview/filetypes/archive.d.ts +0 -6
  395. package/types/ui/UIFilePreview/filetypes/cad.d.ts +0 -5
  396. package/types/ui/UIFilePreview/filetypes/excel.d.ts +0 -6
  397. package/types/ui/UIFilePreview/filetypes/image.d.ts +0 -6
  398. package/types/ui/UIFilePreview/filetypes/imageLoader.d.ts +0 -7
  399. package/types/ui/UIFilePreview/filetypes/pdf.d.ts +0 -7
  400. package/types/ui/UIFilePreview/filetypes/ppt.d.ts +0 -5
  401. package/types/ui/UIFilePreview/filetypes/pptExportPdf.d.ts +0 -28
  402. package/types/ui/UIFilePreview/filetypes/video.d.ts +0 -6
  403. package/types/ui/UIFilePreview/filetypes/word.d.ts +0 -5
  404. package/types/ui/UIFilePreview/filetypes/wordExportMarkdown.d.ts +0 -19
  405. package/types/ui/UIFilePreview/filetypes/wordExportPdf.d.ts +0 -32
  406. package/types/ui/UIFilePreview/index.d.ts +0 -46
  407. package/types/ui/UIFilePreview/pdfPagination.d.ts +0 -25
  408. package/types/ui/UIFilePreview/previewUtils.d.ts +0 -62
  409. package/types/ui.d.ts +0 -5
  410. package/types/utils/CacheFileContent.d.ts +0 -31
  411. package/types/utils/mammothApi.d.ts +0 -14
  412. package/types/utils.d.ts +0 -5
  413. /package/{src → dist}/styles/ant-modal.css +0 -0
  414. /package/{src → dist}/styles/ant-spin.css +0 -0
@@ -1,1345 +0,0 @@
1
- 'use strict';
2
- /**
3
- * Copyright (c) 2025 SPACECORE Co.,Ltd. All Rights Reserved.
4
- * Author: brian.li
5
- * Desc:
6
- */
7
-
8
- import { HttpRequest, ResponseCode } from './_base';
9
- import type { ProjectRole } from '../types/projectRole';
10
- import type { ContractStatus } from '../types/project/contract';
11
-
12
-
13
- /*
14
- * Contract
15
- */
16
- export const contract = {
17
- /*
18
- * /api/project/contract/create
19
- */
20
- createContract: (
21
- data: {
22
- projectId: string,
23
- name: string,
24
- tag: string,
25
- code: string,
26
- partyA: string,
27
- partyB: string,
28
- amount: number,
29
- startDate: Date,
30
- endDate: Date,
31
- descs: string
32
- }
33
- ): Promise<{
34
- code: ResponseCode,
35
- message?: string,
36
- data?: string
37
- }> => {
38
- return HttpRequest.post('/api/project/contract/create', null, { projectId:data.projectId, name:data.name, tag:data.tag, code:data.code, partyA:data.partyA, partyB:data.partyB, amount:data.amount, startDate:data.startDate, endDate:data.endDate, descs:data.descs}).then((res:any) => {
39
- return res as any;
40
- });
41
- },
42
-
43
- /*
44
- * /api/project/contract/delete
45
- */
46
- deleteContract: (
47
- params:{
48
- id: string
49
- }
50
- ): Promise<{
51
- code: ResponseCode,
52
- message?: string,
53
- data?: boolean
54
- }> => {
55
- return HttpRequest.delete('/api/project/contract/delete', { id:params.id}, null).then((res:any) => {
56
- return res as any;
57
- });
58
- },
59
-
60
- /*
61
- * /api/project/contract/update
62
- */
63
- updateContract: (
64
- data: {
65
- id: string,
66
- name?: string,
67
- code?: string,
68
- tag?: string,
69
- partyA?: string,
70
- partyB?: string,
71
- amount?: number,
72
- startDate?: Date,
73
- endDate?: Date,
74
- descs?: string,
75
- markdown?: string
76
- }
77
- ): Promise<{
78
- code: ResponseCode,
79
- message?: string
80
- }> => {
81
- return HttpRequest.post('/api/project/contract/update', null, { id:data.id, name:data.name, code:data.code, tag:data.tag, partyA:data.partyA, partyB:data.partyB, amount:data.amount, startDate:data.startDate, endDate:data.endDate, descs:data.descs, markdown:data.markdown}).then((res:any) => {
82
- return res as any;
83
- });
84
- },
85
-
86
- /*
87
- * /api/project/contract/detail
88
- */
89
- getContractDetail: (
90
- params:{
91
- id: string
92
- }
93
- ): Promise<{
94
- code: ResponseCode,
95
- message?: string,
96
- data?: {
97
- id: string,
98
- projectId: string,
99
- name: string,
100
- tag: string,
101
- code: string,
102
- partyA: string,
103
- partyB: string,
104
- status: ContractStatus,
105
- amount: number,
106
- startDate: Date,
107
- endDate: Date,
108
- descs: string,
109
- markdown: string,
110
- currentVersion: number,
111
- createTime: Date,
112
- updateTime: Date,
113
- createBy: string,
114
- updateBy: string,
115
- approvalId: string,
116
- fileResourcePaths: string
117
- }|null
118
- }> => {
119
- return HttpRequest.get('/api/project/contract/detail', { id:params.id}, null).then((res:any) => {
120
- return res as any;
121
- });
122
- },
123
-
124
- /*
125
- * /api/project/contract/list
126
- */
127
- getContractList: (
128
- params:{
129
- projectId: string,
130
- pageNum?: number,
131
- pageSize?: number
132
- }
133
- ): Promise<{
134
- code: ResponseCode,
135
- message?: string,
136
- data?: {
137
- total:number;
138
- list:{
139
- id: string,
140
- projectId: string,
141
- name: string,
142
- tag: string,
143
- code: string,
144
- partyA: string,
145
- partyB: string,
146
- status: ContractStatus,
147
- amount: number,
148
- startDate: Date,
149
- endDate: Date,
150
- descs: string,
151
- markdown: string,
152
- currentVersion: number,
153
- createTime: Date,
154
- updateTime: Date,
155
- createBy: string,
156
- updateBy: string,
157
- approvalId: string,
158
- fileResourcePaths: string
159
- }[];
160
- }
161
- }> => {
162
- return HttpRequest.get('/api/project/contract/list', { projectId:params.projectId, pageNum:params.pageNum, pageSize:params.pageSize}, null).then((res:any) => {
163
- return res as any;
164
- });
165
- },
166
-
167
- /*
168
- * 提交合同版本进行用印审批(提交后将变为PENDING状态).
169
- * 提交合同版本进行用印审批(提交后将变为PENDING状态).
170
- */
171
- submitApproval: (
172
- params:{
173
- id: string,
174
- sealType: string
175
- }
176
- ): Promise<{
177
- code: ResponseCode,
178
- message?: string,
179
- data?: boolean
180
- }> => {
181
- return HttpRequest.post('/api/project/contract/submit', { id:params.id, sealType:params.sealType}, null).then((res:any) => {
182
- return res as any;
183
- });
184
- },
185
-
186
- /*
187
- * 撤销合同版本审批.
188
- * 撤销合同版本审批.
189
- */
190
- cancelApproval: (
191
- params:{
192
- id: string
193
- }
194
- ): Promise<{
195
- code: ResponseCode,
196
- message?: string,
197
- data?: boolean
198
- }> => {
199
- return HttpRequest.post('/api/project/contract/cancelApproval', { id:params.id}, null).then((res:any) => {
200
- return res as any;
201
- });
202
- },
203
-
204
- /*
205
- * /api/project/contract/version/upload
206
- */
207
- uploadVersion: (
208
- data: {
209
- contractId: string,
210
- fileName: string,
211
- fileType: string,
212
- fileSize: number,
213
- changeLog?: string
214
- }
215
- ): Promise<{
216
- code: ResponseCode,
217
- message?: string,
218
- data?: {
219
- newVersion:number;
220
- }
221
- }> => {
222
- return HttpRequest.post('/api/project/contract/version/upload', null, { contractId:data.contractId, fileName:data.fileName, fileType:data.fileType, fileSize:data.fileSize, changeLog:data.changeLog}).then((res:any) => {
223
- return res as any;
224
- });
225
- },
226
-
227
- /*
228
- * /api/project/contract/version/list
229
- */
230
- getVersionList: (
231
- params:{
232
- contractId: string
233
- }
234
- ): Promise<{
235
- code: ResponseCode,
236
- message?: string,
237
- data?: {
238
- id: string,
239
- contractId: string,
240
- versionNumber: number,
241
- layerOpinion: string,
242
- fileName: string,
243
- fileResourcePath: string,
244
- fileType: string,
245
- fileSize: number,
246
- changeLog: string,
247
- createTime: Date,
248
- createBy: string,
249
- }[]
250
- }> => {
251
- return HttpRequest.get('/api/project/contract/version/list', { contractId:params.contractId}, null).then((res:any) => {
252
- return res as any;
253
- });
254
- },
255
-
256
- /*
257
- * 删除合同版本(仅草稿状态合同允许删除).
258
- * /api/project/contract/version/delete
259
- */
260
- deleteVersion: (
261
- params:{
262
- id: string
263
- }
264
- ): Promise<{
265
- code: ResponseCode,
266
- message?: string,
267
- data?: boolean
268
- }> => {
269
- return HttpRequest.delete('/api/project/contract/version/delete', { id:params.id}, null).then((res:any) => {
270
- return res as any;
271
- });
272
- },
273
-
274
- /*
275
- * /api/project/contract/version/detail
276
- */
277
- getVersionDetail: (
278
- params:{
279
- id: string
280
- }
281
- ): Promise<{
282
- code: ResponseCode,
283
- message?: string,
284
- data?: {
285
- id: string,
286
- contractId: string,
287
- versionNumber: number,
288
- layerOpinion: string,
289
- fileName: string,
290
- fileResourcePath: string,
291
- fileType: string,
292
- fileSize: number,
293
- changeLog: string,
294
- createTime: Date,
295
- createBy: string
296
- }|null
297
- }> => {
298
- return HttpRequest.get('/api/project/contract/version/detail', { id:params.id}, null).then((res:any) => {
299
- return res as any;
300
- });
301
- },
302
-
303
- /*
304
- * /api/project/contract/version/layerOpinion
305
- */
306
- setVersionLayerOpinion: (
307
- data: {
308
- contractId: string,
309
- version: number,
310
- opinion: string
311
- }
312
- ): Promise<{
313
- code: ResponseCode,
314
- message?: string,
315
- data?: boolean
316
- }> => {
317
- return HttpRequest.post('/api/project/contract/version/layerOpinion', null, { contractId:data.contractId, version:data.version, opinion:data.opinion}).then((res:any) => {
318
- return res as any;
319
- });
320
- },
321
-
322
- /*
323
- * 获取新的合同编号.
324
- * 获取新的合同编号.
325
- */
326
- getNewContractCode: (
327
- params:{
328
- contractCode: string,
329
- sequenceLength: number
330
- }
331
- ): Promise<{
332
- code: ResponseCode,
333
- message?: string,
334
- data?: string
335
- }> => {
336
- return HttpRequest.get('/api/project/contract/newCode', { contractCode:params.contractCode, sequenceLength:params.sequenceLength}, null).then((res:any) => {
337
- return res as any;
338
- });
339
- },
340
-
341
- /*
342
- * 获取合同历史参与方.
343
- * 获取合同历史参与方.
344
- */
345
- getContractHistoryParties: (
346
-
347
- ): Promise<{
348
- code: ResponseCode,
349
- message?: string,
350
- data?: string[]
351
- }> => {
352
- return HttpRequest.get('/api/project/contract/historyParties', null, null).then((res:any) => {
353
- return res as any;
354
- });
355
- },
356
-
357
- }
358
- /*
359
- * File
360
- */
361
- export const file = {
362
- /*
363
- * /api/project/files/detail
364
- */
365
- getDetail: (
366
- params:{
367
- fileId: string
368
- }
369
- ): Promise<{
370
- code: ResponseCode,
371
- message?: string,
372
- data?: {
373
- id: string,
374
- projectId: string,
375
- isSecure: boolean,
376
- fileName: string,
377
- filePath: string,
378
- fileType: string,
379
- fileSize: number,
380
- crc32: number,
381
- fileResourcePath: string,
382
- descs: string,
383
- uploaderName: string,
384
- uploadTime: Date,
385
- createTime: Date,
386
- updateTime: Date,
387
- createBy: string,
388
- updateBy: string,
389
- isDeleted: boolean,
390
- }
391
- }> => {
392
- return HttpRequest.get('/api/project/files/detail', { fileId:params.fileId}, null).then((res:any) => {
393
- return res as any;
394
- });
395
- },
396
-
397
- /*
398
- * /api/project/files/list
399
- */
400
- listFiles: (
401
- params:{
402
- projectId: string
403
- }
404
- ): Promise<{
405
- code: ResponseCode,
406
- message?: string,
407
- data?: {
408
- id: string,
409
- projectId: string,
410
- isSecure: boolean,
411
- fileName: string,
412
- filePath: string,
413
- fileType: string,
414
- fileSize: number,
415
- crc32: number,
416
- fileResourcePath: string,
417
- descs: string,
418
- uploaderName: string,
419
- uploadTime: Date,
420
- createTime: Date,
421
- updateTime: Date,
422
- createBy: string,
423
- updateBy: string,
424
- isDeleted: boolean,
425
- }[]
426
- }> => {
427
- return HttpRequest.get('/api/project/files/list', { projectId:params.projectId}, null).then((res:any) => {
428
- return res as any;
429
- });
430
- },
431
-
432
- /*
433
- * 跨项目搜索当前用户有权限查看的项目文件.
434
- * 跨项目搜索当前用户有权限查看的项目文件.
435
- */
436
- searchFiles: (
437
- params:{
438
- keyword: string,
439
- pageNum?: number,
440
- pageSize?: number
441
- }
442
- ): Promise<{
443
- code: ResponseCode,
444
- message?: string,
445
- data?: {
446
- total:number;
447
- list:{
448
- id: string,
449
- projectId: string,
450
- projectName: string,
451
- category: string,
452
- isSecure: boolean,
453
- fileName: string,
454
- filePath: string,
455
- fileType: string,
456
- fileSize: number,
457
- descs: string,
458
- uploaderName: string,
459
- uploadTime: Date,
460
- fileResourcePath: string,
461
- contractName: string,
462
- code: string,
463
- partyA: string,
464
- partyB: string,
465
- status: string,
466
- amount: number,
467
- contractId: string,
468
- versionNumber: number,
469
- changeLog: string
470
- }[];
471
- }
472
- }> => {
473
- return HttpRequest.get('/api/project/files/search', { keyword:params.keyword, pageNum:params.pageNum, pageSize:params.pageSize}, null).then((res:any) => {
474
- return res as any;
475
- });
476
- },
477
-
478
- /*
479
- * /api/project/files/add
480
- */
481
- addFile: (
482
- params:{
483
- projectId: string
484
- } ,
485
- data: {
486
- fileName: string,
487
- filePath: string,
488
- isSecure?: boolean,
489
- descs?: string,
490
- fileType?: string,
491
- fileSize?: number,
492
- crc32?: number,
493
- fileResourcePath: string
494
- }
495
- ): Promise<{
496
- code: ResponseCode,
497
- message?: string,
498
- data?: {
499
- fileId: string,
500
- fileName: string,
501
- }
502
- }> => {
503
- return HttpRequest.post('/api/project/files/add', { projectId:params.projectId}, { fileName:data.fileName, filePath:data.filePath, isSecure:data.isSecure, descs:data.descs, fileType:data.fileType, fileSize:data.fileSize, crc32:data.crc32, fileResourcePath:data.fileResourcePath}).then((res:any) => {
504
- return res as any;
505
- });
506
- },
507
-
508
- /*
509
- * /api/project/files/remove
510
- */
511
- removeFile: (
512
- params:{
513
- fileId: string
514
- }
515
- ): Promise<{
516
- code: ResponseCode,
517
- message?: string,
518
- data?: boolean
519
- }> => {
520
- return HttpRequest.post('/api/project/files/remove', { fileId:params.fileId}, null).then((res:any) => {
521
- return res as any;
522
- });
523
- },
524
-
525
- /*
526
- * /api/project/files/move
527
- */
528
- moveFile: (
529
- params:{
530
- projectId: string
531
- } ,
532
- data: {
533
- oldFileName: string,
534
- oldFilePath: string,
535
- newFileName: string,
536
- newFilePath: string
537
- }
538
- ): Promise<{
539
- code: ResponseCode,
540
- message?: string,
541
- data?: string
542
- }> => {
543
- return HttpRequest.post('/api/project/files/move', { projectId:params.projectId}, { oldFileName:data.oldFileName, oldFilePath:data.oldFilePath, newFileName:data.newFileName, newFilePath:data.newFilePath}).then((res:any) => {
544
- return res as any;
545
- });
546
- },
547
-
548
- /*
549
- * /api/project/files/updateDescs
550
- */
551
- updateFileDescs: (
552
- data: {
553
- fileId: string,
554
- descs?: string
555
- }
556
- ): Promise<{
557
- code: ResponseCode,
558
- message?: string,
559
- data?: boolean
560
- }> => {
561
- return HttpRequest.post('/api/project/files/updateDescs', null, { fileId:data.fileId, descs:data.descs}).then((res:any) => {
562
- return res as any;
563
- });
564
- },
565
-
566
- /*
567
- * /api/project/files/copyToProject
568
- */
569
- copyFileToProject: (
570
- params:{
571
- projectId: string,
572
- fileId: string
573
- }
574
- ): Promise<{
575
- code: ResponseCode,
576
- message?: string,
577
- data?: string
578
- }> => {
579
- return HttpRequest.post('/api/project/files/copyToProject', { projectId:params.projectId, fileId:params.fileId}, null).then((res:any) => {
580
- return res as any;
581
- });
582
- },
583
-
584
- /*
585
- * /api/project/files/moveToProject
586
- */
587
- moveFileToProject: (
588
- params:{
589
- projectId: string,
590
- fileId: string
591
- }
592
- ): Promise<{
593
- code: ResponseCode,
594
- message?: string,
595
- data?: string
596
- }> => {
597
- return HttpRequest.post('/api/project/files/moveToProject', { projectId:params.projectId, fileId:params.fileId}, null).then((res:any) => {
598
- return res as any;
599
- });
600
- },
601
-
602
- /*
603
- * 增量更新文件 通过上传差异数据(BSDiff补丁)来更新文件,减少上传数据量
604
- * 增量更新文件 通过上传差异数据(BSDiff补丁)来更新文件,减少上传数据量
605
- */
606
- updateFileDelta: (
607
- data: {
608
- fileId: string,
609
- deltaData: string,
610
- deltaSize: number,
611
- newFileSize: number,
612
- crc32?: number,
613
- recordVersion?: boolean,
614
- rotateResourcePath?: boolean
615
- }
616
- ): Promise<{
617
- code: ResponseCode,
618
- message?: string,
619
- data?: string
620
- }> => {
621
- return HttpRequest.post('/api/project/files/updateDelta', null, { fileId:data.fileId, deltaData:data.deltaData, deltaSize:data.deltaSize, newFileSize:data.newFileSize, crc32:data.crc32, recordVersion:data.recordVersion, rotateResourcePath:data.rotateResourcePath}).then((res:any) => {
622
- return res as any;
623
- });
624
- },
625
-
626
- /*
627
- * 全量文件更新 通过上传完整文件数据来更新文件
628
- * 全量文件更新 通过上传完整文件数据来更新文件
629
- */
630
- updateFile: (
631
- data: {
632
- fileId: string,
633
- fileSize?: number,
634
- crc32?: number,
635
- fileName: string,
636
- fileResourcePath: string,
637
- recordVersion?: boolean,
638
- rotateResourcePath?: boolean
639
- }
640
- ): Promise<{
641
- code: ResponseCode,
642
- message?: string,
643
- data?: string
644
- }> => {
645
- return HttpRequest.post('/api/project/files/updateData', null, { fileId:data.fileId, fileSize:data.fileSize, crc32:data.crc32, fileName:data.fileName, fileResourcePath:data.fileResourcePath, recordVersion:data.recordVersion, rotateResourcePath:data.rotateResourcePath}).then((res:any) => {
646
- return res as any;
647
- });
648
- },
649
-
650
- /*
651
- * 生成临时访问令牌 用于文件下载或上传
652
- * 生成临时访问令牌 用于文件下载或上传
653
- */
654
- generateTempAccessToken: (
655
- params:{
656
- fileId: string,
657
- expireSeconds: number
658
- }
659
- ): Promise<{
660
- code: ResponseCode,
661
- message?: string,
662
- data?: string
663
- }> => {
664
- return HttpRequest.post('/api/project/files/generateTempAccessToken', { fileId:params.fileId, expireSeconds:params.expireSeconds}, null).then((res:any) => {
665
- return res as any;
666
- });
667
- },
668
-
669
- /*
670
- * 发起文件夹异步打包下载(仅项目负责人/管理员)
671
- */
672
- folderDownload: (
673
- params:{
674
- projectId: string
675
- },
676
- data:{
677
- folderPath: string,
678
- folderName: string
679
- }
680
- ): Promise<{
681
- code: ResponseCode,
682
- message?: string,
683
- data?: {
684
- jobId: string
685
- }
686
- }> => {
687
- return HttpRequest.post('/api/project/files/folderDownload', { projectId:params.projectId}, { folderPath:data.folderPath, folderName:data.folderName}).then((res:any) => {
688
- return res as any;
689
- });
690
- },
691
-
692
- /*
693
- * 查询文件夹打包下载任务状态
694
- */
695
- folderDownloadStatus: (
696
- params:{
697
- jobId: string
698
- }
699
- ): Promise<{
700
- code: ResponseCode,
701
- message?: string,
702
- data?: {
703
- jobId: string,
704
- status: 'pending' | 'success' | 'failed',
705
- url?: string,
706
- fileName?: string,
707
- message?: string,
708
- expireAt?: number
709
- }
710
- }> => {
711
- return HttpRequest.get('/api/project/files/folderDownloadStatus', { jobId:params.jobId}, null).then((res:any) => {
712
- return res as any;
713
- });
714
- },
715
-
716
- /*
717
- * /api/project/files/listByTempAccessToken
718
- */
719
- listFilesByTempAccessToken: (
720
- params:{
721
- tempToken: string
722
- }
723
- ): Promise<{
724
- code: ResponseCode,
725
- message?: string,
726
- data?: {
727
- id: string,
728
- projectId: string,
729
- isSecure: boolean,
730
- fileName: string,
731
- filePath: string,
732
- fileType: string,
733
- fileSize: number,
734
- crc32: number,
735
- fileResourcePath: string,
736
- descs: string,
737
- uploaderName: string,
738
- uploadTime: Date,
739
- createTime: Date,
740
- updateTime: Date,
741
- createBy: string,
742
- updateBy: string,
743
- isDeleted: boolean,
744
- }[]
745
- }> => {
746
- return HttpRequest.get('/api/project/files/listByTempAccessToken', { tempToken:params.tempToken}, null).then((res:any) => {
747
- return res as any;
748
- });
749
- },
750
-
751
- }
752
- /*
753
- * FileVersion
754
- */
755
- export const fileversion = {
756
- /*
757
- * 获取文件版本列表
758
- * 获取文件版本列表
759
- */
760
- listVersions: (
761
- params:{
762
- fileId: string
763
- }
764
- ): Promise<{
765
- code: ResponseCode,
766
- message?: string,
767
- data?: {
768
- id: string,
769
- fileId: string,
770
- fileSize: number,
771
- crc32: number,
772
- fileResourcePath: string,
773
- uploadTime: Date,
774
- uploaderName: string,
775
- uploadBy: string,
776
- }[]
777
- }> => {
778
- return HttpRequest.get('/api/project/files/version/list', { fileId:params.fileId}, null).then((res:any) => {
779
- return res as any;
780
- });
781
- },
782
-
783
- /*
784
- * 获取版本详情
785
- * 获取版本详情
786
- */
787
- getVersionDetail: (
788
- params:{
789
- versionId: string
790
- }
791
- ): Promise<{
792
- code: ResponseCode,
793
- message?: string,
794
- data?: {
795
- id: string,
796
- fileId: string,
797
- fileSize: number,
798
- crc32: number,
799
- fileResourcePath: string,
800
- uploadTime: Date,
801
- uploaderName: string,
802
- uploadBy: string,
803
- }
804
- }> => {
805
- return HttpRequest.get('/api/project/files/version/detail', { versionId:params.versionId}, null).then((res:any) => {
806
- return res as any;
807
- });
808
- },
809
-
810
- }
811
- /*
812
- * Project
813
- */
814
- export const project = {
815
- /*
816
- * /api/project/enablePrivateProject
817
- */
818
- enableUserPrivateProject: (
819
-
820
- ): Promise<{
821
- code: ResponseCode,
822
- message?: string,
823
- data?: string
824
- }> => {
825
- return HttpRequest.post('/api/project/enablePrivateProject', null, null).then((res:any) => {
826
- return res as any;
827
- });
828
- },
829
-
830
- /*
831
- * /api/project/create
832
- */
833
- createProject: (
834
- data: {
835
- name: string,
836
- descs: string,
837
- companyId: string,
838
- markdown: string,
839
- startTime: Date,
840
- plannedEndTime: Date,
841
- endTime: Date,
842
- leaderId: string,
843
- customerId: string,
844
- order: number,
845
- isUserPrivate: boolean
846
- }
847
- ): Promise<{
848
- code: ResponseCode,
849
- message?: string,
850
- data?: string
851
- }> => {
852
- return HttpRequest.post('/api/project/create', null, { name:data.name, descs:data.descs, companyId:data.companyId, markdown:data.markdown, startTime:data.startTime, plannedEndTime:data.plannedEndTime, endTime:data.endTime, leaderId:data.leaderId, customerId:data.customerId, order:data.order, isUserPrivate:data.isUserPrivate}).then((res:any) => {
853
- return res as any;
854
- });
855
- },
856
-
857
- /*
858
- * /api/project/update
859
- */
860
- updateProject: (
861
- data: {
862
- id: string,
863
- name?: string,
864
- descs?: string,
865
- companyId?: string,
866
- markdown?: string,
867
- status?: number,
868
- startTime?: Date,
869
- plannedEndTime?: Date,
870
- endTime?: Date,
871
- leaderId?: string,
872
- customerId?: string,
873
- order?: number,
874
- isUserPrivate?: boolean,
875
- createTime?: Date,
876
- updateTime?: Date,
877
- createBy?: string,
878
- updateBy?: string
879
- }
880
- ): Promise<{
881
- code: ResponseCode,
882
- message?: string,
883
- data?: boolean
884
- }> => {
885
- return HttpRequest.post('/api/project/update', null, { id:data.id, name:data.name, descs:data.descs, companyId:data.companyId, markdown:data.markdown, status:data.status, startTime:data.startTime, plannedEndTime:data.plannedEndTime, endTime:data.endTime, leaderId:data.leaderId, customerId:data.customerId, order:data.order, isUserPrivate:data.isUserPrivate, createTime:data.createTime, updateTime:data.updateTime, createBy:data.createBy, updateBy:data.updateBy}).then((res:any) => {
886
- return res as any;
887
- });
888
- },
889
-
890
- /*
891
- * /api/project/updateUserdataOrder
892
- */
893
- updateUserdataOrder: (
894
- data: {
895
- projectIds: string[]
896
- }
897
- ): Promise<{
898
- code: ResponseCode,
899
- message?: string
900
- }> => {
901
- return HttpRequest.post('/api/project/updateUserdataOrder', null, { projectIds:data.projectIds}).then((res:any) => {
902
- return res as any;
903
- });
904
- },
905
-
906
- /*
907
- * 获取用户的项目排序数据. [{pid,order}]
908
- * 获取用户的项目排序数据. [{pid,order}]
909
- */
910
- getUserdataOrder: (
911
-
912
- ): Promise<{
913
- code: ResponseCode,
914
- message?: string,
915
- data?: {
916
- projectIds: string[],
917
- }
918
- }> => {
919
- return HttpRequest.get('/api/project/userdataOrder', null, null).then((res:any) => {
920
- return res as any;
921
- });
922
- },
923
-
924
- /*
925
- * /api/project/detail
926
- */
927
- getProjectDetail: (
928
- params:{
929
- id: string
930
- }
931
- ): Promise<{
932
- code: ResponseCode,
933
- message?: string,
934
- data?: {
935
- id: string,
936
- name: string,
937
- descs: string,
938
- companyId: string,
939
- markdown: string,
940
- status: number,
941
- startTime: Date,
942
- plannedEndTime: Date,
943
- endTime: Date,
944
- leaderId: string,
945
- customerId: string,
946
- order: number,
947
- isUserPrivate: boolean,
948
- createTime: Date,
949
- updateTime: Date,
950
- createBy: string,
951
- updateBy: string
952
- }|null
953
- }> => {
954
- return HttpRequest.get('/api/project/detail', { id:params.id}, null).then((res:any) => {
955
- return res as any;
956
- });
957
- },
958
-
959
- /*
960
- * 获取项目名称.
961
- * 获取项目名称.
962
- */
963
- getProjectName: (
964
- params:{
965
- projectId: string
966
- }
967
- ): Promise<{
968
- code: ResponseCode,
969
- message?: string,
970
- data?: string|null
971
- }> => {
972
- return HttpRequest.get('/api/project/name', { projectId:params.projectId}, null).then((res:any) => {
973
- return res as any;
974
- });
975
- },
976
-
977
- /*
978
- * 仅查看当前用户参与的项目
979
- * 仅查看当前用户参与的项目
980
- */
981
- listProjects: (
982
- params:{
983
- pageNum?: number,
984
- pageSize?: number,
985
- status?: "progress" | "completed" | "temp",
986
- companyId?: string,
987
- customerId?: string
988
- }
989
- ): Promise<{
990
- code: ResponseCode,
991
- message?: string,
992
- data?: {
993
- total:number;
994
- list:{
995
- id: string,
996
- name: string,
997
- descs: string,
998
- companyId: string,
999
- markdown: string,
1000
- status: number,
1001
- startTime: Date,
1002
- plannedEndTime: Date,
1003
- endTime: Date,
1004
- leaderId: string,
1005
- customerId: string,
1006
- order: number,
1007
- isUserPrivate: boolean,
1008
- createTime: Date,
1009
- updateTime: Date,
1010
- createBy: string,
1011
- updateBy: string
1012
- }[];
1013
- }
1014
- }> => {
1015
- return HttpRequest.get('/api/project/list', { pageNum:params.pageNum, pageSize:params.pageSize, status:params.status, companyId:params.companyId, customerId:params.customerId}, null).then((res:any) => {
1016
- return res as any;
1017
- });
1018
- },
1019
-
1020
- /*
1021
- * 仅查看当前用户为管理员及以上的项目
1022
- * 仅查看当前用户为管理员及以上的项目
1023
- */
1024
- listProjectsByManager: (
1025
- params:{
1026
- pageNum?: number,
1027
- pageSize?: number
1028
- }
1029
- ): Promise<{
1030
- code: ResponseCode,
1031
- message?: string,
1032
- data?: {
1033
- total:number;
1034
- list:{
1035
- id: string,
1036
- name: string,
1037
- descs: string,
1038
- companyId: string,
1039
- markdown: string,
1040
- status: number,
1041
- startTime: Date,
1042
- plannedEndTime: Date,
1043
- endTime: Date,
1044
- leaderId: string,
1045
- customerId: string,
1046
- order: number,
1047
- isUserPrivate: boolean,
1048
- createTime: Date,
1049
- updateTime: Date,
1050
- createBy: string,
1051
- updateBy: string
1052
- }[];
1053
- }
1054
- }> => {
1055
- return HttpRequest.get('/api/project/listByManager', { pageNum:params.pageNum, pageSize:params.pageSize}, null).then((res:any) => {
1056
- return res as any;
1057
- });
1058
- },
1059
-
1060
- /*
1061
- * /api/project/status
1062
- */
1063
- changeStatus: (
1064
- params:{
1065
- id: string,
1066
- status: number
1067
- }
1068
- ): Promise<{
1069
- code: ResponseCode,
1070
- message?: string,
1071
- data?: boolean
1072
- }> => {
1073
- return HttpRequest.put('/api/project/status', { id:params.id, status:params.status}, null).then((res:any) => {
1074
- return res as any;
1075
- });
1076
- },
1077
-
1078
- /*
1079
- * /api/project/members
1080
- */
1081
- getProjectMembers: (
1082
- params:{
1083
- projectId: string
1084
- }
1085
- ): Promise<{
1086
- code: ResponseCode,
1087
- message?: string,
1088
- data?: {
1089
- id: string,
1090
- projectId: string,
1091
- userId: string,
1092
- role: ProjectRole,
1093
- permission: number,
1094
- createTime: Date,
1095
- updateTime: Date,
1096
- createBy: string,
1097
- updateBy: string,
1098
- nickname: string,
1099
- username: string,
1100
- phone: string,
1101
- email: string,
1102
- title: string,
1103
- }[]
1104
- }> => {
1105
- return HttpRequest.get('/api/project/members', { projectId:params.projectId}, null).then((res:any) => {
1106
- return res as any;
1107
- });
1108
- },
1109
-
1110
- /*
1111
- * 获取用户在项目中的角色.
1112
- * 获取用户在项目中的角色.
1113
- */
1114
- getMemberRole: (
1115
- params:{
1116
- projectId: string,
1117
- userId?: string
1118
- }
1119
- ): Promise<{
1120
- code: ResponseCode,
1121
- message?: string,
1122
- data?: ProjectRole|null
1123
- }> => {
1124
- return HttpRequest.get('/api/project/member/role', { projectId:params.projectId, userId:params.userId}, null).then((res:any) => {
1125
- return res as any;
1126
- });
1127
- },
1128
-
1129
- /*
1130
- * /api/project/members/assign
1131
- */
1132
- assignMember: (
1133
- data: {
1134
- userId: string,
1135
- role?: string,
1136
- projectId: string
1137
- }
1138
- ): Promise<{
1139
- code: ResponseCode,
1140
- message?: string,
1141
- data?: boolean
1142
- }> => {
1143
- return HttpRequest.post('/api/project/members/assign', null, { userId:data.userId, role:data.role, projectId:data.projectId}).then((res:any) => {
1144
- return res as any;
1145
- });
1146
- },
1147
-
1148
- /*
1149
- * /api/project/members/remove
1150
- */
1151
- removeMember: (
1152
- data: {
1153
- userId: string,
1154
- role?: string,
1155
- projectId: string
1156
- }
1157
- ): Promise<{
1158
- code: ResponseCode,
1159
- message?: string,
1160
- data?: boolean
1161
- }> => {
1162
- return HttpRequest.post('/api/project/members/remove', null, { userId:data.userId, role:data.role, projectId:data.projectId}).then((res:any) => {
1163
- return res as any;
1164
- });
1165
- },
1166
-
1167
- }
1168
- /*
1169
- * ProjectProgress
1170
- */
1171
- export const projectprogress = {
1172
- /*
1173
- * 创建项目进展记录 POST /api/project/progress/create
1174
- * 创建项目进展记录 POST /api/project/progress/create
1175
- */
1176
- createProgress: (
1177
- data: {
1178
- projectId: string,
1179
- descs: string,
1180
- commentCount: number,
1181
- progressTime: Date
1182
- }
1183
- ): Promise<{
1184
- code: ResponseCode,
1185
- message?: string,
1186
- data?: string
1187
- }> => {
1188
- return HttpRequest.post('/api/project/progress/create', null, { projectId:data.projectId, descs:data.descs, commentCount:data.commentCount, progressTime:data.progressTime}).then((res:any) => {
1189
- return res as any;
1190
- });
1191
- },
1192
-
1193
- /*
1194
- * 更新项目进展记录 PUT /api/project/progress/update/:id
1195
- * 更新项目进展记录 PUT /api/project/progress/update/:id
1196
- */
1197
- updateProgress: (
1198
- data: {
1199
- id: string,
1200
- descs?: string,
1201
- progressTime?: Date
1202
- }
1203
- ): Promise<{
1204
- code: ResponseCode,
1205
- message?: string
1206
- }> => {
1207
- return HttpRequest.put('/api/project/progress/update', null, { id:data.id, descs:data.descs, progressTime:data.progressTime}).then((res:any) => {
1208
- return res as any;
1209
- });
1210
- },
1211
-
1212
- /*
1213
- * 删除项目进展记录 DELETE /api/project/progress/delete/:id
1214
- * 删除项目进展记录 DELETE /api/project/progress/delete/:id
1215
- */
1216
- deleteProgress: (
1217
- params:{
1218
- id: string
1219
- }
1220
- ): Promise<{
1221
- code: ResponseCode,
1222
- message?: string
1223
- }> => {
1224
- return HttpRequest.delete('/api/project/progress/delete', { id:params.id}, null).then((res:any) => {
1225
- return res as any;
1226
- });
1227
- },
1228
-
1229
- /*
1230
- * 获取项目进展列表 GET /api/project/progress/list/:projectId
1231
- * 获取项目进展列表 GET /api/project/progress/list/:projectId
1232
- */
1233
- getProgressList: (
1234
- params:{
1235
- projectId: string
1236
- }
1237
- ): Promise<{
1238
- code: ResponseCode,
1239
- message?: string,
1240
- data?: {
1241
- total:number;
1242
- list:{
1243
- id: string,
1244
- projectId: string,
1245
- descs: string,
1246
- isDeleted: boolean,
1247
- commentCount: number,
1248
- progressTime: Date,
1249
- createTime: Date,
1250
- updateTime: Date,
1251
- createBy: string,
1252
- updateBy: string
1253
- }[];
1254
- }
1255
- }> => {
1256
- return HttpRequest.get('/api/project/progress/list', { projectId:params.projectId}, null).then((res:any) => {
1257
- return res as any;
1258
- });
1259
- },
1260
-
1261
- /*
1262
- * 添加进展评论 POST /api/project/progress/comment/add
1263
- * 添加进展评论 POST /api/project/progress/comment/add
1264
- */
1265
- addComment: (
1266
- data: {
1267
- progressId: string,
1268
- comment: string
1269
- }
1270
- ): Promise<{
1271
- code: ResponseCode,
1272
- message?: string,
1273
- data?: string
1274
- }> => {
1275
- return HttpRequest.post('/api/project/progress/comment/add', null, { progressId:data.progressId, comment:data.comment}).then((res:any) => {
1276
- return res as any;
1277
- });
1278
- },
1279
-
1280
- /*
1281
- * 删除进展评论 DELETE /api/project/progress/comment/delete/:id
1282
- * 删除进展评论 DELETE /api/project/progress/comment/delete/:id
1283
- */
1284
- deleteComment: (
1285
- params:{
1286
- id: string
1287
- }
1288
- ): Promise<{
1289
- code: ResponseCode,
1290
- message?: string
1291
- }> => {
1292
- return HttpRequest.delete('/api/project/progress/comment/delete', { id:params.id}, null).then((res:any) => {
1293
- return res as any;
1294
- });
1295
- },
1296
-
1297
- /*
1298
- * 更新进展评论 PUT /api/project/progress/comment/update/:id
1299
- * 更新进展评论 PUT /api/project/progress/comment/update/:id
1300
- */
1301
- updateComment: (
1302
- params:{
1303
- id: string
1304
- }
1305
- ): Promise<{
1306
- code: ResponseCode,
1307
- message?: string
1308
- }> => {
1309
- return HttpRequest.put('/api/project/progress/comment/update', { id:params.id}, {}).then((res:any) => {
1310
- return res as any;
1311
- });
1312
- },
1313
-
1314
- /*
1315
- * 获取进展评论列表 GET /api/project/progress/comment/list/:progressId
1316
- * 获取进展评论列表 GET /api/project/progress/comment/list/:progressId
1317
- */
1318
- getCommentList: (
1319
- params:{
1320
- progressId: string,
1321
- pageNum?: number,
1322
- pageSize?: number
1323
- }
1324
- ): Promise<{
1325
- code: ResponseCode,
1326
- message?: string,
1327
- data?: {
1328
- total:number;
1329
- list:{
1330
- id: string,
1331
- progressId: string,
1332
- comment: string,
1333
- createTime: Date,
1334
- updateTime: Date,
1335
- createBy: string,
1336
- updateBy: string
1337
- }[];
1338
- }
1339
- }> => {
1340
- return HttpRequest.get('/api/project/progress/comment/list', { progressId:params.progressId, pageNum:params.pageNum, pageSize:params.pageSize}, null).then((res:any) => {
1341
- return res as any;
1342
- });
1343
- },
1344
-
1345
- }