systemrobotassistant 3.0.8

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.

Potentially problematic release.


This version of systemrobotassistant might be problematic. Click here for more details.

Files changed (369) hide show
  1. package/.eslintignore +6 -0
  2. package/.eslintrc +45 -0
  3. package/.gitlab-ci.yml +52 -0
  4. package/.lecprc.ts +76 -0
  5. package/.yarnrc +1 -0
  6. package/CHANGELOG.md +114 -0
  7. package/README.md +14 -0
  8. package/custom-amd-plugin.ts +46 -0
  9. package/es/component/answer-itme/index.d.ts +20 -0
  10. package/es/component/answer-itme/index.d.ts.map +1 -0
  11. package/es/component/answer-itme/index.js +41 -0
  12. package/es/component/answer-itme/style.css +35 -0
  13. package/es/component/data-container/index.d.ts +19 -0
  14. package/es/component/data-container/index.d.ts.map +1 -0
  15. package/es/component/data-container/index.js +37 -0
  16. package/es/component/data-container/style.css +26 -0
  17. package/es/component/days-tab/index.d.ts +6 -0
  18. package/es/component/days-tab/index.d.ts.map +1 -0
  19. package/es/component/days-tab/index.js +119 -0
  20. package/es/component/days-tab/style.css +43 -0
  21. package/es/component/days-tab/utils.d.ts +32 -0
  22. package/es/component/days-tab/utils.d.ts.map +1 -0
  23. package/es/component/days-tab/utils.js +98 -0
  24. package/es/component/error-boundary/index.d.ts +2 -0
  25. package/es/component/error-boundary/index.d.ts.map +1 -0
  26. package/es/component/error-boundary/index.js +33 -0
  27. package/es/component/it-notice-modal/columns.d.ts +11 -0
  28. package/es/component/it-notice-modal/columns.d.ts.map +1 -0
  29. package/es/component/it-notice-modal/columns.js +108 -0
  30. package/es/component/it-notice-modal/double-tab.d.ts +6 -0
  31. package/es/component/it-notice-modal/double-tab.d.ts.map +1 -0
  32. package/es/component/it-notice-modal/double-tab.js +94 -0
  33. package/es/component/it-notice-modal/index.d.ts +6 -0
  34. package/es/component/it-notice-modal/index.d.ts.map +1 -0
  35. package/es/component/it-notice-modal/index.js +488 -0
  36. package/es/component/it-notice-modal/server.d.ts +8 -0
  37. package/es/component/it-notice-modal/server.d.ts.map +1 -0
  38. package/es/component/it-notice-modal/server.js +43 -0
  39. package/es/component/it-notice-modal/single-tab.d.ts +6 -0
  40. package/es/component/it-notice-modal/single-tab.d.ts.map +1 -0
  41. package/es/component/it-notice-modal/single-tab.js +82 -0
  42. package/es/component/it-notice-modal/style.css +301 -0
  43. package/es/component/it-notice-modal/utils.d.ts +2 -0
  44. package/es/component/it-notice-modal/utils.d.ts.map +1 -0
  45. package/es/component/it-notice-modal/utils.js +8 -0
  46. package/es/component/it-notice-tab/index.d.ts +6 -0
  47. package/es/component/it-notice-tab/index.d.ts.map +1 -0
  48. package/es/component/it-notice-tab/index.js +206 -0
  49. package/es/component/it-notice-tab/server.d.ts +3 -0
  50. package/es/component/it-notice-tab/server.d.ts.map +1 -0
  51. package/es/component/it-notice-tab/server.js +13 -0
  52. package/es/component/it-notice-tab/style.css +103 -0
  53. package/es/component/mail-list-modal/index.d.ts +2 -0
  54. package/es/component/mail-list-modal/index.d.ts.map +1 -0
  55. package/es/component/mail-list-modal/index.js +306 -0
  56. package/es/component/mail-list-modal/server.d.ts +7 -0
  57. package/es/component/mail-list-modal/server.d.ts.map +1 -0
  58. package/es/component/mail-list-modal/server.js +38 -0
  59. package/es/component/mail-list-modal/style.css +132 -0
  60. package/es/component/myself-chat-card/index.d.ts +15 -0
  61. package/es/component/myself-chat-card/index.d.ts.map +1 -0
  62. package/es/component/myself-chat-card/index.js +25 -0
  63. package/es/component/myself-chat-card/style.css +22 -0
  64. package/es/component/need-answer/index.d.ts +15 -0
  65. package/es/component/need-answer/index.d.ts.map +1 -0
  66. package/es/component/need-answer/index.js +60 -0
  67. package/es/component/need-answer/style.css +19 -0
  68. package/es/component/opppsition-chat-card/index.d.ts +11 -0
  69. package/es/component/opppsition-chat-card/index.d.ts.map +1 -0
  70. package/es/component/opppsition-chat-card/index.js +25 -0
  71. package/es/component/opppsition-chat-card/style.css +23 -0
  72. package/es/component/question-library/index.d.ts +10 -0
  73. package/es/component/question-library/index.d.ts.map +1 -0
  74. package/es/component/question-library/index.js +291 -0
  75. package/es/component/question-library/server.d.ts +4 -0
  76. package/es/component/question-library/server.d.ts.map +1 -0
  77. package/es/component/question-library/server.js +19 -0
  78. package/es/component/question-library/style.css +75 -0
  79. package/es/component/question-tag/index.d.ts +11 -0
  80. package/es/component/question-tag/index.d.ts.map +1 -0
  81. package/es/component/question-tag/index.js +23 -0
  82. package/es/component/question-tag/style.css +12 -0
  83. package/es/component/recommend-questions-card/index.d.ts +10 -0
  84. package/es/component/recommend-questions-card/index.d.ts.map +1 -0
  85. package/es/component/recommend-questions-card/index.js +104 -0
  86. package/es/component/recommend-questions-card/style.css +54 -0
  87. package/es/component/scroll-view/index.d.ts +3 -0
  88. package/es/component/scroll-view/index.d.ts.map +1 -0
  89. package/es/component/scroll-view/index.js +2 -0
  90. package/es/component/scroll-view/scroll-view.d.ts +18 -0
  91. package/es/component/scroll-view/scroll-view.d.ts.map +1 -0
  92. package/es/component/scroll-view/scroll-view.js +66 -0
  93. package/es/component/scroll-view/style.css +34 -0
  94. package/es/component/tab/index.d.ts +2 -0
  95. package/es/component/tab/index.d.ts.map +1 -0
  96. package/es/component/tab/index.js +18 -0
  97. package/es/component/tab/style.css +26 -0
  98. package/es/component/tips-answer/index.d.ts +15 -0
  99. package/es/component/tips-answer/index.d.ts.map +1 -0
  100. package/es/component/tips-answer/index.js +28 -0
  101. package/es/component/tips-answer/style.css +10 -0
  102. package/es/images/expire-robot.svg +16 -0
  103. package/es/images/pc-invalid.svg +11 -0
  104. package/es/images/screenshot-5.png +0 -0
  105. package/es/index.d.ts +92 -0
  106. package/es/index.d.ts.map +1 -0
  107. package/es/index.js +506 -0
  108. package/es/js/const.d.ts +41 -0
  109. package/es/js/const.d.ts.map +1 -0
  110. package/es/js/const.js +46 -0
  111. package/es/js/gen-render-promise.d.ts +9 -0
  112. package/es/js/gen-render-promise.d.ts.map +1 -0
  113. package/es/js/gen-render-promise.js +30 -0
  114. package/es/js/get-time.d.ts +15 -0
  115. package/es/js/get-time.d.ts.map +1 -0
  116. package/es/js/get-time.js +35 -0
  117. package/es/js/hfc-space.d.ts +16 -0
  118. package/es/js/hfc-space.d.ts.map +1 -0
  119. package/es/js/hfc-space.js +71 -0
  120. package/es/js/render-special.d.ts +16 -0
  121. package/es/js/render-special.d.ts.map +1 -0
  122. package/es/js/render-special.js +53 -0
  123. package/es/js/request/fetch.d.ts +10 -0
  124. package/es/js/request/fetch.d.ts.map +1 -0
  125. package/es/js/request/fetch.js +81 -0
  126. package/es/js/request/request.d.ts +3 -0
  127. package/es/js/request/request.d.ts.map +1 -0
  128. package/es/js/request/request.js +63 -0
  129. package/es/js/showMessage.d.ts +15 -0
  130. package/es/js/showMessage.d.ts.map +1 -0
  131. package/es/js/showMessage.js +75 -0
  132. package/es/js/state-immer.d.ts +3 -0
  133. package/es/js/state-immer.d.ts.map +1 -0
  134. package/es/js/state-immer.js +19 -0
  135. package/es/js/timer-executor.d.ts +3 -0
  136. package/es/js/timer-executor.d.ts.map +1 -0
  137. package/es/js/timer-executor.js +83 -0
  138. package/es/js/to-hfc.d.ts +2 -0
  139. package/es/js/to-hfc.d.ts.map +1 -0
  140. package/es/js/to-hfc.js +8 -0
  141. package/es/js/utils.d.ts +3 -0
  142. package/es/js/utils.d.ts.map +1 -0
  143. package/es/js/utils.js +11 -0
  144. package/es/jsx/chat-modal.d.ts +16 -0
  145. package/es/jsx/chat-modal.d.ts.map +1 -0
  146. package/es/jsx/chat-modal.js +268 -0
  147. package/es/server.d.ts +8 -0
  148. package/es/server.d.ts.map +1 -0
  149. package/es/server.js +44 -0
  150. package/es/style.css +174 -0
  151. package/lib/component/answer-itme/index.d.ts +20 -0
  152. package/lib/component/answer-itme/index.d.ts.map +1 -0
  153. package/lib/component/answer-itme/index.js +51 -0
  154. package/lib/component/answer-itme/style.css +35 -0
  155. package/lib/component/data-container/index.d.ts +19 -0
  156. package/lib/component/data-container/index.d.ts.map +1 -0
  157. package/lib/component/data-container/index.js +45 -0
  158. package/lib/component/data-container/style.css +26 -0
  159. package/lib/component/days-tab/index.d.ts +6 -0
  160. package/lib/component/days-tab/index.d.ts.map +1 -0
  161. package/lib/component/days-tab/index.js +129 -0
  162. package/lib/component/days-tab/style.css +43 -0
  163. package/lib/component/days-tab/utils.d.ts +32 -0
  164. package/lib/component/days-tab/utils.d.ts.map +1 -0
  165. package/lib/component/days-tab/utils.js +110 -0
  166. package/lib/component/error-boundary/index.d.ts +2 -0
  167. package/lib/component/error-boundary/index.d.ts.map +1 -0
  168. package/lib/component/error-boundary/index.js +40 -0
  169. package/lib/component/it-notice-modal/columns.d.ts +11 -0
  170. package/lib/component/it-notice-modal/columns.d.ts.map +1 -0
  171. package/lib/component/it-notice-modal/columns.js +116 -0
  172. package/lib/component/it-notice-modal/double-tab.d.ts +6 -0
  173. package/lib/component/it-notice-modal/double-tab.d.ts.map +1 -0
  174. package/lib/component/it-notice-modal/double-tab.js +104 -0
  175. package/lib/component/it-notice-modal/index.d.ts +6 -0
  176. package/lib/component/it-notice-modal/index.d.ts.map +1 -0
  177. package/lib/component/it-notice-modal/index.js +499 -0
  178. package/lib/component/it-notice-modal/server.d.ts +8 -0
  179. package/lib/component/it-notice-modal/server.d.ts.map +1 -0
  180. package/lib/component/it-notice-modal/server.js +55 -0
  181. package/lib/component/it-notice-modal/single-tab.d.ts +6 -0
  182. package/lib/component/it-notice-modal/single-tab.d.ts.map +1 -0
  183. package/lib/component/it-notice-modal/single-tab.js +92 -0
  184. package/lib/component/it-notice-modal/style.css +301 -0
  185. package/lib/component/it-notice-modal/utils.d.ts +2 -0
  186. package/lib/component/it-notice-modal/utils.d.ts.map +1 -0
  187. package/lib/component/it-notice-modal/utils.js +15 -0
  188. package/lib/component/it-notice-tab/index.d.ts +6 -0
  189. package/lib/component/it-notice-tab/index.d.ts.map +1 -0
  190. package/lib/component/it-notice-tab/index.js +216 -0
  191. package/lib/component/it-notice-tab/server.d.ts +3 -0
  192. package/lib/component/it-notice-tab/server.d.ts.map +1 -0
  193. package/lib/component/it-notice-tab/server.js +20 -0
  194. package/lib/component/it-notice-tab/style.css +103 -0
  195. package/lib/component/mail-list-modal/index.d.ts +2 -0
  196. package/lib/component/mail-list-modal/index.d.ts.map +1 -0
  197. package/lib/component/mail-list-modal/index.js +316 -0
  198. package/lib/component/mail-list-modal/server.d.ts +7 -0
  199. package/lib/component/mail-list-modal/server.d.ts.map +1 -0
  200. package/lib/component/mail-list-modal/server.js +50 -0
  201. package/lib/component/mail-list-modal/style.css +132 -0
  202. package/lib/component/myself-chat-card/index.d.ts +15 -0
  203. package/lib/component/myself-chat-card/index.d.ts.map +1 -0
  204. package/lib/component/myself-chat-card/index.js +35 -0
  205. package/lib/component/myself-chat-card/style.css +22 -0
  206. package/lib/component/need-answer/index.d.ts +15 -0
  207. package/lib/component/need-answer/index.d.ts.map +1 -0
  208. package/lib/component/need-answer/index.js +70 -0
  209. package/lib/component/need-answer/style.css +19 -0
  210. package/lib/component/opppsition-chat-card/index.d.ts +11 -0
  211. package/lib/component/opppsition-chat-card/index.d.ts.map +1 -0
  212. package/lib/component/opppsition-chat-card/index.js +35 -0
  213. package/lib/component/opppsition-chat-card/style.css +23 -0
  214. package/lib/component/question-library/index.d.ts +10 -0
  215. package/lib/component/question-library/index.d.ts.map +1 -0
  216. package/lib/component/question-library/index.js +301 -0
  217. package/lib/component/question-library/server.d.ts +4 -0
  218. package/lib/component/question-library/server.d.ts.map +1 -0
  219. package/lib/component/question-library/server.js +27 -0
  220. package/lib/component/question-library/style.css +75 -0
  221. package/lib/component/question-tag/index.d.ts +11 -0
  222. package/lib/component/question-tag/index.d.ts.map +1 -0
  223. package/lib/component/question-tag/index.js +33 -0
  224. package/lib/component/question-tag/style.css +12 -0
  225. package/lib/component/recommend-questions-card/index.d.ts +10 -0
  226. package/lib/component/recommend-questions-card/index.d.ts.map +1 -0
  227. package/lib/component/recommend-questions-card/index.js +114 -0
  228. package/lib/component/recommend-questions-card/style.css +54 -0
  229. package/lib/component/scroll-view/index.d.ts +3 -0
  230. package/lib/component/scroll-view/index.d.ts.map +1 -0
  231. package/lib/component/scroll-view/index.js +10 -0
  232. package/lib/component/scroll-view/scroll-view.d.ts +18 -0
  233. package/lib/component/scroll-view/scroll-view.d.ts.map +1 -0
  234. package/lib/component/scroll-view/scroll-view.js +76 -0
  235. package/lib/component/scroll-view/style.css +34 -0
  236. package/lib/component/tab/index.d.ts +2 -0
  237. package/lib/component/tab/index.d.ts.map +1 -0
  238. package/lib/component/tab/index.js +28 -0
  239. package/lib/component/tab/style.css +26 -0
  240. package/lib/component/tips-answer/index.d.ts +15 -0
  241. package/lib/component/tips-answer/index.d.ts.map +1 -0
  242. package/lib/component/tips-answer/index.js +38 -0
  243. package/lib/component/tips-answer/style.css +10 -0
  244. package/lib/images/expire-robot.svg +16 -0
  245. package/lib/images/pc-invalid.svg +11 -0
  246. package/lib/images/screenshot-5.png +0 -0
  247. package/lib/index.d.ts +92 -0
  248. package/lib/index.d.ts.map +1 -0
  249. package/lib/index.js +516 -0
  250. package/lib/js/const.d.ts +41 -0
  251. package/lib/js/const.d.ts.map +1 -0
  252. package/lib/js/const.js +55 -0
  253. package/lib/js/gen-render-promise.d.ts +9 -0
  254. package/lib/js/gen-render-promise.d.ts.map +1 -0
  255. package/lib/js/gen-render-promise.js +37 -0
  256. package/lib/js/get-time.d.ts +15 -0
  257. package/lib/js/get-time.d.ts.map +1 -0
  258. package/lib/js/get-time.js +43 -0
  259. package/lib/js/hfc-space.d.ts +16 -0
  260. package/lib/js/hfc-space.d.ts.map +1 -0
  261. package/lib/js/hfc-space.js +91 -0
  262. package/lib/js/render-special.d.ts +16 -0
  263. package/lib/js/render-special.d.ts.map +1 -0
  264. package/lib/js/render-special.js +61 -0
  265. package/lib/js/request/fetch.d.ts +10 -0
  266. package/lib/js/request/fetch.d.ts.map +1 -0
  267. package/lib/js/request/fetch.js +88 -0
  268. package/lib/js/request/request.d.ts +3 -0
  269. package/lib/js/request/request.d.ts.map +1 -0
  270. package/lib/js/request/request.js +71 -0
  271. package/lib/js/showMessage.d.ts +15 -0
  272. package/lib/js/showMessage.d.ts.map +1 -0
  273. package/lib/js/showMessage.js +83 -0
  274. package/lib/js/state-immer.d.ts +3 -0
  275. package/lib/js/state-immer.d.ts.map +1 -0
  276. package/lib/js/state-immer.js +27 -0
  277. package/lib/js/timer-executor.d.ts +3 -0
  278. package/lib/js/timer-executor.d.ts.map +1 -0
  279. package/lib/js/timer-executor.js +91 -0
  280. package/lib/js/to-hfc.d.ts +2 -0
  281. package/lib/js/to-hfc.d.ts.map +1 -0
  282. package/lib/js/to-hfc.js +14 -0
  283. package/lib/js/utils.d.ts +3 -0
  284. package/lib/js/utils.d.ts.map +1 -0
  285. package/lib/js/utils.js +19 -0
  286. package/lib/jsx/chat-modal.d.ts +16 -0
  287. package/lib/jsx/chat-modal.d.ts.map +1 -0
  288. package/lib/jsx/chat-modal.js +278 -0
  289. package/lib/server.d.ts +8 -0
  290. package/lib/server.d.ts.map +1 -0
  291. package/lib/server.js +58 -0
  292. package/lib/style.css +174 -0
  293. package/package.json +57 -0
  294. package/rct.config.js +8 -0
  295. package/src/component/answer-itme/index.jsx +64 -0
  296. package/src/component/answer-itme/style.less +37 -0
  297. package/src/component/data-container/index.jsx +45 -0
  298. package/src/component/data-container/style.less +27 -0
  299. package/src/component/days-tab/index.jsx +114 -0
  300. package/src/component/days-tab/style.less +55 -0
  301. package/src/component/days-tab/utils.js +87 -0
  302. package/src/component/error-boundary/index.jsx +39 -0
  303. package/src/component/it-notice-modal/columns.js +102 -0
  304. package/src/component/it-notice-modal/double-tab.jsx +83 -0
  305. package/src/component/it-notice-modal/index.jsx +404 -0
  306. package/src/component/it-notice-modal/server.js +43 -0
  307. package/src/component/it-notice-modal/single-tab.jsx +70 -0
  308. package/src/component/it-notice-modal/style.less +367 -0
  309. package/src/component/it-notice-modal/utils.js +8 -0
  310. package/src/component/it-notice-tab/index.jsx +196 -0
  311. package/src/component/it-notice-tab/server.js +14 -0
  312. package/src/component/it-notice-tab/style.less +120 -0
  313. package/src/component/mail-list-modal/index.jsx +270 -0
  314. package/src/component/mail-list-modal/server.js +38 -0
  315. package/src/component/mail-list-modal/style.less +154 -0
  316. package/src/component/myself-chat-card/index.jsx +27 -0
  317. package/src/component/myself-chat-card/style.less +30 -0
  318. package/src/component/need-answer/index.jsx +56 -0
  319. package/src/component/need-answer/style.less +21 -0
  320. package/src/component/opppsition-chat-card/index.jsx +25 -0
  321. package/src/component/opppsition-chat-card/style.less +33 -0
  322. package/src/component/question-library/index.jsx +316 -0
  323. package/src/component/question-library/server.js +19 -0
  324. package/src/component/question-library/style.less +102 -0
  325. package/src/component/question-tag/index.jsx +27 -0
  326. package/src/component/question-tag/style.less +15 -0
  327. package/src/component/recommend-questions-card/index.jsx +111 -0
  328. package/src/component/recommend-questions-card/style.less +66 -0
  329. package/src/component/scroll-view/index.js +3 -0
  330. package/src/component/scroll-view/scroll-view.jsx +74 -0
  331. package/src/component/scroll-view/style.less +37 -0
  332. package/src/component/tab/index.jsx +17 -0
  333. package/src/component/tab/style.less +26 -0
  334. package/src/component/tips-answer/index.jsx +38 -0
  335. package/src/component/tips-answer/style.less +11 -0
  336. package/src/images/expire-robot.svg +16 -0
  337. package/src/images/pc-invalid.svg +11 -0
  338. package/src/images/screenshot-5.png +0 -0
  339. package/src/index.jsx +554 -0
  340. package/src/js/const.js +48 -0
  341. package/src/js/gen-render-promise.js +32 -0
  342. package/src/js/get-time.js +35 -0
  343. package/src/js/hfc-space.js +91 -0
  344. package/src/js/render-special.js +64 -0
  345. package/src/js/request/fetch.js +87 -0
  346. package/src/js/request/request.js +74 -0
  347. package/src/js/showMessage.js +81 -0
  348. package/src/js/state-immer.js +12 -0
  349. package/src/js/timer-executor.js +37 -0
  350. package/src/js/to-hfc.js +9 -0
  351. package/src/js/utils.js +13 -0
  352. package/src/jsx/chat-modal.jsx +254 -0
  353. package/src/main.js +1 -0
  354. package/src/server.js +45 -0
  355. package/src/style.less +229 -0
  356. package/test/cases/case-01.assert.js +6 -0
  357. package/test/cases/case-01.source.jsx +17 -0
  358. package/test/cases/case-02.assert.js +6 -0
  359. package/test/cases/case-02.source.jsx +25 -0
  360. package/test/cases/case-02.style.less +15 -0
  361. package/test/cases/case-03.source.jsx +69 -0
  362. package/test/cases/case-03.style.less +3 -0
  363. package/tsconfig.json +48 -0
  364. package/typings.d.ts +5 -0
  365. package/umd/b415d90208c277ba3703.png +0 -0
  366. package/umd/index.css +1753 -0
  367. package/umd/index.js +36258 -0
  368. package/umd/index.min.css +1 -0
  369. package/umd/index.min.js +657 -0
