eli-video-interview 1.2.35 → 1.2.36-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/esm/components/Charts/Chart.js +1 -1
  2. package/esm/components/react-photo-view/Photo.css +14 -0
  3. package/esm/components/react-photo-view/Photo.d.ts +18 -0
  4. package/esm/components/react-photo-view/Photo.js +54 -0
  5. package/esm/components/react-photo-view/PhotoBox.css +18 -0
  6. package/esm/components/react-photo-view/PhotoBox.d.ts +22 -0
  7. package/esm/components/react-photo-view/PhotoBox.js +302 -0
  8. package/esm/components/react-photo-view/PhotoPage.d.ts +9 -0
  9. package/esm/components/react-photo-view/PhotoPage.js +77 -0
  10. package/esm/components/react-photo-view/PhotoProvider.d.ts +14 -0
  11. package/esm/components/react-photo-view/PhotoProvider.js +98 -0
  12. package/esm/components/react-photo-view/PhotoSlider.css +125 -0
  13. package/esm/components/react-photo-view/PhotoSlider.d.ts +12 -0
  14. package/esm/components/react-photo-view/PhotoSlider.js +262 -0
  15. package/esm/components/react-photo-view/PhotoView.d.ts +30 -0
  16. package/esm/components/react-photo-view/PhotoView.js +48 -0
  17. package/esm/components/react-photo-view/components/ArrowLeft.d.ts +3 -0
  18. package/esm/components/react-photo-view/components/ArrowLeft.js +18 -0
  19. package/esm/components/react-photo-view/components/ArrowRight.d.ts +3 -0
  20. package/esm/components/react-photo-view/components/ArrowRight.js +18 -0
  21. package/esm/components/react-photo-view/components/CloseIcon.d.ts +3 -0
  22. package/esm/components/react-photo-view/components/CloseIcon.js +16 -0
  23. package/esm/components/react-photo-view/components/PreventScroll.d.ts +1 -0
  24. package/esm/components/react-photo-view/components/PreventScroll.js +12 -0
  25. package/esm/components/react-photo-view/components/SlidePortal.css +10 -0
  26. package/esm/components/react-photo-view/components/SlidePortal.d.ts +7 -0
  27. package/esm/components/react-photo-view/components/SlidePortal.js +30 -0
  28. package/esm/components/react-photo-view/components/Spinner.css +23 -0
  29. package/esm/components/react-photo-view/components/Spinner.d.ts +4 -0
  30. package/esm/components/react-photo-view/components/Spinner.js +29 -0
  31. package/esm/components/react-photo-view/hooks/useAdjacentImages.d.ts +5 -0
  32. package/esm/components/react-photo-view/hooks/useAdjacentImages.js +14 -0
  33. package/esm/components/react-photo-view/hooks/useAnimationOrigin.d.ts +6 -0
  34. package/esm/components/react-photo-view/hooks/useAnimationOrigin.js +72 -0
  35. package/esm/components/react-photo-view/hooks/useAnimationPosition.d.ts +2 -0
  36. package/esm/components/react-photo-view/hooks/useAnimationPosition.js +28 -0
  37. package/esm/components/react-photo-view/hooks/useAnimationVisible.d.ts +6 -0
  38. package/esm/components/react-photo-view/hooks/useAnimationVisible.js +49 -0
  39. package/esm/components/react-photo-view/hooks/useContinuousTap.d.ts +8 -0
  40. package/esm/components/react-photo-view/hooks/useContinuousTap.js +36 -0
  41. package/esm/components/react-photo-view/hooks/useDebounceCallback.d.ts +10 -0
  42. package/esm/components/react-photo-view/hooks/useDebounceCallback.js +48 -0
  43. package/esm/components/react-photo-view/hooks/useEventListener.d.ts +1 -0
  44. package/esm/components/react-photo-view/hooks/useEventListener.js +18 -0
  45. package/esm/components/react-photo-view/hooks/useForkedVariable.d.ts +5 -0
  46. package/esm/components/react-photo-view/hooks/useForkedVariable.js +17 -0
  47. package/esm/components/react-photo-view/hooks/useInitial.d.ts +1 -0
  48. package/esm/components/react-photo-view/hooks/useInitial.js +9 -0
  49. package/esm/components/react-photo-view/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  50. package/esm/components/react-photo-view/hooks/useIsomorphicLayoutEffect.js +3 -0
  51. package/esm/components/react-photo-view/hooks/useMethods.d.ts +4 -0
  52. package/esm/components/react-photo-view/hooks/useMethods.js +35 -0
  53. package/esm/components/react-photo-view/hooks/useMountedRef.d.ts +3 -0
  54. package/esm/components/react-photo-view/hooks/useMountedRef.js +12 -0
  55. package/esm/components/react-photo-view/hooks/useScrollPosition.d.ts +4 -0
  56. package/esm/components/react-photo-view/hooks/useScrollPosition.js +157 -0
  57. package/esm/components/react-photo-view/hooks/useSetState.d.ts +2 -0
  58. package/esm/components/react-photo-view/hooks/useSetState.js +15 -0
  59. package/esm/components/react-photo-view/hooks/useTargetScale.d.ts +4 -0
  60. package/esm/components/react-photo-view/hooks/useTargetScale.js +70 -0
  61. package/esm/components/react-photo-view/index.d.ts +4 -0
  62. package/esm/components/react-photo-view/index.js +4 -0
  63. package/esm/components/react-photo-view/photo-context.d.ts +11 -0
  64. package/esm/components/react-photo-view/photo-context.js +2 -0
  65. package/esm/components/react-photo-view/types.d.ts +196 -0
  66. package/esm/components/react-photo-view/types.js +1 -0
  67. package/esm/components/react-photo-view/utils/edgeHandle.d.ts +15 -0
  68. package/esm/components/react-photo-view/utils/edgeHandle.js +40 -0
  69. package/esm/components/react-photo-view/utils/getMultipleTouchPosition.d.ts +5 -0
  70. package/esm/components/react-photo-view/utils/getMultipleTouchPosition.js +11 -0
  71. package/esm/components/react-photo-view/utils/getPositionOnMoveOrScale.d.ts +9 -0
  72. package/esm/components/react-photo-view/utils/getPositionOnMoveOrScale.js +31 -0
  73. package/esm/components/react-photo-view/utils/getRotateSize.d.ts +4 -0
  74. package/esm/components/react-photo-view/utils/getRotateSize.js +11 -0
  75. package/esm/components/react-photo-view/utils/getSuitableImageSize.d.ts +10 -0
  76. package/esm/components/react-photo-view/utils/getSuitableImageSize.js +42 -0
  77. package/esm/components/react-photo-view/utils/isTouchDevice.d.ts +5 -0
  78. package/esm/components/react-photo-view/utils/isTouchDevice.js +5 -0
  79. package/esm/components/react-photo-view/utils/limitTarget.d.ts +5 -0
  80. package/esm/components/react-photo-view/utils/limitTarget.js +12 -0
  81. package/esm/components/react-photo-view/variables.d.ts +48 -0
  82. package/esm/components/react-photo-view/variables.js +48 -0
  83. package/esm/modules/ai-ability/Root.js +12 -3
  84. package/esm/modules/ai-ability/components/AddAbility/index.js +2 -2
  85. package/esm/modules/ai-ability/components/UpdateAbility/index.js +2 -2
  86. package/esm/modules/ai-ability/interface.d.ts +8 -1
  87. package/esm/modules/ai-ability-select/Root.d.ts +4 -0
  88. package/esm/modules/ai-ability-select/Root.js +47 -0
  89. package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +4 -0
  90. package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +22 -0
  91. package/esm/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +4 -0
  92. package/esm/modules/ai-ability-select/components/AiAbilityItem/index.js +42 -0
  93. package/esm/modules/ai-ability-select/components/AiAbilityItem/interface.d.ts +13 -0
  94. package/esm/modules/ai-ability-select/components/AiAbilityItem/interface.js +1 -0
  95. package/esm/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +2 -0
  96. package/esm/modules/ai-ability-select/components/AiAbilityItem/styled.js +8 -0
  97. package/esm/modules/ai-ability-select/components/AiAbilityList/index.d.ts +4 -0
  98. package/esm/modules/ai-ability-select/components/AiAbilityList/index.js +19 -0
  99. package/esm/modules/ai-ability-select/components/AiAbilityList/interface.d.ts +4 -0
  100. package/esm/modules/ai-ability-select/components/AiAbilityList/interface.js +1 -0
  101. package/esm/modules/ai-ability-select/index.d.ts +4 -0
  102. package/esm/modules/ai-ability-select/index.js +20 -0
  103. package/esm/modules/ai-ability-select/interface.d.ts +33 -0
  104. package/esm/modules/ai-ability-select/interface.js +1 -0
  105. package/esm/modules/ai-question/Root.d.ts +1 -1
  106. package/esm/modules/ai-question/Root.js +6 -6
  107. package/esm/modules/ai-question/components/QuestionModel/AutoCombine.d.ts +4 -0
  108. package/esm/modules/ai-question/components/QuestionModel/AutoCombine.js +19 -0
  109. package/esm/modules/ai-question/components/QuestionModel/Interactive.d.ts +3 -0
  110. package/esm/modules/ai-question/components/QuestionModel/Interactive.js +30 -0
  111. package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.d.ts +4 -0
  112. package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +58 -0
  113. package/esm/modules/ai-question/components/QuestionUpdate/SelectQuestion.d.ts +8 -0
  114. package/esm/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +62 -0
  115. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.d.ts +6 -0
  116. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.js +47 -0
  117. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +7 -0
  118. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +60 -0
  119. package/esm/modules/ai-question/components/QuestionUpdate/styled.d.ts +6 -0
  120. package/esm/modules/ai-question/components/QuestionUpdate/styled.js +52 -0
  121. package/esm/modules/ai-report/components/ScoreReport/styled.d.ts +1 -1
  122. package/esm/modules/ai-report/components/VideoQuestion/BodyImages.d.ts +7 -0
  123. package/esm/modules/ai-report/components/VideoQuestion/BodyImages.js +40 -0
  124. package/esm/modules/ai-template/Root.js +32 -10
  125. package/esm/modules/ai-template/components/CapabilityModel/index.js +1 -1
  126. package/esm/modules/ai-template/components/QuestionList/Item.d.ts +2 -2
  127. package/esm/modules/ai-template/components/QuestionList/Item.js +28 -7
  128. package/esm/modules/ai-template/components/QuestionList/index.d.ts +2 -1
  129. package/esm/modules/ai-template/components/QuestionList/index.js +15 -4
  130. package/esm/modules/ai-template/components/QuestionList/interface.d.ts +6 -1
  131. package/esm/modules/ai-template/components/TemplateList/index.js +4 -4
  132. package/esm/modules/ai-template/components/TemplateList/styled.d.ts +1 -1
  133. package/esm/modules/ai-template/index.js +2 -2
  134. package/esm/modules/ai-template/interface.d.ts +2 -0
  135. package/esm/store/ai-ability-select/question-ability-store.d.ts +21 -0
  136. package/esm/store/ai-ability-select/question-ability-store.js +21 -0
  137. package/esm/store/ai-question/interview-room-store.d.ts +20 -0
  138. package/esm/store/ai-question/interview-room-store.js +21 -0
  139. package/esm/store/ai-template/global-store.d.ts +3 -0
  140. package/esm/store/ai-template/global-store.js +3 -3
  141. package/esm/store/enterprise/enterprise-store.d.ts +29 -0
  142. package/esm/store/enterprise/enterprise-store.js +13 -0
  143. package/lib/components/Charts/Chart.js +1 -1
  144. package/lib/components/react-photo-view/Photo.css +14 -0
  145. package/lib/components/react-photo-view/Photo.d.ts +18 -0
  146. package/lib/components/react-photo-view/Photo.js +60 -0
  147. package/lib/components/react-photo-view/PhotoBox.css +18 -0
  148. package/lib/components/react-photo-view/PhotoBox.d.ts +22 -0
  149. package/lib/components/react-photo-view/PhotoBox.js +308 -0
  150. package/lib/components/react-photo-view/PhotoPage.d.ts +9 -0
  151. package/lib/components/react-photo-view/PhotoPage.js +79 -0
  152. package/lib/components/react-photo-view/PhotoProvider.d.ts +14 -0
  153. package/lib/components/react-photo-view/PhotoProvider.js +104 -0
  154. package/lib/components/react-photo-view/PhotoSlider.css +125 -0
  155. package/lib/components/react-photo-view/PhotoSlider.d.ts +12 -0
  156. package/lib/components/react-photo-view/PhotoSlider.js +268 -0
  157. package/lib/components/react-photo-view/PhotoView.d.ts +30 -0
  158. package/lib/components/react-photo-view/PhotoView.js +53 -0
  159. package/lib/components/react-photo-view/components/ArrowLeft.d.ts +3 -0
  160. package/lib/components/react-photo-view/components/ArrowLeft.js +20 -0
  161. package/lib/components/react-photo-view/components/ArrowRight.d.ts +3 -0
  162. package/lib/components/react-photo-view/components/ArrowRight.js +20 -0
  163. package/lib/components/react-photo-view/components/CloseIcon.d.ts +3 -0
  164. package/lib/components/react-photo-view/components/CloseIcon.js +18 -0
  165. package/lib/components/react-photo-view/components/PreventScroll.d.ts +1 -0
  166. package/lib/components/react-photo-view/components/PreventScroll.js +15 -0
  167. package/lib/components/react-photo-view/components/SlidePortal.css +10 -0
  168. package/lib/components/react-photo-view/components/SlidePortal.d.ts +7 -0
  169. package/lib/components/react-photo-view/components/SlidePortal.js +32 -0
  170. package/lib/components/react-photo-view/components/Spinner.css +23 -0
  171. package/lib/components/react-photo-view/components/Spinner.d.ts +4 -0
  172. package/lib/components/react-photo-view/components/Spinner.js +31 -0
  173. package/lib/components/react-photo-view/hooks/useAdjacentImages.d.ts +5 -0
  174. package/lib/components/react-photo-view/hooks/useAdjacentImages.js +17 -0
  175. package/lib/components/react-photo-view/hooks/useAnimationOrigin.d.ts +6 -0
  176. package/lib/components/react-photo-view/hooks/useAnimationOrigin.js +78 -0
  177. package/lib/components/react-photo-view/hooks/useAnimationPosition.d.ts +2 -0
  178. package/lib/components/react-photo-view/hooks/useAnimationPosition.js +34 -0
  179. package/lib/components/react-photo-view/hooks/useAnimationVisible.d.ts +6 -0
  180. package/lib/components/react-photo-view/hooks/useAnimationVisible.js +55 -0
  181. package/lib/components/react-photo-view/hooks/useContinuousTap.d.ts +8 -0
  182. package/lib/components/react-photo-view/hooks/useContinuousTap.js +42 -0
  183. package/lib/components/react-photo-view/hooks/useDebounceCallback.d.ts +10 -0
  184. package/lib/components/react-photo-view/hooks/useDebounceCallback.js +51 -0
  185. package/lib/components/react-photo-view/hooks/useEventListener.d.ts +1 -0
  186. package/lib/components/react-photo-view/hooks/useEventListener.js +21 -0
  187. package/lib/components/react-photo-view/hooks/useForkedVariable.d.ts +5 -0
  188. package/lib/components/react-photo-view/hooks/useForkedVariable.js +20 -0
  189. package/lib/components/react-photo-view/hooks/useInitial.d.ts +1 -0
  190. package/lib/components/react-photo-view/hooks/useInitial.js +12 -0
  191. package/lib/components/react-photo-view/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  192. package/lib/components/react-photo-view/hooks/useIsomorphicLayoutEffect.js +5 -0
  193. package/lib/components/react-photo-view/hooks/useMethods.d.ts +4 -0
  194. package/lib/components/react-photo-view/hooks/useMethods.js +38 -0
  195. package/lib/components/react-photo-view/hooks/useMountedRef.d.ts +3 -0
  196. package/lib/components/react-photo-view/hooks/useMountedRef.js +14 -0
  197. package/lib/components/react-photo-view/hooks/useScrollPosition.d.ts +4 -0
  198. package/lib/components/react-photo-view/hooks/useScrollPosition.js +163 -0
  199. package/lib/components/react-photo-view/hooks/useSetState.d.ts +2 -0
  200. package/lib/components/react-photo-view/hooks/useSetState.js +18 -0
  201. package/lib/components/react-photo-view/hooks/useTargetScale.d.ts +4 -0
  202. package/lib/components/react-photo-view/hooks/useTargetScale.js +76 -0
  203. package/lib/components/react-photo-view/index.d.ts +4 -0
  204. package/lib/components/react-photo-view/index.js +12 -0
  205. package/lib/components/react-photo-view/photo-context.d.ts +11 -0
  206. package/lib/components/react-photo-view/photo-context.js +4 -0
  207. package/lib/components/react-photo-view/types.d.ts +196 -0
  208. package/lib/components/react-photo-view/types.js +2 -0
  209. package/lib/components/react-photo-view/utils/edgeHandle.d.ts +15 -0
  210. package/lib/components/react-photo-view/utils/edgeHandle.js +45 -0
  211. package/lib/components/react-photo-view/utils/getMultipleTouchPosition.d.ts +5 -0
  212. package/lib/components/react-photo-view/utils/getMultipleTouchPosition.js +14 -0
  213. package/lib/components/react-photo-view/utils/getPositionOnMoveOrScale.d.ts +9 -0
  214. package/lib/components/react-photo-view/utils/getPositionOnMoveOrScale.js +34 -0
  215. package/lib/components/react-photo-view/utils/getRotateSize.d.ts +4 -0
  216. package/lib/components/react-photo-view/utils/getRotateSize.js +14 -0
  217. package/lib/components/react-photo-view/utils/getSuitableImageSize.d.ts +10 -0
  218. package/lib/components/react-photo-view/utils/getSuitableImageSize.js +48 -0
  219. package/lib/components/react-photo-view/utils/isTouchDevice.d.ts +5 -0
  220. package/lib/components/react-photo-view/utils/isTouchDevice.js +7 -0
  221. package/lib/components/react-photo-view/utils/limitTarget.d.ts +5 -0
  222. package/lib/components/react-photo-view/utils/limitTarget.js +17 -0
  223. package/lib/components/react-photo-view/variables.d.ts +48 -0
  224. package/lib/components/react-photo-view/variables.js +51 -0
  225. package/lib/modules/ai-ability/Root.js +12 -3
  226. package/lib/modules/ai-ability/components/AddAbility/index.js +2 -2
  227. package/lib/modules/ai-ability/components/UpdateAbility/index.js +2 -2
  228. package/lib/modules/ai-ability/interface.d.ts +8 -1
  229. package/lib/modules/ai-ability-select/Root.d.ts +4 -0
  230. package/lib/modules/ai-ability-select/Root.js +52 -0
  231. package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +4 -0
  232. package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +24 -0
  233. package/lib/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +4 -0
  234. package/lib/modules/ai-ability-select/components/AiAbilityItem/index.js +47 -0
  235. package/lib/modules/ai-ability-select/components/AiAbilityItem/interface.d.ts +13 -0
  236. package/lib/modules/ai-ability-select/components/AiAbilityItem/interface.js +2 -0
  237. package/lib/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +2 -0
  238. package/lib/modules/ai-ability-select/components/AiAbilityItem/styled.js +11 -0
  239. package/lib/modules/ai-ability-select/components/AiAbilityList/index.d.ts +4 -0
  240. package/lib/modules/ai-ability-select/components/AiAbilityList/index.js +24 -0
  241. package/lib/modules/ai-ability-select/components/AiAbilityList/interface.d.ts +4 -0
  242. package/lib/modules/ai-ability-select/components/AiAbilityList/interface.js +2 -0
  243. package/lib/modules/ai-ability-select/index.d.ts +4 -0
  244. package/lib/modules/ai-ability-select/index.js +25 -0
  245. package/lib/modules/ai-ability-select/interface.d.ts +33 -0
  246. package/lib/modules/ai-ability-select/interface.js +2 -0
  247. package/lib/modules/ai-question/Root.d.ts +1 -1
  248. package/lib/modules/ai-question/Root.js +6 -6
  249. package/lib/modules/ai-question/components/QuestionModel/AutoCombine.d.ts +4 -0
  250. package/lib/modules/ai-question/components/QuestionModel/AutoCombine.js +21 -0
  251. package/lib/modules/ai-question/components/QuestionModel/Interactive.d.ts +3 -0
  252. package/lib/modules/ai-question/components/QuestionModel/Interactive.js +35 -0
  253. package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.d.ts +4 -0
  254. package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +63 -0
  255. package/lib/modules/ai-question/components/QuestionUpdate/SelectQuestion.d.ts +8 -0
  256. package/lib/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +64 -0
  257. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.d.ts +6 -0
  258. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.js +49 -0
  259. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +7 -0
  260. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +62 -0
  261. package/lib/modules/ai-question/components/QuestionUpdate/styled.d.ts +6 -0
  262. package/lib/modules/ai-question/components/QuestionUpdate/styled.js +55 -0
  263. package/lib/modules/ai-report/components/ScoreReport/styled.d.ts +1 -1
  264. package/lib/modules/ai-report/components/VideoQuestion/BodyImages.d.ts +7 -0
  265. package/lib/modules/ai-report/components/VideoQuestion/BodyImages.js +45 -0
  266. package/lib/modules/ai-template/Root.js +32 -10
  267. package/lib/modules/ai-template/components/CapabilityModel/index.js +1 -1
  268. package/lib/modules/ai-template/components/QuestionList/Item.d.ts +2 -2
  269. package/lib/modules/ai-template/components/QuestionList/Item.js +27 -6
  270. package/lib/modules/ai-template/components/QuestionList/index.d.ts +2 -1
  271. package/lib/modules/ai-template/components/QuestionList/index.js +15 -4
  272. package/lib/modules/ai-template/components/QuestionList/interface.d.ts +6 -1
  273. package/lib/modules/ai-template/components/TemplateList/index.js +4 -4
  274. package/lib/modules/ai-template/components/TemplateList/styled.d.ts +1 -1
  275. package/lib/modules/ai-template/index.js +2 -2
  276. package/lib/modules/ai-template/interface.d.ts +2 -0
  277. package/lib/store/ai-ability-select/question-ability-store.d.ts +21 -0
  278. package/lib/store/ai-ability-select/question-ability-store.js +24 -0
  279. package/lib/store/ai-question/interview-room-store.d.ts +20 -0
  280. package/lib/store/ai-question/interview-room-store.js +24 -0
  281. package/lib/store/ai-template/global-store.d.ts +3 -0
  282. package/lib/store/ai-template/global-store.js +3 -3
  283. package/lib/store/enterprise/enterprise-store.d.ts +29 -0
  284. package/lib/store/enterprise/enterprise-store.js +16 -0
  285. package/package.json +2 -2
