cnhis-design-vue 3.3.3-beta.73 → 3.3.3-beta.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/es/components/big-table/src/hooks/useBatchEditing.js +25 -24
  2. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
  3. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  4. package/es/components/form-render/src/constants/index.d.ts +1 -1
  5. package/es/components/iho-chat/index.d.ts +19 -2
  6. package/es/components/iho-chat/src/Index.vue.d.ts +19 -2
  7. package/es/components/iho-chat/src/Index.vue2.js +14 -6
  8. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  9. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +0 -1
  10. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +0 -20
  11. package/es/components/iho-chat/src/components/Video.vue.d.ts +6 -1
  12. package/es/components/iho-chat/src/components/Video.vue2.js +23 -11
  13. package/es/components/iho-chat/src/hooks/useVideo.d.ts +8 -8
  14. package/es/components/iho-chat/src/hooks/useVideo.js +22 -2
  15. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
  16. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +0 -22
  17. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -1
  18. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -1
  19. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  20. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  21. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  22. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
  23. package/es/components/search-cascader/src/utils/index.d.ts +1 -1
  24. package/es/shared/package.json.js +1 -1
  25. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
1
  import { computed, watch } from 'vue';
2
2
 
3
3
  const useBatchEditing = (props, state, emit, xGrid) => {
4
- let _batchFieldList = [];
4
+ const _batchFieldList = [];
5
5
  const allSelectedLength = computed(() => {
6
6
  var _a;
7
7
  return (_a = state.checkedRows) == null ? void 0 : _a.length;
@@ -49,8 +49,8 @@ const useBatchEditing = (props, state, emit, xGrid) => {
49
49
  var _a;
50
50
  if (props.isNestTable)
51
51
  return false;
52
- let id = props.inlineEditCurrentOperateBtnId;
53
- let find = (_a = props.btnList) == null ? void 0 : _a.find((item) => {
52
+ const id = props.inlineEditCurrentOperateBtnId;
53
+ const find = (_a = props.btnList) == null ? void 0 : _a.find((item) => {
54
54
  var _a2, _b;
55
55
  return ((_b = (_a2 = item == null ? void 0 : item.settingObj) == null ? void 0 : _a2[0]) == null ? void 0 : _b.obj_id) === id;
56
56
  });
@@ -59,17 +59,17 @@ const useBatchEditing = (props, state, emit, xGrid) => {
59
59
  const setRowStatus = (vxeTable, rowIndex, value) => {
60
60
  if (!vxeTable)
61
61
  return false;
62
- let tableWrap = [vxeTable.querySelector(".vxe-table--main-wrapper"), vxeTable.querySelector(".vxe-table--fixed-left-wrapper"), vxeTable.querySelector(".vxe-table--fixed-right-wrapper"), vxeTable.querySelector(".vxe-table--body-wrapper")].filter((item) => item);
62
+ const tableWrap = [vxeTable.querySelector(".vxe-table--main-wrapper"), vxeTable.querySelector(".vxe-table--fixed-left-wrapper"), vxeTable.querySelector(".vxe-table--fixed-right-wrapper"), vxeTable.querySelector(".vxe-table--body-wrapper")].filter((item) => item);
63
63
  let rowWrap = [];
64
64
  tableWrap.forEach((table) => {
65
- let row = [...table.querySelectorAll(".vxe-body--row")];
65
+ const row = [...table.querySelectorAll(".vxe-body--row")];
66
66
  rowWrap.push(row[rowIndex]);
67
67
  });
68
68
  rowWrap = rowWrap.filter((item) => item);
69
- let height = value ? `${value}px` : value;
70
- let lineHeight = value ? `${value - 10}px` : value;
69
+ const height = value ? `${value}px` : value;
70
+ const lineHeight = value ? `${value - 10}px` : value;
71
71
  rowWrap.forEach((wrap) => {
72
- let rowItemWrap = [...wrap.querySelectorAll(".vxe-cell")];
72
+ const rowItemWrap = [...wrap.querySelectorAll(".vxe-cell")];
73
73
  rowItemWrap.push(...[...wrap.querySelectorAll(".vxe-body--column")]);
74
74
  rowItemWrap.forEach((dom) => {
75
75
  dom.style.setProperty("height", height, "important");
@@ -89,7 +89,7 @@ const useBatchEditing = (props, state, emit, xGrid) => {
89
89
  if (state.isTree != 0)
90
90
  return false;
91
91
  const vxeTable = xGrid.value;
92
- let {
92
+ const {
93
93
  tableData
94
94
  } = vxeTable.getTableData();
95
95
  vxeTable.clearActived();
@@ -103,7 +103,7 @@ const useBatchEditing = (props, state, emit, xGrid) => {
103
103
  const hideSelectCloumns = () => {
104
104
  var _a;
105
105
  const vxeTable = xGrid.value;
106
- let findSelectCloumns = (_a = vxeTable.getColumns()) == null ? void 0 : _a.find((item) => item.type === state.selectType);
106
+ const findSelectCloumns = (_a = vxeTable.getColumns()) == null ? void 0 : _a.find((item) => item.type === state.selectType);
107
107
  findSelectCloumns && vxeTable.hideColumn(findSelectCloumns);
108
108
  };
109
109
  const checkListFormUnionSettingParamsList = () => {
@@ -114,7 +114,7 @@ const useBatchEditing = (props, state, emit, xGrid) => {
114
114
  emit("triggerSpinning", false);
115
115
  return false;
116
116
  }
117
- let find = (_c = props.fieldListOriginal) == null ? void 0 : _c.find((item) => item.isEdit == 1);
117
+ const find = (_c = props.fieldListOriginal) == null ? void 0 : _c.find((item) => item.isEdit == 1);
118
118
  if (!find) {
119
119
  window.$message.warning("\u6CA1\u6709\u8BBE\u7F6E\u53EF\u7F16\u8F91\u5B57\u6BB5\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458");
120
120
  emit("resetInlineEditAll", false);
@@ -131,7 +131,7 @@ const useBatchEditing = (props, state, emit, xGrid) => {
131
131
  const getInlineOpreateRow = () => {
132
132
  const vxeTable = xGrid.value;
133
133
  if (props.isInlineAdding) {
134
- let {
134
+ const {
135
135
  tableData
136
136
  } = vxeTable.getTableData();
137
137
  return {
@@ -140,7 +140,7 @@ const useBatchEditing = (props, state, emit, xGrid) => {
140
140
  };
141
141
  }
142
142
  if (state.showButtonTop == 0) {
143
- let {
143
+ const {
144
144
  row: row2,
145
145
  index: rowIndex
146
146
  } = state.currentClickBtnInfo || {};
@@ -149,9 +149,10 @@ const useBatchEditing = (props, state, emit, xGrid) => {
149
149
  rowIndex
150
150
  };
151
151
  }
152
- let row = props.clickRowData;
153
- for (var i = 0; i < props.oldtableData.length; i++) {
154
- let item = props.oldtableData[i];
152
+ const row = props.clickRowData;
153
+ let i = 0;
154
+ for (i = 0; i < props.oldtableData.length; i++) {
155
+ const item = props.oldtableData[i];
155
156
  if (item[props.primaryKey] === row[props.primaryKey])
156
157
  break;
157
158
  }
@@ -162,7 +163,7 @@ const useBatchEditing = (props, state, emit, xGrid) => {
162
163
  };
163
164
  const setAllRowInlineStatus = (disabled = false) => {
164
165
  const vxeTable = xGrid.value;
165
- let {
166
+ const {
166
167
  tableData
167
168
  } = vxeTable.getTableData();
168
169
  tableData.forEach((row) => {
@@ -180,7 +181,7 @@ const useBatchEditing = (props, state, emit, xGrid) => {
180
181
  if (state.isTree != 0)
181
182
  return false;
182
183
  const vxeTable = xGrid.value;
183
- let {
184
+ const {
184
185
  row,
185
186
  rowIndex
186
187
  } = getInlineOpreateRow();
@@ -210,7 +211,7 @@ const useBatchEditing = (props, state, emit, xGrid) => {
210
211
  const getBatchOpreateRows = () => {
211
212
  const vxeTable = xGrid.value;
212
213
  let arr = state.checkedRows;
213
- let {
214
+ const {
214
215
  tableData
215
216
  } = vxeTable.getTableData();
216
217
  if (props.isEditAllRow) {
@@ -219,7 +220,7 @@ const useBatchEditing = (props, state, emit, xGrid) => {
219
220
  arr.forEach((item, i) => {
220
221
  let rowIndex = i;
221
222
  if (!props.isEditAllRow) {
222
- let matchIndex = tableData.findIndex((v) => v[props.primaryKey] == item[props.primaryKey]);
223
+ const matchIndex = tableData.findIndex((v) => v[props.primaryKey] == item[props.primaryKey]);
223
224
  if (matchIndex > -1) {
224
225
  rowIndex = matchIndex;
225
226
  }
@@ -235,7 +236,7 @@ const useBatchEditing = (props, state, emit, xGrid) => {
235
236
  }
236
237
  let arr = state.checkedRows;
237
238
  const vxeTable = xGrid.value;
238
- let {
239
+ const {
239
240
  tableData
240
241
  } = vxeTable.getTableData();
241
242
  if (props.isEditAllRow) {
@@ -247,7 +248,7 @@ const useBatchEditing = (props, state, emit, xGrid) => {
247
248
  getBatchOpreateRows();
248
249
  };
249
250
  const handleEditFormLength = () => {
250
- let fieldLength = _batchFieldList.length;
251
+ const fieldLength = _batchFieldList.length;
251
252
  if (!fieldLength)
252
253
  return;
253
254
  if (props.isInlineAdding) {
@@ -255,7 +256,7 @@ const useBatchEditing = (props, state, emit, xGrid) => {
255
256
  }
256
257
  let rowLen = allSelectedLength.value;
257
258
  const vxeTable = xGrid.value;
258
- let {
259
+ const {
259
260
  tableData
260
261
  } = vxeTable.getTableData();
261
262
  if (props.isEditAllRow) {
@@ -270,7 +271,7 @@ const useBatchEditing = (props, state, emit, xGrid) => {
270
271
  return false;
271
272
  emit("resetBatchEditDoneStatus");
272
273
  let formDom = document.querySelectorAll(".js-inlineEditForm");
273
- let sliceLen = handleEditFormLength();
274
+ const sliceLen = handleEditFormLength();
274
275
  formDom = [...formDom].slice(0, sliceLen);
275
276
  formDom.forEach((item) => {
276
277
  item.__vue__.handleSubmitForm();
@@ -31,7 +31,7 @@ var PopupMenu = /* @__PURE__ */ defineComponent({
31
31
  slots,
32
32
  emit
33
33
  }) {
34
- const menuRef = ref(null);
34
+ const menuRef = ref();
35
35
  useEventListener(menuRef, "contextmenu", (e) => {
36
36
  e.preventDefault();
37
37
  return false;
@@ -128,7 +128,7 @@ const script = /* @__PURE__ */ defineComponent({
128
128
  "contentStyle": "background-color:white;color:rgb(51, 54, 57);padding:8px;position:relative;"
129
129
  }, {
130
130
  trigger: () => createVNode(NButton, {
131
- "onClick": withModifiers(() => editorTitleShowRef.value = !editorTitleShowRef.value, ["stop", "prev"]),
131
+ "onClick": withModifiers(() => editorTitleShowRef.value = !editorTitleShowRef.value, ["stop", "prevent"]),
132
132
  "text": true,
133
133
  "type": "primary"
134
134
  }, {
@@ -17,7 +17,7 @@ export declare const InjectionFormColumnWidth: InjectionKey<ComputedRef<number>>
17
17
  export declare const InjectionFormUUID: InjectionKey<string>;
18
18
  export declare const InjectionFormGraph: InjectionKey<Record<string, GeneralField>>;
19
19
  export declare const InjectionAnnotation: InjectionKey<WritableComputedRef<Nullable<Record<string, AnnotationItem>>>>;
20
- export declare const InjectionAnnotationShortcuts: InjectionKey<WritableComputedRef<Exclude<NonNullable<AnnotationItem>, string>['shortcuts']>>;
20
+ export declare const InjectionAnnotationShortcuts: InjectionKey<ComputedRef<Exclude<NonNullable<AnnotationItem>, string>['shortcuts']>>;
21
21
  export declare const InjectionFormGlobalProps: InjectionKey<Readonly<FormRenderProps>>;
22
22
  export declare const InjectionFormGlobalEmit: InjectionKey<(event: string, ...args: any[]) => void>;
23
23
  export declare enum FIELD_BUSINESS_TYPE {
@@ -48,6 +48,10 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
48
48
  iceTransportPolicy: "all" | "relay";
49
49
  }>>;
50
50
  };
51
+ videoTeleportTo: {
52
+ type: import("vue").PropType<string | Element>;
53
+ default: string;
54
+ };
51
55
  }, {
52
56
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
53
57
  token: {
@@ -98,6 +102,10 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
98
102
  iceTransportPolicy: "all" | "relay";
99
103
  }>>;
100
104
  };
105
+ videoTeleportTo: {
106
+ type: import("vue").PropType<string | Element>;
107
+ default: string;
108
+ };
101
109
  }>> & {
102
110
  "onTemplate-click"?: ((...args: any[]) => any) | undefined;
103
111
  "onUnread-message-update"?: ((...args: any[]) => any) | undefined;
@@ -3687,7 +3695,12 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
3687
3695
  handleRemoteAudioAvailable: (event: import("./src/hooks").TRTCEvent) => void;
3688
3696
  handleRemoteUserEnter: (event: import("./src/hooks").TRTCEvent) => void;
3689
3697
  handleRemoteUserExit: (event: import("./src/hooks").TRTCEvent) => void;
3690
- handleError: (error: any) => void;
3698
+ statusHandlers: {
3699
+ readonly IN_CALL: () => Promise<void>;
3700
+ readonly CALL_BUSY: () => void;
3701
+ readonly NO_RESPONSE: () => void;
3702
+ readonly REJECTED: () => void;
3703
+ };
3691
3704
  NButton: any;
3692
3705
  NAvatar: any;
3693
3706
  NIcon: any;
@@ -3814,7 +3827,6 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
3814
3827
  handleRemoteUserEnter: (event: import("./src/hooks").TRTCEvent) => Promise<void>;
3815
3828
  getUserName: (userId: string) => Promise<string>;
3816
3829
  handleRemoteUserExit: (event: import("./src/hooks").TRTCEvent) => void;
3817
- handleError: (error: any) => void;
3818
3830
  periodicCheckInterval: null;
3819
3831
  NButton: any;
3820
3832
  NAvatar: any;
@@ -4178,6 +4190,10 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
4178
4190
  iceTransportPolicy: "all" | "relay";
4179
4191
  }>>;
4180
4192
  };
4193
+ videoTeleportTo: {
4194
+ type: import("vue").PropType<string | Element>;
4195
+ default: string;
4196
+ };
4181
4197
  }>> & {
4182
4198
  "onTemplate-click"?: ((...args: any[]) => any) | undefined;
4183
4199
  "onUnread-message-update"?: ((...args: any[]) => any) | undefined;
@@ -4189,5 +4205,6 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
4189
4205
  baseURL: string;
4190
4206
  extraParams: import("../../shared/types").AnyObject;
4191
4207
  filterable: boolean;
4208
+ videoTeleportTo: string | Element;
4192
4209
  }>>;
4193
4210
  export default IhoChat;
@@ -49,6 +49,10 @@ declare const _default: import("vue").DefineComponent<{
49
49
  iceTransportPolicy: "all" | "relay";
50
50
  }>>;
51
51
  };
52
+ videoTeleportTo: {
53
+ type: PropType<string | Element>;
54
+ default: string;
55
+ };
52
56
  }, {
53
57
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
54
58
  token: {
@@ -99,6 +103,10 @@ declare const _default: import("vue").DefineComponent<{
99
103
  iceTransportPolicy: "all" | "relay";
100
104
  }>>;
101
105
  };
106
+ videoTeleportTo: {
107
+ type: PropType<string | Element>;
108
+ default: string;
109
+ };
102
110
  }>> & {
103
111
  "onTemplate-click"?: ((...args: any[]) => any) | undefined;
104
112
  "onUnread-message-update"?: ((...args: any[]) => any) | undefined;
@@ -3688,7 +3696,12 @@ declare const _default: import("vue").DefineComponent<{
3688
3696
  handleRemoteAudioAvailable: (event: import("./hooks").TRTCEvent) => void;
3689
3697
  handleRemoteUserEnter: (event: import("./hooks").TRTCEvent) => void;
3690
3698
  handleRemoteUserExit: (event: import("./hooks").TRTCEvent) => void;
3691
- handleError: (error: any) => void;
3699
+ statusHandlers: {
3700
+ readonly IN_CALL: () => Promise<void>;
3701
+ readonly CALL_BUSY: () => void;
3702
+ readonly NO_RESPONSE: () => void;
3703
+ readonly REJECTED: () => void;
3704
+ };
3692
3705
  NButton: any;
3693
3706
  NAvatar: any;
3694
3707
  NIcon: any;
@@ -3815,7 +3828,6 @@ declare const _default: import("vue").DefineComponent<{
3815
3828
  handleRemoteUserEnter: (event: import("./hooks").TRTCEvent) => Promise<void>;
3816
3829
  getUserName: (userId: string) => Promise<string>;
3817
3830
  handleRemoteUserExit: (event: import("./hooks").TRTCEvent) => void;
3818
- handleError: (error: any) => void;
3819
3831
  periodicCheckInterval: null;
3820
3832
  NButton: any;
3821
3833
  NAvatar: any;
@@ -4179,6 +4191,10 @@ declare const _default: import("vue").DefineComponent<{
4179
4191
  iceTransportPolicy: "all" | "relay";
4180
4192
  }>>;
4181
4193
  };
4194
+ videoTeleportTo: {
4195
+ type: PropType<string | Element>;
4196
+ default: string;
4197
+ };
4182
4198
  }>> & {
4183
4199
  "onTemplate-click"?: ((...args: any[]) => any) | undefined;
4184
4200
  "onUnread-message-update"?: ((...args: any[]) => any) | undefined;
@@ -4190,5 +4206,6 @@ declare const _default: import("vue").DefineComponent<{
4190
4206
  baseURL: string;
4191
4207
  extraParams: AnyObject;
4192
4208
  filterable: boolean;
4209
+ videoTeleportTo: string | Element;
4193
4210
  }>;
4194
4211
  export default _default;
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, provide, openBlock, createElementBlock, normalizeStyle, unref, createVNode, withCtx, createBlock, Fragment, createElementVNode, renderSlot, createCommentVNode } from 'vue';
1
+ import { defineComponent, ref, provide, openBlock, createElementBlock, normalizeStyle, unref, createVNode, withCtx, createBlock, Fragment, createElementVNode, renderSlot, createCommentVNode, Teleport } from 'vue';
2
2
  import { NConfigProvider, NSpin, NLayout, NLayoutContent } from 'naive-ui';
3
3
  import SiderList from './components/SiderList.vue.js';
4
4
  import ChatHeader from './components/ChatHeader.vue.js';
@@ -63,6 +63,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
63
63
  },
64
64
  trtcProxy: {
65
65
  type: [String, Object]
66
+ },
67
+ videoTeleportTo: {
68
+ type: [String, Object],
69
+ default: "body"
66
70
  }
67
71
  },
68
72
  emits: [
@@ -149,11 +153,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
149
153
  _: 3
150
154
  }, 8, ["style"]), renderSlot(_ctx.$slots, "external")]),
151
155
  _: 3
152
- }), unref(state).showVideo ? (openBlock(), createBlock(Video, {
153
- key: 1
154
- })) : createCommentVNode("v-if", true), unref(state).showMultipleVideo ? (openBlock(), createBlock(MultipleVideo, {
155
- key: 2
156
- })) : createCommentVNode("v-if", true), createVNode(PersonProfile)], 64))]),
156
+ }), (openBlock(), createBlock(Teleport, {
157
+ to: props.videoTeleportTo
158
+ }, [unref(state).showVideo ? (openBlock(), createBlock(Video, {
159
+ key: 0
160
+ })) : createCommentVNode("v-if", true)], 8, ["to"])), (openBlock(), createBlock(Teleport, {
161
+ to: props.videoTeleportTo
162
+ }, [unref(state).showMultipleVideo ? (openBlock(), createBlock(MultipleVideo, {
163
+ key: 0
164
+ })) : createCommentVNode("v-if", true)], 8, ["to"])), createVNode(PersonProfile)], 64))]),
157
165
  _: 3
158
166
  })], 4)) : createCommentVNode("v-if", true);
159
167
  };
@@ -119,7 +119,7 @@ var ContextMenu = /* @__PURE__ */ defineComponent({
119
119
  label: "\u79FB\u9664\u4F1A\u8BDD",
120
120
  key: "remove"
121
121
  }];
122
- const menuRef = ref(null);
122
+ const menuRef = ref();
123
123
  const item = computed(() => {
124
124
  const list = props.type === "message" ? state.msgList : state.sessionList;
125
125
  return list.find(({
@@ -118,7 +118,6 @@ declare const _default: import("vue").DefineComponent<{}, {
118
118
  handleRemoteUserEnter: (event: TRTCEvent) => Promise<void>;
119
119
  getUserName: (userId: string) => Promise<string>;
120
120
  handleRemoteUserExit: (event: TRTCEvent) => void;
121
- handleError: (error: any) => void;
122
121
  periodicCheckInterval: null;
123
122
  NButton: any;
124
123
  NAvatar: any;
@@ -273,7 +273,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
273
273
  try {
274
274
  startTimer();
275
275
  installEventHandlers({
276
- handleError,
277
276
  handleRemoteUserEnter,
278
277
  handleRemoteAudioAvailable,
279
278
  handleRemoteUserExit,
@@ -306,7 +305,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
306
305
  state.showMultipleVideo = false;
307
306
  if (isConnect.value) {
308
307
  uninstallEventHandlers({
309
- handleError,
310
308
  handleRemoteUserEnter,
311
309
  handleRemoteAudioAvailable,
312
310
  handleRemoteUserExit,
@@ -456,24 +454,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
456
454
  console.error("Error handling remote user exit:", error);
457
455
  }
458
456
  }
459
- function handleError(error) {
460
- console.error("TRTC error occurred:", error);
461
- if (error.code) {
462
- switch (error.code) {
463
- case -3301:
464
- $message.error("\u8FDB\u5165\u623F\u95F4\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5");
465
- break;
466
- case -3302:
467
- $message.error("\u7F51\u7EDC\u8FDE\u63A5\u65AD\u5F00\uFF0C\u6B63\u5728\u5C1D\u8BD5\u91CD\u8FDE...");
468
- break;
469
- default:
470
- $message.error(`\u901A\u8BDD\u51FA\u73B0\u9519\u8BEF: ${error.message || "\u672A\u77E5\u9519\u8BEF"}`);
471
- }
472
- } else {
473
- $message.error("\u901A\u8BDD\u51FA\u73B0\u672A\u77E5\u9519\u8BEF");
474
- }
475
- state.showMultipleVideo = false;
476
- }
477
457
  let periodicCheckInterval = null;
478
458
  onBeforeUnmount(async () => {
479
459
  console.log("Component unmounting, cleaning up...");
@@ -96,7 +96,12 @@ declare const _default: import("vue").DefineComponent<{}, {
96
96
  handleRemoteAudioAvailable: (event: TRTCEvent) => void;
97
97
  handleRemoteUserEnter: (event: TRTCEvent) => void;
98
98
  handleRemoteUserExit: (event: TRTCEvent) => void;
99
- handleError: (error: any) => void;
99
+ statusHandlers: {
100
+ readonly IN_CALL: () => Promise<void>;
101
+ readonly CALL_BUSY: () => void;
102
+ readonly NO_RESPONSE: () => void;
103
+ readonly REJECTED: () => void;
104
+ };
100
105
  NButton: any;
101
106
  NAvatar: any;
102
107
  NIcon: any;
@@ -165,7 +165,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
165
165
  startTimer();
166
166
  }
167
167
  installEventHandlers({
168
- handleError,
169
168
  handleRemoteUserEnter,
170
169
  handleRemoteAudioAvailable,
171
170
  handleRemoteUserExit,
@@ -189,7 +188,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
189
188
  try {
190
189
  state.showVideo = false;
191
190
  uninstallEventHandlers({
192
- handleError,
193
191
  handleRemoteUserEnter,
194
192
  handleRemoteAudioAvailable,
195
193
  handleRemoteUserExit,
@@ -232,21 +230,35 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
232
230
  console.log("Remote user exited:", event.userId);
233
231
  handleExit();
234
232
  }
235
- function handleError(error) {
236
- console.error("TRTC error in single video:", error);
237
- $message.error("\u89C6\u9891\u901A\u8BDD\u51FA\u73B0\u9519\u8BEF");
238
- state.showVideo = false;
239
- }
240
- watch(() => status.value, (value) => {
233
+ const statusHandlers = {
234
+ [AV_STATUS.IN_CALL]: () => init(),
235
+ [AV_STATUS.CALL_BUSY]: () => {
236
+ $message.error("\u5BF9\u65B9\u7E41\u5FD9\uFF01");
237
+ handleExit();
238
+ },
239
+ [AV_STATUS.NO_RESPONSE]: () => {
240
+ $message.error("\u5BF9\u65B9\u672A\u63A5\u542C!");
241
+ handleExit();
242
+ },
243
+ [AV_STATUS.REJECTED]: () => {
244
+ $message.error("\u5BF9\u65B9\u5DF2\u62D2\u7EDD!");
245
+ handleExit();
246
+ }
247
+ };
248
+ watch(status, (newStatus, oldStatus) => {
249
+ if (newStatus === oldStatus)
250
+ return;
241
251
  if (!state.showVideo)
242
252
  return;
243
- if (value === AV_STATUS.IN_CALL) {
244
- init();
253
+ const handler = statusHandlers[newStatus];
254
+ if (handler) {
255
+ handler();
245
256
  } else {
246
257
  handleExit();
247
258
  }
248
259
  }, {
249
- immediate: true
260
+ immediate: true,
261
+ flush: "post"
250
262
  });
251
263
  onBeforeUnmount(() => {
252
264
  handleExit();
@@ -1,3 +1,4 @@
1
+ import { Ref } from 'vue';
1
2
  import TRTC from 'trtc-sdk-v5';
2
3
  import { AnyFn } from '../../../../shared/types';
3
4
  export interface RemoteUser {
@@ -12,7 +13,6 @@ export interface TRTCEvent {
12
13
  available?: boolean;
13
14
  }
14
15
  export interface VideoEventHandlers {
15
- handleError: AnyFn;
16
16
  handleRemoteUserEnter: AnyFn;
17
17
  handleRemoteAudioAvailable: AnyFn;
18
18
  handleRemoteUserExit: AnyFn;
@@ -79,17 +79,17 @@ export declare function useVideo(config?: VideoConfig): {
79
79
  };
80
80
  isForward: boolean;
81
81
  };
82
- trtcProxy: import("vue").Ref<any>;
82
+ trtcProxy: Ref<any>;
83
83
  sendMessage: (message: {
84
84
  chatType?: string | undefined;
85
85
  content: import("../../../../shared/types").AnyObject;
86
86
  receiver?: string | undefined;
87
87
  }) => Promise<void>;
88
88
  trtc: TRTC;
89
- timing: import("vue").Ref<string>;
90
- voiceClose: import("vue").Ref<boolean>;
91
- videocamClose: import("vue").Ref<boolean>;
92
- isConnect: import("vue").Ref<boolean>;
89
+ timing: Ref<string>;
90
+ voiceClose: Ref<boolean>;
91
+ videocamClose: Ref<boolean>;
92
+ isConnect: Ref<boolean>;
93
93
  isAudio: import("vue").ComputedRef<boolean>;
94
94
  isCall: import("vue").ComputedRef<boolean>;
95
95
  messageTypeText: import("vue").ComputedRef<"语音" | "视频">;
@@ -97,13 +97,13 @@ export declare function useVideo(config?: VideoConfig): {
97
97
  timer: any;
98
98
  seconds: number;
99
99
  };
100
- remoteUsers: import("vue").Ref<{
100
+ remoteUsers: Ref<{
101
101
  id: string;
102
102
  name: string;
103
103
  hasVideo?: boolean | undefined;
104
104
  hasAudio?: boolean | undefined;
105
105
  }[]>;
106
- videoRefs: import("vue").Ref<Map<string, HTMLElement>>;
106
+ videoRefs: Ref<Map<string, HTMLElement>>;
107
107
  startTimer: () => void;
108
108
  resetTimer: () => void;
109
109
  toggleAudio: () => Promise<void>;
@@ -378,12 +378,32 @@ function useVideo(config = {}) {
378
378
  }
379
379
  }
380
380
  }
381
+ function handleError(error) {
382
+ console.error("TRTC error occurred:", error);
383
+ if (error.code) {
384
+ switch (error.code) {
385
+ case -3301:
386
+ $message.error("\u8FDB\u5165\u623F\u95F4\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5");
387
+ break;
388
+ case -3302:
389
+ $message.warning("\u7F51\u7EDC\u8FDE\u63A5\u65AD\u5F00\uFF0C\u6B63\u5728\u5C1D\u8BD5\u91CD\u8FDE...");
390
+ break;
391
+ case TRTC.ERROR_CODE.DEVICE_ERROR:
392
+ $message.warning("\u83B7\u53D6\u8BBE\u5907\u6216\u8005\u91C7\u96C6\u97F3\u89C6\u9891\u51FA\u73B0\u5F02\u5E38");
393
+ break;
394
+ default:
395
+ $message.error(`\u901A\u8BDD\u51FA\u73B0\u9519\u8BEF: ${error.message || "\u672A\u77E5\u9519\u8BEF"}`);
396
+ }
397
+ } else {
398
+ $message.error("\u901A\u8BDD\u51FA\u73B0\u672A\u77E5\u9519\u8BEF");
399
+ }
400
+ }
381
401
  function installEventHandlers(handlers) {
382
402
  console.log("Installing TRTC event handlers...");
383
403
  const wrappedHandlers = {
384
404
  handleError: (error) => {
385
405
  console.log("TRTC EVENT: ERROR", error);
386
- handlers.handleError(error);
406
+ handleError(error);
387
407
  },
388
408
  handleRemoteUserEnter: (event) => {
389
409
  console.log("TRTC EVENT: REMOTE_USER_ENTER", event);
@@ -419,7 +439,7 @@ function useVideo(config = {}) {
419
439
  }
420
440
  }
421
441
  function uninstallEventHandlers(handlers) {
422
- trtc.off(TRTC.EVENT.ERROR, handlers.handleError);
442
+ trtc.off(TRTC.EVENT.ERROR, handleError);
423
443
  trtc.off(TRTC.EVENT.REMOTE_USER_ENTER, handlers.handleRemoteUserEnter);
424
444
  trtc.off(TRTC.EVENT.REMOTE_AUDIO_AVAILABLE, handlers.handleRemoteAudioAvailable);
425
445
  trtc.off(TRTC.EVENT.REMOTE_USER_EXIT, handlers.handleRemoteUserExit);
@@ -39,7 +39,7 @@ function dateRendererPlugin() {
39
39
  });
40
40
  },
41
41
  apply(hooks) {
42
- useAutoFocus(hooks).bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.DATE, ".n-input__input-el", {
42
+ useAutoFocus().bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.DATE, ".n-input__input-el", {
43
43
  after: (fieldItem) => {
44
44
  Reflect.set(fieldItem.editRender, "autoselect", true);
45
45
  return fieldItem;
@@ -4,28 +4,6 @@ function useAutoFocus(hooks) {
4
4
  after,
5
5
  focusType = "function"
6
6
  } = {}) {
7
- hooks.fieldHooks.field.tap(pluginName, (fieldItem) => {
8
- var _a;
9
- function createAutoFocusFn(selector2) {
10
- const autofocusFn = ({
11
- cell
12
- } = {}) => {
13
- const ele = cell && cell.querySelector(selector2);
14
- ele && ele.click();
15
- return ele;
16
- };
17
- autofocusFn.toString = () => selector2;
18
- return autofocusFn;
19
- }
20
- if (((_a = fieldItem.editRender) == null ? void 0 : _a.name) === type) {
21
- fieldItem = before ? before(fieldItem) : fieldItem;
22
- if (fieldItem.editRender && !Reflect.has(fieldItem.editRender, "autofocus")) {
23
- Reflect.set(fieldItem.editRender, "autofocus", focusType === "class" ? selector : focusType === "function" ? createAutoFocusFn(selector) : void 0);
24
- }
25
- return after ? after(fieldItem) : fieldItem;
26
- }
27
- return fieldItem;
28
- });
29
7
  }
30
8
  return {
31
9
  bindAutoFocusConfig
@@ -97,7 +97,7 @@ function inputRendererPlugin() {
97
97
  });
98
98
  },
99
99
  apply(hooks) {
100
- useAutoFocus(hooks).bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.INPUT, ".n-input__input-el,.n-input__textarea-el", {
100
+ useAutoFocus().bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.INPUT, ".n-input__input-el,.n-input__textarea-el", {
101
101
  focusType: "class"
102
102
  });
103
103
  }
@@ -81,7 +81,7 @@ function levelSearchCascadePlugin() {
81
81
  });
82
82
  },
83
83
  apply(hooks) {
84
- useAutoFocus(hooks).bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.LEVEL_SEARCH_CASCADE, "input");
84
+ useAutoFocus().bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.LEVEL_SEARCH_CASCADE, "input");
85
85
  }
86
86
  });
87
87
  }
@@ -99,7 +99,7 @@ function numberRendererPlugin() {
99
99
  });
100
100
  },
101
101
  apply(hooks) {
102
- useAutoFocus(hooks).bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.NUMBER, ".n-input__input-el", {
102
+ useAutoFocus().bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.NUMBER, ".n-input__input-el", {
103
103
  focusType: "class"
104
104
  });
105
105
  }
@@ -96,7 +96,7 @@ function selectRendererPlugin() {
96
96
  });
97
97
  },
98
98
  apply(hooks) {
99
- useAutoFocus(hooks).bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.SELECT, ".n-base-selection-input,.n-base-selection-tags");
99
+ useAutoFocus().bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.SELECT, ".n-base-selection-input,.n-base-selection-tags");
100
100
  hooks.fieldHooks.fieldList.tap(pluginName, (fieldList, {
101
101
  uuid
102
102
  }) => {
@@ -96,7 +96,7 @@ function separateRendererPlugins() {
96
96
  });
97
97
  },
98
98
  apply(hooks) {
99
- useAutoFocus(hooks).bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.SEPARATE, ".iho-table__separateText");
99
+ useAutoFocus().bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.SEPARATE, ".iho-table__separateText");
100
100
  hooks.eventHooks.onEditClosed.tap(pluginName, ({
101
101
  row,
102
102
  column,
@@ -36,7 +36,7 @@ function timeRendererPlugin() {
36
36
  });
37
37
  },
38
38
  apply(hooks) {
39
- useAutoFocus(hooks).bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.TIME, ".n-input__input-el", {
39
+ useAutoFocus().bindAutoFocusConfig(pluginName, EDITABLE_WIDGET_TYPE.TIME, ".n-input__input-el", {
40
40
  after: (fieldItem) => {
41
41
  Reflect.set(fieldItem.editRender, "autoselect", true);
42
42
  return fieldItem;
@@ -1,2 +1,2 @@
1
1
  import { AnyObject } from '../../../../shared/types';
2
- export declare function getParentNodeList(node: AnyObject): never[];
2
+ export declare function getParentNodeList(node: AnyObject): AnyObject[];
@@ -1,5 +1,5 @@
1
1
  var name = "@cnhis-design-vue/shared";
2
- var version = "3.3.3-beta.73";
2
+ var version = "3.3.3-beta.74";
3
3
  var main = "index.ts";
4
4
  var peerDependencies = {
5
5
  "naive-ui": "^2.30.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.3.3-beta.73",
3
+ "version": "3.3.3-beta.74",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -62,7 +62,7 @@
62
62
  "video.js": "^7.19.2",
63
63
  "videojs-contrib-hls": "^5.15.0",
64
64
  "viewerjs": "^1.10.5",
65
- "vue": "^3.2.0",
65
+ "vue": "^3.5.0",
66
66
  "vue-simple-uploader": "^1.0.0-beta.5",
67
67
  "xe-utils": "^3.5.4"
68
68
  },
@@ -74,5 +74,5 @@
74
74
  "iOS 7",
75
75
  "last 3 iOS versions"
76
76
  ],
77
- "gitHead": "5ec3ef73116c73fd6f677c8df243b773b4742008"
77
+ "gitHead": "e4daf2ab84e560a83587973475b91dc530d1c30c"
78
78
  }