cnhis-design-vue 3.2.7-release.1 → 3.2.7-release.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. package/README.md +87 -87
  2. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  3. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  4. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  5. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  6. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  7. package/es/components/classification/index.d.ts +60 -5
  8. package/es/components/classification/src/components/search-filter/index.vue.d.ts +60 -5
  9. package/es/components/classification/src/components/set-classification/index.vue.d.ts +60 -5
  10. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  11. package/es/components/classification/src/index.vue.d.ts +60 -5
  12. package/es/components/date-picker/index.d.ts +13 -0
  13. package/es/components/date-picker/src/DatePicker.vue.d.ts +13 -0
  14. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  15. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  16. package/es/components/field-set/src/FieldColor.vue.d.ts +26 -0
  17. package/es/components/field-set/src/components/condition.vue.d.ts +13 -0
  18. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +26 -0
  19. package/es/components/field-set/src/components/edit-filter.vue.d.ts +13 -0
  20. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
  21. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  22. package/es/components/form-render/src/types/index.d.ts +1 -1
  23. package/es/components/form-render/src/utils/business.js +1 -1
  24. package/es/components/form-render/src/utils/schema.d.ts +1 -1
  25. package/es/components/form-render/src/utils/schema.js +1 -1
  26. package/es/components/iho-chat/index.d.ts +171 -85
  27. package/es/components/iho-chat/src/Index.vue.d.ts +171 -85
  28. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  29. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +34 -13
  30. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  31. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +38 -13
  32. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  33. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +48 -14
  34. package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
  35. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +9 -19
  36. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  37. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +13 -0
  38. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +3 -10
  39. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  40. package/es/components/iho-chat/src/components/ContextMenu.d.ts +5 -5
  41. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  42. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +47 -22
  43. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
  44. package/es/components/iho-chat/src/hooks/useSearchUserList.d.ts +11 -0
  45. package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -0
  46. package/es/components/iho-chat/src/types/index.d.ts +0 -1
  47. package/es/components/iho-chat/style/index.css +1 -1
  48. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +13 -0
  49. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +13 -0
  50. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +20 -2
  51. package/es/components/index.css +1 -1
  52. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  53. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  54. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +13 -0
  55. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +13 -0
  56. package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +13 -0
  57. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +13 -0
  58. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +47 -5
  59. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +13 -0
  60. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +13 -0
  61. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +37 -19
  62. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -1
  63. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +47 -5
  64. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
  65. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +47 -5
  66. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +13 -0
  67. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +13 -0
  68. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +13 -0
  69. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +13 -0
  70. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +33 -18
  71. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
  72. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.d.ts +13 -0
  73. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -1
  74. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +69 -4
  75. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +69 -4
  76. package/es/components/table-filter/src/tool/transformData.js +1 -1
  77. package/es/components/table-filter/src/types/index.d.ts +1 -0
  78. package/es/components/time-picker/index.d.ts +20 -2
  79. package/es/components/time-picker/src/TimePicker.vue.d.ts +21 -2
  80. package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
  81. package/es/env.d.ts +25 -25
  82. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  83. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  84. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  85. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  86. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  87. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  88. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  89. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  90. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  91. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  92. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  93. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  94. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  95. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  96. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  97. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  98. package/es/shared/assets/img/failure.png.js +1 -1
  99. package/es/shared/assets/img/no-permission.png.js +1 -1
  100. package/es/shared/assets/img/nodata.png.js +1 -1
  101. package/es/shared/assets/img/notfound.png.js +1 -1
  102. package/es/shared/assets/img/qr.png.js +1 -1
  103. package/es/shared/assets/img/success.png.js +1 -1
  104. package/es/shared/assets/img/table_style_2.png.js +1 -1
  105. package/es/shared/assets/img/video.png.js +1 -1
  106. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  107. package/es/shared/assets/img/xb_big.png.js +1 -1
  108. package/es/shared/assets/img/xb_small.png.js +1 -1
  109. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  110. package/es/shared/package.json.js +1 -1
  111. package/es/shared/utils/business.js +1 -1
  112. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  113. package/es/shared/utils/tapable/index.d.ts +139 -0
  114. package/package.json +2 -2
@@ -76,7 +76,6 @@ declare const _default: import("vue").DefineComponent<{
76
76
  currentReferenceMsg: AnyObject | null;
77
77
  showVideo: boolean;
78
78
  currentAVMsg: AnyObject;
79
- userList: AnyObject[];
80
79
  currentGroupUser: AnyObject[];
81
80
  showMultipleVideo: boolean;
82
81
  };
