@yoka-ui/ui 1.0.10-test → 1.1.1

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 (390) hide show
  1. package/@Docs-yoka/exports.generated.md +68 -62
  2. package/LICENSE +21 -0
  3. package/README.md +40 -189
  4. package/dist/es/assets/image/skills.zip +0 -0
  5. package/dist/es/business/AiChat/aichat-logo.svg +1 -0
  6. package/dist/es/business/AiChat/index.d.ts +3 -3
  7. package/dist/es/business/AiChat/index.js +322 -137
  8. package/dist/es/business/AiChat/index.js.map +3 -3
  9. package/dist/es/business/AiChat/index.module.less +24 -0
  10. package/dist/es/business/AiChat/intentRecognizer.js.map +1 -1
  11. package/dist/es/business/AiChat/navigationManager.js +6 -6
  12. package/dist/es/business/AiChat/navigationManager.js.map +2 -2
  13. package/dist/es/business/AiChat/sse.d.ts +15 -0
  14. package/dist/es/business/AiChat/sse.js +118 -7
  15. package/dist/es/business/AiChat/sse.js.map +2 -2
  16. package/dist/es/business/AiChat/type.d.ts +22 -23
  17. package/dist/es/business/AiChat/useAiChat.js +105 -75
  18. package/dist/es/business/AiChat/useAiChat.js.map +3 -3
  19. package/dist/es/business/AiChat/useTaskWorkflow.d.ts +1 -2
  20. package/dist/es/business/AiChat/useTaskWorkflow.js +2 -36
  21. package/dist/es/business/AiChat/useTaskWorkflow.js.map +2 -2
  22. package/dist/es/business/DrawerPageInfo/index.js.map +1 -1
  23. package/dist/es/business/Editor/index.d.ts +1 -1
  24. package/dist/es/business/Editor/index.js.map +2 -2
  25. package/dist/es/business/Empty/index.js +1 -1
  26. package/dist/es/business/Empty/index.js.map +1 -1
  27. package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js +2 -2
  28. package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js.map +2 -2
  29. package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js +3 -3
  30. package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js.map +2 -2
  31. package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js +2 -2
  32. package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js.map +2 -2
  33. package/dist/es/business/ModCommonFilter/index.d.ts +1 -1
  34. package/dist/es/business/ModCommonFilter/index.js.map +2 -2
  35. package/dist/es/business/YkCharts/Area.d.ts +18 -0
  36. package/dist/es/business/YkCharts/Area.js +336 -0
  37. package/dist/es/business/YkCharts/Area.js.map +7 -0
  38. package/dist/es/business/YkCharts/Bar.d.ts +21 -0
  39. package/dist/es/business/YkCharts/Bar.js +316 -0
  40. package/dist/es/business/YkCharts/Bar.js.map +7 -0
  41. package/dist/es/business/YkCharts/BarProperty.d.ts +21 -0
  42. package/dist/es/business/YkCharts/BarProperty.js +357 -0
  43. package/dist/es/business/YkCharts/BarProperty.js.map +7 -0
  44. package/dist/es/business/YkCharts/BarTotal.d.ts +21 -0
  45. package/dist/es/business/YkCharts/BarTotal.js +292 -0
  46. package/dist/es/business/YkCharts/BarTotal.js.map +7 -0
  47. package/dist/es/business/YkCharts/Line.d.ts +21 -0
  48. package/dist/es/business/YkCharts/Line.js +342 -0
  49. package/dist/es/business/YkCharts/Line.js.map +7 -0
  50. package/dist/es/business/YkCharts/Pie.d.ts +19 -0
  51. package/dist/es/business/YkCharts/Pie.js +107 -0
  52. package/dist/es/business/YkCharts/Pie.js.map +7 -0
  53. package/dist/es/business/YkCharts/PieProperty.d.ts +18 -0
  54. package/dist/es/business/YkCharts/PieProperty.js +180 -0
  55. package/dist/es/business/YkCharts/PieProperty.js.map +7 -0
  56. package/dist/es/business/YkCharts/Pies.d.ts +26 -0
  57. package/dist/es/business/YkCharts/Pies.js +352 -0
  58. package/dist/es/business/YkCharts/Pies.js.map +7 -0
  59. package/dist/es/business/YkCharts/constants.d.ts +1 -0
  60. package/dist/es/business/YkCharts/constants.js +47 -0
  61. package/dist/es/business/YkCharts/constants.js.map +7 -0
  62. package/dist/es/business/YkCharts/hooks.d.ts +4 -0
  63. package/dist/es/business/YkCharts/hooks.js +37 -0
  64. package/dist/es/business/YkCharts/hooks.js.map +7 -0
  65. package/dist/es/business/YkCharts/index.d.ts +9 -0
  66. package/dist/es/business/YkCharts/index.js +20 -0
  67. package/dist/es/business/YkCharts/index.js.map +7 -0
  68. package/dist/es/business/YkCharts/index.module.less +164 -0
  69. package/dist/es/business/YkCharts/tooltip.less +92 -0
  70. package/dist/es/business/YkCharts/transformData.js +16 -0
  71. package/dist/es/business/YkCharts/transformData.js.map +7 -0
  72. package/dist/es/business/YkCharts/typing.d.ts +74 -0
  73. package/dist/es/business/YkCharts/typing.js +1 -0
  74. package/dist/es/business/YkCharts/typing.js.map +7 -0
  75. package/dist/es/business/YkCharts/utils.d.ts +4 -0
  76. package/dist/es/business/YkCharts/utils.js +109 -0
  77. package/dist/es/business/YkCharts/utils.js.map +7 -0
  78. package/dist/es/business/YkCharts/variables.less +13 -0
  79. package/dist/es/business/YkLoginModule/SmsLoginForm.d.ts +25 -0
  80. package/dist/es/business/YkLoginModule/SmsLoginForm.js +178 -0
  81. package/dist/es/business/YkLoginModule/SmsLoginForm.js.map +7 -0
  82. package/dist/es/business/YkLoginModule/index.d.ts +48 -0
  83. package/dist/es/business/YkLoginModule/index.js +198 -0
  84. package/dist/es/business/YkLoginModule/index.js.map +7 -0
  85. package/dist/es/business/YkLoginModule/styles.module.less +169 -0
  86. package/dist/es/business/YkPorjectSelect/index.d.ts +1 -1
  87. package/dist/es/business/YkPorjectSelect/index.js +2 -2
  88. package/dist/es/business/YkPorjectSelect/index.js.map +2 -2
  89. package/dist/es/business/YkSqlEdit/code-mirror-custom.module.less +154 -0
  90. package/dist/es/business/YkSqlEdit/index.d.ts +20 -0
  91. package/dist/es/business/YkSqlEdit/index.js +180 -0
  92. package/dist/es/business/YkSqlEdit/index.js.map +7 -0
  93. package/dist/es/business/YkSqlEdit/sql-language.d.ts +11 -0
  94. package/dist/es/business/YkSqlEdit/sql-language.js +1460 -0
  95. package/dist/es/business/YkSqlEdit/sql-language.js.map +7 -0
  96. package/dist/es/components/DebounceInput/index.js.map +2 -2
  97. package/dist/es/components/MultipleSelect/index.d.ts +14 -0
  98. package/dist/es/components/MultipleSelect/index.js +1 -1
  99. package/dist/es/components/MultipleSelect/index.js.map +2 -2
  100. package/dist/es/components/RefreshButton/index.js.map +2 -2
  101. package/dist/es/components/SearchWithHistory/index.js +1 -1
  102. package/dist/es/components/SearchWithHistory/index.js.map +2 -2
  103. package/dist/es/components/TextWithToolTip/index.d.ts +1 -1
  104. package/dist/es/components/TextWithToolTip/index.js.map +2 -2
  105. package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +1 -24
  106. package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js +2 -2
  107. package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js.map +2 -2
  108. package/dist/es/components/TreeTransfer/index.d.ts +1 -24
  109. package/dist/es/components/TreeTransfer/index.js +8 -8
  110. package/dist/es/components/TreeTransfer/index.js.map +2 -2
  111. package/dist/es/components/TreeTransfer/utils/index.d.ts +1 -1
  112. package/dist/es/components/TreeTransfer/utils/index.js.map +2 -2
  113. package/dist/es/components/YKMarkdown/index.d.ts +11 -0
  114. package/dist/es/components/YKMarkdown/index.js +236 -0
  115. package/dist/es/components/YKMarkdown/index.js.map +7 -0
  116. package/dist/es/components/YKMarkdown/index.module.less +83 -0
  117. package/dist/es/components/YkDateRangePicker/YkDateRangePicker.mdx +194 -0
  118. package/dist/es/components/YkDateRangePicker/index.d.ts +9 -1
  119. package/dist/es/components/YkDateRangePicker/index.js +127 -61
  120. package/dist/es/components/YkDateRangePicker/index.js.map +2 -2
  121. package/dist/es/components/YkDateRangePicker/index.module.less +33 -9
  122. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +1 -1
  123. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +3 -2
  124. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +2 -2
  125. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +1 -1
  126. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +23 -3
  127. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +2 -2
  128. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +1 -1
  129. package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +2 -2
  130. package/dist/es/components/YkRangeDateWithVS/index.d.ts +2 -2
  131. package/dist/es/components/YkRangeDateWithVS/index.js.map +2 -2
  132. package/dist/es/components/YkRangeDateWithVS/index.module.less +22 -4
  133. package/dist/es/components/YkRangeTimeWithRecent/index.d.ts +1 -1
  134. package/dist/es/components/YkRangeTimeWithRecent/index.js.map +2 -2
  135. package/dist/es/creative/ArcCheckbox/index.d.ts +12 -0
  136. package/dist/es/creative/ArcCheckbox/index.js +49 -0
  137. package/dist/es/creative/ArcCheckbox/index.js.map +7 -0
  138. package/dist/es/creative/ArcCheckbox/index.module.less +102 -0
  139. package/dist/es/creative/ButtonRadioWithInfo/index.js.map +1 -1
  140. package/dist/es/creative/ButtonWithProgress/index.d.ts +1 -1
  141. package/dist/es/creative/ButtonWithProgress/index.js.map +2 -2
  142. package/dist/es/creative/GlassSegmentedRadio/index.d.ts +24 -0
  143. package/dist/es/creative/GlassSegmentedRadio/index.js +75 -0
  144. package/dist/es/creative/GlassSegmentedRadio/index.js.map +7 -0
  145. package/dist/es/creative/GlassSegmentedRadio/index.module.less +241 -0
  146. package/dist/es/creative/SkillsWriter/index.d.ts +3 -0
  147. package/dist/es/creative/SkillsWriter/index.js +191 -0
  148. package/dist/es/creative/SkillsWriter/index.js.map +7 -0
  149. package/dist/es/creative/SkillsWriter/index.module.less +21 -0
  150. package/dist/es/index.d.ts +32 -24
  151. package/dist/es/index.js +90 -80
  152. package/dist/es/index.js.map +2 -2
  153. package/dist/es/index.less +45 -0
  154. package/dist/es/layout/FlexGrid/index.d.ts +1 -1
  155. package/dist/es/layout/FlexGrid/index.js.map +2 -2
  156. package/dist/es/layout/YkContainer/index.js.map +1 -1
  157. package/dist/es/layout/YkDrawer/index.d.ts +1 -1
  158. package/dist/es/layout/YkDrawer/index.js.map +2 -2
  159. package/dist/es/ui/LabelSelect/demo.js +1 -1
  160. package/dist/es/ui/LabelSelect/demo.js.map +2 -2
  161. package/dist/es/ui/LabelSelect/index.d.ts +1 -1
  162. package/dist/es/ui/LabelSelect/index.js +1 -1
  163. package/dist/es/ui/LabelSelect/index.js.map +2 -2
  164. package/dist/es/ui/LogicOperator/index.d.ts +1 -1
  165. package/dist/es/ui/LogicOperator/index.js.map +2 -2
  166. package/dist/es/ui/YkButton/index.d.ts +1 -1
  167. package/dist/es/ui/YkButton/index.js.map +2 -2
  168. package/dist/es/ui/YkCard/index.d.ts +1 -1
  169. package/dist/es/ui/YkCard/index.js +1 -1
  170. package/dist/es/ui/YkCard/index.js.map +2 -2
  171. package/dist/es/ui/YkCheckbox/index.d.ts +1 -1
  172. package/dist/es/ui/YkCheckbox/index.js.map +2 -2
  173. package/dist/es/ui/YkDescriptions/index.d.ts +1 -1
  174. package/dist/es/ui/YkDescriptions/index.js.map +2 -2
  175. package/dist/es/ui/YkPagination/index.d.ts +1 -1
  176. package/dist/es/ui/YkPagination/index.js.map +2 -2
  177. package/dist/es/ui/YkRadio/index.d.ts +1 -1
  178. package/dist/es/ui/YkRadio/index.js.map +2 -2
  179. package/dist/es/ui/YkSegmented/index.d.ts +1 -1
  180. package/dist/es/ui/YkSegmented/index.js.map +2 -2
  181. package/dist/es/ui/YkSelect/index.d.ts +1 -1
  182. package/dist/es/ui/YkSelect/index.js.map +2 -2
  183. package/dist/es/ui/YkSpin/index.d.ts +1 -1
  184. package/dist/es/ui/YkSpin/index.js.map +2 -2
  185. package/dist/es/ui/YkStatistic/index.d.ts +1 -1
  186. package/dist/es/ui/YkStatistic/index.js.map +2 -2
  187. package/dist/es/ui/YkSwitch/index.d.ts +1 -1
  188. package/dist/es/ui/YkSwitch/index.js.map +2 -2
  189. package/dist/es/ui/YkTabs/index.d.ts +1 -1
  190. package/dist/es/ui/YkTabs/index.js.map +2 -2
  191. package/dist/es/ui/YkTooltip/index.d.ts +1 -1
  192. package/dist/es/ui/YkTooltip/index.js.map +2 -2
  193. package/dist/es/utils/styleUtils.js.map +2 -2
  194. package/dist/es/utils/ykStorybookDoc.d.ts +15 -0
  195. package/dist/es/utils/ykStorybookDoc.js +24 -2
  196. package/dist/es/utils/ykStorybookDoc.js.map +2 -2
  197. package/dist/lib/assets/image/skills.zip +0 -0
  198. package/dist/lib/business/AiChat/aichat-logo.svg +1 -0
  199. package/dist/lib/business/AiChat/index.d.ts +3 -3
  200. package/dist/lib/business/AiChat/index.js +311 -129
  201. package/dist/lib/business/AiChat/index.js.map +3 -3
  202. package/dist/lib/business/AiChat/index.module.less +24 -0
  203. package/dist/lib/business/AiChat/intentRecognizer.js.map +1 -1
  204. package/dist/lib/business/AiChat/navigationManager.js +6 -6
  205. package/dist/lib/business/AiChat/navigationManager.js.map +2 -2
  206. package/dist/lib/business/AiChat/sse.d.ts +15 -0
  207. package/dist/lib/business/AiChat/sse.js +117 -7
  208. package/dist/lib/business/AiChat/sse.js.map +2 -2
  209. package/dist/lib/business/AiChat/type.d.ts +22 -23
  210. package/dist/lib/business/AiChat/type.js.map +1 -1
  211. package/dist/lib/business/AiChat/useAiChat.js +104 -74
  212. package/dist/lib/business/AiChat/useAiChat.js.map +3 -3
  213. package/dist/lib/business/AiChat/useTaskWorkflow.d.ts +1 -2
  214. package/dist/lib/business/AiChat/useTaskWorkflow.js +0 -34
  215. package/dist/lib/business/AiChat/useTaskWorkflow.js.map +2 -2
  216. package/dist/lib/business/DrawerPageInfo/index.js.map +1 -1
  217. package/dist/lib/business/Editor/index.d.ts +1 -1
  218. package/dist/lib/business/Editor/index.js.map +2 -2
  219. package/dist/lib/business/Empty/index.js +1 -1
  220. package/dist/lib/business/Empty/index.js.map +1 -1
  221. package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js +3 -3
  222. package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js.map +2 -2
  223. package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js +4 -4
  224. package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js.map +2 -2
  225. package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js +3 -3
  226. package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js.map +2 -2
  227. package/dist/lib/business/ModCommonFilter/index.d.ts +1 -1
  228. package/dist/lib/business/ModCommonFilter/index.js.map +2 -2
  229. package/dist/lib/business/YkCharts/Area.d.ts +18 -0
  230. package/dist/lib/business/YkCharts/Area.js +346 -0
  231. package/dist/lib/business/YkCharts/Area.js.map +7 -0
  232. package/dist/lib/business/YkCharts/Bar.d.ts +21 -0
  233. package/dist/lib/business/YkCharts/Bar.js +323 -0
  234. package/dist/lib/business/YkCharts/Bar.js.map +7 -0
  235. package/dist/lib/business/YkCharts/BarProperty.d.ts +21 -0
  236. package/dist/lib/business/YkCharts/BarProperty.js +370 -0
  237. package/dist/lib/business/YkCharts/BarProperty.js.map +7 -0
  238. package/dist/lib/business/YkCharts/BarTotal.d.ts +21 -0
  239. package/dist/lib/business/YkCharts/BarTotal.js +298 -0
  240. package/dist/lib/business/YkCharts/BarTotal.js.map +7 -0
  241. package/dist/lib/business/YkCharts/Line.d.ts +21 -0
  242. package/dist/lib/business/YkCharts/Line.js +349 -0
  243. package/dist/lib/business/YkCharts/Line.js.map +7 -0
  244. package/dist/lib/business/YkCharts/Pie.d.ts +19 -0
  245. package/dist/lib/business/YkCharts/Pie.js +117 -0
  246. package/dist/lib/business/YkCharts/Pie.js.map +7 -0
  247. package/dist/lib/business/YkCharts/PieProperty.d.ts +18 -0
  248. package/dist/lib/business/YkCharts/PieProperty.js +193 -0
  249. package/dist/lib/business/YkCharts/PieProperty.js.map +7 -0
  250. package/dist/lib/business/YkCharts/Pies.d.ts +26 -0
  251. package/dist/lib/business/YkCharts/Pies.js +341 -0
  252. package/dist/lib/business/YkCharts/Pies.js.map +7 -0
  253. package/dist/lib/business/YkCharts/constants.d.ts +1 -0
  254. package/dist/lib/business/YkCharts/constants.js +71 -0
  255. package/dist/lib/business/YkCharts/constants.js.map +7 -0
  256. package/dist/lib/business/YkCharts/hooks.d.ts +4 -0
  257. package/dist/lib/business/YkCharts/hooks.js +62 -0
  258. package/dist/lib/business/YkCharts/hooks.js.map +7 -0
  259. package/dist/lib/business/YkCharts/index.d.ts +9 -0
  260. package/dist/lib/business/YkCharts/index.js +61 -0
  261. package/dist/lib/business/YkCharts/index.js.map +7 -0
  262. package/dist/lib/business/YkCharts/index.module.less +164 -0
  263. package/dist/lib/business/YkCharts/tooltip.less +92 -0
  264. package/dist/lib/business/YkCharts/transformData.js +40 -0
  265. package/dist/lib/business/YkCharts/transformData.js.map +7 -0
  266. package/dist/lib/business/YkCharts/typing.d.ts +74 -0
  267. package/dist/lib/business/YkCharts/typing.js +18 -0
  268. package/dist/lib/business/YkCharts/typing.js.map +7 -0
  269. package/dist/lib/business/YkCharts/utils.d.ts +4 -0
  270. package/dist/lib/business/YkCharts/utils.js +143 -0
  271. package/dist/lib/business/YkCharts/utils.js.map +7 -0
  272. package/dist/lib/business/YkCharts/variables.less +13 -0
  273. package/dist/lib/business/YkLoginModule/SmsLoginForm.d.ts +25 -0
  274. package/dist/lib/business/YkLoginModule/SmsLoginForm.js +171 -0
  275. package/dist/lib/business/YkLoginModule/SmsLoginForm.js.map +7 -0
  276. package/dist/lib/business/YkLoginModule/index.d.ts +48 -0
  277. package/dist/lib/business/YkLoginModule/index.js +206 -0
  278. package/dist/lib/business/YkLoginModule/index.js.map +7 -0
  279. package/dist/lib/business/YkLoginModule/styles.module.less +169 -0
  280. package/dist/lib/business/YkPorjectSelect/index.d.ts +1 -1
  281. package/dist/lib/business/YkPorjectSelect/index.js +3 -3
  282. package/dist/lib/business/YkPorjectSelect/index.js.map +2 -2
  283. package/dist/lib/business/YkSqlEdit/code-mirror-custom.module.less +154 -0
  284. package/dist/lib/business/YkSqlEdit/index.d.ts +20 -0
  285. package/dist/lib/business/YkSqlEdit/index.js +202 -0
  286. package/dist/lib/business/YkSqlEdit/index.js.map +7 -0
  287. package/dist/lib/business/YkSqlEdit/sql-language.d.ts +11 -0
  288. package/dist/lib/business/YkSqlEdit/sql-language.js +1493 -0
  289. package/dist/lib/business/YkSqlEdit/sql-language.js.map +7 -0
  290. package/dist/lib/components/DebounceInput/index.js.map +2 -2
  291. package/dist/lib/components/MultipleSelect/index.d.ts +14 -0
  292. package/dist/lib/components/MultipleSelect/index.js +1 -1
  293. package/dist/lib/components/MultipleSelect/index.js.map +2 -2
  294. package/dist/lib/components/RefreshButton/index.js.map +2 -2
  295. package/dist/lib/components/SearchWithHistory/index.js +1 -1
  296. package/dist/lib/components/SearchWithHistory/index.js.map +2 -2
  297. package/dist/lib/components/TextWithToolTip/index.d.ts +1 -1
  298. package/dist/lib/components/TextWithToolTip/index.js.map +2 -2
  299. package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +1 -24
  300. package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js +2 -2
  301. package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js.map +2 -2
  302. package/dist/lib/components/TreeTransfer/index.d.ts +1 -24
  303. package/dist/lib/components/TreeTransfer/index.js +3 -3
  304. package/dist/lib/components/TreeTransfer/index.js.map +2 -2
  305. package/dist/lib/components/TreeTransfer/utils/index.d.ts +1 -1
  306. package/dist/lib/components/TreeTransfer/utils/index.js.map +2 -2
  307. package/dist/lib/components/YKMarkdown/index.d.ts +11 -0
  308. package/dist/lib/components/YKMarkdown/index.js +188 -0
  309. package/dist/lib/components/YKMarkdown/index.js.map +7 -0
  310. package/dist/lib/components/YKMarkdown/index.module.less +83 -0
  311. package/dist/lib/components/YkDateRangePicker/YkDateRangePicker.mdx +194 -0
  312. package/dist/lib/components/YkDateRangePicker/index.d.ts +9 -1
  313. package/dist/lib/components/YkDateRangePicker/index.js +127 -61
  314. package/dist/lib/components/YkDateRangePicker/index.js.map +2 -2
  315. package/dist/lib/components/YkDateRangePicker/index.module.less +33 -9
  316. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +1 -1
  317. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +3 -2
  318. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +2 -2
  319. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +1 -1
  320. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +22 -2
  321. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +2 -2
  322. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +1 -1
  323. package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +2 -2
  324. package/dist/lib/components/YkRangeDateWithVS/index.d.ts +2 -2
  325. package/dist/lib/components/YkRangeDateWithVS/index.js.map +2 -2
  326. package/dist/lib/components/YkRangeDateWithVS/index.module.less +22 -4
  327. package/dist/lib/components/YkRangeTimeWithRecent/index.d.ts +1 -1
  328. package/dist/lib/components/YkRangeTimeWithRecent/index.js.map +2 -2
  329. package/dist/lib/creative/ArcCheckbox/index.d.ts +12 -0
  330. package/dist/lib/creative/ArcCheckbox/index.js +50 -0
  331. package/dist/lib/creative/ArcCheckbox/index.js.map +7 -0
  332. package/dist/lib/creative/ArcCheckbox/index.module.less +102 -0
  333. package/dist/lib/creative/ButtonRadioWithInfo/index.js.map +1 -1
  334. package/dist/lib/creative/ButtonWithProgress/index.d.ts +1 -1
  335. package/dist/lib/creative/ButtonWithProgress/index.js.map +2 -2
  336. package/dist/lib/creative/GlassSegmentedRadio/index.d.ts +24 -0
  337. package/dist/lib/creative/GlassSegmentedRadio/index.js +78 -0
  338. package/dist/lib/creative/GlassSegmentedRadio/index.js.map +7 -0
  339. package/dist/lib/creative/GlassSegmentedRadio/index.module.less +241 -0
  340. package/dist/lib/creative/SkillsWriter/index.d.ts +3 -0
  341. package/dist/lib/creative/SkillsWriter/index.js +200 -0
  342. package/dist/lib/creative/SkillsWriter/index.js.map +7 -0
  343. package/dist/lib/creative/SkillsWriter/index.module.less +21 -0
  344. package/dist/lib/index.d.ts +32 -24
  345. package/dist/lib/index.js +39 -24
  346. package/dist/lib/index.js.map +2 -2
  347. package/dist/lib/index.less +45 -0
  348. package/dist/lib/layout/FlexGrid/index.d.ts +1 -1
  349. package/dist/lib/layout/FlexGrid/index.js.map +2 -2
  350. package/dist/lib/layout/YkContainer/index.js.map +1 -1
  351. package/dist/lib/layout/YkDrawer/index.d.ts +1 -1
  352. package/dist/lib/layout/YkDrawer/index.js.map +2 -2
  353. package/dist/lib/ui/LabelSelect/demo.js +1 -1
  354. package/dist/lib/ui/LabelSelect/demo.js.map +2 -2
  355. package/dist/lib/ui/LabelSelect/index.d.ts +1 -1
  356. package/dist/lib/ui/LabelSelect/index.js +1 -1
  357. package/dist/lib/ui/LabelSelect/index.js.map +2 -2
  358. package/dist/lib/ui/LogicOperator/index.d.ts +1 -1
  359. package/dist/lib/ui/LogicOperator/index.js.map +2 -2
  360. package/dist/lib/ui/YkButton/index.d.ts +1 -1
  361. package/dist/lib/ui/YkButton/index.js.map +2 -2
  362. package/dist/lib/ui/YkCard/index.d.ts +1 -1
  363. package/dist/lib/ui/YkCard/index.js.map +2 -2
  364. package/dist/lib/ui/YkCheckbox/index.d.ts +1 -1
  365. package/dist/lib/ui/YkCheckbox/index.js.map +2 -2
  366. package/dist/lib/ui/YkDescriptions/index.d.ts +1 -1
  367. package/dist/lib/ui/YkDescriptions/index.js.map +2 -2
  368. package/dist/lib/ui/YkPagination/index.d.ts +1 -1
  369. package/dist/lib/ui/YkPagination/index.js.map +2 -2
  370. package/dist/lib/ui/YkRadio/index.d.ts +1 -1
  371. package/dist/lib/ui/YkRadio/index.js.map +2 -2
  372. package/dist/lib/ui/YkSegmented/index.d.ts +1 -1
  373. package/dist/lib/ui/YkSegmented/index.js.map +2 -2
  374. package/dist/lib/ui/YkSelect/index.d.ts +1 -1
  375. package/dist/lib/ui/YkSelect/index.js.map +2 -2
  376. package/dist/lib/ui/YkSpin/index.d.ts +1 -1
  377. package/dist/lib/ui/YkSpin/index.js.map +2 -2
  378. package/dist/lib/ui/YkStatistic/index.d.ts +1 -1
  379. package/dist/lib/ui/YkStatistic/index.js.map +2 -2
  380. package/dist/lib/ui/YkSwitch/index.d.ts +1 -1
  381. package/dist/lib/ui/YkSwitch/index.js.map +2 -2
  382. package/dist/lib/ui/YkTabs/index.d.ts +1 -1
  383. package/dist/lib/ui/YkTabs/index.js.map +2 -2
  384. package/dist/lib/ui/YkTooltip/index.d.ts +1 -1
  385. package/dist/lib/ui/YkTooltip/index.js.map +2 -2
  386. package/dist/lib/utils/styleUtils.js.map +2 -2
  387. package/dist/lib/utils/ykStorybookDoc.d.ts +15 -0
  388. package/dist/lib/utils/ykStorybookDoc.js +23 -1
  389. package/dist/lib/utils/ykStorybookDoc.js.map +2 -2
  390. package/package.json +151 -144
