cnhis-design-vue 3.3.1-release.5 → 3.3.2-beta.5

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 (347) hide show
  1. package/README.md +87 -87
  2. package/es/components/audio-sdk/index.d.ts +20 -0
  3. package/es/components/audio-sdk/src/Index.vue.d.ts +20 -0
  4. package/es/components/audio-sdk/src/Index.vue2.js +1 -1
  5. package/es/components/audio-sdk/src/audioSDK.d.ts +1 -0
  6. package/es/components/audio-sdk/src/audioSDK.js +11 -3
  7. package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +10 -0
  8. package/es/components/audio-sdk/src/components/recording.vue.d.ts +10 -0
  9. package/es/components/audio-sdk/src/components/recording.vue2.js +5 -0
  10. package/es/components/audio-sdk/src/constants/index.d.ts +1 -0
  11. package/es/components/audio-sdk/src/constants/index.js +3 -0
  12. package/es/components/audio-sdk/src/utils/recorder/fft.d.ts +4 -0
  13. package/es/components/audio-sdk/src/utils/recorder/mp3-engine.d.ts +4 -0
  14. package/es/components/audio-sdk/src/utils/recorder/mp3.d.ts +4 -0
  15. package/es/components/audio-sdk/src/utils/recorder/recorder.d.ts +4 -0
  16. package/es/components/audio-sdk/src/utils/recorder/wave.d.ts +4 -0
  17. package/es/components/audio-sdk/src/utils/recordingModal.js +13 -2
  18. package/es/components/base-search/src/index.vue2.js +6 -6
  19. package/es/components/big-table/src/BigTable.vue2.js +21 -21
  20. package/es/components/big-table/src/components/NoData.vue2.js +4 -4
  21. package/es/components/big-table/src/components/edit-form/edit-date.js +2 -2
  22. package/es/components/big-table/src/components/edit-form/edit-input.js +2 -2
  23. package/es/components/big-table/src/components/edit-form/edit-select.js +2 -2
  24. package/es/components/big-table/src/components/edit-form/edit-time.js +4 -4
  25. package/es/components/big-table/src/components/input-button.vue2.js +2 -2
  26. package/es/components/big-table/src/hooks/useNestTable.js +4 -4
  27. package/es/components/big-table/src/hooks/useTableParse.js +3 -3
  28. package/es/components/body-select/src/index.vue2.js +4 -4
  29. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  30. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  31. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  32. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  33. package/es/components/button-print/src/ButtonPrint.vue2.js +7 -7
  34. package/es/components/button-print/src/components/EditFormat.vue2.js +4 -4
  35. package/es/components/button-print/src/components/IdentityVerification.vue2.js +17 -17
  36. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +34 -34
  37. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +11 -11
  38. package/es/components/button-print/src/components/Preview.vue2.js +2 -2
  39. package/es/components/button-print/src/utils/dialog.js +6 -6
  40. package/es/components/button-print/src/utils/print.js +21 -21
  41. package/es/components/callback/src/components/render/popupMaps.d.ts +17 -1
  42. package/es/components/card-reader-sdk/src/components/readCardDialog.vue2.js +2 -2
  43. package/es/components/card-reader-sdk/src/utils/readHealthCard.js +4 -4
  44. package/es/components/card-reader-sdk-cn/src/henan/index.js +5 -5
  45. package/es/components/card-render/index.d.ts +4 -4
  46. package/es/components/card-render/src/CardRender.vue.d.ts +4 -4
  47. package/es/components/card-render/src/components/index.d.ts +23 -23
  48. package/es/components/classification/src/components/search-filter/index.vue2.js +6 -6
  49. package/es/components/classification/src/components/set-classification/index.vue2.js +5 -5
  50. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  51. package/es/components/classification/src/components/table-modal/index.vue2.js +45 -45
  52. package/es/components/classification/src/index.vue2.js +42 -42
  53. package/es/components/default-page/src/constants/index.js +19 -19
  54. package/es/components/default-page/src/index.vue2.js +2 -2
  55. package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +10 -10
  56. package/es/components/expand-field/src/components/FormItemPerson.vue2.js +4 -4
  57. package/es/components/expand-field/src/components/PersonModal.vue2.js +6 -6
  58. package/es/components/expand-field/src/components/form.vue2.js +87 -87
  59. package/es/components/expand-field/src/index.vue2.js +16 -16
  60. package/es/components/expand-field/src/utils/constant.js +12 -12
  61. package/es/components/fabric-chart/src/components/PopupMenu.js +4 -4
  62. package/es/components/fabric-chart/src/constants/index.js +10 -10
  63. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +3 -3
  64. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +2 -2
  65. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +5 -5
  66. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +2 -2
  67. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +6 -6
  68. package/es/components/fabric-chart/src/hooks/useCommon.js +4 -4
  69. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +12 -6
  70. package/es/components/field-editor/index.d.ts +4 -0
  71. package/es/components/field-editor/src/FieldEditor.vue.d.ts +4 -0
  72. package/es/components/field-editor/src/fields.js +30 -30
  73. package/es/components/field-set/src/FieldColor.vue2.js +15 -15
  74. package/es/components/field-set/src/FieldFilter.vue2.js +8 -8
  75. package/es/components/field-set/src/FieldSet.vue2.js +37 -37
  76. package/es/components/field-set/src/Index.vue2.js +6 -6
  77. package/es/components/field-set/src/TableStyle.vue2.js +9 -9
  78. package/es/components/field-set/src/components/condition.vue2.js +8 -8
  79. package/es/components/field-set/src/components/edit-dialog.vue2.js +23 -23
  80. package/es/components/field-set/src/components/edit-filter.vue2.js +4 -4
  81. package/es/components/field-set/src/components/table-row.vue2.js +25 -25
  82. package/es/components/field-set/src/constants/filter.js +42 -42
  83. package/es/components/field-set/src/constants/index.js +64 -64
  84. package/es/components/form-config/index.d.ts +80 -5
  85. package/es/components/form-config/src/FormConfig.vue.d.ts +80 -5
  86. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +4 -0
  87. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +57 -4
  88. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +16 -1
  89. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +26 -26
  90. package/es/components/form-config/src/constants/index.d.ts +2 -1
  91. package/es/components/form-config/src/constants/index.js +12 -11
  92. package/es/components/form-config/src/hooks/useConfigurationField.js +19 -1
  93. package/es/components/form-config/src/hooks/useLocale.d.ts +1 -0
  94. package/es/components/form-config/src/hooks/useLocale.js +32 -31
  95. package/es/components/form-config/src/types/index.d.ts +1 -0
  96. package/es/components/form-render/index.d.ts +4 -0
  97. package/es/components/form-render/src/FormRender.vue.d.ts +4 -0
  98. package/es/components/form-render/src/FormRender.vue2.js +3 -2
  99. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +4 -0
  100. package/es/components/form-render/src/components/renderer/combination/combination.js +1 -1
  101. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +2 -2
  102. package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +2 -2
  103. package/es/components/form-render/src/components/renderer/combination/tableCombination.js +2 -2
  104. package/es/components/form-render/src/components/renderer/date.d.ts +2 -2
  105. package/es/components/form-render/src/components/renderer/input.d.ts +16 -4
  106. package/es/components/form-render/src/components/renderer/input.js +39 -7
  107. package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +3 -0
  108. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -0
  109. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -0
  110. package/es/components/form-render/src/components/renderer/radio_checkbox.js +11 -10
  111. package/es/components/form-render/src/components/renderer/remoteSearch.js +2 -2
  112. package/es/components/form-render/src/components/renderer/switch.js +4 -4
  113. package/es/components/form-render/src/components/renderer/text.js +1 -1
  114. package/es/components/form-render/src/components/renderer/textarea.d.ts +16 -1
  115. package/es/components/form-render/src/components/renderer/textarea.js +36 -8
  116. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -0
  117. package/es/components/form-render/src/hooks/useComplexOptions.js +3 -2
  118. package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -2
  119. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +4 -3
  120. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
  121. package/es/components/form-render/src/hooks/useFormField.d.ts +2 -0
  122. package/es/components/form-render/src/hooks/useFormField.js +5 -1
  123. package/es/components/form-render/src/hooks/useFormValidator.js +1 -0
  124. package/es/components/form-render/src/hooks/usePresetScope.js +1 -0
  125. package/es/components/form-render/src/types/fieldItem.d.ts +11 -0
  126. package/es/components/form-render/src/types/index.d.ts +1 -0
  127. package/es/components/form-render/src/utils/index.js +1 -0
  128. package/es/components/form-render/src/utils/schema.js +60 -15
  129. package/es/components/guide/src/renderer.d.ts +2 -2
  130. package/es/components/iho-chat/src/Index.vue2.js +2 -2
  131. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +16 -16
  132. package/es/components/iho-chat/src/components/ChatFile.vue2.js +13 -13
  133. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +24 -24
  134. package/es/components/iho-chat/src/components/ChatHeader.vue2.js +10 -10
  135. package/es/components/iho-chat/src/components/ChatMain.vue2.js +10 -10
  136. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +13 -13
  137. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +18 -18
  138. package/es/components/iho-chat/src/components/ChatSet.vue2.js +25 -25
  139. package/es/components/iho-chat/src/components/ContextMenu.js +7 -7
  140. package/es/components/iho-chat/src/components/MessageEvent.vue2.js +4 -4
  141. package/es/components/iho-chat/src/components/MessageTemplate.vue2.js +2 -2
  142. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +12 -12
  143. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +10 -10
  144. package/es/components/iho-chat/src/components/SelectLabel.vue2.js +2 -2
  145. package/es/components/iho-chat/src/components/SiderList.vue2.js +12 -12
  146. package/es/components/iho-chat/src/components/Video.vue2.js +5 -5
  147. package/es/components/iho-chat/src/hooks/useVideo.js +2 -2
  148. package/es/components/iho-chat/src/utils/index.js +14 -14
  149. package/es/components/iho-table/index.d.ts +13 -1
  150. package/es/components/iho-table/src/IhoTable.vue.d.ts +13 -2
  151. package/es/components/iho-table/src/IhoTable.vue2.js +27 -20
  152. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +2 -2
  153. package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/dynamicFilter.vue2.js +9 -9
  154. package/es/components/iho-table/src/plugins/filterRemoteSearchPlugin/remoteFilter.vue2.js +9 -9
  155. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +6 -0
  156. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +11 -11
  157. package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +4 -4
  158. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +3 -3
  159. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +13 -13
  160. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +9 -9
  161. package/es/components/index.css +1 -1
  162. package/es/components/index.d.ts +1 -2
  163. package/es/components/index.js +0 -3
  164. package/es/components/info-header/index.d.ts +13 -0
  165. package/es/components/info-header/src/InfoHeader.vue.d.ts +13 -0
  166. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -0
  167. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -0
  168. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +5 -0
  169. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +4 -0
  170. package/es/components/info-header/src/components/patientInfo/index.vue2.js +21 -21
  171. package/es/components/keyboard/src/Keyboard.vue2.js +7 -7
  172. package/es/components/keyboard/src/components/NumberPanel.vue2.js +6 -6
  173. package/es/components/map/src/Map.vue2.js +2 -2
  174. package/es/components/picture-clipper/src/PictureClipper.vue2.js +4 -4
  175. package/es/components/quick-search/src/index.vue2.js +21 -21
  176. package/es/components/recommend-search/src/components/BaseSearch.js +2 -2
  177. package/es/components/recommend-search/src/components/RecommendInput.vue2.js +4 -4
  178. package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +3 -3
  179. package/es/components/scale-view/index.d.ts +1 -1
  180. package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -1
  181. package/es/components/scale-view/src/ScaleView.vue2.js +6 -6
  182. package/es/components/scale-view/src/components/NoData.vue2.js +4 -4
  183. package/es/components/scale-view/src/components/formitem/r-cascader.js +2 -2
  184. package/es/components/scale-view/src/components/formitem/r-checkbox.js +6 -6
  185. package/es/components/scale-view/src/components/formitem/r-input.js +2 -2
  186. package/es/components/scale-view/src/components/formitem/r-map.js +2 -2
  187. package/es/components/scale-view/src/components/formitem/r-radio.js +6 -6
  188. package/es/components/scale-view/src/components/formitem/r-select.js +2 -2
  189. package/es/components/scale-view/src/components/formitem/r-sign.js +7 -7
  190. package/es/components/scale-view/src/components/formitem/standard-modal.js +3 -3
  191. package/es/components/scale-view/src/hooks/scaleview-computed.js +5 -5
  192. package/es/components/scale-view/src/hooks/scaleview-init.d.ts +1 -1
  193. package/es/components/scale-view/src/hooks/scaleview-init.js +2 -2
  194. package/es/components/scale-view/src/hooks/scaleview-methods.js +4 -4
  195. package/es/components/scale-view/src/hooks/scaleview-submit.js +3 -3
  196. package/es/components/scale-view/src/hooks/scaleview-validate.js +9 -9
  197. package/es/components/search-cascader/src/SearchCascader.vue2.js +2 -2
  198. package/es/components/select-label/src/LabelFormContent.vue2.js +7 -7
  199. package/es/components/select-label/src/SelectLabel.vue2.js +13 -13
  200. package/es/components/select-label/src/components/label-classify.vue2.js +5 -5
  201. package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +3 -3
  202. package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +6 -6
  203. package/es/components/select-label/src/ihoLabel/iho-label-classify.vue2.js +3 -3
  204. package/es/components/select-person/src/SelectPerson.vue2.js +24 -21
  205. package/es/components/select-person/src/SelectPersonType.vue2.js +13 -13
  206. package/es/components/select-person/src/components/SearchOrgAndStaff.vue2.js +2 -2
  207. package/es/components/select-person/src/index.vue2.js +3 -3
  208. package/es/components/shortcut-setter/index.d.ts +16 -1
  209. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +16 -1
  210. package/es/components/slider-tree/src/index.vue2.js +3 -3
  211. package/es/components/table-export-field/src/components/ExportModal.vue2.js +23 -25
  212. package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +19 -19
  213. package/es/components/table-export-field/src/index.vue2.js +6 -6
  214. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue2.js +5 -5
  215. package/es/components/table-filter/src/components/bi-filter/helpers/options.js +34 -34
  216. package/es/components/table-filter/src/components/bi-filter/index.vue2.js +19 -19
  217. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +3 -3
  218. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +2 -2
  219. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +6 -6
  220. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +5 -5
  221. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +3 -3
  222. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +3 -3
  223. package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +2 -2
  224. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +17 -17
  225. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +5 -5
  226. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +4 -4
  227. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +6 -6
  228. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +3 -3
  229. package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue2.js +2 -2
  230. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +3 -3
  231. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +3 -3
  232. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +6 -6
  233. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +207 -207
  234. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +11 -11
  235. package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +2 -2
  236. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +3 -3
  237. package/es/components/table-filter/src/tool/baseOptions.js +19 -19
  238. package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +8 -8
  239. package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +2 -2
  240. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +2 -2
  241. package/es/components/vod-chunk-upload/src/vod-upload-modal.js +4 -4
  242. package/es/env.d.ts +25 -25
  243. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  244. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  245. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  246. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  247. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  248. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  249. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  250. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  251. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  252. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  253. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  254. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  255. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  256. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  257. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  258. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  259. package/es/shared/assets/img/failure.png.js +1 -1
  260. package/es/shared/assets/img/no-permission.png.js +1 -1
  261. package/es/shared/assets/img/nodata.png.js +1 -1
  262. package/es/shared/assets/img/notfound.png.js +1 -1
  263. package/es/shared/assets/img/qr.png.js +1 -1
  264. package/es/shared/assets/img/success.png.js +1 -1
  265. package/es/shared/assets/img/table_style_2.png.js +1 -1
  266. package/es/shared/assets/img/video.png.js +1 -1
  267. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  268. package/es/shared/assets/img/xb_big.png.js +1 -1
  269. package/es/shared/assets/img/xb_small.png.js +1 -1
  270. package/es/shared/components/CancelRadio/CancelRadio.d.ts +7 -0
  271. package/es/shared/components/CancelRadio/CancelRadio.js +6 -6
  272. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  273. package/es/shared/package.json.js +1 -1
  274. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  275. package/es/shared/utils/tapable/index.d.ts +139 -0
  276. package/package.json +76 -77
  277. package/es/components/ai-chat/index.d.ts +0 -680
  278. package/es/components/ai-chat/index.js +0 -10
  279. package/es/components/ai-chat/src/Index.vue.d.ts +0 -682
  280. package/es/components/ai-chat/src/Index.vue.js +0 -6
  281. package/es/components/ai-chat/src/Index.vue2.js +0 -175
  282. package/es/components/ai-chat/src/api/index.d.ts +0 -8
  283. package/es/components/ai-chat/src/api/index.js +0 -87
  284. package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +0 -38
  285. package/es/components/ai-chat/src/components/ChatAudio.vue.js +0 -6
  286. package/es/components/ai-chat/src/components/ChatAudio.vue2.js +0 -103
  287. package/es/components/ai-chat/src/components/ChatBI.vue.d.ts +0 -101
  288. package/es/components/ai-chat/src/components/ChatBI.vue.js +0 -6
  289. package/es/components/ai-chat/src/components/ChatBI.vue2.js +0 -73
  290. package/es/components/ai-chat/src/components/ChatCard.d.ts +0 -43
  291. package/es/components/ai-chat/src/components/ChatCard.js +0 -403
  292. package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +0 -203
  293. package/es/components/ai-chat/src/components/ChatFooter.vue.js +0 -6
  294. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +0 -373
  295. package/es/components/ai-chat/src/components/ChatMain.d.ts +0 -2
  296. package/es/components/ai-chat/src/components/ChatMain.js +0 -350
  297. package/es/components/ai-chat/src/components/ChatMainDefault.d.ts +0 -2
  298. package/es/components/ai-chat/src/components/ChatMainDefault.js +0 -278
  299. package/es/components/ai-chat/src/components/ChatPatient.vue.d.ts +0 -59
  300. package/es/components/ai-chat/src/components/ChatPatient.vue.js +0 -6
  301. package/es/components/ai-chat/src/components/ChatPatient.vue2.js +0 -218
  302. package/es/components/ai-chat/src/components/ChatPrompt.vue.d.ts +0 -45
  303. package/es/components/ai-chat/src/components/ChatPrompt.vue.js +0 -6
  304. package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +0 -143
  305. package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +0 -57
  306. package/es/components/ai-chat/src/components/ChatRight.vue.js +0 -6
  307. package/es/components/ai-chat/src/components/ChatRight.vue2.js +0 -190
  308. package/es/components/ai-chat/src/components/card/JsonCard.d.ts +0 -25
  309. package/es/components/ai-chat/src/components/card/JsonCard.js +0 -574
  310. package/es/components/ai-chat/src/components/message-render/CardRender.d.ts +0 -16
  311. package/es/components/ai-chat/src/components/message-render/CardRender.js +0 -80
  312. package/es/components/ai-chat/src/components/message-render/FormRender.d.ts +0 -16
  313. package/es/components/ai-chat/src/components/message-render/FormRender.js +0 -173
  314. package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.d.ts +0 -36
  315. package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.js +0 -6
  316. package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue2.js +0 -96
  317. package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.d.ts +0 -105
  318. package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.js +0 -6
  319. package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue2.js +0 -260
  320. package/es/components/ai-chat/src/components/svgs/AddIcon.vue.js +0 -18
  321. package/es/components/ai-chat/src/components/svgs/AudioIcon.vue.js +0 -37
  322. package/es/components/ai-chat/src/components/svgs/KeyboardIcon.vue.js +0 -20
  323. package/es/components/ai-chat/src/components/svgs/MicroPhone.vue.js +0 -48
  324. package/es/components/ai-chat/src/hooks/index.d.ts +0 -2
  325. package/es/components/ai-chat/src/hooks/index.js +0 -2
  326. package/es/components/ai-chat/src/hooks/useChartAudioContext.d.ts +0 -18
  327. package/es/components/ai-chat/src/hooks/useChartAudioContext.js +0 -202
  328. package/es/components/ai-chat/src/hooks/useData.d.ts +0 -77
  329. package/es/components/ai-chat/src/hooks/useData.js +0 -289
  330. package/es/components/ai-chat/src/hooks/useFooterContext.d.ts +0 -38
  331. package/es/components/ai-chat/src/hooks/useFooterContext.js +0 -218
  332. package/es/components/ai-chat/src/hooks/useProgram.d.ts +0 -14
  333. package/es/components/ai-chat/src/hooks/useProgram.js +0 -306
  334. package/es/components/ai-chat/src/hooks/useSSE.d.ts +0 -9
  335. package/es/components/ai-chat/src/hooks/useSSE.js +0 -138
  336. package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +0 -4
  337. package/es/components/ai-chat/src/hooks/useWebsocket.js +0 -66
  338. package/es/components/ai-chat/src/types/index.d.ts +0 -45
  339. package/es/components/ai-chat/src/types/index.js +0 -1
  340. package/es/components/ai-chat/src/utils/index.d.ts +0 -7
  341. package/es/components/ai-chat/src/utils/index.js +0 -41
  342. package/es/components/ai-chat/style/index.css +0 -1
  343. package/es/shared/assets/img/ai__avatar.png.js +0 -3
  344. package/es/shared/assets/img/file-emr.png.js +0 -3
  345. package/es/shared/assets/img/file.png.js +0 -3
  346. package/es/shared/assets/img/logo.png.js +0 -3
  347. package/es/shared/assets/img/use.png.js +0 -3
