cnhis-design-vue 3.2.5-release.4 → 3.2.6-beta.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.
- package/es/components/annotation-edit/src/type.d.ts +1 -1
- package/es/components/audio-sdk/src/components/recordingDialog.vue.d.ts +1 -1
- package/es/components/big-table/index.d.ts +6 -56
- package/es/components/big-table/src/BigTable.vue.d.ts +6 -56
- package/es/components/big-table/src/components/edit-form/edit-select.d.ts +1 -1
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.d.ts +4 -4
- package/es/components/big-table/src/hooks/useEdit.d.ts +27 -27
- package/es/components/big-table/src/hooks/useSeparateRow.d.ts +1 -1
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/BpmnRenderer.d.ts +1 -1
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomContextPadProvider.d.ts +1 -1
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPalette.d.ts +1 -1
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRenderer.d.ts +1 -1
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRules.d.ts +1 -1
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/index.d.ts +13 -13
- package/es/components/bpmn-workflow/src/custom/customOtherModule/CustomPopupMenu.d.ts +2 -2
- package/es/components/bpmn-workflow/src/custom/customOtherModule/customViewerRenderer.d.ts +9 -9
- package/es/components/bpmn-workflow/src/custom/customOtherModule/zoomScroll.d.ts +2 -2
- package/es/components/button-print/index.d.ts +13 -2917
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +13 -2917
- package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -1162
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +6 -1458
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +5 -1457
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +5 -1457
- package/es/components/calendar/index.d.ts +4 -4
- package/es/components/calendar/src/Calendar.vue.d.ts +4 -4
- package/es/components/calendar/src/types/index.d.ts +1 -1
- package/es/components/callback/src/components/dialog/drawer.vue.d.ts +2 -179
- package/es/components/callback/src/components/dialog/modal.vue.d.ts +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +120 -1701
- package/es/components/callback/src/types/index.d.ts +1 -1
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue.d.ts +2 -2
- package/es/components/card-reader-sdk/src/constants/index.d.ts +56 -56
- package/es/components/card-reader-sdk/src/utils/ensureUID2IdCard.d.ts +1 -1
- package/es/components/classification/index.d.ts +4 -14
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +24 -34
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +26 -36
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +4 -1
- package/es/components/classification/src/index.vue.d.ts +4 -14
- package/es/components/config-provider/src/interface.d.ts +2 -2
- package/es/components/date-picker/src/DatePicker.vue.d.ts +1 -1
- package/es/components/drag-scroll/src/types.d.ts +2 -2
- package/es/components/expand-field/index.d.ts +41 -575
- package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +56 -198
- package/es/components/expand-field/src/components/PersonModal.vue.d.ts +36 -168
- package/es/components/expand-field/src/components/form.vue.d.ts +41 -526
- package/es/components/expand-field/src/index.vue.d.ts +41 -575
- package/es/components/expand-field/src/types/index.d.ts +1 -1
- package/es/components/fabric-chart/index.d.ts +10 -10
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +10 -10
- package/es/components/fabric-chart/src/components/PopupMenu.d.ts +3 -3
- package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useShadow.d.ts +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +9 -9
- package/es/components/field-set/index.d.ts +5 -52
- package/es/components/field-set/src/FieldColor.vue.d.ts +13 -605
- package/es/components/field-set/src/FieldColor.vue2.js +1 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +6 -19
- package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +8 -9
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/Index.vue.d.ts +6 -53
- package/es/components/field-set/src/Index.vue2.js +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +1 -1
- package/es/components/field-set/src/components/condition.vue.d.ts +2 -2
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +11 -589
- package/es/components/field-set/src/components/edit-filter.vue.d.ts +3 -3
- package/es/components/field-set/src/constants/index.d.ts +1 -1
- package/es/components/field-set/src/types/index.d.ts +8 -8
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +62 -4785
- package/es/components/form-config/src/FormConfig.vue.d.ts +41 -4764
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +37 -98
- package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.d.ts +2 -2
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +22 -4651
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +3 -36
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +3 -3
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +1 -1
- package/es/components/form-config/src/hooks/usePresetRenderer.d.ts +1 -1
- package/es/components/form-config/src/types/index.d.ts +8 -8
- package/es/components/form-render/index.d.ts +15 -75
- package/es/components/form-render/src/FormRender.vue.d.ts +10 -70
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +15 -75
- package/es/components/form-render/src/components/renderer/combination/combination.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/combination/jsonCombination.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/combination/tableCombination.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/complex.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/date.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/index.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/inputGroup.d.ts +1 -11
- package/es/components/form-render/src/components/renderer/inputNumber.d.ts +4 -4
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.d.ts +9 -0
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +10 -10
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +15 -15
- package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/searchCascade.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/select.d.ts +3 -3
- package/es/components/form-render/src/hooks/useChangeContext.d.ts +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -4
- package/es/components/form-render/src/hooks/useFormContext.d.ts +1 -11
- package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +1 -19
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +10 -10
- package/es/components/form-render/src/types/index.d.ts +13 -13
- package/es/components/form-render/src/utils/index.d.ts +1 -1
- package/es/components/iho-chat/index.d.ts +719 -0
- package/es/components/iho-chat/index.js +1 -0
- package/es/components/iho-chat/src/Index.vue.d.ts +723 -0
- package/es/components/iho-chat/src/Index.vue2.js +1 -0
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +64 -0
- package/es/components/{biunique-chat → iho-chat}/src/components/ChatFile.vue2.js +1 -1
- package/es/components/{biunique-chat → iho-chat}/src/components/ChatFooter.vue.d.ts +24 -11
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -0
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +333 -0
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -0
- package/es/components/{biunique-chat → iho-chat}/src/components/ChatMain.vue.d.ts +21 -209
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -0
- package/es/components/{biunique-chat → iho-chat}/src/components/ChatRecord.vue.d.ts +1 -11
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -0
- package/es/components/{biunique-chat → iho-chat}/src/components/ChatSearch.vue.d.ts +2 -2
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +73 -0
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -0
- package/es/components/iho-chat/src/components/ContextMenu.d.ts +17 -0
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -0
- package/es/components/iho-chat/src/components/MessageTemplate.vue2.js +1 -0
- package/es/components/{biunique-chat → iho-chat}/src/components/PersonProfile.vue.d.ts +1 -9
- package/es/components/iho-chat/src/components/Video.vue.d.ts +38 -0
- package/es/components/{biunique-chat → iho-chat}/src/constants/index.d.ts +13 -1
- package/es/components/iho-chat/src/constants/index.js +1 -0
- package/es/components/iho-chat/src/hooks/useSession.js +1 -0
- package/es/components/{biunique-chat → iho-chat}/src/types/index.d.ts +2 -2
- package/es/components/{biunique-chat → iho-chat}/src/utils/index.d.ts +2 -0
- package/es/components/{biunique-chat → iho-chat}/src/utils/index.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -0
- package/es/components/iho-table/index.d.ts +46 -1567
- package/es/components/iho-table/src/IhoTable.vue.d.ts +40 -1561
- package/es/components/iho-table/src/constants/index.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +4 -4
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +18 -18
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +61 -61
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +1 -1
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.d.ts +1 -1
- package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +2 -335
- package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/pagerScrollPlugin/types.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +18 -17
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.d.ts +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.d.ts +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/types.d.ts +1 -1
- package/es/components/iho-table/src/types/index.d.ts +17 -17
- package/es/components/iho-table/src/types/pluginType.d.ts +13 -13
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -2
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +65 -1723
- package/es/components/info-header/src/InfoHeader.vue.d.ts +42 -1700
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +27 -1547
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +16 -1554
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +31 -1629
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +59 -119
- package/es/components/info-header/src/types/index.d.ts +4 -3
- package/es/components/keyboard/index.d.ts +1 -1
- package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
- package/es/components/map/src/types/index.d.ts +2 -2
- package/es/components/quick-search/index.d.ts +1 -295
- package/es/components/quick-search/src/index.vue.d.ts +1 -295
- package/es/components/recommend-search/index.d.ts +28 -28
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +28 -28
- package/es/components/recommend-search/src/components/BaseSearch.d.ts +4 -4
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +10 -10
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +11 -11
- package/es/components/recommend-search/src/types/index.d.ts +2 -2
- package/es/components/scale-view/index.d.ts +6 -300
- package/es/components/scale-view/src/ScaleView.vue.d.ts +6 -300
- package/es/components/scale-view/src/components/EvaluatePage.vue.d.ts +2 -2
- package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +2 -2
- package/es/components/scale-view/src/hooks/use-component.d.ts +3 -15
- package/es/components/scale-view/src/types/index.d.ts +1 -1
- package/es/components/search-cascader/index.d.ts +15 -14
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +16 -15
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
- package/es/components/search-cascader/src/components/SearchMenu.d.ts +3 -3
- package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
- package/es/components/select-label/index.d.ts +3 -21
- package/es/components/select-label/src/LabelFormContent.vue.d.ts +1 -7
- package/es/components/select-label/src/SelectLabel.vue.d.ts +1 -7
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue.d.ts +1 -7
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue.d.ts +1 -7
- package/es/components/select-label/src/index.vue.d.ts +2 -14
- package/es/components/select-label/src/types/index.d.ts +3 -3
- package/es/components/select-person/index.d.ts +36 -168
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +3 -58
- package/es/components/select-person/src/SearchOrgAndStaff.vue.d.ts +2 -2
- package/es/components/select-person/src/SelectPerson.vue.d.ts +9 -117
- package/es/components/shortcut-provider/index.d.ts +1 -1
- package/es/components/shortcut-provider/src/types/index.d.ts +1 -1
- package/es/components/shortcut-setter/index.d.ts +23 -1606
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +14 -1597
- package/es/components/step-notice/index.d.ts +94 -1615
- package/es/components/step-notice/src/StepNotice.vue.d.ts +79 -1600
- package/es/components/step-notice/src/components/NoticeItem.vue.d.ts +22 -22
- package/es/components/step-notice/src/components/NoticeItemAside.vue.d.ts +2 -2
- package/es/components/step-notice/src/components/NoticeOperationList.vue.d.ts +16 -16
- package/es/components/step-notice/src/hooks/useTheme.d.ts +1 -1
- package/es/components/step-notice/src/utils.d.ts +1 -1
- package/es/components/steps-wheel/index.d.ts +1 -1
- package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +1 -1
- package/es/components/table-export-field/index.d.ts +3 -630
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +2 -51
- package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +3 -581
- package/es/components/table-export-field/src/index.vue.d.ts +5 -632
- package/es/components/table-export-field/src/types/index.d.ts +1 -1
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +2 -2
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +2 -2
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +2 -2
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +2 -2
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +22 -32
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +2 -2
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +2 -2
- package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.d.ts +1 -11
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +15 -15
- package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +22 -32
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +22 -32
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +1 -50
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +3 -3
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +4 -4
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.d.ts +2 -2
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.d.ts +1 -11
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +16 -16
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +60 -119
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +59 -108
- package/es/components/table-filter/src/types/index.d.ts +25 -25
- package/es/components/time-line/index.d.ts +1 -48
- package/es/components/time-line/src/TimeLine.vue.d.ts +4 -51
- package/es/components/tooth-bitmap/index.d.ts +3 -3
- package/es/components/tooth-bitmap/src/ToothBitmap.vue.d.ts +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +3 -3
- package/es/shared/components/SlotRender/SlotRender.d.ts +4 -4
- package/es/shared/components/VueDraggable/src/core/renderHelper.d.ts +1 -1
- package/es/shared/hooks/useLevelSearchCascader.d.ts +2 -1
- package/es/shared/hooks/useLevelSearchCascader.js +1 -1
- package/es/shared/hooks/useTheme.d.ts +2 -2
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +1 -1
- package/es/shared/types/index.d.ts +15 -15
- package/es/shared/utils/tapable/AsyncParallelBailHook.d.ts +1 -1
- package/es/shared/utils/tapable/AsyncParallelHook.d.ts +1 -1
- package/es/shared/utils/tapable/AsyncSeriesBailHook.d.ts +1 -1
- package/es/shared/utils/tapable/AsyncSeriesHook.d.ts +1 -1
- package/es/shared/utils/tapable/AsyncSeriesLoopHook.d.ts +1 -1
- package/es/shared/utils/tapable/AsyncSeriesWaterfallHook.d.ts +1 -1
- package/es/shared/utils/tapable/SyncBailHook.d.ts +1 -1
- package/es/shared/utils/tapable/SyncHook.d.ts +1 -1
- package/es/shared/utils/tapable/SyncLoopHook.d.ts +1 -1
- package/es/shared/utils/tapable/SyncWaterfallHook.d.ts +1 -1
- package/es/shared/utils/vexutils.d.ts +2 -2
- package/package.json +6 -5
- package/es/components/biunique-chat/index.d.ts +0 -1692
- package/es/components/biunique-chat/index.js +0 -1
- package/es/components/biunique-chat/src/Index.vue.d.ts +0 -1695
- package/es/components/biunique-chat/src/Index.vue2.js +0 -1
- package/es/components/biunique-chat/src/components/ChatFile.vue.d.ts +0 -263
- package/es/components/biunique-chat/src/components/ChatFooter.vue2.js +0 -1
- package/es/components/biunique-chat/src/components/ChatHeader.vue.d.ts +0 -733
- package/es/components/biunique-chat/src/components/ChatHeader.vue2.js +0 -1
- package/es/components/biunique-chat/src/components/ChatMain.vue2.js +0 -1
- package/es/components/biunique-chat/src/components/ChatRecord.vue2.js +0 -1
- package/es/components/biunique-chat/src/components/ChatSet.vue.d.ts +0 -258
- package/es/components/biunique-chat/src/components/ChatSet.vue2.js +0 -1
- package/es/components/biunique-chat/src/components/MessageTemplate.vue2.js +0 -1
- package/es/components/biunique-chat/src/constants/index.js +0 -1
- package/es/components/biunique-chat/src/hooks/useSession.js +0 -1
- package/es/components/biunique-chat/style/index.css +0 -1
- /package/es/components/{biunique-chat → iho-chat}/src/Index.vue.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/api/index.d.ts +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/api/index.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/components/ChatFile.vue.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/components/ChatFooter.vue.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/components/ChatHeader.vue.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/components/ChatMain.vue.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/components/ChatRecord.vue.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/components/ChatSearch.vue.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/components/ChatSearch.vue2.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/components/ChatSet.vue.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/components/MessageTemplate.vue.d.ts +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/components/MessageTemplate.vue.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/components/PersonProfile.vue.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/components/PersonProfile.vue2.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/components/SiderList.vue.d.ts +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/components/SiderList.vue.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/components/SiderList.vue2.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/hooks/index.d.ts +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/hooks/index.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/hooks/useScrollLoading.d.ts +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/hooks/useScrollLoading.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/hooks/useSession.d.ts +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/hooks/useState.d.ts +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/hooks/useState.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/types/index.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/utils/chatSock.d.ts +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/utils/chatSock.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/utils/emoji.d.ts +0 -0
- /package/es/components/{biunique-chat → iho-chat}/src/utils/emoji.js +0 -0
- /package/es/components/{biunique-chat → iho-chat}/style/iconfont.ttf +0 -0
|
@@ -6,6 +6,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
6
6
|
state: import("../types").IState;
|
|
7
7
|
setMsgList: (list?: AnyObject[]) => void;
|
|
8
8
|
setCurrentSessionItem: (item: AnyObject) => void;
|
|
9
|
+
showMenu: import("vue").Ref<boolean>;
|
|
9
10
|
currentInfo: {
|
|
10
11
|
page: number;
|
|
11
12
|
hasMore: boolean;
|
|
@@ -20,207 +21,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
20
21
|
resetInfo: () => void;
|
|
21
22
|
setReferenceMsg: (msgItem: AnyObject) => void;
|
|
22
23
|
NAvatar: any;
|
|
23
|
-
NImageGroup:
|
|
24
|
-
showToolbar: {
|
|
25
|
-
type: BooleanConstructor;
|
|
26
|
-
default: boolean;
|
|
27
|
-
};
|
|
28
|
-
showToolbarTooltip: BooleanConstructor;
|
|
29
|
-
theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Image", {
|
|
30
|
-
toolbarIconColor: string;
|
|
31
|
-
toolbarColor: string;
|
|
32
|
-
toolbarBoxShadow: string;
|
|
33
|
-
toolbarBorderRadius: string;
|
|
34
|
-
}, {
|
|
35
|
-
Tooltip: import("naive-ui/es/_mixins").Theme<"Tooltip", {
|
|
36
|
-
borderRadius: string;
|
|
37
|
-
boxShadow: string;
|
|
38
|
-
color: string;
|
|
39
|
-
textColor: string;
|
|
40
|
-
padding: string;
|
|
41
|
-
}, {
|
|
42
|
-
Popover: import("naive-ui/es/_mixins").Theme<"Popover", {
|
|
43
|
-
fontSize: string;
|
|
44
|
-
borderRadius: string;
|
|
45
|
-
color: string;
|
|
46
|
-
dividerColor: string;
|
|
47
|
-
textColor: string;
|
|
48
|
-
boxShadow: string;
|
|
49
|
-
space: string;
|
|
50
|
-
spaceArrow: string;
|
|
51
|
-
arrowOffset: string;
|
|
52
|
-
arrowOffsetVertical: string;
|
|
53
|
-
arrowHeight: string;
|
|
54
|
-
padding: string;
|
|
55
|
-
}, any>;
|
|
56
|
-
}>;
|
|
57
|
-
}>>;
|
|
58
|
-
themeOverrides: import("vue").PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Image", {
|
|
59
|
-
toolbarIconColor: string;
|
|
60
|
-
toolbarColor: string;
|
|
61
|
-
toolbarBoxShadow: string;
|
|
62
|
-
toolbarBorderRadius: string;
|
|
63
|
-
}, {
|
|
64
|
-
Tooltip: import("naive-ui/es/_mixins").Theme<"Tooltip", {
|
|
65
|
-
borderRadius: string;
|
|
66
|
-
boxShadow: string;
|
|
67
|
-
color: string;
|
|
68
|
-
textColor: string;
|
|
69
|
-
padding: string;
|
|
70
|
-
}, {
|
|
71
|
-
Popover: import("naive-ui/es/_mixins").Theme<"Popover", {
|
|
72
|
-
fontSize: string;
|
|
73
|
-
borderRadius: string;
|
|
74
|
-
color: string;
|
|
75
|
-
dividerColor: string;
|
|
76
|
-
textColor: string;
|
|
77
|
-
boxShadow: string;
|
|
78
|
-
space: string;
|
|
79
|
-
spaceArrow: string;
|
|
80
|
-
arrowOffset: string;
|
|
81
|
-
arrowOffsetVertical: string;
|
|
82
|
-
arrowHeight: string;
|
|
83
|
-
padding: string;
|
|
84
|
-
}, any>;
|
|
85
|
-
}>;
|
|
86
|
-
}>>>;
|
|
87
|
-
builtinThemeOverrides: import("vue").PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Image", {
|
|
88
|
-
toolbarIconColor: string;
|
|
89
|
-
toolbarColor: string;
|
|
90
|
-
toolbarBoxShadow: string;
|
|
91
|
-
toolbarBorderRadius: string;
|
|
92
|
-
}, {
|
|
93
|
-
Tooltip: import("naive-ui/es/_mixins").Theme<"Tooltip", {
|
|
94
|
-
borderRadius: string;
|
|
95
|
-
boxShadow: string;
|
|
96
|
-
color: string;
|
|
97
|
-
textColor: string;
|
|
98
|
-
padding: string;
|
|
99
|
-
}, {
|
|
100
|
-
Popover: import("naive-ui/es/_mixins").Theme<"Popover", {
|
|
101
|
-
fontSize: string;
|
|
102
|
-
borderRadius: string;
|
|
103
|
-
color: string;
|
|
104
|
-
dividerColor: string;
|
|
105
|
-
textColor: string;
|
|
106
|
-
boxShadow: string;
|
|
107
|
-
space: string;
|
|
108
|
-
spaceArrow: string;
|
|
109
|
-
arrowOffset: string;
|
|
110
|
-
arrowOffsetVertical: string;
|
|
111
|
-
arrowHeight: string;
|
|
112
|
-
padding: string;
|
|
113
|
-
}, any>;
|
|
114
|
-
}>;
|
|
115
|
-
}>>>;
|
|
116
|
-
}, {
|
|
117
|
-
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
118
|
-
previewInstRef: import("vue").Ref<{
|
|
119
|
-
setThumbnailEl: (e: HTMLImageElement | null) => void;
|
|
120
|
-
setPreviewSrc: (src?: string | undefined) => void;
|
|
121
|
-
toggleShow: () => void;
|
|
122
|
-
} | null>;
|
|
123
|
-
next: () => void;
|
|
124
|
-
prev: () => void;
|
|
125
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
126
|
-
showToolbar: {
|
|
127
|
-
type: BooleanConstructor;
|
|
128
|
-
default: boolean;
|
|
129
|
-
};
|
|
130
|
-
showToolbarTooltip: BooleanConstructor;
|
|
131
|
-
theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Image", {
|
|
132
|
-
toolbarIconColor: string;
|
|
133
|
-
toolbarColor: string;
|
|
134
|
-
toolbarBoxShadow: string;
|
|
135
|
-
toolbarBorderRadius: string;
|
|
136
|
-
}, {
|
|
137
|
-
Tooltip: import("naive-ui/es/_mixins").Theme<"Tooltip", {
|
|
138
|
-
borderRadius: string;
|
|
139
|
-
boxShadow: string;
|
|
140
|
-
color: string;
|
|
141
|
-
textColor: string;
|
|
142
|
-
padding: string;
|
|
143
|
-
}, {
|
|
144
|
-
Popover: import("naive-ui/es/_mixins").Theme<"Popover", {
|
|
145
|
-
fontSize: string;
|
|
146
|
-
borderRadius: string;
|
|
147
|
-
color: string;
|
|
148
|
-
dividerColor: string;
|
|
149
|
-
textColor: string;
|
|
150
|
-
boxShadow: string;
|
|
151
|
-
space: string;
|
|
152
|
-
spaceArrow: string;
|
|
153
|
-
arrowOffset: string;
|
|
154
|
-
arrowOffsetVertical: string;
|
|
155
|
-
arrowHeight: string;
|
|
156
|
-
padding: string;
|
|
157
|
-
}, any>;
|
|
158
|
-
}>;
|
|
159
|
-
}>>;
|
|
160
|
-
themeOverrides: import("vue").PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Image", {
|
|
161
|
-
toolbarIconColor: string;
|
|
162
|
-
toolbarColor: string;
|
|
163
|
-
toolbarBoxShadow: string;
|
|
164
|
-
toolbarBorderRadius: string;
|
|
165
|
-
}, {
|
|
166
|
-
Tooltip: import("naive-ui/es/_mixins").Theme<"Tooltip", {
|
|
167
|
-
borderRadius: string;
|
|
168
|
-
boxShadow: string;
|
|
169
|
-
color: string;
|
|
170
|
-
textColor: string;
|
|
171
|
-
padding: string;
|
|
172
|
-
}, {
|
|
173
|
-
Popover: import("naive-ui/es/_mixins").Theme<"Popover", {
|
|
174
|
-
fontSize: string;
|
|
175
|
-
borderRadius: string;
|
|
176
|
-
color: string;
|
|
177
|
-
dividerColor: string;
|
|
178
|
-
textColor: string;
|
|
179
|
-
boxShadow: string;
|
|
180
|
-
space: string;
|
|
181
|
-
spaceArrow: string;
|
|
182
|
-
arrowOffset: string;
|
|
183
|
-
arrowOffsetVertical: string;
|
|
184
|
-
arrowHeight: string;
|
|
185
|
-
padding: string;
|
|
186
|
-
}, any>;
|
|
187
|
-
}>;
|
|
188
|
-
}>>>;
|
|
189
|
-
builtinThemeOverrides: import("vue").PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Image", {
|
|
190
|
-
toolbarIconColor: string;
|
|
191
|
-
toolbarColor: string;
|
|
192
|
-
toolbarBoxShadow: string;
|
|
193
|
-
toolbarBorderRadius: string;
|
|
194
|
-
}, {
|
|
195
|
-
Tooltip: import("naive-ui/es/_mixins").Theme<"Tooltip", {
|
|
196
|
-
borderRadius: string;
|
|
197
|
-
boxShadow: string;
|
|
198
|
-
color: string;
|
|
199
|
-
textColor: string;
|
|
200
|
-
padding: string;
|
|
201
|
-
}, {
|
|
202
|
-
Popover: import("naive-ui/es/_mixins").Theme<"Popover", {
|
|
203
|
-
fontSize: string;
|
|
204
|
-
borderRadius: string;
|
|
205
|
-
color: string;
|
|
206
|
-
dividerColor: string;
|
|
207
|
-
textColor: string;
|
|
208
|
-
boxShadow: string;
|
|
209
|
-
space: string;
|
|
210
|
-
spaceArrow: string;
|
|
211
|
-
arrowOffset: string;
|
|
212
|
-
arrowOffsetVertical: string;
|
|
213
|
-
arrowHeight: string;
|
|
214
|
-
padding: string;
|
|
215
|
-
}, any>;
|
|
216
|
-
}>;
|
|
217
|
-
}>>>;
|
|
218
|
-
}>>, {
|
|
219
|
-
showToolbar: boolean;
|
|
220
|
-
showToolbarTooltip: boolean;
|
|
221
|
-
}>;
|
|
24
|
+
NImageGroup: any;
|
|
222
25
|
NImage: any;
|
|
223
26
|
NIcon: any;
|
|
27
|
+
NButtonGroup: any;
|
|
28
|
+
NButton: any;
|
|
224
29
|
PersonProfile: import("vue").DefineComponent<{
|
|
225
30
|
userId: {
|
|
226
31
|
type: StringConstructor;
|
|
@@ -263,15 +68,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
263
68
|
NButton: any;
|
|
264
69
|
NIcon: any;
|
|
265
70
|
NUpload: any;
|
|
266
|
-
NUploadTrigger:
|
|
267
|
-
abstract: BooleanConstructor;
|
|
268
|
-
}, () => JSX.Element | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
269
|
-
[key: string]: any;
|
|
270
|
-
}>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
271
|
-
abstract: BooleanConstructor;
|
|
272
|
-
}>>, {
|
|
273
|
-
abstract: boolean;
|
|
274
|
-
}>;
|
|
71
|
+
NUploadTrigger: any;
|
|
275
72
|
ChatbubbleEllipses: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
276
73
|
Close: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
277
74
|
Camera: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
@@ -367,11 +164,26 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
367
164
|
default: string[][];
|
|
368
165
|
findEmoji(name: string): any;
|
|
369
166
|
};
|
|
167
|
+
ContextMenu: import("vue").DefineComponent<{
|
|
168
|
+
show: {
|
|
169
|
+
type: BooleanConstructor;
|
|
170
|
+
default: boolean;
|
|
171
|
+
};
|
|
172
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickMenu" | "update:show")[], "clickMenu" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
173
|
+
show: {
|
|
174
|
+
type: BooleanConstructor;
|
|
175
|
+
default: boolean;
|
|
176
|
+
};
|
|
177
|
+
}>> & {
|
|
178
|
+
onClickMenu?: ((...args: any[]) => any) | undefined;
|
|
179
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
180
|
+
}, {
|
|
181
|
+
show: boolean;
|
|
182
|
+
}>;
|
|
370
183
|
formatTime: typeof formatTime;
|
|
371
184
|
downloadFile: typeof downloadFile;
|
|
372
185
|
simplifyMessage: typeof simplifyMessage;
|
|
373
186
|
MESSAGE_TYPE: typeof MESSAGE_TYPE;
|
|
374
|
-
AddCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
375
187
|
ChatbubbleEllipsesOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
376
188
|
EllipsisHorizontal: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
377
189
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as t,watch as n,openBlock as s,createElementBlock as i,normalizeClass as o,unref as r,createVNode as a,withCtx as c,Fragment as l,renderList as m,toDisplayString as u,createCommentVNode as d,createBlock as p,withModifiers as f,createElementVNode as v}from"vue";import{NImageGroup as y,NAvatar as g,NImage as T,NButtonGroup as M,NButton as h,NIcon as k}from"naive-ui";import{format as _}from"date-fns";import{getHistoryRecordApi as E,readMessageApi as S}from"../api/index.js";import{useState as L}from"../hooks/useState.js";import{useSession as I}from"../hooks/useSession.js";import{first as j,last as C,isNumber as A}from"lodash-es";import H from"./PersonProfile.vue.js";import b from"./MessageTemplate.vue.js";import{emojis as w}from"../utils/emoji.js";import x from"./ContextMenu.js";import{formatTime as z,simplifyMessage as N,downloadFile as O}from"../utils/index.js";import{MESSAGE_TYPE as P}from"../constants/index.js";import{useScrollLoading as q}from"../hooks/useScrollLoading.js";import{ChatbubbleEllipsesOutline as D,EllipsisHorizontal as R}from"@vicons/ionicons5";const G={key:0,class:"time"},U={key:2,class:"message-box"},J=["data-time"],K={key:0,class:"reference-content"},F=["innerHTML"],X=["innerHTML"],B=["src"],Q=["href","onClick"],V=v("i",{class:"chat--iconfont chat--icon-face"},null,-1);var W=e({__name:"ChatMain",setup(e){const W=t(),{state:Y,setMsgList:Z}=L(),{setCurrentSessionItem:$}=I(Y),ee=t(!1),te={page:0,hasMore:!0,lastSendTime:_(new Date,"yyyy-MM-dd HH:mm:ss")};async function ne(){try{if(!te.hasMore)return;te.page++;const e=await E({sessionKey:Y.currentSessionItem.sessionKey,page:te.page,lastSendTime:te.lastSendTime});if(!Array.isArray(e)||0===e.length)return te.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");const t=j(e).id;te.lastSendTime=C(e).sendTime,Z(te.page>1?[...e,...Y.msgList]:e),1===te.page&&Y.currentSessionItem.unreadNum&&(await S({chatType:"SINGLE",messageIdSet:[t],receiver:Y.userInfo.id,sender:Y.currentSessionItem.receiver}),$({unreadNum:0}))}catch(e){console.log(e)}}function se(e){const{chatMessageType:t,messageTemplate:n}=e.content;return t!==P.TEMPLATE||!!n}function ie(e,t){var n,s;const{chatMessageType:i,messageTemplate:o}=e.content;if(i===P.TEMPLATE)return"system"===t?2==(null==(n=null==o?void 0:o.setting)?void 0:n.style.id):2!=(null==(s=null==o?void 0:o.setting)?void 0:s.style.id)}function oe(e){var t,n;const{chatMessageType:s,messageTemplate:i}=e;return s===P.TEMPLATE&&3==(null==(n=null==(t=null==i?void 0:i.setting)?void 0:t.style)?void 0:n.id)}function re(e,t){var n;const s=A(e.sendTime)?e.sendTime:Date.parse(e.sendTime),i=null==(n=Y.msgList[t-1])?void 0:n.sendTime;return s-(0===t?0:A(i)?i:Date.parse(i))>3e5}return q(W,(()=>{ne()}),"top"),n((()=>Y.id),(e=>{e&&(Object.assign(te,{page:0,hasMore:!0,lastSendTime:_(new Date,"yyyy-MM-dd HH:mm:ss")}),ne())}),{immediate:!0}),n((()=>Y.isAppendMsg),(e=>{e&&(Z([...Y.msgList,Y.currentMsg]),Y.isAppendMsg=!1,async function(){var e,t,n;const s=null!=(t=null==(e=W.value)?void 0:e.scrollHeight)?t:0;null==(n=W.value)||n.scrollTo({top:s,behavior:"auto"})}())}),{immediate:!0}),(e,t)=>(s(),i("div",{class:o(["chat-main",{"home-bg":!r(Y).id}]),ref_key:"chatMainRef",ref:W},[a(r(y),{"show-toolbar-tooltip":""},{default:c((()=>[(s(!0),i(l,null,m(r(Y).msgList,((e,n)=>(s(),i(l,{key:n},[se(e)?(s(),i("div",{key:0,class:o(["message-item",{"message-item--mine":e.sender==r(Y).userInfo.id}])},[re(e,n)?(s(),i("p",G,u(r(z)(e.sendTime).recordTime),1)):d("v-if",!0),ie(e,"system")?(s(),p(b,{key:1,data:e},null,8,["data"])):(s(),i("div",U,[a(H,{"user-id":e.sender},{trigger:c((()=>[a(r(g),{round:"",size:38,src:e.senderAvatar},null,8,["src"])])),_:2},1032,["user-id"]),e.content?(s(),i("div",{key:0,class:o(["content",{emoji:e.content.chatMessageType===r(P).EMOJI,template:e.content.chatMessageType===r(P).TEMPLATE,"template--3":oe(e.content)}]),"data-time":e.__time,onContextmenu:t[0]||(t[0]=f((e=>ee.value=!0),["prevent"]))},[e.content.chatMessageType===r(P).TEXT?(s(),i(l,{key:0},[e.content.referenceContent?(s(),i("div",K,[v("span",null,u(e.content.referenceContent.senderName)+":",1),v("pre",{innerHTML:r(N)(e.content.referenceContent.content)},null,8,F)])):d("v-if",!0),v("pre",{innerHTML:e.__content},null,8,X)],64)):d("v-if",!0),e.content.chatMessageType===r(P).EMOJI?(s(),i("img",{key:1,src:r(w).findEmoji(e.__content)},null,8,B)):d("v-if",!0),ie(e,"template")?(s(),p(b,{key:2,data:e},null,8,["data"])):d("v-if",!0),e.content.chatMessageType===r(P).IMAGE?(s(),p(r(T),{key:3,width:"240",src:e.__content},null,8,["src"])):d("v-if",!0),e.content.chatMessageType===r(P).FILE?(s(),i("a",{key:4,href:e.content.fileUrl,onClick:f((()=>r(O)(e.content.fileUrl,e.__content)),["prevent"])},u(e.__content),9,Q)):d("v-if",!0),d(' <div class="quick-menu">\r\n\t\t\t\t\t\t\t\t\t<n-icon :component="AddCircleOutline" />\r\n\t\t\t\t\t\t\t\t\t<n-icon :component="ChatbubbleEllipsesOutline" @click="() => setReferenceMsg(item)" />\r\n\t\t\t\t\t\t\t\t\t<n-icon :component="EllipsisHorizontal" />\r\n\t\t\t\t\t\t\t\t</div> '),a(r(M),{class:"quick-menu"},{default:c((()=>[a(r(h),{quaternary:"",size:"tiny"},{icon:c((()=>[V])),_:1}),a(r(h),{quaternary:"",size:"tiny",onClick:()=>{return t=e,Y.currentReferenceMsg=t,void Object.assign(Y.currentReferenceMsg,{chatType:"SINGLE",receiver:Y.currentSessionItem.receiver,receiverAvatar:Y.currentSessionItem.avatar,receiverName:Y.currentSessionItem.name});var t}},{icon:c((()=>[a(r(k),{size:"17",component:r(D)},null,8,["component"])])),_:2},1032,["onClick"]),a(r(h),{quaternary:"",size:"tiny"},{icon:c((()=>[a(r(k),{component:r(R)},null,8,["component"])])),_:1})])),_:2},1024)],42,J)):d("v-if",!0)]))],2)):d("v-if",!0)],64)))),128))])),_:1}),a(r(x),{show:ee.value,"onUpdate:show":t[1]||(t[1]=e=>ee.value=e)},null,8,["show"])],2))}});export{W as default};
|
|
@@ -44,17 +44,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
44
44
|
NSelect: any;
|
|
45
45
|
NAvatar: any;
|
|
46
46
|
NPopover: any;
|
|
47
|
-
NInputGroup:
|
|
48
|
-
[x: string]: never;
|
|
49
|
-
[x: number]: never;
|
|
50
|
-
[x: symbol]: never;
|
|
51
|
-
}, {
|
|
52
|
-
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
53
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
54
|
-
[x: string]: never;
|
|
55
|
-
[x: number]: never;
|
|
56
|
-
[x: symbol]: never;
|
|
57
|
-
}>>, {}>;
|
|
47
|
+
NInputGroup: any;
|
|
58
48
|
DatePicker: import("../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
|
59
49
|
updateUnchangedValue: {
|
|
60
50
|
type: BooleanConstructor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as a,computed as l,watch as t,openBlock as s,createBlock as r,unref as o,withCtx as n,createElementVNode as i,createVNode as u,toDisplayString as c,resolveDynamicComponent as d,createElementBlock as v,Fragment as m,renderList as p,withDirectives as f,createTextVNode as g,vShow as h}from"vue";import{NModal as y,NAvatar as b,NInputGroup as _,NInput as T,NSelect as k,NPopover as M,NTag as x,NIcon as I}from"naive-ui";import{SearchOutline as w}from"@vicons/ionicons5";import{useState as S}from"../hooks/useState.js";import{transformMessage as j,formatTime as A}from"../utils/index.js";import{last as L}from"lodash-es";import C from"../../../date-picker/index.js";import{searchChatRecordApi as E}from"../api/index.js";import{useDebounceFn as H}from"@vueuse/core";import{format as z}from"date-fns";import{useScrollLoading as D}from"../hooks/useScrollLoading.js";import{MESSAGE_TYPE as U}from"../constants/index.js";import{emojis as K}from"../utils/emoji.js";const O={class:"iho-chat-dialog__header"},R=i("span",{class:"left"},"聊天记录",-1),B={class:"center"},G={class:"iho-chat-dialog__content iho-chat-record-wrapper"},J={class:"chat-record-box"},N={class:"msg-box"},P={class:"name-and-time"},X={class:"content"},$=["src"],q=["src"],F=["innerHTML"],Q={key:1,class:"no-data"},V={class:"chat-record-box__filter"},W=i("span",{class:"filter-title"},"添加筛选条件",-1),Y={class:"filter-item"},Z=i("span",{class:"label"},"成员:",-1),ee={class:"filter-item"},ae=i("span",{class:"label"},"日期:",-1),le={class:"time-target"},te={class:"time-target__item"},se=i("span",null,"开始:",-1),re={class:"no-data"},oe={class:"time-target__item"},ne=i("span",null,"结束:",-1),ie={class:"no-data"};var ue=e({__name:"ChatRecord",props:{visible:{type:Boolean}},setup(e){const ue=e,ce={color:"#fff",textColor:"#666"},{state:de}=S(),ve=a(),me=a([]),pe=a(),fe=a([]),ge=a(),he=a(),ye=H(ke,500),be={page:0,hasMore:!0,lastSendTime:z(new Date,"yyyy-MM-dd HH:mm:ss")};async function _e(){var e;try{if(!be.hasMore)return;be.page++;const a=await E({orgId:de.orgId,keyword:pe.value,endTime:he.value?he.value+" 23:59:59":"",startTime:ge.value?ge.value+" 00:00:00":"",lastSendTime:be.lastSendTime,memberIdSet:fe.value,page:be.page,recordType:"ALL",sessionKey:de.currentSessionItem.sessionKey,userId:de.userInfo.id});Array.isArray(a)&&0!==a.length&&Array.isArray(a[0].recordList)||(be.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了"));let l=a||[];Array.isArray(a)&&a.length>0&&(l=a[0].recordList),be.lastSendTime=null==(e=L(l))?void 0:e.sendTime,l.forEach((e=>{var a,l,t,s,r;let o="";switch(e.content.chatMessageType){case U.TEXT:o=j(null==(a=e.content)?void 0:a.msg);break;case U.TEMPLATE:o=null==(s=null==(t=null==(l=e.content)?void 0:l.messageTemplate)?void 0:t.setting)?void 0:s.title;break;default:o=null==(r=e.content)?void 0:r.msg}e.__content=o})),me.value=be.page>1?me.value.concat(l):l}catch(e){console.log(e)}}D(ve,(()=>{_e()}));const Te=l((()=>[de.currentSessionItem]));function ke(){Object.assign(be,{page:0,hasMore:!0,lastSendTime:z(new Date,"yyyy-MM-dd HH:mm:ss")}),_e()}function Me(e){return!!he.value&&e>Date.parse(`${he.value} 23:59:59`)}function xe(e){return!!ge.value&&e<Date.parse(ge.value)}function Ie(e){switch(e){case"member":fe.value=[];break;case"start":ge.value=null;break;case"end":he.value=null}}function we(e){return u(m,null,[u("div",{style:"display: flex;align-items: center"},[u(b,{src:e.avatar,round:!0,size:"small"},null),u("span",{style:"margin-left: 10px"},[e.name])])])}return t([()=>fe.value,()=>ge.value,()=>he.value],(()=>{ue.visible&&ke()}),{deep:!0}),t((()=>ue.visible),(e=>{e?ke():(pe.value="",he.value=null,ge.value=null,fe.value=[],me.value=[])})),(e,a)=>(s(),r(o(y),{preset:"dialog",title:"","show-icon":!1,"auto-focus":!1,class:"iho-chat-dialog"},{header:n((()=>[i("div",O,[R,i("div",B,[u(o(b),{round:"",size:30,src:o(de).currentSessionItem.avatar},null,8,["src"]),i("span",null,c(o(de).currentSessionItem.name),1)])])])),default:n((()=>[i("div",G,[u(o(_),null,{default:n((()=>[(s(),r(d((()=>[u(I,{component:w,size:18,color:"#6666"},null),fe.value.length>0?u(x,{closable:!0,bordered:!1,color:ce,onClose:()=>Ie("member")},{default:()=>{var e;return[g("成员:")," ",fe.value.length>1?fe.value.length+"人":null==(e=Te.value.find((e=>e.receiver===fe.value[0])))?void 0:e.name]}}):null,ge.value?u(x,{closable:!0,bordered:!1,color:ce,onClose:()=>Ie("start")},{default:()=>[g("起始时间: "),ge.value]}):null,he.value?u(x,{closable:!0,bordered:!1,color:ce,onClose:()=>Ie("end")},{default:()=>[g("结束时间: "),he.value]}):null])))),u(o(T),{placeholder:"搜索",value:pe.value,"onUpdate:value":a[0]||(a[0]=e=>pe.value=e),valueModifiers:{trim:!0},onInput:o(ye)},null,8,["value","onInput"])])),_:1}),i("div",J,[i("div",{class:"chat-record-box__content",ref_key:"recordRef",ref:ve},[me.value.length>0?(s(!0),v(m,{key:0},p(me.value,(e=>(s(),v("div",{class:"content-item",key:e.id},[u(o(b),{round:"",size:38,src:e.senderAvatar},null,8,["src"]),i("div",N,[i("div",P,[i("span",null,c(e.senderName),1),i("span",null,c(o(A)(e.sendTime).recordTime),1)]),i("div",X,[e.content.chatMessageType===o(U).IMAGE?(s(),v("img",{key:0,class:"img",src:e.__content},null,8,$)):e.content.chatMessageType===o(U).EMOJI?(s(),v("img",{key:1,class:"emoji",src:o(K).findEmoji(e.__content)},null,8,q)):(s(),v("p",{key:2,innerHTML:e.__content},null,8,F))])])])))),128)):(s(),v("div",Q,"没有找到相关记录"))],512),i("div",V,[W,i("div",Y,[Z,u(o(k),{value:fe.value,"onUpdate:value":a[1]||(a[1]=e=>fe.value=e),multiple:"","max-tag-count":1,"render-label":we,options:o(Te),"value-field":"receiver"},null,8,["value","options"])]),i("div",ee,[ae,i("div",le,[u(o(M),{trigger:"click","show-arrow":!1},{trigger:n((()=>[i("div",te,[se,f(u(o(x),{bordered:!1,color:ce,closable:"",onClose:a[2]||(a[2]=()=>Ie("start"))},{default:n((()=>[g(c(ge.value),1)])),_:1},512),[[h,ge.value]]),f(i("span",re,"点击选择",512),[[h,!ge.value]])])])),default:n((()=>[u(o(C),{"formatted-value":ge.value,"onUpdate:formatted-value":a[3]||(a[3]=e=>ge.value=e),type:"date",panel:"",clearable:"","is-date-disabled":Me},null,8,["formatted-value"])])),_:1}),u(o(M),{trigger:"click","show-arrow":!1},{trigger:n((()=>[i("div",oe,[ne,f(u(o(x),{bordered:!1,color:ce,closable:"",onClose:a[4]||(a[4]=()=>Ie("end"))},{default:n((()=>[g(c(he.value),1)])),_:1},512),[[h,he.value]]),f(i("span",ie,"点击选择",512),[[h,!he.value]])])])),default:n((()=>[u(o(C),{"formatted-value":he.value,"onUpdate:formatted-value":a[5]||(a[5]=e=>he.value=e),type:"date",panel:"",clearable:"","is-date-disabled":xe},null,8,["formatted-value"])])),_:1})])])])])])])),_:1}))}});export{ue as default};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
cssVars: import("vue").ComputedRef<import("
|
|
2
|
+
cssVars: import("vue").ComputedRef<import("../../../../shared/types").AnyObject>;
|
|
3
3
|
inputRef: import("vue").Ref<any>;
|
|
4
4
|
showSearch: import("vue").Ref<boolean>;
|
|
5
5
|
keyword: import("vue").Ref<any>;
|
|
6
6
|
userList: import("vue").Ref<any>;
|
|
7
7
|
state: import("../types").IState;
|
|
8
|
-
openSession: (item: import("
|
|
8
|
+
openSession: (item: import("../../../../shared/types").AnyObject) => Promise<void>;
|
|
9
9
|
handleInput: () => Promise<void>;
|
|
10
10
|
handleSearch: () => Promise<void>;
|
|
11
11
|
addSession: (userId: string) => Promise<void>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../shared/types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
3
|
+
attrs: {
|
|
4
|
+
[x: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
state: import("../types").IState;
|
|
7
|
+
setCurrentSessionItem: (item: AnyObject) => void;
|
|
8
|
+
handleTopping: (value: boolean) => Promise<void>;
|
|
9
|
+
closeUserDetail: () => void;
|
|
10
|
+
NDrawer: any;
|
|
11
|
+
NDrawerContent: any;
|
|
12
|
+
NAvatar: any;
|
|
13
|
+
NIcon: any;
|
|
14
|
+
NSwitch: any;
|
|
15
|
+
ChevronForwardOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
16
|
+
PersonProfile: import("vue").DefineComponent<{
|
|
17
|
+
userId: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
}, {
|
|
22
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
userId: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
}>> & {
|
|
28
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
29
|
+
}>>;
|
|
30
|
+
emit: (event: "close", ...args: any[]) => void;
|
|
31
|
+
state: import("../types").IState;
|
|
32
|
+
openSession: (item: AnyObject) => Promise<void>;
|
|
33
|
+
showUserDetail: import("vue").Ref<boolean>;
|
|
34
|
+
showLargeAvatar: import("vue").Ref<boolean>;
|
|
35
|
+
showPhone: import("vue").Ref<boolean>;
|
|
36
|
+
userDetail: AnyObject;
|
|
37
|
+
info: {
|
|
38
|
+
label: string;
|
|
39
|
+
value: string;
|
|
40
|
+
key: string;
|
|
41
|
+
}[];
|
|
42
|
+
personInfo: import("vue").ComputedRef<{
|
|
43
|
+
label: string;
|
|
44
|
+
value: string;
|
|
45
|
+
key: string;
|
|
46
|
+
}[]>;
|
|
47
|
+
toOpenSession: () => Promise<void>;
|
|
48
|
+
updateShow: (value: boolean) => Promise<void>;
|
|
49
|
+
getContent: (info: AnyObject) => any;
|
|
50
|
+
onChange: (options: {
|
|
51
|
+
file: import("naive-ui").UploadFileInfo;
|
|
52
|
+
}) => Promise<void>;
|
|
53
|
+
NAvatar: any;
|
|
54
|
+
NPopover: any;
|
|
55
|
+
NButton: any;
|
|
56
|
+
NIcon: any;
|
|
57
|
+
NUpload: any;
|
|
58
|
+
NUploadTrigger: any;
|
|
59
|
+
ChatbubbleEllipses: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
60
|
+
Close: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
61
|
+
Camera: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
62
|
+
EyeOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
63
|
+
EyeOffOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
64
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
65
|
+
userId: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
required: true;
|
|
68
|
+
};
|
|
69
|
+
}>> & {
|
|
70
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
71
|
+
}, {}>;
|
|
72
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
73
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,useAttrs as s,openBlock as t,createBlock as o,unref as n,withCtx as r,createVNode as i,createElementVNode as a,toDisplayString as c}from"vue";import{NDrawer as m,NDrawerContent as u,NAvatar as l,NIcon as p,NSwitch as d}from"naive-ui";import{ChevronForwardOutline as f}from"@vicons/ionicons5";import{useState as h}from"../hooks/useState.js";import{useSession as v}from"../hooks/useSession.js";import S from"./PersonProfile.vue.js";import{toppingSessionApi as g}from"../api/index.js";import{isFunction as _}from"lodash-es";const I={class:"chat-set-wrapper"},w={class:"item user-info"},j={class:"item"},y=a("span",{class:"label"},"置顶聊天",-1);var k=e({__name:"ChatSet",setup(e){const k=s(),{state:C}=h(),{setCurrentSessionItem:U}=v(C);async function b(e){try{await g({sessionKey:C.currentSessionItem.sessionKey,id:C.currentSessionItem.id,topping:e}),U({topping:e})}catch(e){console.log(e)}}function x(){_(k["onUpdate:show"])&&k["onUpdate:show"](!1)}return(e,s)=>(t(),o(n(m),{width:320,"trap-focus":!1,"block-scroll":!1,to:".iho-chat"},{default:r((()=>[i(n(u),{title:"聊天设置"},{default:r((()=>[a("div",I,[i(S,{"user-id":n(C).currentSessionItem.receiver,onClose:x},{trigger:r((()=>[a("div",w,[i(n(l),{round:"",size:40,src:n(C).currentSessionItem.avatar},null,8,["src"]),a("span",null,c(n(C).currentSessionItem.name),1),i(n(p),{size:24,component:n(f),class:"item__right"},null,8,["component"])])])),_:1},8,["user-id"]),a("div",j,[y,i(n(d),{value:n(C).currentSessionItem.topping,"onUpdate:value":[s[0]||(s[0]=e=>n(C).currentSessionItem.topping=e),b],class:"item__right"},null,8,["value"])])])])),_:1})])),_:1}))}});export{k as default};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
show: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickMenu" | "update:show")[], "clickMenu" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
+
show: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
}>> & {
|
|
12
|
+
onClickMenu?: ((...args: any[]) => any) | undefined;
|
|
13
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
show: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as o,withDirectives as t,createVNode as l,vShow as n,isVNode as r}from"vue";import{NButtonGroup as a,NButton as i,NIcon as c}from"naive-ui";import{CopyOutline as p,OpenOutline as u,ChatbubbleEllipsesOutline as s,ReorderFourOutline as m,ReturnDownBack as y,DownloadOutline as f}from"@vicons/ionicons5";import{onClickOutside as b}from"@vueuse/core";var d=e({name:"PopupMenu",inheritAttrs:!1,props:{show:{type:Boolean,default:!1}},emits:["update:show","clickMenu"],setup(e,{attrs:d,slots:v,emit:w}){const k=[{icon:p,label:"复制",key:"copy"},{icon:u,label:"转发",key:"relay"},{icon:s,label:"回复",key:"reply"},{icon:m,label:"多选",key:"multiSelect"},{icon:y,label:"撤回",key:"withdraw"},{icon:f,label:"下载",key:"download"}],h=o(null);return b(h,(e=>{w("update:show",!1)})),()=>{let o;return t(l("div",{class:"contextmenu-wrapper",ref:h},[l(a,{vertical:!0},(p=o=k.map((e=>l(i,{quaternary:!0},{default:()=>e.label,icon:()=>l(c,{component:e.icon},null)}))),"function"==typeof p||"[object Object]"===Object.prototype.toString.call(p)&&!r(p)?o:{default:()=>[o]}))]),[[n,e.show]]);var p}}});export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as t,computed as l,openBlock as s,createElementBlock as n,Fragment as o,unref as a,createElementVNode as i,toDisplayString as c,withModifiers as r,createBlock as d,createCommentVNode as u,renderList as m,withCtx as p,createTextVNode as v,normalizeClass as f,createVNode as g}from"vue";import{NIcon as y,NButton as k}from"naive-ui";import{ChevronForwardOutline as _,AlertCircleSharp as h}from"@vicons/ionicons5";import b from"../../../../shared/components/SvgIcon/SvgIcon.vue.js";import{useState as T}from"../hooks/useState.js";const C={class:"default-msg-template__header"},M={class:"title"},L={class:"default-msg-template__body"},S=["src"],E={class:"template-content"},H=["innerHTML"],N={key:0,class:"default-msg-template__btn-group"},w=i("i",{class:"chat--iconfont chat--icon-more"},null,-1),j={key:1,class:"describe-msg-template"},B={class:"describe-msg-template__header"},D={class:"title"},O={class:"txt"},x=i("i",{class:"chat--iconfont chat--icon-more"},null,-1),z={key:2,class:"system-msg-template"},F=["innerHTML"],I=["onClick"];var P=e({__name:"MessageTemplate",props:{data:{type:Object,required:!0}},setup(e){const P=e,R=t(),q=t(!0),{emit:V}=T(),W=l((()=>{if(!R.value)return!1;const{childNodes:e,clientWidth:t}=R.value;let l=0;for(let s=0;s<e.length;s++)if(e[s].nodeType===Node.ELEMENT_NODE){const t=parseFloat(window.getComputedStyle(e[s]).lineHeight);l+=e[s].scrollHeight/t}else if(e[s].nodeType===Node.TEXT_NODE){const n=e[s].nodeValue.trim();if(""!==n){const e=n.split(" "),s=Math.floor(t/parseFloat(window.getComputedStyle(R.value).fontSize));l+=Math.ceil(e.length/s)}}return l>6})),X=l((()=>P.data.content.messageTemplate.setting)),$=l((()=>X.value.serverSetting)),A=l((()=>($.value.topRightButton||[])[0])),G=l((()=>{const e=(X.value.content||"").split("##").filter((e=>e));if(!e)return[];const{dbParamsList:t}=X.value||{};return e.map((e=>{const l=/\\n|\n|\r/g;return(e||"").replace(l,"<br>").replace(/\${(.*?)}/g,((e,s)=>{if(0===(t||[]).length)return"";return(U.value[s]||"").replace(l,"<br>")}))}))})),J=l((()=>{var e;return(null==(e=$.value)?void 0:e.toolbar_button)||[]})),K=l((()=>($.value.bottomButton||[])[0])),Q=l((()=>X.value.dbParamsList)),U=l((()=>P.data.content.messageTemplateData));function Y(e){V("template-click",e,P.data)}return(e,t)=>(s(),n(o,null,[1==a(X).style.id?(s(),n("div",{key:0,class:"default-msg-template",onClick:t[2]||(t[2]=()=>Y(a($)))},[i("div",C,[i("span",M,c(a(X).title),1),a(A)?(s(),n("span",{key:0,class:"btn",onClick:t[0]||(t[0]=r((()=>Y(a(A))),["stop"]))},c(a(A).title),1)):a($).address?(s(),d(a(y),{key:1,component:a(_),color:"#969696"},null,8,["component"])):u("v-if",!0)]),i("div",L,[a(X).style.icon?(s(),d(a(b),{key:0,class:"logo","icon-class":a(X).style.icon},null,8,["icon-class"])):a(X).style.image?(s(),n("img",{key:1,class:"logo",src:a(X).style.image},null,8,S)):u("v-if",!0),i("div",E,[(s(!0),n(o,null,m(a(G),(e=>(s(),n("div",{key:e,innerHTML:e},null,8,H)))),128))])]),a(J)?(s(),n("div",N,[(s(!0),n(o,null,m(a(J),((e,t)=>(s(),d(a(k),{type:"primary",round:"",ghost:"",onClick:r((()=>Y(e)),["stop"]),key:t},{default:p((()=>[v(c(e.title),1)])),_:2},1032,["onClick"])))),128))])):u("v-if",!0),a(K)?(s(),n("div",{key:1,class:"default-msg-template__footer",onClick:t[1]||(t[1]=r((()=>Y(a(K))),["stop"]))},[v(c(a(K).title)+" ",1),w])):u("v-if",!0)])):u("v-if",!0),3==a(X).style.id?(s(),n("div",j,[i("div",B,c(a(X).title),1),i("div",{class:f(["describe-msg-template__body",a(W)&&q.value?"overflow-hidden":""]),ref_key:"describeBodyRef",ref:R},[(s(!0),n(o,null,m(a(Q),((e,t)=>(s(),n(o,{key:t},[i("div",D,c(e.desc),1),i("div",O,c(a(U)[e.p_name]),1)],64)))),128))],2),a(W)?(s(),n("div",{key:0,class:f(["describe-msg-template__footer",q.value?"":"hidden"]),onClick:t[3]||(t[3]=()=>q.value=!1)},[v(" 展开全部 "),x],2)):u("v-if",!0)])):u("v-if",!0),2==a(X).style.id?(s(),n("div",z,[g(a(y),{component:a(h),color:"#ffc200",size:18},null,8,["component"]),i("span",{innerHTML:G.value.join("<br>")},null,8,F),(s(!0),n(o,null,m(a(J),((e,t)=>(s(),n("span",{class:"btn",onClick:()=>Y(e),key:t},c(e.title),9,I)))),128))])):u("v-if",!0)],64))}});export{P as default};
|
|
@@ -42,15 +42,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
42
42
|
NButton: any;
|
|
43
43
|
NIcon: any;
|
|
44
44
|
NUpload: any;
|
|
45
|
-
NUploadTrigger:
|
|
46
|
-
abstract: BooleanConstructor;
|
|
47
|
-
}, () => JSX.Element | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
48
|
-
[key: string]: any;
|
|
49
|
-
}>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
50
|
-
abstract: BooleanConstructor;
|
|
51
|
-
}>>, {
|
|
52
|
-
abstract: boolean;
|
|
53
|
-
}>;
|
|
45
|
+
NUploadTrigger: any;
|
|
54
46
|
ChatbubbleEllipses: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
55
47
|
Close: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
56
48
|
Camera: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import TRTC from 'trtc-sdk-v5';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
show: {
|
|
4
|
+
type: BooleanConstructor;
|
|
5
|
+
default: boolean;
|
|
6
|
+
};
|
|
7
|
+
}, {
|
|
8
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
show: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
}>> & {
|
|
14
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
}>>;
|
|
16
|
+
emit: (event: "update:show", ...args: any[]) => void;
|
|
17
|
+
state: import("../types").IState;
|
|
18
|
+
videoRef: import("vue").Ref<any>;
|
|
19
|
+
selfVideoRef: import("vue").Ref<any>;
|
|
20
|
+
trtc: TRTC;
|
|
21
|
+
handleEnter: () => Promise<void>;
|
|
22
|
+
installEventHandlers: () => void;
|
|
23
|
+
NButton: any;
|
|
24
|
+
NAvatar: any;
|
|
25
|
+
NIcon: any;
|
|
26
|
+
Mic: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
27
|
+
Call: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
28
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
show: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
}>> & {
|
|
34
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
show: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
export default _default;
|
|
@@ -9,7 +9,9 @@ export declare enum MESSAGE_TYPE {
|
|
|
9
9
|
TEMPLATE = "TEMPLATE",
|
|
10
10
|
BLEND = "BLEND",
|
|
11
11
|
FORWARD = "FORWARD",
|
|
12
|
-
QUICK_REPLY = "QUICK_REPLY"
|
|
12
|
+
QUICK_REPLY = "QUICK_REPLY",
|
|
13
|
+
AUDIO = "AUDIO",
|
|
14
|
+
VIDEO = "VIDEO"
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* 订阅消息类别
|
|
@@ -20,3 +22,13 @@ export declare enum SUBSCRIBE_MESSAGE_TYPE {
|
|
|
20
22
|
NEW_SESSION = "NEW_SESSION",
|
|
21
23
|
MESSAGE = "MESSAGE"
|
|
22
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* 音视频接通状态
|
|
27
|
+
*/
|
|
28
|
+
export declare enum AV_STATUS {
|
|
29
|
+
IN_CALL = "IN_CALL",
|
|
30
|
+
NO_RESPONSE = "NO_RESPONSE",
|
|
31
|
+
FINISHED = "FINISHED",
|
|
32
|
+
REJECTED = "REJECTED",
|
|
33
|
+
CANCELED = "CANCELED"
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var E=(E=>(E.TEXT="TEXT",E.FILE="FILE",E.EMOJI="EMOJI",E.IMAGE="IMAGE",E.TEMPLATE="TEMPLATE",E.BLEND="BLEND",E.FORWARD="FORWARD",E.QUICK_REPLY="QUICK_REPLY",E.AUDIO="AUDIO",E.VIDEO="VIDEO",E))(E||{}),I=(E=>(E.JOIN="JOIN",E.LEAVE="LEAVE",E.NEW_SESSION="NEW_SESSION",E.MESSAGE="MESSAGE",E))(I||{}),N=(E=>(E.IN_CALL="IN_CALL",E.NO_RESPONSE="NO_RESPONSE",E.FINISHED="FINISHED",E.REJECTED="REJECTED",E.CANCELED="CANCELED",E))(N||{});export{N as AV_STATUS,E as MESSAGE_TYPE,I as SUBSCRIBE_MESSAGE_TYPE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{computed as s}from"vue";import{simplifyMessage as e,isAudioOrVideo as t}from"../utils/index.js";import{uniqBy as n}from"lodash-es";function i(i){function o(s){Object.assign(i.currentSessionItem,s,{lastMessageContent:s.lastMessage?e(s.lastMessage):i.currentSessionItem.lastMessageContent||""}),i.isChangeSession=!0,i.id!==i.currentSessionItem.id&&(i.msgList=[],i.id=i.currentSessionItem.id)}return{openSession:async function(s){o(s)},closeSession:function(){if(!i.id)return null;const{currentSessionItem:s}=i;return i.currentSessionItem={},i.msgList=[],i.id="",s},getCurrentSession:function(){return i.id?i.currentSessionItem:null},setCurrentSessionItem:o,setUpdateSessionItem:function(s){Object.assign(i.updateSessionItem,s,{lastMessageContent:s.lastMessage?e(s.lastMessage):""}),t(s.lastMessage)||(i.isUpdateSession=!0)},unreadTotal:s((()=>i.sessionList.reduce(((s,e)=>s+ +e.unreadNum),0))),setSessionList:function(s){i.sessionList=n(s.map((s=>{const{lastMessage:t}=s;return{...s,lastMessageContent:Reflect.has(s,"lastMessageContent")?s.lastMessageContent:t?e(t):""}})),"id")}}}export{i as useSession};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
2
|
import { AnyObject } from '../../../../shared/types';
|
|
3
3
|
import { ChatSock } from '../utils/chatSock';
|
|
4
|
-
export
|
|
4
|
+
export type IState = {
|
|
5
5
|
orgId: number | string;
|
|
6
6
|
currentSessionItem: AnyObject;
|
|
7
7
|
id: string;
|
|
@@ -13,7 +13,7 @@ export declare type IState = {
|
|
|
13
13
|
isChangeSession: boolean;
|
|
14
14
|
updateSessionItem: AnyObject;
|
|
15
15
|
isUpdateSession: boolean;
|
|
16
|
-
currentReferenceMsg: AnyObject;
|
|
16
|
+
currentReferenceMsg: null | AnyObject;
|
|
17
17
|
};
|
|
18
18
|
export declare const InjectionIChatState: InjectionKey<IState>;
|
|
19
19
|
export declare const InjectionIChatStompClient: InjectionKey<Ref<ChatSock>>;
|
|
@@ -9,3 +9,5 @@ export declare function transformMessage(content: string): string;
|
|
|
9
9
|
export declare function simplifyMessage(lastMessage: AnyObject): any;
|
|
10
10
|
export declare function downloadFile(url: string, filename: string): void;
|
|
11
11
|
export declare function getFileSize(url: string): Promise<unknown>;
|
|
12
|
+
export declare function genTestUserSig(sdkAppId: number, userId: string, sdkSecretKey: string): any;
|
|
13
|
+
export declare function isAudioOrVideo(message: AnyObject): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isToday as e,format as t,isYesterday as n}from"date-fns";import{cloneDeep as r}from"lodash-es";import{MESSAGE_TYPE as o}from"../constants/index.js";import{emojis as
|
|
1
|
+
import{isToday as e,format as t,isYesterday as n}from"date-fns";import{cloneDeep as r}from"lodash-es";import{MESSAGE_TYPE as o}from"../constants/index.js";import{emojis as s}from"./emoji.js";function a(r){const o=new Date(r);let s,a;if(e(o))s=a=t(o,"HH:mm");else{s=n(o)?"昨天":t(o,"MM-dd");const e=o.getFullYear(),r=(new Date).getFullYear();a=t(o,e<r?"yyyy年M月d日 HH:mm":"M月d日 HH:mm")}return{siderMsgTime:s,msgTime:a,recordTime:function(r){const o=new Date(r),s=Date.now()-o.getTime();if(s<6e4)return"刚刚";if(s<36e5)return Math.ceil(s/1e3/60)+"分钟前";if(e(o))return"今天 "+t(o,"HH:mm");if(n(o))return"昨天 "+t(o,"HH:mm");{const e=o.getFullYear(),n=(new Date).getFullYear();return t(o,e<n?"yyyy年M月d日 HH:mm":"M月d日 HH:mm")}}(r)}}function i(e){return r(e).sort(((e,t)=>e.topping&&!t.topping?-1:!e.topping&&t.topping?1:new Date(t.sortTime).getTime()-new Date(e.sortTime).getTime()))}function c(e){if(!e)return"";const t=e=>new RegExp("\\n*\\["+(e||"")+"(code|pre|div|span|p|table|thead|th|tbody|tr|td|ul|li|ol|li|dl|dt|dd|h2|h3|h4|h5)([\\s\\S]*?)]\\n*","g");return e=e.toString().replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/@(\S+)(\s+?|$)/g,'@<a href="javascript:;">$1</a>$2').replace(t(),"<$1 $2>").replace(t("/"),"</$1>").replace(/\n/g,"<br>")}function l(e){var t;const{chatMessageType:n,msg:r,messageTemplate:a}=e;switch(n){case o.TEXT:return c(r);case o.IMAGE:return"[图片]";case o.FILE:return"[文件]";case o.EMOJI:return`<img alt=${r} src=${s.findEmoji(r)}>`;case o.TEMPLATE:return null==(t=null==a?void 0:a.setting)?void 0:t.title;default:return"其他消息"}}function u(e,t){const n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="blob",n.onload=function(r){if(200===n.status){const r=window.URL.createObjectURL(n.response),o=document.createElement("a");o.href=r,o.download=t,o.dispatchEvent(new MouseEvent("click")),window.URL.revokeObjectURL(e)}},n.send()}function d(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("HEAD",e,!0),r.onreadystatechange=()=>{var e;if(4===r.readyState&&200===r.status){let n=null!=(e=r.getResponseHeader("Content-Length"))?e:0;const o=+n;o>1048576?n=(o/1048576).toFixed(2)+"M":o>1024?n=(o/1024).toFixed(2)+"K":n+="B",t(n)}},r.send()}))}function m(e,t,n){const r=e,o=n;null!=r&&""!==o||alert("请先配置好您的账号信息: SDKAPPID 及 SDKSECRETKEY \r\n\r\nPlease configure your SDKAPPID/SDKSECRETKEY in js/debug/GenerateTestUserSig.js");return new window.LibGenerateTestUserSig(r,o,604800).genTestUserSig(t)}function p(e){return[o.AUDIO,o.VIDEO].includes(e.chatMessageType)}export{u as downloadFile,a as formatTime,m as genTestUserSig,d as getFileSize,p as isAudioOrVideo,i as listSort,l as simplifyMessage,c as transformMessage};
|