@@ -0,0 +1,25 @@
1
+ import React, { memo } from 'react';
2
+ import Proptypes from 'prop-types';
3
+ import "./style.css";
4
+ var styles = {
5
+ "wrapper": "shein-components_systemrobotassistant_wrapper",
6
+ "contentBox": "shein-components_systemrobotassistant_contentBox",
7
+ "time": "shein-components_systemrobotassistant_time"
8
+ };
9
+ var MyselfChatCard = /*#__PURE__*/memo(props => {
10
+ var item = props.item;
11
+ return /*#__PURE__*/React.createElement("div", {
12
+ className: styles.wrapper
13
+ }, /*#__PURE__*/React.createElement("div", {
14
+ className: styles.contentBox
15
+ }, item.problem), /*#__PURE__*/React.createElement("div", {
16
+ className: styles.time
17
+ }, item.questionTime));
18
+ });
19
+ MyselfChatCard.propTypes = {
20
+ item: Proptypes.shape({
21
+ problem: Proptypes.string,
22
+ questionTime: Proptypes.string
23
+ })
24
+ };
25
+ export default MyselfChatCard;
@@ -0,0 +1,22 @@
1
+ .shein-components_systemrobotassistant_wrapper {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: flex-end;
5
+ margin-top: 16px;
6
+ }
7
+ .shein-components_systemrobotassistant_contentBox {
8
+ max-width: 560px;
9
+ background: #1890ff;
10
+ background: var(--primary-color, #1890ff);
11
+ border-radius: 8px 0px 8px 8px;
12
+ display: flex;
13
+ align-items: center;
14
+ padding: 12px 12px;
15
+ font-size: 14px;
16
+ font-weight: 400;
17
+ color: #FFFFFF;
18
+ }
19
+ .shein-components_systemrobotassistant_time {
20
+ margin-top: 8px;
21
+ color: #7E848F;
22
+ }
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+
3
+ export interface NeedAnswerItem {
4
+ problem?: string;
5
+ userName?: string;
6
+ }
7
+
8
+ export interface NeedAnswerProps {
9
+ item?: NeedAnswerItem;
10
+ }
11
+
12
+ declare const NeedAnswer: React.FC<NeedAnswerProps>;
13
+
14
+ export default NeedAnswer;
15
+
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/component/need-answer/index.jsx"],"names":[],"mappings":";AAQA,6DAsCE"}
@@ -0,0 +1,60 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { memo } from 'react';
8
+ import Proptypes from 'prop-types';
9
+ import showMessage from "../../js/showMessage";
10
+ import OppositionChatCard from "../opppsition-chat-card";
11
+ import "./style.css";
12
+ var styles = {
13
+ "needAnswerContent": "shein-components_systemrobotassistant_needAnswerContent",
14
+ "needLink": "shein-components_systemrobotassistant_needLink",
15
+ "onSeekHlep": "shein-components_systemrobotassistant_onSeekHlep",
16
+ "onDisabled": "shein-components_systemrobotassistant_onDisabled"
17
+ };
18
+ import * as Server from "../../server";
19
+ import useStateByImmer from "../../js/state-immer";
20
+ var NeedAnswer = /*#__PURE__*/memo(props => {
21
+ var item = props.item,
22
+ t = props.t;
23
+ var _useStateByImmer = useStateByImmer({
24
+ loading: false
25
+ }),
26
+ _useStateByImmer2 = _slicedToArray(_useStateByImmer, 2),
27
+ state = _useStateByImmer2[0],
28
+ setState = _useStateByImmer2[1];
29
+ return /*#__PURE__*/React.createElement(OppositionChatCard, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
30
+ className: styles.needAnswerContent
31
+ }, t('您好,您厂【{0}】有问题“{1}”需要帮助,请为其解决。若解决不了', item.userName, item.problem)), /*#__PURE__*/React.createElement("span", {
32
+ className: state.disabled ? styles.onDisabled : styles.onSeekHlep,
33
+ loading: state.loading,
34
+ onClick: () => {
35
+ if (state.disabled) return;
36
+ setState({
37
+ loading: true
38
+ });
39
+ Server.seekHelp({
40
+ problem: item.problem
41
+ }).then(res => {
42
+ setState({
43
+ loading: false,
44
+ disabled: true
45
+ });
46
+ if (res.info && res.info.managerName) {
47
+ var content = t('已将您的问题反馈给管理员【{0}】,由管理员统一反馈给实施。', res.info.managerName);
48
+ showMessage(content, true);
49
+ }
50
+ });
51
+ }
52
+ }, t('请联系我'))));
53
+ });
54
+ NeedAnswer.propTypes = {
55
+ item: Proptypes.shape({
56
+ problem: Proptypes.string,
57
+ userName: Proptypes.string
58
+ })
59
+ };
60
+ export default NeedAnswer;
@@ -0,0 +1,19 @@
1
+ .shein-components_systemrobotassistant_needAnswerContent {
2
+ font-weight: 400;
3
+ color: #35383D;
4
+ }
5
+ .shein-components_systemrobotassistant_needLink {
6
+ color: #1890ff;
7
+ color: var(--primary-color, #1890ff);
8
+ font-weight: 400;
9
+ cursor: pointer;
10
+ }
11
+ .shein-components_systemrobotassistant_onSeekHlep {
12
+ color: #1890ff;
13
+ color: var(--primary-color, #1890ff);
14
+ cursor: pointer;
15
+ }
16
+ .shein-components_systemrobotassistant_onDisabled {
17
+ color: #A5ACB8;
18
+ cursor: not-allowed;
19
+ }
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+
3
+ export interface OppositionChatCardProps {
4
+ children?: React.ReactElement<any>;
5
+ noBorderRadius?: boolean;
6
+ }
7
+
8
+ declare const OppositionChatCard: React.FC<OppositionChatCardProps>;
9
+
10
+ export default OppositionChatCard;
11
+
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/component/opppsition-chat-card/index.jsx"],"names":[],"mappings":";AAKA,qEAWE"}
@@ -0,0 +1,25 @@
1
+ import React, { memo } from 'react';
2
+ import classNames from 'classnames';
3
+ import Proptypes from 'prop-types';
4
+ import "./style.css";
5
+ var styles = {
6
+ "oppositionChatCardwrapper": "shein-components_systemrobotassistant_oppositionChatCardwrapper",
7
+ "oppositionContentWrapper": "shein-components_systemrobotassistant_oppositionContentWrapper",
8
+ "otherRadius": "shein-components_systemrobotassistant_otherRadius",
9
+ "isRecommendQuestions": "shein-components_systemrobotassistant_isRecommendQuestions"
10
+ };
11
+ var OppositionChatCard = /*#__PURE__*/memo(props => {
12
+ var children = props.children,
13
+ noBorderRadius = props.noBorderRadius,
14
+ isRecommendQuestions = props.isRecommendQuestions;
15
+ return /*#__PURE__*/React.createElement("div", {
16
+ className: styles.oppositionChatCardwrapper
17
+ }, /*#__PURE__*/React.createElement("div", {
18
+ className: classNames(styles.oppositionContentWrapper, !noBorderRadius && styles.otherRadius, isRecommendQuestions && styles.isRecommendQuestions)
19
+ }, children));
20
+ });
21
+ OppositionChatCard.propTypes = {
22
+ children: Proptypes.element,
23
+ noBorderRadius: Proptypes.bool
24
+ };
25
+ export default OppositionChatCard;
@@ -0,0 +1,23 @@
1
+ .shein-components_systemrobotassistant_oppositionChatCardwrapper {
2
+ display: flex;
3
+ flex-direction: row;
4
+ overflow: hidden;
5
+ }
6
+ .shein-components_systemrobotassistant_oppositionContentWrapper {
7
+ max-width: 416px;
8
+ margin-top: 12px;
9
+ background-color: #fff;
10
+ padding: 10px 12px;
11
+ border: 1px solid #E0E4F3;
12
+ display: flex;
13
+ flex-direction: column;
14
+ }
15
+ .shein-components_systemrobotassistant_otherRadius {
16
+ border-radius: 0px 8px 8px 8px;
17
+ }
18
+ .shein-components_systemrobotassistant_isRecommendQuestions {
19
+ padding: 10px 12px 0;
20
+ box-shadow: 0px 1px 2px 0px rgba(25, 122, 250, 0.15);
21
+ border-radius: 8px;
22
+ width: 100%;
23
+ }
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+
3
+ export interface QuestionLibraryProps {
4
+ }
5
+
6
+ export default class QuestionLibrary extends React.PureComponent<QuestionLibraryProps, any> {
7
+ render(): JSX.Element;
8
+
9
+ }
10
+
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/component/question-library/index.jsx"],"names":[],"mappings":";AAiBA;IACE,wBAeC;IAbC;;;;;;MAQC;IACD,gCAA4B;IA6F9B,2BAiBC;IArDD,oCAkCC;IArFD,0BAEC;IAGD,uBA4CC;IA0DD,oBAQC;IAED,4BAiBC;IAGD,sBAKC;IAED,kDAoIC;CACF"}
@@ -0,0 +1,291 @@
1
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
2
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
3
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
4
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ import React, { createRef, PureComponent } from 'react';
8
+ import { Button, Spin } from 'shineout';
9
+ import { Scrollbars } from 'react-custom-scrollbars';
10
+ import Icon from '@shein-components/Icon';
11
+ import getNow from "../../js/get-time";
12
+ import { debounce, getRandomID } from "../../js/utils";
13
+ import { toHfc } from "../../js/to-hfc";
14
+ import { contentType, TIPS } from "../../js/const";
15
+ import AnswerItme from "../answer-itme";
16
+ import OppositionChatCard from "../opppsition-chat-card";
17
+ import RecommendQuestionsCard from "../recommend-questions-card";
18
+ import MyselfChatCard from "../myself-chat-card";
19
+ import TipsAnswer from "../tips-answer";
20
+ import NeedAnswer from "../need-answer";
21
+ import * as Server from "./server";
22
+ import "./style.css";
23
+ var styles = {
24
+ "tipsWrapper": "shein-components_systemrobotassistant_tipsWrapper",
25
+ "scrollWrapper": "shein-components_systemrobotassistant_scrollWrapper",
26
+ "scrollCon": "shein-components_systemrobotassistant_scrollCon",
27
+ "bottomLink": "shein-components_systemrobotassistant_bottomLink",
28
+ "toLink": "shein-components_systemrobotassistant_toLink",
29
+ "textAreaWrapper": "shein-components_systemrobotassistant_textAreaWrapper",
30
+ "bottomWrapper": "shein-components_systemrobotassistant_bottomWrapper",
31
+ "textArea": "shein-components_systemrobotassistant_textArea",
32
+ "findByWechat": "shein-components_systemrobotassistant_findByWechat",
33
+ "btn": "shein-components_systemrobotassistant_btn"
34
+ };
35
+ class QuestionLibrary extends PureComponent {
36
+ constructor(props) {
37
+ super(props);
38
+ this.state = {
39
+ conversationRecordList: [],
40
+ value: '',
41
+ // hotList: [],
42
+ refreshLoading: false,
43
+ pageNo: 1,
44
+ pageSize: 20
45
+ };
46
+ this.scrollRef = /*#__PURE__*/createRef();
47
+ this.setChatMsg = this.setChatMsg.bind(this);
48
+ this.getMoreChatRecords = debounce(this.getMoreChatRecords.bind(this), 300);
49
+ }
50
+ componentDidMount() {
51
+ this.getChatRecords();
52
+ }
53
+ getChatRecords() {
54
+ var t = this.props.t;
55
+ var _this$state = this.state,
56
+ pageNo = _this$state.pageNo,
57
+ pageSize = _this$state.pageSize;
58
+ Server.queryConversationRecord({
59
+ pageNo,
60
+ pageSize
61
+ }).then(res => {
62
+ if (res) {
63
+ // 确认查看接口
64
+ Server.confirmView();
65
+ var list = res.info && res.info.conversationRecordList && res.info.conversationRecordList.map(vo => _objectSpread(_objectSpread({}, vo), {}, {
66
+ key: getRandomID()
67
+ })) || [];
68
+
69
+ // eslint-disable-next-line no-unused-expressions
70
+ Object.keys(TIPS) && Object.keys(TIPS).forEach(key => {
71
+ if (res.info && res.info[key] > 0) {
72
+ list.push({
73
+ key: getRandomID(),
74
+ contentType: contentType.TIPS,
75
+ content: t('帮助中心{0}有更新了,', t(TIPS[key].content)),
76
+ link: TIPS[key].link
77
+ });
78
+ }
79
+ });
80
+ var problemNeedHelpList = res.info && res.info.problemHelpList && res.info.problemHelpList.map(vo => _objectSpread(_objectSpread({}, vo), {}, {
81
+ key: getRandomID(),
82
+ contentType: contentType.NEEDANSWER
83
+ })) || [];
84
+ var newList = [...list, ...problemNeedHelpList];
85
+ this.setState({
86
+ conversationRecordList: newList
87
+ }, () => {
88
+ this.scrollToEnd();
89
+ });
90
+ }
91
+ });
92
+ }
93
+ getMoreChatRecords() {
94
+ var _this = this;
95
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
96
+ var refreshLoading, _this$state2, pageNo, pageSize, newPageNo, res, list, conversationRecordList, originScrollHeight;
97
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
98
+ while (1) switch (_context.prev = _context.next) {
99
+ case 0:
100
+ refreshLoading = _this.state.refreshLoading;
101
+ if (!refreshLoading) {
102
+ _context.next = 3;
103
+ break;
104
+ }
105
+ return _context.abrupt("return");
106
+ case 3:
107
+ _this.setState({
108
+ refreshLoading: true
109
+ });
110
+ _this$state2 = _this.state, pageNo = _this$state2.pageNo, pageSize = _this$state2.pageSize;
111
+ newPageNo = pageNo + 1;
112
+ _context.next = 8;
113
+ return Server.queryConversationRecord({
114
+ pageNo: newPageNo,
115
+ pageSize
116
+ });
117
+ case 8:
118
+ res = _context.sent;
119
+ list = res.info && res.info.conversationRecordList && res.info.conversationRecordList.map(vo => _objectSpread(_objectSpread({}, vo), {}, {
120
+ key: getRandomID()
121
+ })) || [];
122
+ conversationRecordList = _this.state.conversationRecordList;
123
+ _this.setState({
124
+ refreshLoading: false
125
+ });
126
+ if (list.length > 0) {
127
+ // 记录增加数据之前的高度
128
+ originScrollHeight = _this.scrollRef.current.getScrollHeight();
129
+ _this.setState({
130
+ conversationRecordList: [...list, ...conversationRecordList],
131
+ pageNo: newPageNo
132
+ }, () => {
133
+ var scrollTop = _this.scrollRef.current.getScrollHeight() - originScrollHeight - 10;
134
+ _this.scrollRef.current.scrollTop(scrollTop);
135
+ });
136
+ }
137
+ case 13:
138
+ case "end":
139
+ return _context.stop();
140
+ }
141
+ }, _callee);
142
+ }))();
143
+ }
144
+ setChatMsg(val) {
145
+ var conversationRecordList = this.state.conversationRecordList;
146
+ if (val) {
147
+ var vo = {
148
+ contentType: contentType.MYSELF,
149
+ problem: val,
150
+ questionTime: getNow(),
151
+ // 获取此刻的时间
152
+ key: getRandomID()
153
+ };
154
+ var newArr = [...conversationRecordList, vo];
155
+ this.setState({
156
+ conversationRecordList: newArr,
157
+ value: ''
158
+ });
159
+ this.scrollToEnd();
160
+ this.queryAnswer(val);
161
+ }
162
+ }
163
+ scrollToEnd() {
164
+ if (this.scrollRef && this.scrollRef.current && this.scrollRef.current.scrollToBottom) {
165
+ setTimeout(() => {
166
+ this.scrollRef.current.scrollToBottom({
167
+ behavior: 'smooth'
168
+ });
169
+ }, 0);
170
+ }
171
+ }
172
+ queryAnswer(val) {
173
+ Server.queryAnswer({
174
+ problem: val
175
+ }).then(res => {
176
+ var conversationRecordList = this.state.conversationRecordList;
177
+ if (res) {
178
+ var newVo = _objectSpread(_objectSpread({}, res.info || {}), {}, {
179
+ key: getRandomID()
180
+ });
181
+ this.setState({
182
+ conversationRecordList: [...conversationRecordList, newVo]
183
+ });
184
+ this.scrollToEnd();
185
+ }
186
+ });
187
+ }
188
+ handlenScroll() {
189
+ // 到达顶部的时候
190
+ if (this.scrollRef && this.scrollRef.current && this.scrollRef.current.getScrollTop() === 0) {
191
+ this.getMoreChatRecords();
192
+ }
193
+ }
194
+ render() {
195
+ var _this$props = this.props,
196
+ zIndex = _this$props.zIndex,
197
+ t = _this$props.t;
198
+ var _this$state3 = this.state,
199
+ value = _this$state3.value,
200
+ conversationRecordList = _this$state3.conversationRecordList,
201
+ refreshLoading = _this$state3.refreshLoading;
202
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
203
+ className: styles.tipsWrapper
204
+ }, /*#__PURE__*/React.createElement(RecommendQuestionsCard, this.props)), /*#__PURE__*/React.createElement("div", {
205
+ className: styles.scrollCon
206
+ }, /*#__PURE__*/React.createElement(Scrollbars, {
207
+ style: {
208
+ paddingRight: '20px',
209
+ flex: 1,
210
+ backgroundColor: '#F7F9FC'
211
+ },
212
+ ref: this.scrollRef,
213
+ onScroll: e => {
214
+ this.handlenScroll(e);
215
+ }
216
+ }, refreshLoading ? /*#__PURE__*/React.createElement(Spin, {
217
+ size: 18,
218
+ tips: t('加载中')
219
+ }) : null, /*#__PURE__*/React.createElement("div", {
220
+ className: styles.scrollWrapper
221
+ }, conversationRecordList.map(item => {
222
+ // 自己提问的问题
223
+ if (item.contentType === contentType.MYSELF) {
224
+ return /*#__PURE__*/React.createElement(MyselfChatCard, {
225
+ key: item.key,
226
+ item: item
227
+ });
228
+ }
229
+ // 回答类型
230
+ if (item.contentType === contentType.OPPOSITION) {
231
+ return /*#__PURE__*/React.createElement(OppositionChatCard, {
232
+ key: item.key
233
+ }, /*#__PURE__*/React.createElement(AnswerItme, {
234
+ item: item,
235
+ zIndex: zIndex,
236
+ t: t
237
+ }));
238
+ }
239
+ // 帮助中心类型
240
+ if (item.contentType === contentType.TIPS) {
241
+ return /*#__PURE__*/React.createElement(TipsAnswer, {
242
+ item: item,
243
+ key: item.key,
244
+ t: t
245
+ });
246
+ }
247
+ // 需要回答的类型
248
+ return /*#__PURE__*/React.createElement(NeedAnswer, {
249
+ item: item,
250
+ key: item.key,
251
+ t: t
252
+ });
253
+ })))), /*#__PURE__*/React.createElement("div", {
254
+ className: styles.bottomLink
255
+ }, /*#__PURE__*/React.createElement("div", {
256
+ className: styles.toLink,
257
+ onClick: () => {
258
+ toHfc('');
259
+ }
260
+ }, /*#__PURE__*/React.createElement("span", null, t('进入帮助中心')), /*#__PURE__*/React.createElement(Icon, {
261
+ name: "arrow-right"
262
+ }))), /*#__PURE__*/React.createElement("div", {
263
+ className: styles.bottomWrapper
264
+ }, /*#__PURE__*/React.createElement("div", {
265
+ className: styles.textAreaWrapper
266
+ }, /*#__PURE__*/React.createElement("textarea", {
267
+ placeholder: t('请输入问题关键词,如:如何发货'),
268
+ className: styles.textArea,
269
+ value: value,
270
+ onChange: e => {
271
+ this.setState({
272
+ value: e.target.value
273
+ });
274
+ },
275
+ onKeyDown: event => {
276
+ if (event.keyCode === 13) {
277
+ this.setChatMsg(value);
278
+ event.preventDefault();
279
+ }
280
+ }
281
+ }), /*#__PURE__*/React.createElement(Button, {
282
+ type: "primary",
283
+ disabled: !value,
284
+ className: styles.btn,
285
+ onClick: () => {
286
+ this.setChatMsg(value);
287
+ }
288
+ }, t('发送')))));
289
+ }
290
+ }
291
+ export default QuestionLibrary;
@@ -0,0 +1,4 @@
1
+ export function queryConversationRecord(argument: any): any;
2
+ export function confirmView(argument: any): any;
3
+ export function queryAnswer(argument: any): any;
4
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/component/question-library/server.js"],"names":[],"mappings":"AAIA,4DAEC;AAID,gDAEC;AAID,gDAEC"}
@@ -0,0 +1,19 @@
1
+ import postRequest from "../../js/request/request";
2
+
3
+ // 查询聊天记录
4
+ // https://soapi.sheincorp.cn/application/3768/routes/102471
5
+ export function queryConversationRecord(argument) {
6
+ return postRequest('/front/mesAssistant/queryConversationRecord', argument);
7
+ }
8
+
9
+ // 确认查看
10
+ // https://soapi.sheincorp.cn/application/3876/routes/post_mesAssistant_confirmView
11
+ export function confirmView(argument) {
12
+ return postRequest('/front/mesAssistant/confirmView', argument);
13
+ }
14
+
15
+ // 查询回答
16
+ // https://soapi.sheincorp.cn/application/3876/routes/post_mesAssistant_queryAnswer
17
+ export function queryAnswer(argument) {
18
+ return postRequest('/front/mesAssistant/queryAnswer', argument);
19
+ }
@@ -0,0 +1,75 @@
1
+ .shein-components_systemrobotassistant_tipsWrapper {
2
+ padding: 20px;
3
+ background-color: #F7F9FC;
4
+ }
5
+ .shein-components_systemrobotassistant_scrollWrapper {
6
+ padding: 20px;
7
+ }
8
+ .shein-components_systemrobotassistant_scrollCon {
9
+ display: flex;
10
+ flex: 1;
11
+ }
12
+ .shein-components_systemrobotassistant_scrollCon > div:nth-child(1) > div:nth-child(1) {
13
+ margin-right: 0 !important;
14
+ margin-bottom: 0 !important;
15
+ }
16
+ .shein-components_systemrobotassistant_scrollCon *::-webkit-scrollbar {
17
+ width: 0;
18
+ height: 0;
19
+ }
20
+ .shein-components_systemrobotassistant_bottomLink {
21
+ display: flex;
22
+ justify-content: flex-end;
23
+ font-size: 14px;
24
+ color: #7E848F;
25
+ background-color: #F7F9FC;
26
+ padding-bottom: 12px;
27
+ padding-right: 12px;
28
+ }
29
+ .shein-components_systemrobotassistant_bottomLink .shein-components_systemrobotassistant_toLink {
30
+ font-weight: 400;
31
+ cursor: pointer;
32
+ }
33
+ .shein-components_systemrobotassistant_bottomLink .shein-components_systemrobotassistant_toLink > span {
34
+ margin-right: 4px;
35
+ }
36
+ .shein-components_systemrobotassistant_bottomLink .shein-components_systemrobotassistant_toLink .so-icon {
37
+ font-size: 12px;
38
+ }
39
+ .shein-components_systemrobotassistant_textAreaWrapper {
40
+ width: 100%;
41
+ display: flex;
42
+ align-items: flex-end;
43
+ }
44
+ .shein-components_systemrobotassistant_bottomWrapper {
45
+ background: #ffffff;
46
+ box-shadow: inset 0px 1px 0px 0px #e6eaf0;
47
+ padding: 20px;
48
+ }
49
+ .shein-components_systemrobotassistant_bottomWrapper .shein-components_systemrobotassistant_textArea {
50
+ border-width: 0;
51
+ height: 56px;
52
+ width: 100%;
53
+ resize: none !important;
54
+ outline: none;
55
+ }
56
+ .shein-components_systemrobotassistant_bottomWrapper .shein-components_systemrobotassistant_findByWechat {
57
+ margin-top: 9px;
58
+ cursor: pointer;
59
+ }
60
+ .shein-components_systemrobotassistant_bottomWrapper .shein-components_systemrobotassistant_findByWechat span {
61
+ color: #1890ff;
62
+ color: var(--primary-color, #1890ff);
63
+ }
64
+ .shein-components_systemrobotassistant_bottomWrapper .so-input {
65
+ border: 0px solid #fff;
66
+ }
67
+ .shein-components_systemrobotassistant_bottomWrapper .so-input:hover {
68
+ border: 0px solid #fff;
69
+ }
70
+ .shein-components_systemrobotassistant_bottomWrapper textarea {
71
+ padding: 0;
72
+ }
73
+ .shein-components_systemrobotassistant_bottomWrapper .shein-components_systemrobotassistant_btn {
74
+ height: 32px;
75
+ }
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+
3
+ export interface QuestionTagProps {
4
+ title?: string;
5
+ onSendMsg?: (...args: any[])=>any;
6
+ }
7
+
8
+ declare const QuestionTag: React.FC<QuestionTagProps>;
9
+
10
+ export default QuestionTag;
11
+