@@ -0,0 +1,60 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
+ if (ar || !(i in from)) {
15
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
16
+ ar[i] = from[i];
17
+ }
18
+ }
19
+ return to.concat(ar || Array.prototype.slice.call(from));
20
+ };
21
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
22
+ import { PostCommonUpload } from "../../../../services/ai-question";
23
+ import { isExceedMaxVideoFileSize } from "../../../../utils/utils";
24
+ import { useRequest } from 'ahooks';
25
+ import { Message, Typography, Upload, UploadIcon } from 'fbm-ui';
26
+ import { Stack } from 'fbm-ui/lib/mui';
27
+ var VideoVoiceUploader = function (_a) {
28
+ var index = _a.index, questions = _a.questions, setQuestions = _a.setQuestions;
29
+ var _b = useRequest(PostCommonUpload, {
30
+ manual: true,
31
+ onSuccess: function (_a) {
32
+ var data = _a.data;
33
+ var firstData = data[0];
34
+ questions[index] = __assign(__assign({}, questions[index]), { videoUrl: firstData.url });
35
+ setQuestions(__spreadArray([], questions, true));
36
+ },
37
+ }), loading = _b.loading, postCommonUpload = _b.run;
38
+ var uploadProps = {
39
+ type: 'custom',
40
+ showUploadList: false,
41
+ accept: '.mp4',
42
+ customRequest: function (_a) {
43
+ var file = _a.file;
44
+ if (isExceedMaxVideoFileSize(file.size)) {
45
+ Message.error('视频大小超过500M,请重新上传!');
46
+ }
47
+ else {
48
+ var formData = new FormData();
49
+ formData.append('files', file);
50
+ postCommonUpload(formData);
51
+ }
52
+ },
53
+ };
54
+ return (_jsx(Upload, __assign({}, uploadProps, { children: _jsxs(Stack, __assign({ justifyContent: "center", alignItems: "center", color: "text.secondary", sx: {
55
+ cursor: 'pointer',
56
+ width: 94,
57
+ height: 94,
58
+ } }, { children: [!loading && (_jsxs(_Fragment, { children: [_jsx(UploadIcon, { color: "inherit" }), _jsx(Typography, __assign({ variant: "caption", color: "inherit" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] })), loading && _jsx(Typography, __assign({ variant: "caption" }, { children: "\u4E0A\u4F20\u4E2D..." }))] })) })));
59
+ };
60
+ export default VideoVoiceUploader;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare const VideoPreview: import("@emotion/styled").StyledComponent<import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, {}>;
3
+ export declare const VideoPreviewWrapper: import("@emotion/styled").StyledComponent<import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
4
+ export declare const VideoPreviewMask: import("@emotion/styled").StyledComponent<import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
+ export declare const VideoPreviewMaskContent: import("@emotion/styled").StyledComponent<import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
+ export declare const VideoPreviewMaskIcon: import("@emotion/styled").StyledComponent<import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,52 @@
1
+ import { styled } from 'fbm-ui';
2
+ export var VideoPreview = styled('video')({
3
+ width: '100%',
4
+ height: '100%',
5
+ objectFit: 'cover',
6
+ });
7
+ export var VideoPreviewWrapper = styled('div')({
8
+ width: '100%',
9
+ height: '100%',
10
+ position: 'relative',
11
+ backgroundColor: 'rgb(222, 222, 222)',
12
+ overflow: 'hidden',
13
+ '& .video-preview': {
14
+ opacity: 0,
15
+ },
16
+ '&:hover': {
17
+ '& .video-preview': {
18
+ opacity: 1,
19
+ },
20
+ },
21
+ });
22
+ export var VideoPreviewMask = styled('div')(function (_a) {
23
+ var theme = _a.theme;
24
+ return ({
25
+ position: 'absolute',
26
+ top: 0,
27
+ left: 0,
28
+ width: '100%',
29
+ height: '100%',
30
+ color: 'white',
31
+ backgroundColor: theme.palette.text.disabled,
32
+ });
33
+ });
34
+ export var VideoPreviewMaskContent = styled('div')({
35
+ position: 'absolute',
36
+ top: '50%',
37
+ left: '50%',
38
+ transform: 'translate(-50%, -50%)',
39
+ });
40
+ export var VideoPreviewMaskIcon = styled('div')({
41
+ width: 40,
42
+ height: 40,
43
+ borderRadius: '50%',
44
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
45
+ display: 'flex',
46
+ justifyContent: 'center',
47
+ alignItems: 'center',
48
+ cursor: 'pointer',
49
+ '&:hover': {
50
+ backgroundColor: 'rgba(0, 0, 0, 0.8)',
51
+ },
52
+ });
@@ -15,7 +15,7 @@ export declare const RefreshIconRoot: import("@emotion/styled").StyledComponent<
15
15
  sx?: import("@mui/system/styleFunctionSx").SxProps<import("@mui/material").Theme> | undefined;
16
16
  titleAccess?: string | undefined;
17
17
  viewBox?: string | undefined;
18
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").SVGProps<SVGSVGElement>, "string" | "seed" | "children" | "style" | "clipPath" | "filter" | "mask" | "path" | "d" | "y" | "name" | "type" | "onLoad" | "fill" | "values" | "className" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "cursor" | "direction" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "key" | "id" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "end" | "max" | "media" | "method" | "min" | "target" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "local" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
18
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").SVGProps<SVGSVGElement>, "string" | "seed" | "children" | "style" | "clipPath" | "filter" | "mask" | "path" | "name" | "type" | "fill" | "values" | "className" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "cursor" | "direction" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "key" | "id" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "end" | "max" | "media" | "method" | "min" | "target" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "local" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan"> & {
19
19
  ref?: ((instance: SVGSVGElement | null) => void) | import("react").RefObject<SVGSVGElement> | null | undefined;
20
20
  }, "children" | keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "sx" | "viewBox" | "htmlColor" | "titleAccess"> & {
21
21
  children?: import("react").ReactNode;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import '@components/react-photo-view/Photo';
3
+ import '@components/react-photo-view/PhotoSlider';
4
+ declare const BodyImages: ({ reviewImgs }: {
5
+ reviewImgs: any;
6
+ }) => JSX.Element;
7
+ export default BodyImages;
@@ -0,0 +1,40 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
13
+ import { Image } from './styled';
14
+ import { PhotoSlider } from "../../../../components/react-photo-view";
15
+ import "../../../../components/react-photo-view/Photo";
16
+ import PhotoPage from "../../../../components/react-photo-view/PhotoPage";
17
+ import "../../../../components/react-photo-view/PhotoSlider";
18
+ import { Box, Typography } from 'fbm-ui';
19
+ import { Stack } from 'fbm-ui/lib/mui';
20
+ import { useCallback, useState } from 'react';
21
+ var BodyImages = function (_a) {
22
+ var reviewImgs = _a.reviewImgs;
23
+ var _b = useState(false), visible = _b[0], setVisible = _b[1];
24
+ var _c = useState(0), index = _c[0], setIndex = _c[1];
25
+ var handleSelected = useCallback(function (_, i) {
26
+ setIndex(i);
27
+ setVisible(true);
28
+ }, []);
29
+ return (_jsxs(_Fragment, { children: [_jsx(Stack, __assign({ spacing: 2, direction: "row" }, { children: reviewImgs.map(function (_a, i) {
30
+ var url = _a.url, title = _a.title;
31
+ return (_jsxs(Stack, __assign({ spacing: 0.5, onClick: function () {
32
+ setIndex(i);
33
+ setVisible(true);
34
+ } }, { children: [_jsx(Image, { src: url, alt: "" }), _jsx(Typography, __assign({ variant: "caption", color: "textSecondary", textAlign: "center" }, { children: title }))] }), url));
35
+ }) })), _jsx(PhotoSlider, { maskOpacity: 0.56, visible: visible, onClose: function () { return setVisible(false); }, index: index, onIndexChange: setIndex, images: reviewImgs.map(function (item) { return ({ src: item.url, key: item.url, title: item === null || item === void 0 ? void 0 : item.title }); }), overlayRender: function (_a) {
36
+ var images = _a.images, index = _a.index;
37
+ return (_jsx(Box, __assign({ sx: { width: 1, position: 'absolute', bottom: 0, zIndex: 50 } }, { children: _jsx(PhotoPage, { onSelected: handleSelected, images: images, index: index }) })));
38
+ } })] }));
39
+ };
40
+ export default BodyImages;
@@ -10,29 +10,45 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { forwardRef, memo, useCallback, useEffect } from 'react';
14
- import { Box, Button, Dialog, styled } from 'fbm-ui';
15
- import ScrollDialogContent from "../../components/ScrollDialogContent";
16
- import { useAiTemplateStore } from "../../store/ai-template/global-store";
17
13
  import CapabilityModel from './components/CapabilityModel';
18
14
  import QuestionList from './components/QuestionList';
19
15
  import TemplateHeader from './components/TemplateHeader';
20
16
  import TemplateList from './components/TemplateList';
21
17
  import TemplateMenu from './components/TemplateMenu';
18
+ import ScrollDialogContent from "../../components/ScrollDialogContent";
19
+ import { useAiTemplateStore } from "../../store/ai-template/global-store";
20
+ import { Box, Button, Dialog, styled, Typography } from 'fbm-ui';
21
+ import { forwardRef, memo, useCallback, useEffect, useState } from 'react';
22
22
  var AiTemplateDialog = styled(Dialog)({
23
23
  '& .MuiPaper-root>.MuiBox-root>.MuiBox-root': {
24
24
  marginBottom: 0,
25
25
  },
26
26
  });
27
27
  var AiTemplateRoot = forwardRef(function (props, ref) {
28
- var _a = useAiTemplateStore(), open = _a.open, previewItem = _a.previewItem, updateProps = _a.updateProps, updateState = _a.updateState, handleIncrUse = _a.handleIncrUse;
28
+ var _a = useAiTemplateStore(), open = _a.open, previewItem = _a.previewItem, _b = _a.currentCheckedQuestions, currentCheckedQuestions = _b === void 0 ? [] : _b, updateProps = _a.updateProps, updateState = _a.updateState, handleIncrUse = _a.handleIncrUse;
29
+ var _c = useState([]), checkedQuestionList = _c[0], setCheckedQuestionList = _c[1];
30
+ var _d = useState(0), curCheckedQuestionListCount = _d[0], setCurCheckedQuestionListCount = _d[1];
29
31
  var handleUseTemplate = useCallback(function () {
30
- var _a;
31
- (_a = props === null || props === void 0 ? void 0 : props.onUseTemplate) === null || _a === void 0 ? void 0 : _a.call(props, previewItem === null || previewItem === void 0 ? void 0 : previewItem.list);
32
+ var _a, _b;
33
+ if ((currentCheckedQuestions === null || currentCheckedQuestions === void 0 ? void 0 : currentCheckedQuestions.length) > 0) {
34
+ console.log('currentCheckedQuestions', currentCheckedQuestions);
35
+ (_a = props === null || props === void 0 ? void 0 : props.onUseTemplate) === null || _a === void 0 ? void 0 : _a.call(props, currentCheckedQuestions);
36
+ return;
37
+ }
38
+ (_b = props === null || props === void 0 ? void 0 : props.onUseTemplate) === null || _b === void 0 ? void 0 : _b.call(props, previewItem === null || previewItem === void 0 ? void 0 : previewItem.list);
32
39
  if (previewItem === null || previewItem === void 0 ? void 0 : previewItem.token) {
33
40
  handleIncrUse(previewItem === null || previewItem === void 0 ? void 0 : previewItem.token);
34
41
  }
35
- }, [handleIncrUse, previewItem, props]);
42
+ }, [handleIncrUse, previewItem, props, currentCheckedQuestions]);
43
+ var handleCheckedQuestionList = useCallback(function (list) {
44
+ setCheckedQuestionList(list);
45
+ var curList = list.filter(function (v) { return v && v.checked; });
46
+ setCurCheckedQuestionListCount(curList.length);
47
+ updateProps(__assign(__assign({}, props), { currentCheckedQuestions: curList }));
48
+ }, [props, updateProps, setCurCheckedQuestionListCount]);
49
+ var handleCheckChange = useCallback(function (list) {
50
+ handleCheckedQuestionList(list);
51
+ }, [handleCheckedQuestionList]);
36
52
  useEffect(function () {
37
53
  if (!props.open) {
38
54
  updateState({ previewItem: undefined });
@@ -40,9 +56,15 @@ var AiTemplateRoot = forwardRef(function (props, ref) {
40
56
  updateProps(props);
41
57
  // eslint-disable-next-line react-hooks/exhaustive-deps
42
58
  }, [props]);
59
+ // 重置选择项
60
+ useEffect(function () {
61
+ if (!previewItem) {
62
+ handleCheckedQuestionList([]);
63
+ }
64
+ }, [previewItem, handleCheckedQuestionList]);
43
65
  return (_jsx(AiTemplateDialog, __assign({ open: open, size: "lg", header: function () { return (_jsx(TemplateHeader, { name: (previewItem === null || previewItem === void 0 ? void 0 : previewItem.positionName) || (previewItem === null || previewItem === void 0 ? void 0 : previewItem.name), onClose: props.onClose, onBack: function () { return updateState({ previewItem: undefined }); }, onSearch: function () { } })); }, footer: function () {
44
- return previewItem ? (_jsx(Box, __assign({ display: "flex", justifyContent: "flex-end", padding: "12px 0" }, { children: _jsx(Button, __assign({ onClick: handleUseTemplate }, { children: "\u4F7F\u7528\u8BE5\u6A21\u7248" })) }))) : null;
45
- }, onClose: props.onClose }, { children: _jsxs(ScrollDialogContent, { children: [_jsxs(Box, __assign({ display: previewItem ? 'flex' : 'none', flexDirection: "column" }, { children: [_jsx(CapabilityModel, {}), _jsx(QuestionList, {})] })), _jsxs(Box, __assign({ display: previewItem ? 'none' : 'flex' }, { children: [_jsx(TemplateMenu, {}), _jsx(TemplateList, {})] }))] }) })));
66
+ return previewItem ? (_jsxs(Box, __assign({ display: "flex", justifyContent: curCheckedQuestionListCount > 0 ? 'space-between' : 'flex-end', alignItems: "center", padding: "12px 0 12px" }, { children: [curCheckedQuestionListCount > 0 && (_jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u5DF2\u9009\u62E9", _jsx("span", __assign({ style: { color: '#4CAF50', margin: '0 3px', fontWeight: 500 } }, { children: curCheckedQuestionListCount })), "\u9898"] }))), _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [curCheckedQuestionListCount > 0 && (_jsx(Button, __assign({ color: "secondary", variant: "text", sx: { mr: 1, color: 'RGBA(0, 0, 0, 0.56)' }, onClick: function () { return handleCheckedQuestionList([]); } }, { children: "\u53D6\u6D88\u9009\u62E9" }))), _jsx(Button, __assign({ onClick: handleUseTemplate }, { children: curCheckedQuestionListCount ? '使用选择题目' : '使用该模版' }))] }))] }))) : null;
67
+ }, onClose: props.onClose }, { children: _jsxs(ScrollDialogContent, { children: [_jsxs(Box, __assign({ display: previewItem ? 'flex' : 'none', flexDirection: "column" }, { children: [_jsx(CapabilityModel, {}), _jsx(QuestionList, { checkedQuestionList: checkedQuestionList, onCheckChange: handleCheckChange })] })), _jsxs(Box, __assign({ display: previewItem ? 'none' : 'flex' }, { children: [_jsx(TemplateMenu, {}), _jsx(TemplateList, {})] }))] }) })));
46
68
  });
47
69
  AiTemplateRoot.displayName = 'AiTemplateRoot';
48
70
  export default memo(AiTemplateRoot);
@@ -10,10 +10,10 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { Box, Typography } from 'fbm-ui';
14
13
  import TemplatePieProps from "../../../../components/Charts/TemplatePie";
15
14
  import ScoreBigBall from "../../../../components/ScoreBigBall";
16
15
  import { useAiTemplateStore } from "../../../../store/ai-template/global-store";
16
+ import { Box, Typography } from 'fbm-ui';
17
17
  var CapabilityModel = function () {
18
18
  var _a, _b;
19
19
  var _c = useAiTemplateStore(function (store) { return [store.menuId, store.previewItem]; }), menuId = _c.menuId, previewItem = _c.previewItem;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { QuestionListProps } from './interface';
3
- declare const QuestionItem: React.FC<QuestionListProps>;
2
+ import { QuestionItemProps } from './interface';
3
+ declare const QuestionItem: React.FC<QuestionItemProps>;
4
4
  export default QuestionItem;
@@ -9,16 +9,37 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
13
- import { Box, Button, Chip, Typography } from 'fbm-ui';
14
- import { Done } from '@mui/icons-material';
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
13
  import { useAiTemplateStore } from "../../../../store/ai-template/global-store";
14
+ import { Box, Checkbox, Chip, styled, Typography } from 'fbm-ui';
15
+ import { useCallback, useEffect, useState } from 'react';
16
16
  var QuestionItem = function (_a) {
17
- var item = _a.item, index = _a.index;
17
+ var item = _a.item, index = _a.index, onChange = _a.onChange;
18
18
  var name = item.name, desc = item.desc, category = item.category, weight = item.weight, originToken = item.originToken;
19
- var _b = useAiTemplateStore(function (store) { return [store.currentSteps, store.onUseTemplate]; }), currentSteps = _b.currentSteps, onUseTemplate = _b.onUseTemplate;
20
- console.log(currentSteps);
19
+ var _b = useAiTemplateStore(function (store) { return [store.currentSteps, store.currentCheckedQuestions]; }), currentSteps = _b.currentSteps, currentCheckedQuestions = _b.currentCheckedQuestions;
21
20
  var isUsed = currentSteps === null || currentSteps === void 0 ? void 0 : currentSteps.find(function (step) { return step.originToken === originToken; });
22
- return (_jsxs(Box, __assign({ border: isUsed ? '1px solid rgb(76, 175, 80)' : '1px solid rgba(0,0,0, 0.08)', borderRadius: "6px", mt: 2 }, { children: [_jsxs(Box, __assign({ borderBottom: "1px solid rgba(0,0,0, 0.08)", p: 2, display: "flex", justifyContent: "space-between" }, { children: [_jsxs(Box, { children: [_jsxs(Typography, __assign({ variant: "body1", weight: "500" }, { children: [index + 1, ".", name] })), _jsx(Typography, __assign({ variant: "body2", color: "secondary", mt: 1 }, { children: desc }))] }), isUsed && _jsx(Done, { color: "primary" }, "icon")] })), _jsxs(Box, __assign({ display: "flex", justifyContent: "space-between", padding: "8px 8px 8px 16px" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [category === null || category === void 0 ? void 0 : category.map(function (label) { return (_jsx(Chip, { color: "default", label: label }, label)); }), _jsxs(Typography, __assign({ variant: "body2", ml: 2 }, { children: ["\u6743\u91CD\u5360\u6BD4\uFF1A", weight, "%"] }))] })), _jsx(Button, __assign({ variant: "outlined", color: "inherit", onClick: function () { return onUseTemplate === null || onUseTemplate === void 0 ? void 0 : onUseTemplate([item]); } }, { children: "\u4F7F\u7528" }))] }))] })));
21
+ var _c = useState(false), curChecked = _c[0], setChecked = _c[1];
22
+ var UsedTag = styled(Box)(function () { return ({
23
+ position: 'absolute',
24
+ right: -1,
25
+ top: -1,
26
+ borderRadius: '0px 4px 0px 12px',
27
+ backgroundColor: '#81C784',
28
+ width: 49,
29
+ height: 24,
30
+ textAlign: 'center',
31
+ color: '#fff',
32
+ fontFamily: 'AlibabaPuHuiTiR',
33
+ fontSize: 12,
34
+ lineHeight: '24px',
35
+ }); });
36
+ var handleChange = useCallback(function (e) {
37
+ onChange === null || onChange === void 0 ? void 0 : onChange(e, index);
38
+ }, [index, onChange]);
39
+ useEffect(function () {
40
+ var checked = !!(currentCheckedQuestions === null || currentCheckedQuestions === void 0 ? void 0 : currentCheckedQuestions.find(function (step) { return step.token === item.token; }));
41
+ setChecked(checked);
42
+ }, [currentCheckedQuestions, item.token]);
43
+ return (_jsxs(Box, __assign({ border: '1px solid rgba(0,0,0, 0.08)', borderRadius: "6px", mt: 2 }, { children: [_jsxs(Box, __assign({ borderBottom: "1px solid rgba(0,0,0, 0.08)", p: 2, display: "flex", alignItems: "center" }, { children: [_jsx(Checkbox, { checked: curChecked, value: originToken, onChange: handleChange }), _jsxs(Box, __assign({ ml: -1 }, { children: [_jsxs(Typography, __assign({ variant: "body1", weight: "500" }, { children: [index + 1, ".", name] })), _jsx(Typography, __assign({ variant: "body2", color: "secondary", mt: 1 }, { children: desc }))] })), isUsed && (_jsx(UsedTag, { children: _jsx("span", { children: "\u5DF2\u4F7F\u7528" }) }))] })), _jsx(Box, __assign({ display: "flex", justifyContent: "space-between", padding: "8px 8px 8px 50px" }, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [category === null || category === void 0 ? void 0 : category.map(function (label) { return (_jsx(Chip, { color: "default", label: label }, label)); }), _jsxs(Typography, __assign({ variant: "body2", ml: 2 }, { children: ["\u6743\u91CD\u5360\u6BD4\uFF1A", weight, "%"] }))] })) }))] })));
23
44
  };