@@ -89,7 +88,6 @@ declare const _default: import("vue").DefineComponent<{
89
88
  setCurrentSessionItem: (item: AnyObject) => void;
90
89
  groupSessionList: AnyObject[];
91
90
  init: () => Promise<void>;
92
- handleUserSearch: () => Promise<void>;
93
91
  initWebSocket: () => void;
94
92
  subscribeSessionList: () => void;
95
93
  handleDefaultSession: () => void;
@@ -152,7 +150,7 @@ declare const _default: import("vue").DefineComponent<{
152
150
  defaultValue?: undefined;
153
151
  } | {
154
152
  mode: string;
155
- defaultValue: any[];
153
+ defaultValue: AnyObject[];
156
154
  disabledIds?: undefined;
157
155
  }>;
158
156
  handleOpenChatFile: (type: string) => void;
@@ -434,6 +432,10 @@ declare const _default: import("vue").DefineComponent<{
434
432
  allowedInvalidValue: {
435
433
  type: StringConstructor;
436
434
  };
435
+ to: {
436
+ type: PropType<string | false | HTMLElement>;
437
+ default: string;
438
+ };
437
439
  }, {
438
440
  attrs: {
439
441
  [x: string]: unknown;
@@ -454,6 +456,10 @@ declare const _default: import("vue").DefineComponent<{
454
456
  allowedInvalidValue: {
455
457
  type: StringConstructor;
456
458
  };
459
+ to: {
460
+ type: PropType<string | false | HTMLElement>;
461
+ default: string;
462
+ };
457
463
  }>> & {
458
464
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
459
465
  }>>;
@@ -490,10 +496,15 @@ declare const _default: import("vue").DefineComponent<{
490
496
  allowedInvalidValue: {
491
497
  type: StringConstructor;
492
498
  };
499
+ to: {
500
+ type: PropType<string | false | HTMLElement>;
501
+ default: string;
502
+ };
493
503
  }>> & {
494
504
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
495
505
  }, {
496
506
  updateUnchangedValue: boolean;
507
+ to: string | false | HTMLElement;
497
508
  }>>;
498
509
  formatTime: typeof import("./utils").formatTime;
499
510
  MESSAGE_TYPE: typeof import("./constants").MESSAGE_TYPE;
@@ -522,9 +533,10 @@ declare const _default: import("vue").DefineComponent<{
522
533
  };
523
534
  disabledIds: {
524
535
  type: PropType<string[]>;
536
+ default: () => never[];
525
537
  };
526
538
  defaultValue: {
527
- type: PropType<string[]>;
539
+ type: PropType<AnyObject[]>;
528
540
  };
529
541
  }, {
530
542
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -541,34 +553,52 @@ declare const _default: import("vue").DefineComponent<{
541
553
  };
542
554
  disabledIds: {
543
555
  type: PropType<string[]>;
556
+ default: () => never[];
544
557
  };
545
558
  defaultValue: {
546
- type: PropType<string[]>;
559
+ type: PropType<AnyObject[]>;
547
560
  };
548
561
  }>> & {
549
562
  onComfirm?: ((...args: any[]) => any) | undefined;
550
563
  }>>;
551
564
  emit: (event: "comfirm", ...args: any[]) => void;
552
565
  state: IState;
566
+ listRef: import("vue").Ref<any>;
567
+ keyword: import("vue").Ref<any>;
553
568
  showModal: import("vue").Ref<boolean>;
554
- checkedIds: import("vue").Ref<(string | number)[]>;
569
+ checkedOptions: import("vue").Ref<AnyObject[]>;
555
570
  options: import("vue").Ref<AnyObject[]>;
556
571
  groupName: import("vue").Ref<string>;
572
+ checkedSourceIds: import("vue").Ref<(string | number)[]>;
573
+ userList: import("vue").Ref<AnyObject[]>;
574
+ handleInput: () => void;
575
+ _disabledIds: import("vue").ComputedRef<any[]>;
576
+ defaultOptions: import("vue").ComputedRef<{
577
+ id: any;
578
+ name: any;
579
+ avatar: any;
580
+ }[]>;
581
+ checkedIds: import("vue").ComputedRef<any[]>;
557
582
  btnDisabled: import("vue").ComputedRef<boolean>;
583
+ allChecked: import("vue").WritableComputedRef<boolean>;
558
584
  handlePositiveClick: () => Promise<void>;
559
- renderSourceLabel: ({ option }: {
560
- option: AnyObject;
561
- }) => JSX.Element;
562
- renderTargetList: (props: {
563
- onCheck: (checkedValueList: (string | number)[]) => void;
564
- checkedOptions: AnyObject[];
565
- pattern: string;
566
- }) => JSX.Element | null;
585
+ updateCheckedSourceIds: () => void;
586
+ handleSourceIdsUpdate: (value: (string | number)[], meta: {
587
+ actionType: "check" | "uncheck";
588
+ value: string | number;
589
+ }) => void;
590
+ closeTag: (id: string) => void;
591
+ renderTargetList: () => JSX.Element[] | null;
567
592
  NModal: any;
568
593
  NButton: any;
569
- NTransfer: any;
594
+ NSpace: any;
595
+ NAvatar: any;
570
596
  NIcon: any;
597
+ NTag: any;
571
598
  NInput: any;
599
+ NCheckbox: any;
600
+ NCheckboxGroup: any;
601
+ SearchOutline: 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<{}>>, {}>;
572
602
  AddOutline: 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<{}>>, {}>;
573
603
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
574
604
  title: {
@@ -584,15 +614,17 @@ declare const _default: import("vue").DefineComponent<{
584
614
  };
585
615
  disabledIds: {
586
616
  type: PropType<string[]>;
617
+ default: () => never[];
587
618
  };
588
619
  defaultValue: {
589
- type: PropType<string[]>;
620
+ type: PropType<AnyObject[]>;
590
621
  };
591
622
  }>> & {
592
623
  onComfirm?: ((...args: any[]) => any) | undefined;
593
624
  }, {
594
625
  mode: string;
595
626
  title: string;
627
+ disabledIds: string[];
596
628
  }>;
597
629
  PersonAddOutline: 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<{}>>, {}>;
598
630
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
@@ -604,7 +636,8 @@ declare const _default: import("vue").DefineComponent<{
604
636
  isGroupChat: import("vue").ComputedRef<boolean>;
605
637
  contextmenuRef: import("vue").Ref<any>;
606
638
  showMenu: import("vue").Ref<boolean>;
607
- contextmenuPosition: any;
639
+ menuPosition: any;
640
+ menuMsgId: import("vue").Ref<any>;
608
641
  pageInfo: {
609
642
  page: number;
610
643
  hasMore: boolean;
@@ -614,19 +647,9 @@ declare const _default: import("vue").DefineComponent<{
614
647
  '--c-tip-top': string;
615
648
  '--c-tip-gap': string;
616
649
  }>;
617
- chatMainBounding: import("vue").ComputedRef<{
618
- height: import("vue").Ref<number>;
619
- bottom: import("vue").Ref<number>;
620
- left: import("vue").Ref<number>;
621
- right: import("vue").Ref<number>;
622
- top: import("vue").Ref<number>;
623
- width: import("vue").Ref<number>;
624
- x: import("vue").Ref<number>;
625
- y: import("vue").Ref<number>;
626
- update: () => void;
627
- }>;
628
650
  getHistoryRecord: () => Promise<void>;
629
- handleContextmenu: (event: MouseEvent) => Promise<void>;
651
+ handleContextmenu: (event: MouseEvent, msgId: string) => Promise<void>;
652
+ setMenuPosition: (event: MouseEvent) => Promise<void>;
630
653
  showMessage: (item: AnyObject) => boolean;
631
654
  showTemplateMsg: (item: AnyObject, type: "template" | "system") => boolean | undefined;
632
655
  isTemplate3: (content: AnyObject) => boolean;
@@ -800,10 +823,10 @@ declare const _default: import("vue").DefineComponent<{
800
823
  position: {
801
824
  type: PropType<import("vue").CSSProperties>;
802
825
  };
803
- exclude: {
804
- type: PropType<string[]>;
826
+ msgId: {
827
+ type: StringConstructor;
805
828
  };
806
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:show")[], "select" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
829
+ }, () => JSX.Element | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:show")[], "select" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
807
830
  show: {
808
831
  type: BooleanConstructor;
809
832
  default: boolean;
@@ -811,8 +834,8 @@ declare const _default: import("vue").DefineComponent<{
811
834
  position: {
812
835
  type: PropType<import("vue").CSSProperties>;
813
836
  };
814
- exclude: {
815
- type: PropType<string[]>;
837
+ msgId: {
838
+ type: StringConstructor;
816
839
  };
817
840
  }>> & {
818
841
  onSelect?: ((...args: any[]) => any) | undefined;
@@ -826,7 +849,6 @@ declare const _default: import("vue").DefineComponent<{
826
849
  getAVTime: typeof import("./utils").getAVTime;
827
850
  MESSAGE_TYPE: typeof import("./constants").MESSAGE_TYPE;
828
851
  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<{}>>, {}>;
829
- 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<{}>>, {}>;
830
852
  CallOutline: 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<{}>>, {}>;
831
853
  VideocamOutline: 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<{}>>, {}>;
832
854
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
@@ -841,6 +863,10 @@ declare const _default: import("vue").DefineComponent<{
841
863
  }) => Promise<void>;
842
864
  isGroupChat: import("vue").ComputedRef<boolean>;
843
865
  showEmoji: import("vue").Ref<boolean>;
866
+ chatAddProps: import("vue").ComputedRef<{
867
+ options: AnyObject[];
868
+ defaultValue: AnyObject[];
869
+ }>;
844
870
  handleCall: (chatMessageType: string, checkedIds?: never[]) => void;
845
871
  handleKeyDown: (event: KeyboardEvent) => void;
846
872
  isWrap: (event: KeyboardEvent) => boolean;
@@ -872,9 +898,10 @@ declare const _default: import("vue").DefineComponent<{
872
898
  };
873
899
  disabledIds: {
874
900
  type: PropType<string[]>;
901
+ default: () => never[];
875
902
  };
876
903
  defaultValue: {
877
- type: PropType<string[]>;
904
+ type: PropType<AnyObject[]>;
878
905
  };
879
906
  }, {
880
907
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -891,34 +918,52 @@ declare const _default: import("vue").DefineComponent<{
891
918
  };
892
919
  disabledIds: {
893
920
  type: PropType<string[]>;
921
+ default: () => never[];
894
922
  };
895
923
  defaultValue: {
896
- type: PropType<string[]>;
924
+ type: PropType<AnyObject[]>;
897
925
  };
898
926
  }>> & {
899
927
  onComfirm?: ((...args: any[]) => any) | undefined;
900
928
  }>>;
901
929
  emit: (event: "comfirm", ...args: any[]) => void;
902
930
  state: IState;
931
+ listRef: import("vue").Ref<any>;
932
+ keyword: import("vue").Ref<any>;
903
933
  showModal: import("vue").Ref<boolean>;
904
- checkedIds: import("vue").Ref<(string | number)[]>;
934
+ checkedOptions: import("vue").Ref<AnyObject[]>;
905
935
  options: import("vue").Ref<AnyObject[]>;
906
936
  groupName: import("vue").Ref<string>;
937
+ checkedSourceIds: import("vue").Ref<(string | number)[]>;
938
+ userList: import("vue").Ref<AnyObject[]>;
939
+ handleInput: () => void;
940
+ _disabledIds: import("vue").ComputedRef<any[]>;
941
+ defaultOptions: import("vue").ComputedRef<{
942
+ id: any;
943
+ name: any;
944
+ avatar: any;
945
+ }[]>;
946
+ checkedIds: import("vue").ComputedRef<any[]>;
907
947
  btnDisabled: import("vue").ComputedRef<boolean>;
948
+ allChecked: import("vue").WritableComputedRef<boolean>;
908
949
  handlePositiveClick: () => Promise<void>;
909
- renderSourceLabel: ({ option }: {
910
- option: AnyObject;
911
- }) => JSX.Element;
912
- renderTargetList: (props: {
913
- onCheck: (checkedValueList: (string | number)[]) => void;
914
- checkedOptions: AnyObject[];
915
- pattern: string;
916
- }) => JSX.Element | null;
950
+ updateCheckedSourceIds: () => void;
951
+ handleSourceIdsUpdate: (value: (string | number)[], meta: {
952
+ actionType: "check" | "uncheck";
953
+ value: string | number;
954
+ }) => void;
955
+ closeTag: (id: string) => void;
956
+ renderTargetList: () => JSX.Element[] | null;
917
957
  NModal: any;
918
958
  NButton: any;
919
- NTransfer: any;
959
+ NSpace: any;
960
+ NAvatar: any;
920
961
  NIcon: any;
962
+ NTag: any;
921
963
  NInput: any;
964
+ NCheckbox: any;
965
+ NCheckboxGroup: any;
966
+ SearchOutline: 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<{}>>, {}>;
922
967
  AddOutline: 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<{}>>, {}>;
923
968
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
924
969
  title: {
@@ -934,15 +979,17 @@ declare const _default: import("vue").DefineComponent<{
934
979
  };
935
980
  disabledIds: {
936
981
  type: PropType<string[]>;
982
+ default: () => never[];
937
983
  };
938
984
  defaultValue: {
939
- type: PropType<string[]>;
985
+ type: PropType<AnyObject[]>;
940
986
  };
941
987
  }>> & {
942
988
  onComfirm?: ((...args: any[]) => any) | undefined;
943
989
  }, {
944
990
  mode: string;
945
991
  title: string;
992
+ disabledIds: string[];
946
993
  }>;
947
994
  emojis: {
948
995
  default: string[][];
@@ -960,16 +1007,10 @@ declare const _default: import("vue").DefineComponent<{
960
1007
  inputRef: import("vue").Ref<any>;
961
1008
  showSearch: import("vue").Ref<boolean>;
962
1009
  keyword: import("vue").Ref<any>;
963
- userList: import("vue").Ref<any>;
964
1010
  state: IState;
965
1011
  openSession: (item: AnyObject) => Promise<void>;
966
- pageInfo: {
967
- page: number;
968
- hasMore: boolean;
969
- };
1012
+ userList: import("vue").Ref<AnyObject[]>;
970
1013
  handleInput: () => void;
971
- handleSearch: () => Promise<void>;
972
- resetAndSearch: () => void;
973
1014
  addSession: (userId: string) => Promise<void>;
974
1015
  NPopover: any;
975
1016
  NButton: any;
@@ -992,9 +1033,10 @@ declare const _default: import("vue").DefineComponent<{
992
1033
  };
993
1034
  disabledIds: {
994
1035
  type: PropType<string[]>;
1036
+ default: () => never[];
995
1037
  };
996
1038
  defaultValue: {
997
- type: PropType<string[]>;
1039
+ type: PropType<AnyObject[]>;
998
1040
  };
999
1041
  }, {
1000
1042
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -1011,34 +1053,52 @@ declare const _default: import("vue").DefineComponent<{
1011
1053
  };
1012
1054
  disabledIds: {
1013
1055
  type: PropType<string[]>;
1056
+ default: () => never[];
1014
1057
  };
1015
1058
  defaultValue: {
1016
- type: PropType<string[]>;
1059
+ type: PropType<AnyObject[]>;
1017
1060
  };
1018
1061
  }>> & {
1019
1062
  onComfirm?: ((...args: any[]) => any) | undefined;
1020
1063
  }>>;
1021
1064
  emit: (event: "comfirm", ...args: any[]) => void;
1022
1065
  state: IState;
1066
+ listRef: import("vue").Ref<any>;
1067
+ keyword: import("vue").Ref<any>;
1023
1068
  showModal: import("vue").Ref<boolean>;
1024
- checkedIds: import("vue").Ref<(string | number)[]>;
1069
+ checkedOptions: import("vue").Ref<AnyObject[]>;
1025
1070
  options: import("vue").Ref<AnyObject[]>;
1026
1071
  groupName: import("vue").Ref<string>;
1072
+ checkedSourceIds: import("vue").Ref<(string | number)[]>;
1073
+ userList: import("vue").Ref<AnyObject[]>;
1074
+ handleInput: () => void;
1075
+ _disabledIds: import("vue").ComputedRef<any[]>;
1076
+ defaultOptions: import("vue").ComputedRef<{
1077
+ id: any;
1078
+ name: any;
1079
+ avatar: any;
1080
+ }[]>;
1081
+ checkedIds: import("vue").ComputedRef<any[]>;
1027
1082
  btnDisabled: import("vue").ComputedRef<boolean>;
1083
+ allChecked: import("vue").WritableComputedRef<boolean>;
1028
1084
  handlePositiveClick: () => Promise<void>;
1029
- renderSourceLabel: ({ option }: {
1030
- option: AnyObject;
1031
- }) => JSX.Element;
1032
- renderTargetList: (props: {
1033
- onCheck: (checkedValueList: (string | number)[]) => void;
1034
- checkedOptions: AnyObject[];
1035
- pattern: string;
1036
- }) => JSX.Element | null;
1085
+ updateCheckedSourceIds: () => void;
1086
+ handleSourceIdsUpdate: (value: (string | number)[], meta: {
1087
+ actionType: "check" | "uncheck";
1088
+ value: string | number;
1089
+ }) => void;
1090
+ closeTag: (id: string) => void;
1091
+ renderTargetList: () => JSX.Element[] | null;
1037
1092
  NModal: any;
1038
1093
  NButton: any;
1039
- NTransfer: any;
1094
+ NSpace: any;
1095
+ NAvatar: any;
1040
1096
  NIcon: any;
1097
+ NTag: any;
1041
1098
  NInput: any;
1099
+ NCheckbox: any;
1100
+ NCheckboxGroup: any;
1101
+ SearchOutline: 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<{}>>, {}>;
1042
1102
  AddOutline: 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<{}>>, {}>;
1043
1103
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1044
1104
  title: {
@@ -1054,15 +1114,17 @@ declare const _default: import("vue").DefineComponent<{
1054
1114
  };
1055
1115
  disabledIds: {
1056
1116
  type: PropType<string[]>;
1117
+ default: () => never[];
1057
1118
  };
1058
1119
  defaultValue: {
1059
- type: PropType<string[]>;
1120
+ type: PropType<AnyObject[]>;
1060
1121
  };
1061
1122
  }>> & {
1062
1123
  onComfirm?: ((...args: any[]) => any) | undefined;
1063
1124
  }, {
1064
1125
  mode: string;
1065
1126
  title: string;
1127
+ disabledIds: string[];
1066
1128
  }>;
1067
1129
  Video: import("vue").DefineComponent<{}, {
1068
1130
  sendMessage: (message: {
@@ -1117,7 +1179,10 @@ declare const _default: import("vue").DefineComponent<{
1117
1179
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1118
1180
  MultipleVideo: import("vue").DefineComponent<{}, {
1119
1181
  selfVideoRef: import("vue").Ref<any>;
1120
- remoteUsers: import("vue").Ref<string[]>;
1182
+ remoteUsers: import("vue").Ref<{
1183
+ id: string;
1184
+ name: string;
1185
+ }[]>;
1121
1186
  state: IState;
1122
1187
  sendMessage: (message: {
1123
1188
  chatType?: string | undefined;
@@ -1145,11 +1210,11 @@ declare const _default: import("vue").DefineComponent<{
1145
1210
  installEventHandlers: () => void;
1146
1211
  uninstallEventHandlers: () => void;
1147
1212
  handleRemoteVideoAvailable: (event: any) => Promise<void>;
1148
- handleRemoteAudioAvailable: (event: any) => void;
1149
- handleRemoteUserEnter: (event: any) => void;
1213
+ handleRemoteAudioAvailable: (event: any) => Promise<void>;
1214
+ handleRemoteUserEnter: (event: any) => Promise<void>;
1215
+ getUserName: (userId: string) => Promise<any>;
1150
1216
  handleRemoteUserExit: (event: any) => void;
1151
1217
  handleError: (error: any) => void;
1152
- getName: (id: string) => any;
1153
1218
  NButton: any;
1154
1219
  NIcon: any;
1155
1220
  ChatAdd: import("vue").DefineComponent<{
@@ -1166,9 +1231,10 @@ declare const _default: import("vue").DefineComponent<{
1166
1231
  };
1167
1232
  disabledIds: {
1168
1233
  type: PropType<string[]>;
1234
+ default: () => never[];
1169
1235
  };
1170
1236
  defaultValue: {
1171
- type: PropType<string[]>;
1237
+ type: PropType<AnyObject[]>;
1172
1238
  };
1173
1239
  }, {
1174
1240
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -1185,34 +1251,52 @@ declare const _default: import("vue").DefineComponent<{
1185
1251
  };
1186
1252
  disabledIds: {
1187
1253
  type: PropType<string[]>;
1254
+ default: () => never[];
1188
1255
  };
1189
1256
  defaultValue: {
1190
- type: PropType<string[]>;
1257
+ type: PropType<AnyObject[]>;
1191
1258
  };
1192
1259
  }>> & {
1193
1260
  onComfirm?: ((...args: any[]) => any) | undefined;
1194
1261
  }>>;
1195
1262
  emit: (event: "comfirm", ...args: any[]) => void;
1196
1263
  state: IState;
1264
+ listRef: import("vue").Ref<any>;
1265
+ keyword: import("vue").Ref<any>;
1197
1266
  showModal: import("vue").Ref<boolean>;
1198
- checkedIds: import("vue").Ref<(string | number)[]>;
1267
+ checkedOptions: import("vue").Ref<AnyObject[]>;
1199
1268
  options: import("vue").Ref<AnyObject[]>;
1200
1269
  groupName: import("vue").Ref<string>;
1270
+ checkedSourceIds: import("vue").Ref<(string | number)[]>;
1271
+ userList: import("vue").Ref<AnyObject[]>;
1272
+ handleInput: () => void;
1273
+ _disabledIds: import("vue").ComputedRef<any[]>;
1274
+ defaultOptions: import("vue").ComputedRef<{
1275
+ id: any;
1276
+ name: any;
1277
+ avatar: any;
1278
+ }[]>;
1279
+ checkedIds: import("vue").ComputedRef<any[]>;
1201
1280
  btnDisabled: import("vue").ComputedRef<boolean>;
1281
+ allChecked: import("vue").WritableComputedRef<boolean>;
1202
1282
  handlePositiveClick: () => Promise<void>;
1203
- renderSourceLabel: ({ option }: {
1204
- option: AnyObject;
1205
- }) => JSX.Element;
1206
- renderTargetList: (props: {
1207
- onCheck: (checkedValueList: (string | number)[]) => void;
1208
- checkedOptions: AnyObject[];
1209
- pattern: string;
1210
- }) => JSX.Element | null;
1283
+ updateCheckedSourceIds: () => void;
1284
+ handleSourceIdsUpdate: (value: (string | number)[], meta: {
1285
+ actionType: "check" | "uncheck";
1286
+ value: string | number;
1287
+ }) => void;
1288
+ closeTag: (id: string) => void;
1289
+ renderTargetList: () => JSX.Element[] | null;
1211
1290
  NModal: any;
1212
1291
  NButton: any;
1213
- NTransfer: any;
1292
+ NSpace: any;
1293
+ NAvatar: any;
1214
1294
  NIcon: any;
1295
+ NTag: any;
1215
1296
  NInput: any;
1297
+ NCheckbox: any;
1298
+ NCheckboxGroup: any;
1299
+ SearchOutline: 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<{}>>, {}>;
1216
1300
  AddOutline: 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<{}>>, {}>;
1217
1301
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1218
1302
  title: {
@@ -1228,15 +1312,17 @@ declare const _default: import("vue").DefineComponent<{
1228
1312
  };
1229
1313
  disabledIds: {
1230
1314
  type: PropType<string[]>;
1315
+ default: () => never[];
1231
1316
  };
1232
1317
  defaultValue: {
1233
- type: PropType<string[]>;
1318
+ type: PropType<AnyObject[]>;
1234
1319
  };
1235
1320
  }>> & {
1236
1321
  onComfirm?: ((...args: any[]) => any) | undefined;
1237
1322
  }, {
1238
1323
  mode: string;
1239
1324
  title: string;
1325
+ disabledIds: string[];
1240
1326
  }>;
1241
1327
  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<{}>>, {}>;
1242
1328
  Videocam: 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<{}>>, {}>;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as s,reactive as o,provide as t,onBeforeUnmount as n,openBlock as r,createElementBlock as i,normalizeStyle as a,unref as c,createVNode as d,withCtx as u,createBlock as l,Fragment as p,createElementVNode as m,renderSlot as h,createCommentVNode as f}from"vue";import{NConfigProvider as g,NSpin as y,NLayout as v,NLayoutContent as S}from"naive-ui";import b from"./components/SiderList.vue.js";import I from"./components/ChatHeader.vue.js";import M from"./components/ChatMain.vue.js";import k from"./components/ChatFooter.vue.js";import T from"./components/ChatSearch.vue.js";import V from"./components/ChatAdd.vue.js";import j from"./components/Video.vue.js";import w from"./components/MultipleVideo.vue.js";import{ChatSock as L}from"./utils/chatSock.js";import{instanceAxios as N,listUserApi as U,readMessageApi as _}from"./api/index.js";import{useTheme as A}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as C,isNumber as O}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{CHAT_TYPE as x,SUBSCRIBE_MESSAGE_TYPE as R,AV_STATUS as G}from"./constants/index.js";import{InjectionIChatState as K,InjectionIChatStompClient as E,InjectionIChatEmits as B}from"./types/index.js";import{isAudioOrVideoMessage as J}from"./utils/index.js";import{useSession as P}from"./hooks/useSession.js";import"trtc-sdk-v5";const $={key:0,class:"iho-chat__header"},q={class:"toolbar"};var z=e({__name:"Index",props:{token:{type:String,required:!0},orgId:{type:[String,Number],required:!0},userId:{type:String,required:!0},baseURL:{type:String,default:"/fdp-chat"},chatBox:{type:Boolean,default:!1},defaultSessionKey:{type:String}},emits:["template-click","unread-message-update"],setup(e,{expose:z,emit:F}){const H=e;N.defaults.baseURL=H.baseURL,N.defaults.headers.Authorization="bearer "+H.token;const D=A(),W=s(!1),Y=s(),Q=o({orgId:H.orgId,currentSessionItem:{},id:"",userInfo:{id:H.userId},msgList:[],currentMsg:{},isAppendMsg:!1,sessionList:[],isChangeSession:!1,updateSessionItem:{},isUpdateSession:!1,currentReferenceMsg:null,showVideo:!1,currentAVMsg:{},userList:[],currentGroupUser:[],showMultipleVideo:!1});t(K,Q),t(E,Y),t(B,F);const{openSession:X,closeSession:Z,getCurrentSession:ee,setSessionList:se,setUpdateSessionItem:oe,setCurrentSessionItem:te}=P(Q),ne=[];function re(){const e={headers:{AccessToken:H.token,UserId:H.userId},heartbeatFn(){try{Y.value.send("test")}catch(e){Y.value.disconnect(),re()}},connectCb(){console.log("连接成功"),Y.value.subscribe("/user/topic/single",(({body:e})=>ae({body:e,chatType:x.SINGLE}))),Y.value.subscribe("/app/sessionList",(({body:e})=>{try{const s=JSON.parse(e),{authentication:o,currentUser:t,sessionVos:n}=s;if(console.log("body",s),Object.assign(Q.userInfo,t,o),!(null==n?void 0:n.length))return;se(n),ne.splice(0,ne.length),ne.push(...n.filter((e=>e.chatType===x.GROUP))),ne.forEach((e=>{Y.value.subscribe(`/topic/group/${e.receiver}`,(({body:e})=>ae({body:e,chatType:x.GROUP})))})),function(){const e=Q.sessionList.find((e=>e.sessionKey===H.defaultSessionKey));e&&X(e)}()}catch(e){console.log(e)}}))},errorCb(e,s){console.log("断线了,正在重连...")}};Y.value=new L("/fdp-chat/websocket",e)}async function ie(e,s){if(Q.currentMsg=e,e.sessionKey===Q.currentSessionItem.sessionKey)return Q.isAppendMsg=!0,e.sender!==Q.userInfo.id&&await _({chatType:s,messageIdSet:[e.id],receiver:Q.userInfo.id,sender:e.sender}),void te({lastMessageSendTime:e.sendTime,lastMessage:e.content,sortTime:e.sendTime,unreadNum:0,lastSenderName:e.senderName});const o={lastMessageSendTime:e.sendTime,sortTime:e.sendTime,lastMessage:e.content,sessionKey:e.sessionKey,lastSenderName:e.senderName};oe(o)}async function ae({body:e,chatType:s}){try{console.log(JSON.parse(e),"订阅新增消息");const o=JSON.parse(e),{messageVo:t,sessionVo:n,chatAvStatusVo:r}=o;switch(o.event){case R.MESSAGE:J(t.content)?!Q.showVideo&&!Q.showMultipleVideo||t.content.avStatus!==G.IN_CALL?(Q.currentMsg=t,Object.assign(Q.currentAVMsg,{strRoomId:t.sessionKey,chatMessageType:t.content.chatMessageType,callMode:t.sender===Q.userInfo.id?"call":"invite",currentMsg:t}),Q.showVideo||Q.showMultipleVideo?ie(t,s):Q.showVideo=!0):(Y.value.send("/app/chat/send",{},JSON.stringify({chatType:x.SINGLE,receiver:t.sender,content:{chatMessageType:t.content.chatMessageType,avStatus:G.CALL_BUSY}})),console.log("用户忙!")):ie(t,s);break;case R.AV_STATUS:Object.assign(Q.currentAVMsg,r,{callMode:r.sender===Q.userInfo.id?"call":"invite",checkedIds:[]}),Q.showVideo||Q.showMultipleVideo?console.log("用户忙!"):Q.showMultipleVideo=!0;break;case R.NEW_SESSION:if(s===x.GROUP)return;oe(n);break;case R.JOIN:if(s===x.GROUP)return;oe(n),Y.value.subscribe(`/topic/group/${n.receiver}`,(({body:e})=>ae({body:e,chatType:x.GROUP})))}}catch(e){console.log(e)}}return async function(){re(),async function(){const e=await U({orgId:Q.orgId,keyword:"",page:1,pageSize:50});if(!C(e.records))return;Q.userList=e.records}()}(),n((()=>{var e;null==(e=Y.value)||e.disconnect()})),z({getUnreadData:function(){return Q.sessionList.filter((e=>O(e.unreadNum)&&e.unreadNum>0))},openSession:X,closeSession:Z,getCurrentSession:ee}),(s,o)=>(r(),i("div",{class:"iho-chat",style:a(c(D))},[d(c(g),{abstract:"",namespace:"iho-chat__popover"},{default:u((()=>[W.value?(r(),l(c(y),{key:0,stroke:"#5585f5"})):(r(),i(p,{key:1},[e.chatBox?f("v-if",!0):(r(),i("div",$,[d(T),d(V,{title:"发起群聊",mode:"create","default-value":[Q.userInfo.id]},null,8,["default-value"]),m("div",q,[h(s.$slots,"toolbar")])])),d(c(v),{class:"iho-chat__body","has-sider":""},{default:u((()=>[e.chatBox?f("v-if",!0):(r(),l(b,{key:0})),d(c(S),{class:"chat-content"},{default:u((()=>[d(I),d(M),d(k)])),_:1}),h(s.$slots,"external")])),_:3}),Q.showVideo?(r(),l(j,{key:1})):f("v-if",!0),Q.showMultipleVideo?(r(),l(w,{key:2})):f("v-if",!0)],64))])),_:3})],4))}});export{z as default};
1
+ import{defineComponent as e,ref as s,reactive as o,provide as t,onBeforeUnmount as n,openBlock as r,createElementBlock as i,normalizeStyle as a,unref as c,createVNode as d,withCtx as u,createBlock as l,Fragment as p,createElementVNode as m,renderSlot as h,createCommentVNode as f}from"vue";import{NConfigProvider as g,NSpin as y,NLayout as v,NLayoutContent as S}from"naive-ui";import b from"./components/SiderList.vue.js";import M from"./components/ChatHeader.vue.js";import I from"./components/ChatMain.vue.js";import k from"./components/ChatFooter.vue.js";import T from"./components/ChatSearch.vue.js";import V from"./components/ChatAdd.vue.js";import j from"./components/Video.vue.js";import N from"./components/MultipleVideo.vue.js";import{ChatSock as w}from"./utils/chatSock.js";import{instanceAxios as L,readMessageApi as U}from"./api/index.js";import{useTheme as _}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as A}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{CHAT_TYPE as C,SUBSCRIBE_MESSAGE_TYPE as O,AV_STATUS as x}from"./constants/index.js";import{InjectionIChatState as R,InjectionIChatStompClient as G,InjectionIChatEmits as K}from"./types/index.js";import{isAudioOrVideoMessage as E}from"./utils/index.js";import{useSession as B}from"./hooks/useSession.js";import"trtc-sdk-v5";const J={key:0,class:"iho-chat__header"},P={class:"toolbar"};var $=e({__name:"Index",props:{token:{type:String,required:!0},orgId:{type:[String,Number],required:!0},userId:{type:String,required:!0},baseURL:{type:String,default:"/fdp-chat"},chatBox:{type:Boolean,default:!1},defaultSessionKey:{type:String}},emits:["template-click","unread-message-update"],setup(e,{expose:$,emit:q}){const F=e;L.defaults.baseURL=F.baseURL,L.defaults.headers.Authorization="bearer "+F.token;const H=_(),z=s(!1),D=s(),W=o({orgId:F.orgId,currentSessionItem:{},id:"",userInfo:{id:F.userId},msgList:[],currentMsg:{},isAppendMsg:!1,sessionList:[],isChangeSession:!1,updateSessionItem:{},isUpdateSession:!1,currentReferenceMsg:null,showVideo:!1,currentAVMsg:{},currentGroupUser:[],showMultipleVideo:!1});t(R,W),t(G,D),t(K,q);const{openSession:Y,closeSession:Q,getCurrentSession:X,setSessionList:Z,setUpdateSessionItem:ee,setCurrentSessionItem:se}=B(W),oe=[];function te(){const e={headers:{AccessToken:F.token,UserId:F.userId},heartbeatFn(){try{D.value.send("test")}catch(e){D.value.disconnect(),te()}},connectCb(){console.log("连接成功"),D.value.subscribe("/user/topic/single",(({body:e})=>re({body:e,chatType:C.SINGLE}))),D.value.subscribe("/app/sessionList",(({body:e})=>{try{const s=JSON.parse(e),{authentication:o,currentUser:t,sessionVos:n}=s;if(console.log("body",s),Object.assign(W.userInfo,t,o),!(null==n?void 0:n.length))return;Z(n),oe.splice(0,oe.length),oe.push(...n.filter((e=>e.chatType===C.GROUP))),oe.forEach((e=>{D.value.subscribe(`/topic/group/${e.receiver}`,(({body:e})=>re({body:e,chatType:C.GROUP})))})),function(){const e=W.sessionList.find((e=>e.sessionKey===F.defaultSessionKey));e&&Y(e)}()}catch(e){console.log(e)}}))},errorCb(e,s){console.log("断线了,正在重连...")}};D.value=new w("/fdp-chat/websocket",e)}async function ne(e,s){if(W.currentMsg=e,e.sessionKey===W.currentSessionItem.sessionKey)return W.isAppendMsg=!0,e.sender!==W.userInfo.id&&await U({chatType:s,messageIdSet:[e.id],receiver:W.userInfo.id,sender:e.sender}),void se({lastMessageSendTime:e.sendTime,lastMessage:e.content,sortTime:e.sendTime,unreadNum:0,lastSenderName:e.senderName});const o={lastMessageSendTime:e.sendTime,sortTime:e.sendTime,lastMessage:e.content,sessionKey:e.sessionKey,lastSenderName:e.senderName};ee(o)}async function re({body:e,chatType:s}){try{console.log(JSON.parse(e),"订阅新增消息");const o=JSON.parse(e),{messageVo:t,sessionVo:n,chatAvStatusVo:r}=o;switch(o.event){case O.MESSAGE:E(t.content)?!W.showVideo&&!W.showMultipleVideo||t.content.avStatus!==x.IN_CALL?(W.currentMsg=t,Object.assign(W.currentAVMsg,{strRoomId:t.sessionKey,chatMessageType:t.content.chatMessageType,callMode:t.sender===W.userInfo.id?"call":"invite",currentMsg:t}),W.showVideo||W.showMultipleVideo?ne(t,s):W.showVideo=!0):(D.value.send("/app/chat/send",{},JSON.stringify({chatType:C.SINGLE,receiver:t.sender,content:{chatMessageType:t.content.chatMessageType,avStatus:x.CALL_BUSY}})),console.log("用户忙!")):ne(t,s);break;case O.AV_STATUS:Object.assign(W.currentAVMsg,r,{callMode:r.sender===W.userInfo.id?"call":"invite",checkedIds:[]}),W.showVideo||W.showMultipleVideo?console.log("用户忙!"):W.showMultipleVideo=!0;break;case O.NEW_SESSION:if(s===C.GROUP)return;ee(n);break;case O.JOIN:if(s===C.GROUP)return;ee(n),D.value.subscribe(`/topic/group/${n.receiver}`,(({body:e})=>re({body:e,chatType:C.GROUP})))}}catch(e){console.log(e)}}return async function(){te()}(),n((()=>{var e;null==(e=D.value)||e.disconnect()})),$({getUnreadData:function(){return W.sessionList.filter((e=>A(e.unreadNum)&&e.unreadNum>0))},openSession:Y,closeSession:Q,getCurrentSession:X}),(s,o)=>(r(),i("div",{class:"iho-chat",style:a(c(H))},[d(c(g),{abstract:"",namespace:"iho-chat__popover"},{default:u((()=>[z.value?(r(),l(c(y),{key:0,stroke:"#5585f5"})):(r(),i(p,{key:1},[e.chatBox?f("v-if",!0):(r(),i("div",J,[d(T),d(V,{title:"发起群聊",mode:"create","default-value":[W.userInfo]},null,8,["default-value"]),m("div",P,[h(s.$slots,"toolbar")])])),d(c(v),{class:"iho-chat__body","has-sider":""},{default:u((()=>[e.chatBox?f("v-if",!0):(r(),l(b,{key:0})),d(c(S),{class:"chat-content"},{default:u((()=>[d(M),d(I),d(k)])),_:1}),h(s.$slots,"external")])),_:3}),W.showVideo?(r(),l(j,{key:1})):f("v-if",!0),W.showMultipleVideo?(r(),l(N,{key:2})):f("v-if",!0)],64))])),_:3})],4))}});export{$ as default};