@@ -1,77 +0,0 @@
1
- import { InjectionKey } from 'vue';
2
- import { AnyObject } from '../../../../shared/types';
3
- export declare const InjectionAIChatData: InjectionKey<ReturnType<typeof initData>>;
4
- export declare function initData(props: AnyObject, emit: (event: 'button-click' | 'program', ...args: any[]) => void): {
5
- chatMainRef: import("vue").Ref<any>;
6
- patientInfo: import("vue").Ref<any>;
7
- configs: import("vue").Ref<any>;
8
- queryPrompt: import("vue").Ref<any>;
9
- queryData: import("vue").Ref<any>;
10
- queryRecord: import("vue").Ref<any>;
11
- defaultShortcutList: import("vue").Ref<any>;
12
- hideInput: import("vue").Ref<any>;
13
- shortcutList: import("vue").Ref<any>;
14
- audioTimed: import("vue").Ref<any>;
15
- commandList: import("vue").Ref<any>;
16
- appId: import("vue").Ref<any>;
17
- immediatelyRecording: import("vue").Ref<any>;
18
- isStreamingOutput: import("vue").Ref<any>;
19
- showLBtn: import("vue").Ref<any>;
20
- disabled: import("vue").Ref<any>;
21
- appCode: import("vue").Ref<any>;
22
- prologue: import("vue").Ref<any>;
23
- mobile: import("vue").Ref<any>;
24
- bpmnProcessIdAndStartToken: import("vue").Ref<any>;
25
- cssVars: import("vue").ComputedRef<AnyObject>;
26
- state: AnyObject;
27
- isSmall: import("vue").ComputedRef<boolean>;
28
- isDefault: import("vue").ComputedRef<boolean>;
29
- vaa07: import("vue").ComputedRef<any>;
30
- sessionId: import("vue").ComputedRef<any>;
31
- axiosInstance: import("axios").AxiosInstance;
32
- $dialog: import("naive-ui").DialogApi;
33
- emit: (event: 'button-click' | 'program', ...args: any[]) => void;
34
- appendMessage: (item: AnyObject) => Promise<void>;
35
- sendMessage: (params?: AnyObject) => Promise<void>;
36
- toFinishProgram: (bpmnProcessId: string) => void;
37
- toNext: (bpmnProcessId?: string | undefined, variables?: any) => void;
38
- toReplyAiConditions: (params?: AnyObject | undefined) => void;
39
- formatProcessInfo: (result: string) => void;
40
- };
41
- export declare const useData: () => {
42
- chatMainRef: import("vue").Ref<any>;
43
- patientInfo: import("vue").Ref<any>;
44
- configs: import("vue").Ref<any>;
45
- queryPrompt: import("vue").Ref<any>;
46
- queryData: import("vue").Ref<any>;
47
- queryRecord: import("vue").Ref<any>;
48
- defaultShortcutList: import("vue").Ref<any>;
49
- hideInput: import("vue").Ref<any>;
50
- shortcutList: import("vue").Ref<any>;
51
- audioTimed: import("vue").Ref<any>;
52
- commandList: import("vue").Ref<any>;
53
- appId: import("vue").Ref<any>;
54
- immediatelyRecording: import("vue").Ref<any>;
55
- isStreamingOutput: import("vue").Ref<any>;
56
- showLBtn: import("vue").Ref<any>;
57
- disabled: import("vue").Ref<any>;
58
- appCode: import("vue").Ref<any>;
59
- prologue: import("vue").Ref<any>;
60
- mobile: import("vue").Ref<any>;
61
- bpmnProcessIdAndStartToken: import("vue").Ref<any>;
62
- cssVars: import("vue").ComputedRef<AnyObject>;
63
- state: AnyObject;
64
- isSmall: import("vue").ComputedRef<boolean>;
65
- isDefault: import("vue").ComputedRef<boolean>;
66
- vaa07: import("vue").ComputedRef<any>;
67
- sessionId: import("vue").ComputedRef<any>;
68
- axiosInstance: import("axios").AxiosInstance;
69
- $dialog: import("naive-ui").DialogApi;
70
- emit: (event: 'button-click' | 'program', ...args: any[]) => void;
71
- appendMessage: (item: AnyObject) => Promise<void>;
72
- sendMessage: (params?: AnyObject) => Promise<void>;
73
- toFinishProgram: (bpmnProcessId: string) => void;
74
- toNext: (bpmnProcessId?: string | undefined, variables?: any) => void;
75
- toReplyAiConditions: (params?: AnyObject | undefined) => void;
76
- formatProcessInfo: (result: string) => void;
77
- };
@@ -1,289 +0,0 @@
1
- import { ref, reactive, computed, watch, nextTick, toRef, inject } from 'vue';
2
- import { useDialog } from 'naive-ui';
3
- import { useTheme } from '../../../../shared/hooks/useTheme.js';
4
- import '@vueuse/core';
5
- import 'date-fns';
6
- import { isArray, cloneDeep } from 'lodash-es';
7
- import '@vue/shared';
8
- import { uuidGenerator } from '../../../../shared/utils/index.js';
9
- import '@vueuse/shared';
10
- import '../../../../shared/hooks/selectHooks/useSearchContent.js';
11
- import '@vicons/ionicons5';
12
- import '../../../../shared/hooks/useScrollLoading.js';
13
- import { axiosInstance, conversationApi } from '../api/index.js';
14
- import { useSSE } from './useSSE.js';
15
- import { useProgram } from './useProgram.js';
16
- import { isValidJSON } from '../utils/index.js';
17
-
18
- const InjectionAIChatData = Symbol("InjectionAIChatData");
19
- function isMe({
20
- role = ""
21
- }) {
22
- return role === "user";
23
- }
24
- function initData(props, emit) {
25
- axiosInstance.defaults.headers["Authorization"] = "bearer " + props.token;
26
- const $dialog = useDialog();
27
- const chatMainRef = ref();
28
- const state = reactive({
29
- id: "ai-chat-" + uuidGenerator(),
30
- loading: false,
31
- sending: false,
32
- sendContent: "",
33
- selectedCommand: null,
34
- selectedPrompt: null,
35
- externalData: null,
36
- selectedPatient: null,
37
- selectedPatientLabel: "",
38
- selectedPatientForm: null,
39
- showPatient: false,
40
- showRight: false,
41
- showRightSlot: false,
42
- switchFlag: true,
43
- record: [],
44
- bpmnProcessId: "",
45
- bpmnProcessDoing: false,
46
- startToken: "",
47
- inquiryStr: "",
48
- needSubmitMsg: null
49
- });
50
- const {
51
- toNext,
52
- toBindAiConditions,
53
- toReplyAiConditions,
54
- toFinishProgram
55
- } = useProgram({
56
- props,
57
- state,
58
- appendMessage,
59
- emit,
60
- chatMainRef
61
- });
62
- const cssVars = useTheme();
63
- const isSmall = computed(() => props.uiStyle === "small");
64
- const isDefault = computed(() => props.uiStyle === "default");
65
- const vaa07 = computed(() => {
66
- var _a;
67
- return (_a = props.configs) == null ? void 0 : _a.vaa07;
68
- });
69
- const sessionId = computed(() => props.sessionId || vaa07.value);
70
- watch(() => state.startToken, (startToken) => {
71
- if (startToken && state.bpmnProcessId) {
72
- toBindAiConditions();
73
- toNext();
74
- }
75
- });
76
- watch(() => state.bpmnProcessId, async (value, old) => {
77
- if (value) {
78
- if (old) {
79
- toFinishProgram(old);
80
- }
81
- }
82
- });
83
- async function appendMessage(item) {
84
- if (isArray(item.contents)) {
85
- state.record.unshift(item);
86
- await nextTick();
87
- if (chatMainRef.value) {
88
- chatMainRef.value.scrollTop = 0;
89
- }
90
- }
91
- }
92
- function sendMessageSSE(params = {}) {
93
- appendMessage({
94
- fromMe: true,
95
- msgId: uuidGenerator(),
96
- contents: [{
97
- role: "user",
98
- content: state.sendContent
99
- }]
100
- });
101
- const {
102
- opType
103
- } = params;
104
- const _params = {
105
- ...params
106
- };
107
- if (opType && ["recommend_treatment_plan", "recommend_diagnosis", "recommend_examination"].includes(opType)) {
108
- Object.assign(_params, {
109
- contents: [{
110
- role: "user",
111
- content: state.sendContent,
112
- contentType: "text"
113
- }]
114
- });
115
- }
116
- useSSE({
117
- state,
118
- props,
119
- appendMessage,
120
- params: _params,
121
- emit,
122
- formatProcessInfo
123
- });
124
- }
125
- async function sendMessage(params = {}) {
126
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
127
- if (props.isStreamingOutput) {
128
- sendMessageSSE(params);
129
- return;
130
- }
131
- state.loading = true;
132
- const {
133
- opType
134
- } = params;
135
- const _params = {
136
- ...params
137
- };
138
- if (!opType && state.sendContent) {
139
- state.record.unshift({
140
- msgId: uuidGenerator(),
141
- contents: [{
142
- role: "user",
143
- content: state.sendContent
144
- }]
145
- });
146
- }
147
- if (chatMainRef.value) {
148
- chatMainRef.value.scrollTop = 0;
149
- }
150
- if (opType && ["recommend_treatment_plan", "recommend_diagnosis", "recommend_examination"].includes(opType)) {
151
- if (state.record.length > 0) {
152
- const newItem = state.record.find((item) => {
153
- var _a2;
154
- return !isMe((_a2 = item == null ? void 0 : item.contents) == null ? void 0 : _a2[0]);
155
- });
156
- if (newItem) {
157
- Object.assign(_params, cloneDeep(newItem));
158
- }
159
- }
160
- Object.assign(_params, {
161
- contents: [{
162
- role: "user",
163
- content: "",
164
- contentType: "text"
165
- }]
166
- });
167
- }
168
- try {
169
- const data = await conversationApi({
170
- contents: [{
171
- role: "user",
172
- content: state.sendContent,
173
- contentType: "text"
174
- }],
175
- platform: "web",
176
- sessionType: "text_chat",
177
- source: "global",
178
- configs: props.configs,
179
- switchFlag: state.switchFlag ? 1 : 0,
180
- ..._params
181
- });
182
- if (["diagnosis", "medical_order"].includes(opType)) {
183
- if (state.showRightSlot) {
184
- let key = "cliRefreshDiagnosis";
185
- if (opType === "medical_order") {
186
- key = "cliRefreshMedical";
187
- }
188
- emit("program", {
189
- key,
190
- type: "refresh",
191
- params: {}
192
- });
193
- }
194
- }
195
- if (isArray(data.contents) && data.contents.length > 1)
196
- data.contents.reverse();
197
- appendMessage(data);
198
- if (opType && ["create_inquiry", "create_medical"].includes(opType)) {
199
- if (opType === "create_inquiry") {
200
- if (((_b = (_a = data == null ? void 0 : data.contents) == null ? void 0 : _a[0]) == null ? void 0 : _b.messageType) !== "retry_inquiry") {
201
- if ((_f = (_e = (_d = (_c = data == null ? void 0 : data.contents) == null ? void 0 : _c[0]) == null ? void 0 : _d.content) == null ? void 0 : _e.details) == null ? void 0 : _f.autoBackFillData) {
202
- state.consultationContent = data;
203
- state.showRight = true;
204
- }
205
- }
206
- } else {
207
- emit("program", {
208
- key: "medical",
209
- params: {
210
- vac01: (_g = props.configs) == null ? void 0 : _g.vac01,
211
- type: 1
212
- }
213
- });
214
- }
215
- }
216
- if (!opType || opType === "create_inquiry") {
217
- state.sendContent = "";
218
- }
219
- } catch (error) {
220
- console.log("error ==>", error);
221
- if (error.message) {
222
- $dialog.error({
223
- title: "\u9519\u8BEF\u63D0\u793A",
224
- maskClosable: false,
225
- content: ((_h = error.message) == null ? void 0 : _h.includes("Network Error")) ? "\u7F51\u7EDC\u8FDE\u63A5\u5931\u8D25" : "\u5BF9\u8BDD\u8FDE\u63A5\u5931\u8D25",
226
- positiveText: ((_i = window.getLanguageByCode) == null ? void 0 : _i.call(window, "10010.1.27")) || "\u786E\u5B9A"
227
- });
228
- }
229
- } finally {
230
- state.loading = false;
231
- state.loadingText = "";
232
- }
233
- }
234
- function formatProcessInfo(result) {
235
- if (isValidJSON(result)) {
236
- const res = JSON.parse(result);
237
- const {
238
- bpmnProcessId,
239
- startToken
240
- } = res;
241
- if (bpmnProcessId) {
242
- state.bpmnProcessId = bpmnProcessId;
243
- }
244
- if (startToken) {
245
- state.startToken = startToken;
246
- }
247
- }
248
- }
249
- return {
250
- chatMainRef,
251
- patientInfo: toRef(props, "patientInfo"),
252
- configs: toRef(props, "configs"),
253
- queryPrompt: toRef(props, "queryPrompt"),
254
- queryData: toRef(props, "queryData"),
255
- queryRecord: toRef(props, "queryRecord"),
256
- defaultShortcutList: toRef(props, "defaultShortcutList"),
257
- hideInput: toRef(props, "hideInput"),
258
- shortcutList: toRef(props, "shortcutList"),
259
- audioTimed: toRef(props, "audioTimed"),
260
- commandList: toRef(props, "commandList"),
261
- appId: toRef(props, "appId"),
262
- immediatelyRecording: toRef(props, "immediatelyRecording"),
263
- isStreamingOutput: toRef(props, "isStreamingOutput"),
264
- showLBtn: toRef(props, "showLBtn"),
265
- disabled: toRef(props, "disabled"),
266
- appCode: toRef(props, "appCode"),
267
- prologue: toRef(props, "prologue"),
268
- mobile: toRef(props, "mobile"),
269
- bpmnProcessIdAndStartToken: toRef(props, "bpmnProcessIdAndStartToken"),
270
- cssVars,
271
- state,
272
- isSmall,
273
- isDefault,
274
- vaa07,
275
- sessionId,
276
- axiosInstance,
277
- $dialog,
278
- emit,
279
- appendMessage,
280
- sendMessage,
281
- toFinishProgram,
282
- toNext,
283
- toReplyAiConditions,
284
- formatProcessInfo
285
- };
286
- }
287
- const useData = () => inject(InjectionAIChatData);
288
-
289
- export { InjectionAIChatData, initData, useData };
@@ -1,38 +0,0 @@
1
- import { AnyObject } from '../../../../shared/types';
2
- import { CommandItem } from '../../../../components/ai-chat/src/types';
3
- export declare function useFooterContext(): {
4
- state: AnyObject;
5
- shortcutList: import("vue").Ref<any>;
6
- getShortcutName: (item: string | AnyObject) => any;
7
- isAllDisabled: import("vue").ComputedRef<any>;
8
- isStreamingOutput: import("vue").Ref<any>;
9
- handleShortcut: (item: string | AnyObject) => void;
10
- showPopover: import("vue").Ref<boolean>;
11
- handleKeyDown: (event: KeyboardEvent) => void;
12
- handleInput: (value: string) => void;
13
- btnDisabled: import("vue").ComputedRef<any>;
14
- showAudio: import("vue").Ref<boolean>;
15
- handleSend: () => void;
16
- breadcrumb: import("vue").Ref<{
17
- [x: string]: any;
18
- shortcutTitle: string;
19
- shortcutId: string;
20
- shortcutDescription?: string | undefined;
21
- children?: any[] | undefined;
22
- }[]>;
23
- currentShortcutId: import("vue").Ref<string>;
24
- currentCommand: import("vue").Ref<{
25
- [x: string]: any;
26
- shortcutTitle: string;
27
- shortcutId: string;
28
- shortcutDescription?: string | undefined;
29
- children?: any[] | undefined;
30
- }[]>;
31
- clickMenu: (menu: CommandItem) => void;
32
- audioTimed: import("vue").Ref<any>;
33
- showLBtn: import("vue").Ref<any>;
34
- isDefault: import("vue").ComputedRef<boolean>;
35
- commandList: import("vue").Ref<any>;
36
- isSmall: import("vue").ComputedRef<boolean>;
37
- cssVars: import("vue").ComputedRef<AnyObject>;
38
- };
@@ -1,218 +0,0 @@
1
- import { uuidGenerator } from '../../../../shared/utils/index.js';
2
- import { cloneDeep, isString } from 'lodash-es';
3
- import { ref, computed, onBeforeUnmount } from 'vue';
4
- import { callbackApi } from '../api/index.js';
5
- import { useData } from './useData.js';
6
- import '../../../audio-sdk/index.js';
7
- import AudioSDK from '../../../audio-sdk/src/audioSDK.js';
8
-
9
- function useFooterContext() {
10
- const {
11
- shortcutList,
12
- state,
13
- isSmall,
14
- audioTimed,
15
- commandList,
16
- isDefault,
17
- showLBtn,
18
- disabled,
19
- isStreamingOutput,
20
- emit,
21
- sendMessage,
22
- toReplyAiConditions,
23
- appendMessage,
24
- cssVars
25
- } = useData();
26
- const showPopover = ref(false);
27
- const breadcrumb = ref([]);
28
- const currentCommand = ref(cloneDeep(commandList.value || []));
29
- const currentShortcutId = ref("");
30
- const showAudio = ref(false);
31
- const isAllDisabled = computed(() => isDefault.value && disabled.value);
32
- const btnDisabled = computed(() => isAllDisabled.value || state.loading || !state.sendContent.replace(/(&nbsp;|\s|<br>)+/g, ""));
33
- function getShortcutName(item) {
34
- var _a;
35
- if (isString(item))
36
- return item;
37
- if (isDefault.value)
38
- return item.value;
39
- const {
40
- content: c
41
- } = ((_a = item == null ? void 0 : item.contents) == null ? void 0 : _a[0]) || {};
42
- return c == null ? void 0 : c.instructionName;
43
- }
44
- function handleShortcut(item) {
45
- var _a;
46
- if (isString(item))
47
- return handleStringShortcut(item);
48
- if (isStreamingOutput.value)
49
- return handleObjectStreamShortcut(item);
50
- if (isDefault.value && item.key)
51
- return handleDefaultModeShortcut(item);
52
- const msgItem = (_a = item == null ? void 0 : item.contents) == null ? void 0 : _a[0];
53
- emit("button-click", {
54
- msgItem,
55
- item
56
- });
57
- }
58
- function handleStringShortcut(shortcut) {
59
- state.sendContent = shortcut;
60
- }
61
- function handleObjectStreamShortcut(shortcut) {
62
- state.loadingText = "";
63
- state.sendContent = shortcut.value;
64
- sendMessage({
65
- opType: shortcut.key
66
- });
67
- }
68
- function handleDefaultModeShortcut(shortcut) {
69
- const keyMap = {
70
- recommend_treatment_plan: "\u53C2\u8003\u8BCA\u65AD\u7ED3\u679C\u4E0E\u60A3\u8005\u4E2A\u4F53\u4FE1\u606F\uFF0C\u6B63\u5168\u9762\u68B3\u7406\u77E5\u8BC6\u5E93\u548C\u4E34\u5E8A\u6307\u5357\uFF0C\u7EFC\u5408\u8003\u91CF\u4E3A\u60A8\u5339\u914D\u6700\u9002\u5B9C\u7684\u8BCA\u7597\u65B9\u6848\u63A8\u8350",
71
- recommend_examination: "\u4F9D\u636E\u5F53\u524D\u8BCA\u65AD\u4E0E\u75C5\u5386\u5185\u5BB9\u5206\u6790\uFF0C\u6B63\u5728\u7B5B\u4E3A\u60A8\u7B5B\u9009\u548C\u5339\u914D\u6700\u9002\u5408\u7684\u68C0\u9A8C\u68C0\u67E5\u9879\u76EE",
72
- recommend_diagnosis: "\u7CFB\u7EDF\u6B63\u5728\u5BF9\u60A8\u7684\u5BF9\u8BDD\u5185\u5BB9\u8FDB\u884C\u68B3\u7406\u6574\u5408\uFF0C\u8F6C\u5316\u4E3A\u89C4\u8303\u7684\u7ED3\u6784\u5316\u95EE\u8BCA\u8BB0\u5F55"
73
- };
74
- const loadingText = keyMap[shortcut.key];
75
- if (!loadingText)
76
- return emit("program", {
77
- key: shortcut.key
78
- });
79
- state.loadingText = loadingText;
80
- sendMessage({
81
- opType: shortcut.key
82
- });
83
- }
84
- function resetCurrentCommand() {
85
- var _a;
86
- showPopover.value = false;
87
- currentCommand.value = cloneDeep(commandList.value || []);
88
- breadcrumb.value = [];
89
- if ((_a = commandList.value) == null ? void 0 : _a.length) {
90
- showPopover.value = true;
91
- currentShortcutId.value = currentCommand.value[0].shortcutId;
92
- }
93
- }
94
- function handleKeyDown(event) {
95
- if (isDefault.value) {
96
- if (event.key === "Enter" && !isWrap(event)) {
97
- event.preventDefault();
98
- handleSend();
99
- }
100
- return;
101
- }
102
- if (["Slash", "NumpadDivide"].includes(event.code) && !state.selectedCommand && !state.sendContent) {
103
- resetCurrentCommand();
104
- } else if (event.key === "Backspace") {
105
- showPopover.value = false;
106
- if ((state.sendContent.startsWith("/") || state.sendContent.startsWith("\u3001")) && state.sendContent.length === 2 && !state.selectedCommand) {
107
- resetCurrentCommand();
108
- } else if (!state.sendContent && state.selectedCommand) {
109
- event.preventDefault();
110
- state.selectedCommand = null;
111
- state.sendContent = "/";
112
- resetCurrentCommand();
113
- }
114
- } else if (showPopover.value && ["ArrowUp", "ArrowDown"].includes(event.key)) {
115
- const currentIndex = currentCommand.value.findIndex((item) => item.shortcutId === currentShortcutId.value);
116
- if (event.key === "ArrowUp") {
117
- const previousIndex = currentIndex > 0 ? currentIndex - 1 : currentCommand.value.length - 1;
118
- currentShortcutId.value = currentCommand.value[previousIndex].shortcutId;
119
- } else if (event.key === "ArrowDown") {
120
- const nextIndex = currentIndex < currentCommand.value.length - 1 ? currentIndex + 1 : 0;
121
- currentShortcutId.value = currentCommand.value[nextIndex].shortcutId;
122
- }
123
- } else if (["Enter"].includes(event.key)) {
124
- if (!isWrap(event)) {
125
- event.preventDefault();
126
- if (showPopover.value) {
127
- const menu = currentCommand.value.find((item) => item.shortcutId === currentShortcutId.value);
128
- clickMenu(menu);
129
- } else {
130
- handleSend();
131
- }
132
- }
133
- } else {
134
- showPopover.value = false;
135
- }
136
- }
137
- function isWrap(event) {
138
- return event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
139
- }
140
- function handleInput(value) {
141
- if (!value && state.selectedPrompt) {
142
- state.selectedPrompt = null;
143
- }
144
- }
145
- function handleSend() {
146
- var _a;
147
- if (btnDisabled.value)
148
- return;
149
- if (isDefault.value) {
150
- if ((_a = state.needSubmitMsg) == null ? void 0 : _a.programData) {
151
- toReplyAiConditions({
152
- programData: state.needSubmitMsg.programData,
153
- params: {
154
- data: state.sendContent
155
- }
156
- });
157
- state.needSubmitMsg.programData = null;
158
- const messageItem = {
159
- fromMe: true,
160
- msgId: uuidGenerator(),
161
- contents: [{
162
- role: "user",
163
- content: state.sendContent
164
- }]
165
- };
166
- appendMessage(messageItem);
167
- callbackApi(messageItem);
168
- return;
169
- }
170
- sendMessage();
171
- return;
172
- }
173
- state.sending = true;
174
- state.loading = true;
175
- }
176
- function clickMenu(menu) {
177
- var _a;
178
- currentShortcutId.value = menu.shortcutId;
179
- if ((_a = menu.children) == null ? void 0 : _a.length) {
180
- currentCommand.value = menu.children;
181
- currentShortcutId.value = currentCommand.value[0].shortcutId;
182
- breadcrumb.value.push(menu);
183
- } else {
184
- state.selectedCommand = menu || {};
185
- showPopover.value = false;
186
- state.sendContent = "";
187
- }
188
- }
189
- onBeforeUnmount(() => {
190
- AudioSDK.destroy();
191
- });
192
- return {
193
- state,
194
- shortcutList,
195
- getShortcutName,
196
- isAllDisabled,
197
- isStreamingOutput,
198
- handleShortcut,
199
- showPopover,
200
- handleKeyDown,
201
- handleInput,
202
- btnDisabled,
203
- showAudio,
204
- handleSend,
205
- breadcrumb,
206
- currentShortcutId,
207
- currentCommand,
208
- clickMenu,
209
- audioTimed,
210
- showLBtn,
211
- isDefault,
212
- commandList,
213
- isSmall,
214
- cssVars
215
- };
216
- }
217
-
218
- export { useFooterContext };
@@ -1,14 +0,0 @@
1
- import { Ref } from 'vue';
2
- import { AnyObject } from '../../../../shared/types';
3
- export declare function useProgram({ props, state, appendMessage, emit, chatMainRef }: {
4
- props: AnyObject;
5
- state: AnyObject;
6
- appendMessage: Function;
7
- emit: (event: 'button-click' | 'program', ...args: any[]) => void;
8
- chatMainRef: Ref<Element | undefined>;
9
- }): {
10
- toNext: (bpmnProcessId?: string, variables?: any) => void;
11
- toBindAiConditions: () => void;
12
- toReplyAiConditions: (params?: AnyObject) => void;
13
- toFinishProgram: (bpmnProcessId: string) => void;
14
- };