@@ -1,4 +1,6 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
2
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
4
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
14
16
  }
15
17
  return a;
16
18
  };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
17
20
  var __async = (__this, __arguments, generator) => {
18
21
  return new Promise((resolve, reject) => {
19
22
  var fulfilled = (value) => {
@@ -37,41 +40,49 @@ var __async = (__this, __arguments, generator) => {
37
40
 
38
41
  // src/business/AiChat/index.tsx
39
42
  import {
40
- ClearOutlined,
43
+ CloseOutlined,
44
+ CompressOutlined,
41
45
  CopyOutlined,
42
46
  DeleteOutlined,
43
- ExportOutlined,
47
+ ExpandOutlined,
48
+ FileImageOutlined,
44
49
  MenuOutlined,
45
50
  MessageOutlined,
51
+ PaperClipOutlined,
46
52
  PlusOutlined,
47
53
  ReloadOutlined,
48
54
  SendOutlined,
49
- StopOutlined,
50
- SwitcherOutlined
55
+ StopOutlined
51
56
  } from "@ant-design/icons";
52
- import { Button, Input, List, message, Popconfirm, Space, Tooltip, Typography } from "antd";
57
+ import { Button, Input, List, message, Popconfirm, Space, Tooltip, Typography, Upload } from "antd";
53
58
  import React, { useCallback, useEffect, useRef, useState } from "react";
59
+ import AiChatLogo from "./aichat-logo.svg";
60
+ import styles from "./index.module.less";
61
+ import { generateSuggestions, isTaskCreationIntent, recognizeIntent } from "./intentRecognizer";
54
62
  import MarkdownRender from "./MarkdownRender";
55
63
  import { useAiChat } from "./useAiChat";
56
64
  import { useTaskWorkflow } from "./useTaskWorkflow";
57
- import { recognizeIntent, generateSuggestions, isTaskCreationIntent } from "./intentRecognizer";
65
+ import { generateSuggestions as generateSuggestions2, isTaskCreationIntent as isTaskCreationIntent2, parseTaskDescription, recognizeIntent as recognizeIntent2 } from "./intentRecognizer";
66
+ import { delay, NavigationManager } from "./navigationManager";
58
67
  import { useAiChat as useAiChat2 } from "./useAiChat";
59
68
  import { useTaskWorkflow as useTaskWorkflow2 } from "./useTaskWorkflow";
60
- import { recognizeIntent as recognizeIntent2, generateSuggestions as generateSuggestions2, isTaskCreationIntent as isTaskCreationIntent2, parseTaskDescription } from "./intentRecognizer";
61
- import { NavigationManager, delay } from "./navigationManager";
62
69
  var { TextArea } = Input;
63
70
  var { Title } = Typography;
64
71
  var AiChat = ({
65
72
  apiPath = "/api/ai/chat-stream",
66
73
  storageKey = "ai_chat_sessions",
67
- position = { bottom: 24, right: 24 },
74
+ position: initialPosition = { bottom: 24, right: 24 },
68
75
  buttonSize = 56,
69
76
  zIndex = 1080,
70
77
  showSessionPanel = true,
71
- showExport = true,
72
78
  onBeforeSend,
73
79
  onError,
74
80
  onSuccess,
81
+ onFetchSessions,
82
+ onFetchSessionDetail,
83
+ onCreateSession,
84
+ onSendMessage,
85
+ onUploadFile,
75
86
  className,
76
87
  style,
77
88
  renderTrigger,
@@ -93,22 +104,21 @@ var AiChat = ({
93
104
  sendQuestion,
94
105
  regenerateAnswer,
95
106
  deleteSingleMsg,
96
- clearCurrentSession,
97
- exportCurrentSession,
98
107
  cancelRequest,
99
108
  toggleVisible
100
- } = useAiChat({ apiPath, storageKey, onBeforeSend, onError, onSuccess });
101
- const {
102
- tasks,
103
- createTask,
104
- updateTaskStatus,
105
- deleteTask,
106
- exportTasks,
107
- createTaskFromNaturalLanguage,
108
- updateUrlWithTaskId,
109
- refreshCurrentPage,
110
- executeTaskCreationWorkflow
111
- } = useTaskWorkflow({
109
+ } = useAiChat({
110
+ apiPath,
111
+ storageKey,
112
+ onBeforeSend,
113
+ onError,
114
+ onSuccess,
115
+ onFetchSessions,
116
+ onFetchSessionDetail,
117
+ onCreateSession,
118
+ onSendMessage,
119
+ onUploadFile
120
+ });
121
+ const { updateUrlWithTaskId, executeTaskCreationWorkflow } = useTaskWorkflow({
112
122
  enabled: taskWorkflow == null ? void 0 : taskWorkflow.enabled,
113
123
  createTaskApi: taskWorkflow == null ? void 0 : taskWorkflow.createTaskApi,
114
124
  supportedTaskTypes: taskWorkflow == null ? void 0 : taskWorkflow.supportedTaskTypes,
@@ -116,14 +126,8 @@ var AiChat = ({
116
126
  refreshDelay: navConfig == null ? void 0 : navConfig.refreshDelay,
117
127
  taskIdParamName: taskWorkflow == null ? void 0 : taskWorkflow.taskIdParamName,
118
128
  taskTypeParamName: taskWorkflow == null ? void 0 : taskWorkflow.taskTypeParamName,
119
- onTaskCreated: (taskId, taskData) => {
129
+ onTaskCreated: (taskId) => {
120
130
  if (activeSession) {
121
- const systemMsg = {
122
- id: `${Date.now()}_sys`,
123
- role: "system",
124
- content: `任务创建成功,ID: ${taskId}`,
125
- taskId
126
- };
127
131
  }
128
132
  },
129
133
  onError
@@ -131,11 +135,62 @@ var AiChat = ({
131
135
  const [inputValue, setInputValue] = useState("");
132
136
  const [showSessions, setShowSessions] = useState(false);
133
137
  const [suggestions, setSuggestions] = useState([]);
138
+ const [fileList, setFileList] = useState([]);
139
+ const [isMaximized, setIsMaximized] = useState(false);
140
+ const [dialogPosition, setDialogPosition] = useState({ x: 0, y: 0 });
141
+ const [isDragging, setIsDragging] = useState(false);
142
+ const dragOffset = useRef({ x: 0, y: 0 });
134
143
  const messagesEndRef = useRef(null);
144
+ const triggerRef = useRef(null);
135
145
  useEffect(() => {
136
146
  var _a;
137
147
  (_a = messagesEndRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
138
148
  }, [activeSession == null ? void 0 : activeSession.messages]);
149
+ const handleTriggerMouseDown = useCallback(
150
+ (e) => {
151
+ if (visible)
152
+ return;
153
+ const target = e.target;
154
+ if (target.closest(".ant-upload, .ant-btn"))
155
+ return;
156
+ e.preventDefault();
157
+ const triggerEl = triggerRef.current;
158
+ if (!triggerEl)
159
+ return;
160
+ const rect = triggerEl.getBoundingClientRect();
161
+ dragOffset.current = {
162
+ x: e.clientX - rect.left,
163
+ y: e.clientY - rect.top
164
+ };
165
+ setIsDragging(true);
166
+ },
167
+ [visible]
168
+ );
169
+ const handleTriggerMouseMove = useCallback(
170
+ (e) => {
171
+ if (!isDragging || visible)
172
+ return;
173
+ setDialogPosition({
174
+ x: e.clientX - dragOffset.current.x,
175
+ y: e.clientY - dragOffset.current.y
176
+ });
177
+ },
178
+ [isDragging, visible]
179
+ );
180
+ const handleTriggerMouseUp = useCallback(() => {
181
+ setIsDragging(false);
182
+ }, []);
183
+ useEffect(() => {
184
+ if (isDragging && !visible) {
185
+ document.addEventListener("mousemove", handleTriggerMouseMove);
186
+ document.addEventListener("mouseup", handleTriggerMouseUp);
187
+ return () => {
188
+ document.removeEventListener("mousemove", handleTriggerMouseMove);
189
+ document.removeEventListener("mouseup", handleTriggerMouseUp);
190
+ };
191
+ }
192
+ return void 0;
193
+ }, [isDragging, visible, handleTriggerMouseMove, handleTriggerMouseUp]);
139
194
  const handleInputChange = useCallback((e) => {
140
195
  const value = e.target.value;
141
196
  setInputValue(value);
@@ -147,25 +202,70 @@ var AiChat = ({
147
202
  setSuggestions([]);
148
203
  }
149
204
  }, []);
205
+ const handleFileChange = useCallback(
206
+ (info) => __async(void 0, null, function* () {
207
+ const uploadFile = info.file;
208
+ if (!uploadFile || !uploadFile.originFileObj) {
209
+ setFileList(info.fileList);
210
+ return;
211
+ }
212
+ const file = uploadFile.originFileObj;
213
+ const isImage = file.type.startsWith("image/");
214
+ const fileType = isImage ? "image" : "document";
215
+ try {
216
+ if (onUploadFile && activeSession) {
217
+ const result = yield onUploadFile({
218
+ sessionId: activeSession.id,
219
+ file,
220
+ type: fileType
221
+ });
222
+ const uploadedFile = {
223
+ uid: file.name,
224
+ name: result.name || file.name,
225
+ status: "done",
226
+ url: result.url
227
+ };
228
+ setFileList([...fileList, uploadedFile]);
229
+ message.success(`${fileType === "image" ? "图片" : "文件"}上传成功`);
230
+ } else {
231
+ setFileList([...fileList, uploadFile]);
232
+ }
233
+ } catch (err) {
234
+ console.error("文件上传失败:", err);
235
+ message.error("文件上传失败");
236
+ setFileList(fileList.filter((f) => f.uid !== file.name));
237
+ }
238
+ }),
239
+ [fileList, activeSession, onUploadFile]
240
+ );
150
241
  const handleSend = useCallback(() => __async(void 0, null, function* () {
151
- if (!inputValue.trim()) {
152
- message.warning("请输入问题");
242
+ if (!inputValue.trim() && fileList.length === 0) {
243
+ message.warning("请输入问题或上传文件");
153
244
  return;
154
245
  }
155
- const content = inputValue.trim();
246
+ let content = inputValue.trim();
247
+ if (fileList.length > 0) {
248
+ const fileInfo = fileList.map((f) => f.name).join(", ");
249
+ content += `
250
+ [附件: ${fileInfo}]`;
251
+ }
156
252
  setInputValue("");
157
253
  setSuggestions([]);
254
+ setFileList([]);
158
255
  const intentEnabled = (intentConfig == null ? void 0 : intentConfig.enabled) !== false;
159
256
  if (intentEnabled && isTaskCreationIntent(content)) {
160
257
  yield executeTaskCreationWorkflow(content);
161
258
  return;
162
259
  }
163
260
  sendQuestion(content);
164
- }), [inputValue, intentConfig == null ? void 0 : intentConfig.enabled, executeTaskCreationWorkflow, sendQuestion]);
261
+ }), [inputValue, fileList, intentConfig == null ? void 0 : intentConfig.enabled, executeTaskCreationWorkflow, sendQuestion]);
165
262
  const copyMsg = (c) => {
166
263
  navigator.clipboard.writeText(c);
167
264
  message.success("复制成功");
168
265
  };
266
+ const toggleMaximize = useCallback(() => {
267
+ setIsMaximized((prev) => !prev);
268
+ }, []);
169
269
  const renderMsg = (item) => /* @__PURE__ */ React.createElement(
170
270
  List.Item,
171
271
  {
@@ -200,16 +300,29 @@ var AiChat = ({
200
300
  flexShrink: 0
201
301
  }
202
302
  }
203
- )) : item.role === "system" ? /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", gap: 8, fontSize: 13 } }, /* @__PURE__ */ React.createElement("span", { style: { color: "#52c41a" } }, "✓"), /* @__PURE__ */ React.createElement("span", null, item.content), item.taskId && /* @__PURE__ */ React.createElement(
204
- Button,
303
+ )) : item.role === "system" ? /* @__PURE__ */ React.createElement(
304
+ "div",
205
305
  {
206
- type: "link",
207
- size: "small",
208
- style: { padding: 0, fontSize: 12 },
209
- onClick: () => updateUrlWithTaskId(item.taskId)
306
+ style: {
307
+ display: "flex",
308
+ alignItems: "center",
309
+ gap: 8,
310
+ fontSize: 13
311
+ }
210
312
  },
211
- "查看任务"
212
- )) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { style: { minHeight: 20 } }, /* @__PURE__ */ React.createElement(MarkdownRender, { content: item.content, msgId: item.id, isAi: true, onDelete: deleteSingleMsg })), item.loading && /* @__PURE__ */ React.createElement("span", { style: { color: "#1677ff", fontSize: 12 } }, " 思考中..."), !item.loading && /* @__PURE__ */ React.createElement(Space, { size: 8, style: { fontSize: 12, marginTop: 6, display: "flex" } }, /* @__PURE__ */ React.createElement(Tooltip, { title: "复制" }, /* @__PURE__ */ React.createElement(CopyOutlined, { onClick: () => copyMsg(item.content), style: { cursor: "pointer", color: "#999" } })), /* @__PURE__ */ React.createElement(Tooltip, { title: "重新生成" }, /* @__PURE__ */ React.createElement(ReloadOutlined, { onClick: () => regenerateAnswer(item), style: { cursor: "pointer", color: "#999" } }))))
313
+ /* @__PURE__ */ React.createElement("span", { style: { color: "#52c41a" } }, "✓"),
314
+ /* @__PURE__ */ React.createElement("span", null, item.content),
315
+ item.taskId && /* @__PURE__ */ React.createElement(
316
+ Button,
317
+ {
318
+ type: "link",
319
+ size: "small",
320
+ style: { padding: 0, fontSize: 12 },
321
+ onClick: () => updateUrlWithTaskId(item.taskId)
322
+ },
323
+ "查看任务"
324
+ )
325
+ ) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { style: { minHeight: 20 } }, /* @__PURE__ */ React.createElement(MarkdownRender, { content: item.content, msgId: item.id, isAi: true, onDelete: deleteSingleMsg })), item.loading && /* @__PURE__ */ React.createElement("span", { style: { color: "#1677ff", fontSize: 12 } }, " 思考中..."), !item.loading && /* @__PURE__ */ React.createElement(Space, { size: 8, style: { fontSize: 12, marginTop: 6, display: "flex" } }, /* @__PURE__ */ React.createElement(Tooltip, { title: "复制" }, /* @__PURE__ */ React.createElement(CopyOutlined, { onClick: () => copyMsg(item.content), style: { cursor: "pointer", color: "#999" } })), /* @__PURE__ */ React.createElement(Tooltip, { title: "重新生成" }, /* @__PURE__ */ React.createElement(ReloadOutlined, { onClick: () => regenerateAnswer(item), style: { cursor: "pointer", color: "#999" } }))))
213
326
  )
214
327
  );
215
328
  const renderSession = (s) => /* @__PURE__ */ React.createElement(
@@ -221,14 +334,14 @@ var AiChat = ({
221
334
  return;
222
335
  }
223
336
  switchSession(s.id);
224
- setShowSessions(false);
225
337
  },
226
338
  style: {
227
339
  padding: "10px 12px",
228
340
  borderRadius: 8,
229
341
  cursor: "pointer",
230
342
  backgroundColor: (activeSession == null ? void 0 : activeSession.id) === s.id ? "#e6f7ff" : "#fff",
231
- transition: "all 0.2s"
343
+ transition: "all 0.2s",
344
+ marginBottom: 8
232
345
  }
233
346
  },
234
347
  /* @__PURE__ */ React.createElement(
@@ -273,66 +386,113 @@ var AiChat = ({
273
386
  )
274
387
  )
275
388
  );
389
+ const getDialogStyle = () => {
390
+ if (isMaximized) {
391
+ return {
392
+ position: "fixed",
393
+ top: 0,
394
+ left: 0,
395
+ width: "100vw",
396
+ height: "100vh",
397
+ borderRadius: 0
398
+ };
399
+ }
400
+ const baseStyle = {
401
+ position: "relative",
402
+ width: showSessions ? 960 : 720,
403
+ height: 680,
404
+ borderRadius: 12
405
+ };
406
+ if (dialogPosition.x !== 0 || dialogPosition.y !== 0) {
407
+ return __spreadProps(__spreadValues({}, baseStyle), {
408
+ transform: `translate(${dialogPosition.x}px, ${dialogPosition.y}px)`
409
+ });
410
+ }
411
+ return baseStyle;
412
+ };
276
413
  return /* @__PURE__ */ React.createElement(
277
414
  "div",
278
415
  {
279
416
  className,
280
417
  style: __spreadValues({
281
418
  position: "fixed",
282
- bottom: position.bottom,
283
- right: position.right,
419
+ bottom: initialPosition.bottom,
420
+ right: initialPosition.right,
284
421
  zIndex,
285
422
  display: "flex",
286
423
  flexDirection: "column",
287
- alignItems: "flex-end"
424
+ alignItems: "flex-end",
425
+ transform: dialogPosition.x !== 0 || dialogPosition.y !== 0 ? `translate(${dialogPosition.x}px, ${dialogPosition.y}px)` : void 0
288
426
  }, style)
289
427
  },
290
- !visible ? renderTrigger ? /* @__PURE__ */ React.createElement("div", { onClick: () => toggleVisible(true), style: { cursor: "pointer" } }, renderTrigger) : /* @__PURE__ */ React.createElement(
291
- Button,
428
+ !visible ? renderTrigger ? /* @__PURE__ */ React.createElement(
429
+ "div",
292
430
  {
293
- type: "primary",
294
- shape: "circle",
295
- size: "large",
296
- icon: /* @__PURE__ */ React.createElement(MessageOutlined, null),
297
- onClick: () => toggleVisible(true),
298
- style: {
299
- width: buttonSize,
300
- height: buttonSize,
301
- boxShadow: "0 4px 16px rgba(22, 119, 255, 0.4)"
302
- }
303
- }
431
+ ref: triggerRef,
432
+ onMouseDown: handleTriggerMouseDown,
433
+ onClick: () => !isDragging && toggleVisible(true),
434
+ style: { cursor: isDragging ? "grabbing" : "grab" }
435
+ },
436
+ renderTrigger
304
437
  ) : /* @__PURE__ */ React.createElement(
305
438
  "div",
306
439
  {
307
- style: {
308
- width: showSessions ? 960 : 720,
309
- height: 680,
440
+ ref: triggerRef,
441
+ onMouseDown: handleTriggerMouseDown,
442
+ onClick: () => !isDragging && toggleVisible(true),
443
+ style: { cursor: isDragging ? "grabbing" : "grab" }
444
+ },
445
+ /* @__PURE__ */ React.createElement("div", { className: styles["ai-chat-btn"] }, /* @__PURE__ */ React.createElement("img", { src: AiChatLogo, width: 28, height: 28 }))
446
+ ) : /* @__PURE__ */ React.createElement(
447
+ "div",
448
+ {
449
+ style: __spreadProps(__spreadValues({}, getDialogStyle()), {
310
450
  background: "#fff",
311
- borderRadius: 12,
312
451
  boxShadow: "0 4px 20px rgba(0,0,0,0.15)",
313
452
  overflow: "hidden",
314
453
  display: "flex",
315
454
  flexDirection: "row",
316
- marginBottom: 12,
317
- transition: "width 0.2s ease",
318
- position: "relative"
319
- }
455
+ marginBottom: isMaximized ? 0 : 12,
456
+ transition: "all 0.3s ease"
457
+ })
320
458
  },
321
- /* @__PURE__ */ React.createElement(
322
- Button,
459
+ showSessionPanel && showSessions && /* @__PURE__ */ React.createElement(
460
+ "div",
323
461
  {
324
- type: "text",
325
- icon: /* @__PURE__ */ React.createElement(SwitcherOutlined, null),
326
- onClick: () => toggleVisible(false),
327
462
  style: {
328
- position: "absolute",
329
- top: -5,
330
- right: -5,
331
- zIndex: zIndex + 1,
332
- fontSize: 14,
333
- color: "#999"
463
+ width: 280,
464
+ borderRight: "1px solid #f0f0f0",
465
+ background: "#fafafa",
466
+ display: "flex",
467
+ flexDirection: "column",
468
+ flexShrink: 0
334
469
  }
335
- }
470
+ },
471
+ /* @__PURE__ */ React.createElement(
472
+ "div",
473
+ {
474
+ style: {
475
+ padding: "12px 16px",
476
+ borderBottom: "1px solid #f0f0f0",
477
+ display: "flex",
478
+ justifyContent: "space-between",
479
+ alignItems: "center"
480
+ }
481
+ },
482
+ /* @__PURE__ */ React.createElement(Title, { level: 5, style: { margin: 0, fontSize: 16 } }, "历史会话"),
483
+ /* @__PURE__ */ React.createElement(Button, { type: "text", size: "small", icon: /* @__PURE__ */ React.createElement(CloseOutlined, null), onClick: () => setShowSessions(false) })
484
+ ),
485
+ /* @__PURE__ */ React.createElement("div", { style: { flex: 1, padding: 16, overflowY: "auto" } }, /* @__PURE__ */ React.createElement(
486
+ Button,
487
+ {
488
+ type: "primary",
489
+ block: true,
490
+ icon: /* @__PURE__ */ React.createElement(PlusOutlined, null),
491
+ onClick: createNewSession,
492
+ style: { marginBottom: 12 }
493
+ },
494
+ "新建会话"
495
+ ), /* @__PURE__ */ React.createElement(List, { dataSource: sessions, renderItem: renderSession, locale: { emptyText: "暂无会话" } }))
336
496
  ),
337
497
  /* @__PURE__ */ React.createElement(
338
498
  "div",
@@ -347,6 +507,7 @@ var AiChat = ({
347
507
  renderHeader || /* @__PURE__ */ React.createElement(
348
508
  "div",
349
509
  {
510
+ className: "ai-chat-header",
350
511
  style: {
351
512
  padding: "12px 16px",
352
513
  background: "#fafafa",
@@ -357,16 +518,25 @@ var AiChat = ({
357
518
  flexShrink: 0
358
519
  }
359
520
  },
360
- /* @__PURE__ */ React.createElement(Space, null, /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(PlusOutlined, null), onClick: createNewSession, style: { fontWeight: 500 } }, "新会话"), /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(ClearOutlined, null), onClick: clearCurrentSession }, "清空")),
361
- /* @__PURE__ */ React.createElement(Space, null, showExport && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(ExportOutlined, null), onClick: exportCurrentSession }, "导出"), (taskWorkflow == null ? void 0 : taskWorkflow.enabled) && /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(ExportOutlined, null), onClick: () => exportTasks("json") }, "导出任务")), showSessionPanel && /* @__PURE__ */ React.createElement(
521
+ /* @__PURE__ */ React.createElement(Space, null, showSessionPanel && /* @__PURE__ */ React.createElement(
362
522
  Button,
363
523
  {
364
524
  type: showSessions ? "primary" : "text",
365
525
  icon: /* @__PURE__ */ React.createElement(MenuOutlined, null),
526
+ size: "small",
366
527
  onClick: () => setShowSessions(!showSessions)
367
528
  },
368
- showSessions ? "收起会话" : "会话"
369
- ))
529
+ showSessions ? "收起" : "会话"
530
+ ), /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(PlusOutlined, null), onClick: createNewSession, size: "small" }, "新会话")),
531
+ /* @__PURE__ */ React.createElement(Space, null, /* @__PURE__ */ React.createElement(Tooltip, { title: isMaximized ? "还原" : "最大化" }, /* @__PURE__ */ React.createElement(
532
+ Button,
533
+ {
534
+ type: "text",
535
+ icon: isMaximized ? /* @__PURE__ */ React.createElement(CompressOutlined, null) : /* @__PURE__ */ React.createElement(ExpandOutlined, null),
536
+ onClick: toggleMaximize,
537
+ size: "small"
538
+ }
539
+ )), /* @__PURE__ */ React.createElement(Tooltip, { title: "关闭" }, /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(CloseOutlined, null), onClick: () => toggleVisible(false), size: "small" })))
370
540
  ),