24
45
  export default QuestionItem;
@@ -1,3 +1,4 @@
1
1
  /// <reference types="react" />
2
- declare const QuestionList: React.FC;
2
+ import { QuestionListProps } from './interface';
3
+ declare const QuestionList: React.FC<QuestionListProps>;
3
4
  export default QuestionList;
@@ -10,11 +10,22 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { Box, Typography } from 'fbm-ui';
14
- import { useAiTemplateStore } from "../../../../store/ai-template/global-store";
15
13
  import QuestionItem from './Item';
16
- var QuestionList = function () {
14
+ import { useAiTemplateStore } from "../../../../store/ai-template/global-store";
15
+ import { Box, Typography } from 'fbm-ui';
16
+ import { useCallback } from 'react';
17
+ var QuestionList = function (_a) {
18
+ var checkedQuestionList = _a.checkedQuestionList, onCheckChange = _a.onCheckChange;
17
19
  var previewItem = useAiTemplateStore(function (store) { return [store.previewItem]; }).previewItem;
18
- return (_jsxs(Box, __assign({ display: "flex", flexDirection: "column", mt: 3 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center" }, { children: _jsx(Typography, __assign({ variant: "body1", weight: "500" }, { children: "\u9898\u76EE\u5217\u8868" })) })), _jsx(Box, { children: previewItem === null || previewItem === void 0 ? void 0 : previewItem.list.map(function (item, index) { return (_jsx(QuestionItem, { item: item, index: index }, item.token)); }) })] })));
20
+ var handleChange = useCallback(function (e, index) {
21
+ var checked = e.target.checked;
22
+ var item = previewItem === null || previewItem === void 0 ? void 0 : previewItem.list[index];
23
+ if (!item)
24
+ return;
25
+ item.checked = checked;
26
+ checkedQuestionList[index] = item;
27
+ onCheckChange(checkedQuestionList);
28
+ }, [previewItem, onCheckChange, checkedQuestionList]);
29
+ return (_jsxs(Box, __assign({ display: "flex", flexDirection: "column", mt: 3, width: "760px" }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center" }, { children: _jsx(Typography, __assign({ variant: "body1", weight: "500" }, { children: "\u9898\u76EE\u5217\u8868" })) })), _jsx(Box, { children: previewItem === null || previewItem === void 0 ? void 0 : previewItem.list.map(function (item, index) { return (_jsx(QuestionItem, { item: item, index: index, onChange: handleChange }, item.token)); }) })] })));
19
30
  };
20
31
  export default QuestionList;
@@ -1,5 +1,10 @@
1
1
  import { QuestionList } from '@/modules/ai-template/interface';
2
- export interface QuestionListProps {
2
+ export interface QuestionItemProps {
3
3
  item: QuestionList;
4
4
  index: number;
5
+ onChange?: (e: any, index: number) => void;
6
+ }
7
+ export interface QuestionListProps {
8
+ checkedQuestionList: QuestionList[];
9
+ onCheckChange: (list: QuestionList[]) => void;
5
10
  }
@@ -10,14 +10,14 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { useCallback, useEffect, useRef, useState } from 'react';
14
- import { Box, Button, Typography } from 'fbm-ui';
15
- import { useRequest } from 'ahooks';
13
+ import { AddIconRoot, ListCol, ListItem, ListItemOperation, ListItemSubTitle, ListItemTitle, ListRow } from './styled';
16
14
  import TemplatePie from "../../../../components/Charts/TemplatePie";
17
15
  import ScoreBigBall from "../../../../components/ScoreBigBall";
18
16
  import { PostAiTemplatesDetail, PostAiTemplatesList } from "../../../../services/ai-template";
19
17
  import { useAiTemplateStore } from "../../../../store/ai-template/global-store";
20
- import { AddIconRoot, ListCol, ListItem, ListItemOperation, ListItemSubTitle, ListItemTitle, ListRow } from './styled';
18
+ import { useRequest } from 'ahooks';
19
+ import { Box, Button, Typography } from 'fbm-ui';
20
+ import { useCallback, useEffect, useRef, useState } from 'react';
21
21
  var TemplateList = function () {
22
22
  var isPreview = useRef(false);
23
23
  var _a = useState([]), list = _a[0], setList = _a[1];
@@ -9,7 +9,7 @@ export declare const AddIconRoot: import("@emotion/styled").StyledComponent<{
9
9
  sx?: import("@mui/system/styleFunctionSx").SxProps<import("@mui/material").Theme> | undefined;
10
10
  titleAccess?: string | undefined;
11
11
  viewBox?: string | undefined;
12
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").SVGProps<SVGSVGElement>, "string" | "seed" | "children" | "style" | "clipPath" | "filter" | "mask" | "path" | "d" | "y" | "name" | "type" | "onLoad" | "fill" | "values" | "className" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "cursor" | "direction" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "key" | "id" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "end" | "max" | "media" | "method" | "min" | "target" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "local" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan"> & {
12
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").SVGProps<SVGSVGElement>, "string" | "seed" | "children" | "style" | "clipPath" | "filter" | "mask" | "path" | "name" | "type" | "fill" | "values" | "className" | "display" | "overflow" | "visibility" | "order" | "color" | "width" | "height" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "cursor" | "direction" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "imageRendering" | "opacity" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "offset" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "key" | "id" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "end" | "max" | "media" | "method" | "min" | "target" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "local" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan"> & {
13
13
  ref?: ((instance: SVGSVGElement | null) => void) | import("react").RefObject<SVGSVGElement> | null | undefined;
14
14
  }, "children" | keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "fontSize" | "shapeRendering" | "sx" | "viewBox" | "htmlColor" | "titleAccess"> & {
15
15
  children?: import("react").ReactNode;
@@ -10,9 +10,9 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
- import { forwardRef, memo } from 'react';
14
- import RootProvider from "../../components/RootProvider";
15
13
  import TemplateRoot from './Root';
14
+ import RootProvider from "../../components/RootProvider";
15
+ import { forwardRef, memo } from 'react';
16
16
  var AiTemplate = forwardRef(function (props, ref) {
17
17
  return (_jsx(RootProvider, { children: _jsx(TemplateRoot, __assign({ ref: ref }, props)) }));
18
18
  });
@@ -1,6 +1,7 @@
1
1
  import { QuestionModelStep } from '@/modules/ai-question/components/QuestionModel/interface';
2
2
  import { AiTemplatesCollection, AiTemplatesList } from '@/modules/ai-template/components/TemplateList/interface';
3
3
  export interface QuestionList extends QuestionModelStep {
4
+ checked?: boolean;
4
5
  }
5
6
  export interface HistoryPatterns {
6
7
  token?: string;
@@ -13,6 +14,7 @@ export interface AiTemplateProps {
13
14
  open: boolean;
14
15
  historyPatterns?: HistoryPatterns[];
15
16
  currentSteps?: QuestionList[];
17
+ currentCheckedQuestions?: QuestionList[];
16
18
  onClose?: () => void;
17
19
  onUseTemplate?: (list?: QuestionList[]) => void;
18
20
  }
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ import { AiAbility } from '@/modules/ai-ability-select/interface';
3
+ export declare const useAiAbilityListStore: (depsFn?: import("hox/es/types").DepsFn<{
4
+ selctedAbilitys: string[];
5
+ setSelctedAbilitys: import("react").Dispatch<import("react").SetStateAction<string[]>>;
6
+ setSpecialAiAbilityList: (list: AiAbility[]) => void;
7
+ aiAbilityList: AiAbility[];
8
+ setAiAbilityList: import("react").Dispatch<import("react").SetStateAction<AiAbility[]>>;
9
+ }> | undefined) => {
10
+ selctedAbilitys: string[];
11
+ setSelctedAbilitys: import("react").Dispatch<import("react").SetStateAction<string[]>>;
12
+ setSpecialAiAbilityList: (list: AiAbility[]) => void;
13
+ aiAbilityList: AiAbility[];
14
+ setAiAbilityList: import("react").Dispatch<import("react").SetStateAction<AiAbility[]>>;
15
+ }, getAiAbilityListStore: () => {
16
+ selctedAbilitys: string[];
17
+ setSelctedAbilitys: import("react").Dispatch<import("react").SetStateAction<string[]>>;
18
+ setSpecialAiAbilityList: (list: AiAbility[]) => void;
19
+ aiAbilityList: AiAbility[];
20
+ setAiAbilityList: import("react").Dispatch<import("react").SetStateAction<AiAbility[]>>;
21
+ } | undefined;
@@ -0,0 +1,21 @@
1
+ var _a;
2
+ import { getQuestionModelStore } from '../ai-question/question-model-store';
3
+ import { createGlobalStore } from 'hox';
4
+ import { useCallback, useState } from 'react';
5
+ export var useAiAbilityListStore = (_a = createGlobalStore(function () {
6
+ var isEdit = (getQuestionModelStore() || {}).isEdit;
7
+ var _a = useState([]), aiAbilityList = _a[0], setAiAbilityList = _a[1];
8
+ var _b = useState([]), selctedAbilitys = _b[0], setSelctedAbilitys = _b[1];
9
+ var setSpecialAiAbilityList = useCallback(function (list) {
10
+ setAiAbilityList((list === null || list === void 0 ? void 0 : list.filter(function (v) {
11
+ return !isEdit || !v.isNew || selctedAbilitys.includes(v.token);
12
+ })) || []);
13
+ }, [isEdit, selctedAbilitys]);
14
+ return {
15
+ selctedAbilitys: selctedAbilitys,
16
+ setSelctedAbilitys: setSelctedAbilitys,
17
+ setSpecialAiAbilityList: setSpecialAiAbilityList,
18
+ aiAbilityList: aiAbilityList,
19
+ setAiAbilityList: setAiAbilityList,
20
+ };
21
+ }), _a[0]), getAiAbilityListStore = _a[1];