@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,399 +0,0 @@
1
- /* eslint-disable react-refresh/only-export-components */
2
- /**
3
- * UIAlert - 全局警告/提示对话框组件
4
- *
5
- * 使用示例:
6
- *
7
- * 1. 直接调用 API(推荐):
8
- * import uiAlert from './UIAlert';
9
- *
10
- * // 简单提示
11
- * const close = uiAlert.success('操作成功');
12
- * const close = uiAlert.error('操作失败');
13
- * const close = uiAlert.warning('警告信息');
14
- * const close = uiAlert.info('提示信息');
15
- *
16
- * // 手动关闭
17
- * close();
18
- * // 或使用全局关闭
19
- * uiAlert.close();
20
- *
21
- * // 完整配置
22
- * uiAlert.success({
23
- * title: '成功',
24
- * content: '数据保存成功!',
25
- * okText: '确定',
26
- * okType: 'primary',
27
- * onOk: () => console.log('用户点击了确定'),
28
- * autoClose: 3000, // 3秒后自动关闭(毫秒)
29
- * showIcon: true
30
- * });
31
- *
32
- * // 确认对话框
33
- * uiAlert.confirm({
34
- * title: '确认',
35
- * content: '确定要删除吗?',
36
- * onOk: () => console.log('用户点击了确定'),
37
- * onCancel: () => console.log('用户点击了取消')
38
- * });
39
- *
40
- * // 自定义按钮
41
- * uiAlert.custom({
42
- * title: '选择操作',
43
- * content: '请选择您的操作',
44
- * buttons: [
45
- * { text: '删除', type: 'danger', onClick: () => console.log('删除') },
46
- * { text: '修改', type: 'primary', onClick: () => console.log('修改') },
47
- * { text: '取消', onClick: () => console.log('取消') }
48
- * ]
49
- * });
50
- *
51
- * 特点:
52
- * - 支持多种类型:success, error, warning, info, confirm
53
- * - 支持自定义按钮
54
- * - 支持自动关闭
55
- * - 返回关闭方法,可以手动调用
56
- */
57
-
58
- import React from 'react';
59
- import { Modal, Button, Space, Typography } from 'antd';
60
- import { CheckCircleFilled, CloseCircleFilled, ExclamationCircleFilled, InfoCircleFilled, QuestionCircleFilled } from '@ant-design/icons';
61
- import { createRoot, Root } from 'react-dom/client';
62
- import type { ButtonProps } from 'antd/es/button';
63
-
64
- const { Text, Title } = Typography;
65
-
66
- // Alert类型定义
67
- export type UIAlertType = 'success' | 'error' | 'warning' | 'info' | 'confirm';
68
-
69
- // Alert按钮定义
70
- export interface UIAlertButton {
71
- text: string;
72
- type?: ButtonProps['type'];
73
- onClick?: () => void;
74
- }
75
-
76
- // Alert选项接口
77
- export interface UIAlertOptions {
78
- type?: UIAlertType;
79
- title?: React.ReactNode;
80
- content?: React.ReactNode;
81
- width?: number | string;
82
- centered?: boolean;
83
- closable?: boolean;
84
- maskClosable?: boolean;
85
- okText?: string;
86
- okType?: ButtonProps['type'];
87
- cancelText?: string;
88
- buttons?: UIAlertButton[];
89
- onOk?: () => void | Promise<void>;
90
- onCancel?: () => void;
91
- afterClose?: () => void;
92
- className?: string;
93
- autoClose?: number; // 自动关闭时间(毫秒),0表示不自动关闭
94
- showIcon?: boolean;
95
- }
96
-
97
- // 默认选项
98
- const defaultOptions: UIAlertOptions = {
99
- type: 'info',
100
- title: '提示',
101
- content: '',
102
- width: 420,
103
- centered: true,
104
- closable: true,
105
- maskClosable: true,
106
- okText: '确定',
107
- okType: 'primary',
108
- cancelText: '取消',
109
- autoClose: 0,
110
- showIcon: false,
111
- };
112
-
113
- // 单例管理
114
- let alertInstance: HTMLDivElement | null = null;
115
- let rootInstance: Root | null = null;
116
- let autoCloseTimer: number | null = null;
117
-
118
- // Alert组件
119
- const AlertComponent: React.FC<UIAlertOptions & { open: boolean; onClose: () => void }> = (props) => {
120
- const {
121
- type = 'info',
122
- title,
123
- content,
124
- width,
125
- centered,
126
- closable,
127
- maskClosable,
128
- okText,
129
- okType,
130
- cancelText,
131
- buttons,
132
- onOk,
133
- onCancel,
134
- open,
135
- onClose,
136
- className,
137
- showIcon
138
- } = props;
139
-
140
- // 图标映射
141
- const iconMap = {
142
- success: <CheckCircleFilled style={{ color: '#52c41a', fontSize: 24, marginRight: 8 }} />,
143
- error: <CloseCircleFilled style={{ color: '#ff4d4f', fontSize: 24, marginRight: 8 }} />,
144
- warning: <ExclamationCircleFilled style={{ color: '#faad14', fontSize: 24, marginRight: 8 }} />,
145
- info: <InfoCircleFilled style={{ color: '#1677ff', fontSize: 24, marginRight: 8 }} />,
146
- confirm: <QuestionCircleFilled style={{ color: '#1677ff', fontSize: 24, marginRight: 8 }} />
147
- };
148
-
149
- // 处理确定按钮点击
150
- const handleOk = async () => {
151
- if (onOk) {
152
- await onOk();
153
- }
154
- onClose();
155
- };
156
-
157
- // 处理取消按钮点击
158
- const handleCancel = () => {
159
- if (onCancel) {
160
- onCancel();
161
- }
162
- onClose();
163
- };
164
-
165
- // 渲染自定义按钮
166
- const renderFooter = () => {
167
- if (buttons && buttons.length > 0) {
168
- return (
169
- <Space style={{ display: 'flex', justifyContent: 'flex-end' }}>
170
- {buttons.map((btn, index) => (
171
- <Button
172
- key={index}
173
- type={btn.type || 'default'}
174
- onClick={() => {
175
- if (btn.onClick) {
176
- btn.onClick();
177
- }
178
- onClose();
179
- }}
180
- >
181
- {btn.text}
182
- </Button>
183
- ))}
184
- </Space>
185
- );
186
- }
187
-
188
- // 不同类型的默认按钮
189
- if (type === 'confirm') {
190
- return (
191
- <Space style={{ display: 'flex', justifyContent: 'flex-end' }}>
192
- <Button onClick={handleCancel}>{cancelText}</Button>
193
- <Button type={okType} onClick={handleOk}>{okText}</Button>
194
- </Space>
195
- );
196
- }
197
-
198
- return (
199
- <Button type={okType} onClick={handleOk}>{okText}</Button>
200
- );
201
- };
202
-
203
- // 渲染标题
204
- const renderTitle = () => {
205
- if (!title) return null;
206
-
207
- return (
208
- <div style={{ display: 'flex', alignItems: 'center' }}>
209
- {showIcon && iconMap[type]}
210
- <Title level={4} style={{ margin: 0 }}>{title}</Title>
211
- </div>
212
- );
213
- };
214
-
215
- return (
216
- <Modal
217
- title={renderTitle()}
218
- open={open}
219
- width={width}
220
- centered={centered}
221
- closable={closable}
222
- maskClosable={maskClosable}
223
- onCancel={handleCancel}
224
- footer={renderFooter()}
225
- className={className ? className + ' ant-modal-nofull' : 'ant-modal-nofull'}
226
- >
227
- <div style={{ marginLeft: showIcon ? 32 : 0 }}>
228
- {typeof content === 'string' ? <Text>{content}</Text> : content}
229
- </div>
230
- </Modal>
231
- );
232
- };
233
-
234
- // 创建Alert实例
235
- const createAlertInstance = (options: UIAlertOptions, open: boolean = true) => {
236
- // 清除自动关闭计时器
237
- if (autoCloseTimer) {
238
- window.clearTimeout(autoCloseTimer);
239
- autoCloseTimer = null;
240
- }
241
-
242
- // 合并选项
243
- const mergedOptions = { ...defaultOptions, ...options };
244
-
245
- // 关闭Alert的方法
246
- const closeAlert = () => {
247
- if (alertInstance && rootInstance) {
248
- rootInstance.render(
249
- <AlertComponent
250
- {...mergedOptions}
251
- open={false}
252
- onClose={() => {
253
- if (mergedOptions.afterClose) {
254
- mergedOptions.afterClose();
255
- }
256
-
257
- if (alertInstance && rootInstance) {
258
- setTimeout(() => {
259
- rootInstance?.unmount();
260
- document.body.removeChild(alertInstance!);
261
- alertInstance = null;
262
- rootInstance = null;
263
- }, 300); // 等待动画结束
264
- }
265
- }}
266
- />
267
- );
268
- }
269
- };
270
-
271
- // 如果已存在实例,则更新内容
272
- if (alertInstance && rootInstance) {
273
- rootInstance.render(
274
- <AlertComponent
275
- {...mergedOptions}
276
- open={open}
277
- onClose={closeAlert}
278
- />
279
- );
280
- } else {
281
- // 创建新实例
282
- alertInstance = document.createElement('div');
283
- document.body.appendChild(alertInstance);
284
- rootInstance = createRoot(alertInstance);
285
- rootInstance.render(
286
- <AlertComponent
287
- {...mergedOptions}
288
- open={open}
289
- onClose={closeAlert}
290
- />
291
- );
292
- }
293
-
294
- // 如果设置了自动关闭
295
- if (mergedOptions.autoClose && mergedOptions.autoClose > 0) {
296
- autoCloseTimer = window.setTimeout(() => {
297
- closeAlert();
298
- autoCloseTimer = null;
299
- }, mergedOptions.autoClose);
300
- }
301
-
302
- // 返回关闭方法
303
- return closeAlert;
304
- };
305
-
306
- // 全局Alert API
307
- const uiAlert = {
308
- // 成功提示
309
- success: (options: string | UIAlertOptions) => {
310
- const config = typeof options === 'string'
311
- ? { content: options }
312
- : options;
313
-
314
- return createAlertInstance({
315
- ...config,
316
- type: 'success',
317
- title: config.title || '成功',
318
- });
319
- },
320
-
321
- // 错误提示
322
- error: (options: string | UIAlertOptions) => {
323
- const config = typeof options === 'string'
324
- ? { content: options }
325
- : options;
326
-
327
- return createAlertInstance({
328
- ...config,
329
- type: 'error',
330
- title: config.title || '错误',
331
- });
332
- },
333
-
334
- // 警告提示
335
- warning: (options: string | UIAlertOptions) => {
336
- const config = typeof options === 'string'
337
- ? { content: options }
338
- : options;
339
-
340
- return createAlertInstance({
341
- ...config,
342
- type: 'warning',
343
- title: config.title || '警告',
344
- });
345
- },
346
-
347
- // 信息提示
348
- info: (options: string | UIAlertOptions) => {
349
- const config = typeof options === 'string'
350
- ? { content: options }
351
- : options;
352
-
353
- return createAlertInstance({
354
- ...config,
355
- type: 'info',
356
- title: config.title || '提示',
357
- });
358
- },
359
-
360
- // 确认提示
361
- confirm: (options: string | UIAlertOptions) => {
362
- const config = typeof options === 'string'
363
- ? { content: options }
364
- : options;
365
-
366
- return createAlertInstance({
367
- ...config,
368
- type: 'confirm',
369
- title: config.title || '确认',
370
- });
371
- },
372
-
373
- // 自定义提示
374
- custom: (options: UIAlertOptions) => {
375
- return createAlertInstance(options);
376
- },
377
-
378
- // 关闭当前显示的Alert
379
- close: () => {
380
- if (alertInstance && rootInstance) {
381
- rootInstance.render(
382
- <AlertComponent
383
- {...defaultOptions}
384
- open={false}
385
- onClose={() => {
386
- if (alertInstance && rootInstance) {
387
- rootInstance.unmount();
388
- document.body.removeChild(alertInstance);
389
- alertInstance = null;
390
- rootInstance = null;
391
- }
392
- }}
393
- />
394
- );
395
- }
396
- },
397
- };
398
-
399
- export default uiAlert;
@@ -1,129 +0,0 @@
1
- import React from 'react';
2
- import { Button, Space, Card, Divider } from 'antd';
3
- import uiAlert from './UIAlert';
4
-
5
- const AlertExample: React.FC = () => {
6
- // 成功提示
7
- const showSuccessAlert = () => {
8
- uiAlert.success('操作已成功完成');
9
- };
10
-
11
- // 错误提示
12
- const showErrorAlert = () => {
13
- uiAlert.error({
14
- title: '操作失败',
15
- content: '服务器连接超时,请稍后再试',
16
- okText: '我知道了'
17
- });
18
- };
19
-
20
- // 警告提示
21
- const showWarningAlert = () => {
22
- uiAlert.warning({
23
- content: '此操作将删除所选项目,是否继续?',
24
- onOk: () => console.log('用户确认删除')
25
- });
26
- };
27
-
28
- // 信息提示
29
- const showInfoAlert = () => {
30
- uiAlert.info('系统将于今晚22:00进行维护,届时服务将暂停使用');
31
- };
32
-
33
- // 确认对话框
34
- const showConfirmAlert = () => {
35
- uiAlert.confirm({
36
- title: '确认操作',
37
- content: '您确定要提交这些更改吗?提交后将不可撤销',
38
- onOk: () => console.log('用户确认提交'),
39
- onCancel: () => console.log('用户取消提交')
40
- });
41
- };
42
-
43
- // 自定义按钮提示
44
- const showCustomButtonsAlert = () => {
45
- uiAlert.custom({
46
- type: 'info',
47
- title: '选择操作',
48
- content: '请选择要执行的操作:',
49
- buttons: [
50
- { text: '保存', type: 'primary', onClick: () => console.log('保存操作') },
51
- { text: '保存并发布', type: 'default', onClick: () => console.log('保存并发布') },
52
- { text: '取消', type: 'dashed', onClick: () => console.log('取消操作') }
53
- ],
54
- closable: true
55
- });
56
- };
57
-
58
- // 自动关闭提示
59
- const showAutoCloseAlert = () => {
60
- uiAlert.success({
61
- title: '上传成功',
62
- content: '文件已成功上传到服务器',
63
- autoClose: 3000, // 3秒后自动关闭
64
- onOk: () => console.log('用户点击了确定')
65
- });
66
- };
67
-
68
- // 复杂内容示例
69
- const showComplexContentAlert = () => {
70
- uiAlert.custom({
71
- type: 'info',
72
- title: '用户信息',
73
- content: (
74
- <div>
75
- <p>以下是您的账户信息摘要:</p>
76
- <ul style={{ marginBottom: 0 }}>
77
- <li>用户名:admin</li>
78
- <li>注册时间:2023-05-01</li>
79
- <li>上次登录:2023-06-15</li>
80
- <li>账户状态:<span style={{ color: '#52c41a' }}>正常</span></li>
81
- </ul>
82
- </div>
83
- ),
84
- width: 500
85
- });
86
- };
87
-
88
- return (
89
- <Card title="Alert 提示示例" style={{ width: '100%', maxWidth: 600, margin: '20px auto' }}>
90
- <Space direction="vertical" style={{ width: '100%' }}>
91
- <Button type="primary" block onClick={showSuccessAlert}>
92
- 显示成功提示
93
- </Button>
94
-
95
- <Button danger block onClick={showErrorAlert}>
96
- 显示错误提示
97
- </Button>
98
-
99
- <Button type="default" block onClick={showWarningAlert}>
100
- 显示警告提示
101
- </Button>
102
-
103
- <Button type="dashed" block onClick={showInfoAlert}>
104
- 显示信息提示
105
- </Button>
106
-
107
- <Divider>高级用法</Divider>
108
-
109
- <Button type="primary" ghost block onClick={showConfirmAlert}>
110
- 显示确认对话框
111
- </Button>
112
-
113
- <Button block onClick={showCustomButtonsAlert}>
114
- 显示自定义按钮提示
115
- </Button>
116
-
117
- <Button type="default" block onClick={showAutoCloseAlert}>
118
- 显示自动关闭提示(3秒)
119
- </Button>
120
-
121
- <Button type="dashed" block onClick={showComplexContentAlert}>
122
- 显示复杂内容提示
123
- </Button>
124
- </Space>
125
- </Card>
126
- );
127
- };
128
-
129
- export default AlertExample;