371
541
  /* @__PURE__ */ React.createElement(
372
542
  "div",
@@ -387,7 +557,7 @@ var AiChat = ({
387
557
  }
388
558
  },
389
559
  /* @__PURE__ */ React.createElement(MessageOutlined, { style: { fontSize: 48, color: "#d9d9d9" } }),
390
- /* @__PURE__ */ React.createElement("div", { style: { marginTop: 16 } }, "开始你的 AI 对话"),
560
+ /* @__PURE__ */ React.createElement("div", { style: { marginTop: 16, fontSize: 16 } }, "开始你的 AI 对话"),
391
561
  /* @__PURE__ */ React.createElement("div", { style: { marginTop: 8, fontSize: 13, color: "#bfbfbf" } }, "我可以帮你解答问题、创建任务"),
392
562
  /* @__PURE__ */ React.createElement(Button, { type: "primary", onClick: createNewSession, style: { marginTop: 20 } }, "新建会话")
393
563
  ) : /* @__PURE__ */ React.createElement(List, { dataSource: activeSession.messages, renderItem: renderMsg }),
@@ -425,7 +595,33 @@ var AiChat = ({
425
595
  suggestion
426
596
  ))
427
597
  ),
428
- /* @__PURE__ */ React.createElement(
598
+ fileList.length > 0 && /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 8 } }, fileList.map((file) => /* @__PURE__ */ React.createElement(
599
+ "div",
600
+ {
601
+ key: file.uid,
602
+ style: {
603
+ display: "inline-block",
604
+ padding: "4px 8px",
605
+ background: "#e6f7ff",
606
+ borderRadius: 4,
607
+ marginRight: 8,
608
+ fontSize: 12
609
+ }
610
+ },
611
+ file.name,
612
+ /* @__PURE__ */ React.createElement(
613
+ CloseOutlined,
614
+ {
615
+ style: {
616
+ marginLeft: 8,
617
+ cursor: "pointer",
618
+ fontSize: 10
619
+ },
620
+ onClick: () => setFileList(fileList.filter((f) => f.uid !== file.uid))
621
+ }
622
+ )
623
+ ))),
624
+ /* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(
429
625
  TextArea,
430
626
  {
431
627
  value: inputValue,
@@ -438,69 +634,58 @@ var AiChat = ({
438
634
  handleSend();
439
635
  }
440
636
  },
441
- style: { marginBottom: 8, borderRadius: 8 },
637
+ style: {
638
+ marginBottom: 8,
639
+ borderRadius: 8,
640
+ paddingRight: 80
641
+ },
442
642
  disabled: loading
443
643
  }
444
- ),
445
- /* @__PURE__ */ React.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React.createElement(Space, null, loading && /* @__PURE__ */ React.createElement(Button, { danger: true, icon: /* @__PURE__ */ React.createElement(StopOutlined, null), onClick: cancelRequest, size: "small" }, "取消"), /* @__PURE__ */ React.createElement(
446
- Button,
447
- {
448
- type: "primary",
449
- icon: /* @__PURE__ */ React.createElement(SendOutlined, null),
450
- onClick: handleSend,
451
- loading,
452
- disabled: !inputValue.trim(),
453
- size: "small"
454
- },
455
- "发送"
456
- )))
457
- ),
458
- showSessionPanel && showSessions && /* @__PURE__ */ React.createElement(
459
- "div",
460
- {
461
- style: {
462
- width: 240,
463
- borderLeft: "1px solid #f0f0f0",
464
- padding: 16,
465
- background: "#fafafa",
466
- overflowY: "auto",
467
- flexShrink: 0
468
- }
469
- },
470
- /* @__PURE__ */ React.createElement(
644
+ ), /* @__PURE__ */ React.createElement(
471
645
  "div",
472
646
  {
473
647
  style: {
648
+ position: "absolute",
649
+ right: 12,
650
+ bottom: 16,
474
651
  display: "flex",
475
- justifyContent: "space-between",
476
- alignItems: "center",
477
- marginBottom: 16
652
+ gap: 8
478
653
  }
479
654
  },
480
- /* @__PURE__ */ React.createElement(Title, { level: 5, style: { margin: 0 } }, "我的会话"),
481
655
  /* @__PURE__ */ React.createElement(
482
- Button,
656
+ Upload,
483
657
  {
484
- type: "link",
485
- size: "small",
486
- onClick: () => {
487
- setShowSessions(false);
488
- },
489
- style: { padding: 0 }
658
+ fileList,
659
+ onChange: handleFileChange,
660
+ beforeUpload: () => false,
661
+ showUploadList: false,
662
+ accept: "image/*"
490
663
  },
491
- "收起"
664
+ /* @__PURE__ */ React.createElement(Tooltip, { title: "上传图片" }, /* @__PURE__ */ React.createElement(Button, { type: "text", size: "small", icon: /* @__PURE__ */ React.createElement(FileImageOutlined, null) }))
665
+ ),
666
+ /* @__PURE__ */ React.createElement(
667
+ Upload,
668
+ {
669
+ fileList,
670
+ onChange: handleFileChange,
671
+ beforeUpload: () => false,
672
+ showUploadList: false
673
+ },
674
+ /* @__PURE__ */ React.createElement(Tooltip, { title: "上传文件" }, /* @__PURE__ */ React.createElement(Button, { type: "text", size: "small", icon: /* @__PURE__ */ React.createElement(PaperClipOutlined, null) }))
492
675
  )
493
- ),
494
- /* @__PURE__ */ React.createElement(
495
- List,
676
+ )),
677
+ /* @__PURE__ */ React.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React.createElement(Space, null, loading && /* @__PURE__ */ React.createElement(Button, { danger: true, icon: /* @__PURE__ */ React.createElement(StopOutlined, null), onClick: cancelRequest, size: "small" }, "终止"), /* @__PURE__ */ React.createElement(
678
+ Button,
496
679
  {
497
- dataSource: sessions,
498
- renderItem: renderSession,
499
- locale: { emptyText: "暂无会话" },
500
- style: { marginBottom: 16 }
501
- }
502
- ),
503
- /* @__PURE__ */ React.createElement(Button, { type: "primary", block: true, icon: /* @__PURE__ */ React.createElement(PlusOutlined, null), onClick: createNewSession }, "新建会话")
680
+ type: "primary",
681
+ icon: /* @__PURE__ */ React.createElement(SendOutlined, null),
682
+ onClick: handleSend,
683
+ loading,
684
+ disabled: !inputValue.trim() && fileList.length === 0,
685
+ size: "small"
686
+ },
687
+ "发送"
688
+ )))
504
689
  )
505
690
  )
506
691
  )