cnhis-design-vue 3.3.3-release.0 → 3.3.3-release.8
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/audio-sdk/index.d.ts +18 -16
- package/es/components/audio-sdk/src/Index.vue.d.ts +18 -16
- package/es/components/audio-sdk/src/Index.vue2.js +47 -12
- package/es/components/audio-sdk/src/audioSDK.js +1 -1
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +6 -6
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +6 -6
- package/es/components/audio-sdk/src/components/recording.vue2.js +17 -3
- package/es/components/base-search/index.d.ts +3 -0
- package/es/components/base-search/src/index.vue.d.ts +3 -0
- package/es/components/big-table/src/components/NoData.vue2.js +8 -1
- package/es/components/big-table/src/hooks/useTableParse.js +8 -1
- package/es/components/button-print/index.d.ts +2 -1
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +2 -1
- package/es/components/button-print/src/ButtonPrint.vue2.js +6 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +11 -5
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +4 -1
- package/es/components/button-print/src/utils/print.d.ts +2 -2
- package/es/components/button-print/src/utils/print.js +29 -20
- package/es/components/callback/src/components/render/popupMaps.d.ts +13 -0
- package/es/components/card-reader-sdk-cn/src/henan/index.js +8 -1
- package/es/components/classification/index.d.ts +56 -6
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +56 -6
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +56 -6
- package/es/components/classification/src/index.vue.d.ts +56 -6
- package/es/components/expand-field/index.d.ts +792 -1
- package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +792 -1
- package/es/components/expand-field/src/components/PersonModal.vue.d.ts +792 -1
- package/es/components/expand-field/src/components/form.vue.d.ts +792 -1
- package/es/components/expand-field/src/components/form.vue2.js +8 -1
- package/es/components/expand-field/src/index.vue.d.ts +792 -1
- package/es/components/field-editor/index.d.ts +13 -0
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +13 -0
- package/es/components/field-editor/src/FieldEditor.vue2.js +2 -1
- package/es/components/field-editor/src/fields.d.ts +1 -0
- package/es/components/field-editor/src/fields.js +6 -0
- package/es/components/field-set/src/FieldColor.vue.d.ts +6 -4
- package/es/components/field-set/src/FieldFilter.vue.d.ts +6 -4
- package/es/components/field-set/src/FieldSet.vue.d.ts +39 -5
- package/es/components/field-set/src/FieldSet.vue2.js +118 -69
- package/es/components/field-set/src/Index.vue2.js +8 -3
- package/es/components/field-set/src/TableStyle.vue2.js +2 -2
- package/es/components/field-set/src/components/table-row.vue.d.ts +4 -4
- package/es/components/field-set/src/constants/index.d.ts +1 -1
- package/es/components/field-set/src/types/index.d.ts +1 -0
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +39 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +39 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +13 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +13 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +13 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +8 -1
- package/es/components/form-render/index.d.ts +13 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +13 -0
- package/es/components/form-render/src/FormRender.vue2.js +4 -0
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +13 -0
- package/es/components/form-render/src/components/renderer/formItem.js +8 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +12 -3
- package/es/components/form-render/src/hooks/useBusinessBinding.js +7 -7
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +8 -1
- package/es/components/form-render/src/utils/business.d.ts +3 -1
- package/es/components/form-render/src/utils/business.js +7 -1
- package/es/components/iho-chat/index.d.ts +21 -1
- package/es/components/iho-chat/src/Index.vue.d.ts +21 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +5 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +52 -13
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +3 -2
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +16 -0
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +112 -53
- package/es/components/iho-chat/src/hooks/index.d.ts +1 -0
- package/es/components/iho-chat/src/hooks/index.js +1 -0
- package/es/components/iho-chat/src/hooks/useDraggable.d.ts +25 -0
- package/es/components/iho-chat/src/hooks/useDraggable.js +160 -0
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +26 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +26 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +13 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +13 -0
- package/es/components/info-header/src/components/patientInfo/index.vue2.js +16 -2
- package/es/components/quick-search/index.d.ts +2 -0
- package/es/components/quick-search/src/index.vue.d.ts +2 -0
- package/es/components/scale-view/index.d.ts +67 -17
- package/es/components/scale-view/src/ScaleView.vue.d.ts +70 -19
- package/es/components/scale-view/src/ScaleView.vue2.js +84 -10
- package/es/components/scale-view/src/components/AnswerParse.vue.d.ts +5 -0
- package/es/components/scale-view/src/components/AnswerParse.vue2.js +74 -8
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +10 -7
- package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +28 -4
- package/es/components/scale-view/src/components/EvaluatePage.vue.d.ts +10 -7
- package/es/components/scale-view/src/components/EvaluatePage.vue2.js +29 -8
- package/es/components/scale-view/src/components/NoData.vue2.js +9 -3
- package/es/components/scale-view/src/components/ScaleScore.d.ts +1 -1
- package/es/components/scale-view/src/components/ScaleScore.js +47 -4
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +20 -2
- package/es/components/scale-view/src/components/formitem/r-radio.js +2 -0
- package/es/components/scale-view/src/components/formitem/r-sign.js +32 -4
- package/es/components/scale-view/src/components/formitem/r-upload.js +65 -7
- package/es/components/scale-view/src/components/formitem/sign-com.js +8 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +20 -5
- package/es/components/scale-view/src/hooks/scaleview-init.js +24 -3
- package/es/components/scale-view/src/hooks/scaleview-methods.js +40 -5
- package/es/components/scale-view/src/hooks/scaleview-props.d.ts +8 -0
- package/es/components/scale-view/src/hooks/scaleview-props.js +8 -0
- package/es/components/scale-view/src/hooks/scaleview-submit.d.ts +2 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.js +64 -8
- package/es/components/scale-view/src/hooks/scaleview-validate.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-validate.js +157 -24
- package/es/components/scale-view/src/hooks/use-evaluate.js +16 -2
- package/es/components/scale-view/src/hooks/use-noData.js +33 -5
- package/es/components/scale-view/src/utils/judge-types.d.ts +2 -1
- package/es/components/scale-view/src/utils/judge-types.js +10 -10
- package/es/components/scale-view/src/utils/watch-form-change.d.ts +13 -0
- package/es/components/scale-view/src/utils/watch-form-change.js +71 -0
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/select-person/index.d.ts +792 -1
- package/es/components/select-person/src/SelectPerson.vue.d.ts +434 -341
- package/es/components/select-person/src/SelectPerson.vue2.js +521 -675
- package/es/components/select-person/src/SelectPersonRole.vue.d.ts +630 -0
- package/es/components/select-person/src/SelectPersonRole.vue.js +6 -0
- package/es/components/select-person/src/SelectPersonRole.vue2.js +942 -0
- package/es/components/select-person/src/components/GroupItem.vue.d.ts +19 -0
- package/es/components/select-person/src/components/GroupItem.vue.js +6 -0
- package/es/components/select-person/src/components/GroupItem.vue2.js +37 -0
- package/es/components/select-person/src/components/SearchGroupList.vue.d.ts +214 -0
- package/es/components/select-person/src/components/SearchGroupList.vue.js +6 -0
- package/es/components/select-person/src/components/SearchGroupList.vue2.js +145 -0
- package/es/components/select-person/src/components/SearchMultiple.vue2.js +1 -1
- package/es/components/select-person/src/components/SearchOrgAndStaff.vue2.js +21 -12
- package/es/components/select-person/src/components/TagItem.vue.d.ts +43 -0
- package/es/components/select-person/src/components/TagItem.vue.js +6 -0
- package/es/components/select-person/src/components/TagItem.vue2.js +40 -0
- package/es/components/select-person/src/index.vue.d.ts +793 -1
- package/es/components/select-person/src/index.vue2.js +21 -4
- package/es/components/select-person/src/types/index.d.ts +35 -0
- package/es/components/select-person/src/types/index.js +1 -0
- package/es/components/select-person/src/utils/index.d.ts +3 -0
- package/es/components/select-person/src/utils/index.js +29 -8
- package/es/components/select-person/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +13 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +1 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +54 -6
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +26 -10
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +17 -2
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +37 -2
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +18 -2
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +44 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +36 -4
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +2 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +55 -6
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +6 -3
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +12 -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/DateQuickBtn/index.vue2.js +25 -6
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +12 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +2 -2
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +2 -2
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -0
- package/es/components/table-filter/src/hooks/useAdvanced.js +20 -3
- package/es/components/table-filter/src/hooks/useRenderWidget.js +4 -0
- package/es/components/table-filter/src/tool/date.d.ts +3 -0
- package/es/components/table-filter/src/tool/date.js +139 -0
- package/es/components/table-filter/src/tool/transformData.d.ts +1 -0
- package/es/components/table-filter/src/tool/transformData.js +11 -8
- package/es/components/table-filter/src/types/enums.d.ts +1 -0
- package/es/components/table-filter/src/types/enums.js +2 -1
- package/es/components/table-filter/src/types/index.d.ts +12 -0
- package/es/components/vod-chunk-upload/index.d.ts +3 -0
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.d.ts +1 -29
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +109 -11
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +15 -1
- package/es/components/vod-chunk-upload/src/hooks/upload-data.js +72 -9
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +3 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +75 -9
- package/es/shared/hooks/selectHooks/useSearchContent.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -174,7 +174,13 @@ function parseAge2Birthday(age, ageUnit, formatter = "yyyy-MM-dd HH:mm") {
|
|
174
174
|
return date;
|
175
175
|
}
|
176
176
|
}
|
177
|
-
function parseAgeFromContext(context) {
|
177
|
+
function parseAgeFromContext(context, nominalAge) {
|
178
|
+
if (nominalAge && context.birthday) {
|
179
|
+
return {
|
180
|
+
ageUnit: FIELD_AGE_UNIT.YEAR,
|
181
|
+
age: Math.max(new Date().getFullYear() - new Date(context.birthday).getFullYear(), 1)
|
182
|
+
};
|
183
|
+
}
|
178
184
|
const result = context.minutes < 60 ? {
|
179
185
|
ageUnit: FIELD_AGE_UNIT.MINUTE,
|
180
186
|
age: context.minutes
|
@@ -2281,6 +2281,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
2281
2281
|
HappyOutline: 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<{}>>, {}>;
|
2282
2282
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
2283
2283
|
ChatFooter: import("vue").DefineComponent<{}, {
|
2284
|
+
SPACE_PLACEHOLDER: string;
|
2284
2285
|
inputRef: import("vue").Ref<HTMLDivElement | undefined>;
|
2285
2286
|
state: {
|
2286
2287
|
orgId: string | number;
|
@@ -2330,16 +2331,19 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
2330
2331
|
options: import("../../shared/types").AnyObject[];
|
2331
2332
|
defaultValue: import("../../shared/types").AnyObject[];
|
2332
2333
|
}>;
|
2333
|
-
|
2334
|
+
sendBtnDisabled: import("vue").ComputedRef<boolean>;
|
2334
2335
|
isForwardDisabled: import("vue").ComputedRef<boolean>;
|
2336
|
+
callBtnDisabled: import("vue").ComputedRef<boolean>;
|
2335
2337
|
handleCall: (chatMessageType: string, checkedIds?: string[]) => void;
|
2336
2338
|
handleKeyDown: (event: KeyboardEvent) => void;
|
2337
2339
|
isWrap: (event: KeyboardEvent) => boolean;
|
2338
2340
|
handleInput: () => void;
|
2339
2341
|
selectEmoji: (name: string) => void;
|
2342
|
+
insertSpace: () => void;
|
2340
2343
|
doUpdateFile: (file: File) => Promise<string>;
|
2341
2344
|
fileChange: (options: import("./src/types").FileOptions, chatMessageType: import("./src/constants").MESSAGE_TYPE) => Promise<void>;
|
2342
2345
|
handleMsgSend: () => Promise<void>;
|
2346
|
+
removeSpace: () => void;
|
2343
2347
|
doSendMessage: (contentInfo: import("../../shared/types").AnyObject) => Promise<void>;
|
2344
2348
|
clearInput: () => void;
|
2345
2349
|
handleRelay: ({ checkedIds, remark }: {
|
@@ -3046,8 +3050,22 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
3046
3050
|
handleRemoteVideoAvailable: import("../../shared/types").AnyFn;
|
3047
3051
|
}) => void;
|
3048
3052
|
isConnect: import("vue").Ref<boolean>;
|
3053
|
+
wrapperRef: import("vue").Ref<HTMLElement | null>;
|
3054
|
+
handleRef: import("vue").Ref<HTMLElement | null>;
|
3055
|
+
isMaxSize: import("vue").Ref<boolean>;
|
3056
|
+
miniWrapperRef: import("vue").Ref<HTMLElement | null>;
|
3049
3057
|
callUser: import("vue").ComputedRef<any>;
|
3050
3058
|
title: import("vue").ComputedRef<string>;
|
3059
|
+
style: import("vue").Ref<{
|
3060
|
+
left: string;
|
3061
|
+
top: string;
|
3062
|
+
}>;
|
3063
|
+
changePosition: (position?: ("center" | "top-right") | undefined) => void;
|
3064
|
+
miniStyle: import("vue").Ref<{
|
3065
|
+
left: string;
|
3066
|
+
top: string;
|
3067
|
+
}>;
|
3068
|
+
changeMiniPosition: (position?: ("center" | "top-right") | undefined) => void;
|
3051
3069
|
handleAddPerson: ({ checkedIds, checkedOptions }: {
|
3052
3070
|
checkedIds: string[];
|
3053
3071
|
checkedOptions: import("../../shared/types").AnyObject[];
|
@@ -3062,6 +3080,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
3062
3080
|
handleRemoteUserExit: (event: any) => void;
|
3063
3081
|
handleError: (error: any) => void;
|
3064
3082
|
NButton: any;
|
3083
|
+
NAvatar: any;
|
3065
3084
|
NIcon: any;
|
3066
3085
|
ChatAdd: import("vue").DefineComponent<{
|
3067
3086
|
title: {
|
@@ -3264,6 +3283,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
3264
3283
|
PersonAdd: 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<{}>>, {}>;
|
3265
3284
|
MicOff: 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<{}>>, {}>;
|
3266
3285
|
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<{}>>, {}>;
|
3286
|
+
ResizeOutline: 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<{}>>, {}>;
|
3267
3287
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
3268
3288
|
PersonProfile: import("vue").DefineComponent<{}, {
|
3269
3289
|
state: {
|
@@ -2282,6 +2282,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
2282
2282
|
HappyOutline: 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<{}>>, {}>;
|
2283
2283
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
2284
2284
|
ChatFooter: import("vue").DefineComponent<{}, {
|
2285
|
+
SPACE_PLACEHOLDER: string;
|
2285
2286
|
inputRef: import("vue").Ref<HTMLDivElement | undefined>;
|
2286
2287
|
state: {
|
2287
2288
|
orgId: string | number;
|
@@ -2331,16 +2332,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
2331
2332
|
options: AnyObject[];
|
2332
2333
|
defaultValue: AnyObject[];
|
2333
2334
|
}>;
|
2334
|
-
|
2335
|
+
sendBtnDisabled: import("vue").ComputedRef<boolean>;
|
2335
2336
|
isForwardDisabled: import("vue").ComputedRef<boolean>;
|
2337
|
+
callBtnDisabled: import("vue").ComputedRef<boolean>;
|
2336
2338
|
handleCall: (chatMessageType: string, checkedIds?: string[]) => void;
|
2337
2339
|
handleKeyDown: (event: KeyboardEvent) => void;
|
2338
2340
|
isWrap: (event: KeyboardEvent) => boolean;
|
2339
2341
|
handleInput: () => void;
|
2340
2342
|
selectEmoji: (name: string) => void;
|
2343
|
+
insertSpace: () => void;
|
2341
2344
|
doUpdateFile: (file: File) => Promise<string>;
|
2342
2345
|
fileChange: (options: import("./types").FileOptions, chatMessageType: import("./constants").MESSAGE_TYPE) => Promise<void>;
|
2343
2346
|
handleMsgSend: () => Promise<void>;
|
2347
|
+
removeSpace: () => void;
|
2344
2348
|
doSendMessage: (contentInfo: AnyObject) => Promise<void>;
|
2345
2349
|
clearInput: () => void;
|
2346
2350
|
handleRelay: ({ checkedIds, remark }: {
|
@@ -3047,8 +3051,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
3047
3051
|
handleRemoteVideoAvailable: import("../../../shared/types").AnyFn;
|
3048
3052
|
}) => void;
|
3049
3053
|
isConnect: import("vue").Ref<boolean>;
|
3054
|
+
wrapperRef: import("vue").Ref<HTMLElement | null>;
|
3055
|
+
handleRef: import("vue").Ref<HTMLElement | null>;
|
3056
|
+
isMaxSize: import("vue").Ref<boolean>;
|
3057
|
+
miniWrapperRef: import("vue").Ref<HTMLElement | null>;
|
3050
3058
|
callUser: import("vue").ComputedRef<any>;
|
3051
3059
|
title: import("vue").ComputedRef<string>;
|
3060
|
+
style: import("vue").Ref<{
|
3061
|
+
left: string;
|
3062
|
+
top: string;
|
3063
|
+
}>;
|
3064
|
+
changePosition: (position?: ("center" | "top-right") | undefined) => void;
|
3065
|
+
miniStyle: import("vue").Ref<{
|
3066
|
+
left: string;
|
3067
|
+
top: string;
|
3068
|
+
}>;
|
3069
|
+
changeMiniPosition: (position?: ("center" | "top-right") | undefined) => void;
|
3052
3070
|
handleAddPerson: ({ checkedIds, checkedOptions }: {
|
3053
3071
|
checkedIds: string[];
|
3054
3072
|
checkedOptions: AnyObject[];
|
@@ -3063,6 +3081,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
3063
3081
|
handleRemoteUserExit: (event: any) => void;
|
3064
3082
|
handleError: (error: any) => void;
|
3065
3083
|
NButton: any;
|
3084
|
+
NAvatar: any;
|
3066
3085
|
NIcon: any;
|
3067
3086
|
ChatAdd: import("vue").DefineComponent<{
|
3068
3087
|
title: {
|
@@ -3265,6 +3284,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
3265
3284
|
PersonAdd: 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<{}>>, {}>;
|
3266
3285
|
MicOff: 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<{}>>, {}>;
|
3267
3286
|
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<{}>>, {}>;
|
3287
|
+
ResizeOutline: 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<{}>>, {}>;
|
3268
3288
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
3269
3289
|
PersonProfile: import("vue").DefineComponent<{}, {
|
3270
3290
|
state: {
|
@@ -4,6 +4,7 @@ import { MESSAGE_TYPE } from '../constants';
|
|
4
4
|
import { simplifyMessage } from '../utils';
|
5
5
|
import { FileOptions } from '../types';
|
6
6
|
declare const _default: import("vue").DefineComponent<{}, {
|
7
|
+
SPACE_PLACEHOLDER: string;
|
7
8
|
inputRef: Ref<HTMLDivElement | undefined>;
|
8
9
|
state: {
|
9
10
|
orgId: string | number;
|
@@ -53,16 +54,19 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
53
54
|
options: AnyObject[];
|
54
55
|
defaultValue: AnyObject[];
|
55
56
|
}>;
|
56
|
-
|
57
|
+
sendBtnDisabled: import("vue").ComputedRef<boolean>;
|
57
58
|
isForwardDisabled: import("vue").ComputedRef<boolean>;
|
59
|
+
callBtnDisabled: import("vue").ComputedRef<boolean>;
|
58
60
|
handleCall: (chatMessageType: string, checkedIds?: string[]) => void;
|
59
61
|
handleKeyDown: (event: KeyboardEvent) => void;
|
60
62
|
isWrap: (event: KeyboardEvent) => boolean;
|
61
63
|
handleInput: () => void;
|
62
64
|
selectEmoji: (name: string) => void;
|
65
|
+
insertSpace: () => void;
|
63
66
|
doUpdateFile: (file: File) => Promise<string>;
|
64
67
|
fileChange: (options: FileOptions, chatMessageType: MESSAGE_TYPE) => Promise<void>;
|
65
68
|
handleMsgSend: () => Promise<void>;
|
69
|
+
removeSpace: () => void;
|
66
70
|
doSendMessage: (contentInfo: AnyObject) => Promise<void>;
|
67
71
|
clearInput: () => void;
|
68
72
|
handleRelay: ({ checkedIds, remark }: {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { createElementVNode, defineComponent, ref, computed, watch, withDirectives, openBlock, createElementBlock, normalizeStyle, unref, createVNode, withCtx, Fragment, toDisplayString, createCommentVNode, renderList, createBlock, createTextVNode, mergeProps, renderSlot, vShow } from 'vue';
|
1
|
+
import { createElementVNode, defineComponent, ref, computed, onMounted, watch, withDirectives, openBlock, createElementBlock, normalizeStyle, unref, createVNode, withCtx, Fragment, toDisplayString, createCommentVNode, renderList, createBlock, createTextVNode, mergeProps, renderSlot, vShow } from 'vue';
|
2
2
|
import { NButton, NIcon, NTooltip, NPopover, NUpload, NUploadTrigger } from 'naive-ui';
|
3
3
|
import ChatAdd from './ChatAdd.vue.js';
|
4
4
|
import { useData } from '../hooks/useData.js';
|
@@ -92,6 +92,7 @@ const _hoisted_24 = /* @__PURE__ */ createElementVNode("span", {
|
|
92
92
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
93
93
|
__name: "ChatFooter",
|
94
94
|
setup(__props) {
|
95
|
+
const SPACE_PLACEHOLDER = '<span style="display: inline-block;width: 1px;user-select: none;" data-space="true"></span>';
|
95
96
|
const inputRef = ref();
|
96
97
|
const {
|
97
98
|
state,
|
@@ -109,8 +110,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
109
110
|
defaultValue: [state.userInfo]
|
110
111
|
};
|
111
112
|
});
|
112
|
-
const
|
113
|
+
const sendBtnDisabled = computed(() => !content.value.replace(/( |\s|<br>|<span[^>]*data-space="true"[^>]*>[\s\S]*?<\/span>)+/g, ""));
|
113
114
|
const isForwardDisabled = computed(() => !state.msgList.some((msgItem) => msgItem.checked));
|
115
|
+
const callBtnDisabled = computed(() => state.showVideo || state.showMultipleVideo);
|
114
116
|
function handleCall(chatMessageType, checkedIds = []) {
|
115
117
|
const uuid = uuidGenerator();
|
116
118
|
const _checkedIds = [];
|
@@ -153,15 +155,29 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
153
155
|
}
|
154
156
|
function handleInput() {
|
155
157
|
var _a;
|
158
|
+
if (!inputRef.value)
|
159
|
+
return;
|
156
160
|
content.value = ((_a = inputRef.value) == null ? void 0 : _a.innerHTML) || "";
|
161
|
+
insertSpace();
|
157
162
|
}
|
158
163
|
function selectEmoji(name) {
|
159
164
|
var _a;
|
160
165
|
commonEmoticons.value.unshift(name);
|
161
166
|
commonEmoticons.value = uniq(commonEmoticons.value).slice(0, 26);
|
167
|
+
if (!inputRef.value)
|
168
|
+
return;
|
162
169
|
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
170
|
+
insertSpace();
|
163
171
|
document.execCommand("insertHTML", false, `<img data-msg=${name} data-type=${MESSAGE_TYPE.EMOJI} class="emoji--min" src=${emojis.findEmoji(name)} />`);
|
164
172
|
}
|
173
|
+
function insertSpace() {
|
174
|
+
if (!inputRef.value)
|
175
|
+
return;
|
176
|
+
if (!inputRef.value.innerHTML || inputRef.value.innerHTML === "<br>") {
|
177
|
+
Array.from(inputRef.value.childNodes).forEach((child) => child.remove());
|
178
|
+
document.execCommand("insertHTML", false, SPACE_PLACEHOLDER);
|
179
|
+
}
|
180
|
+
}
|
165
181
|
async function doUpdateFile(file) {
|
166
182
|
const formData = new FormData();
|
167
183
|
formData.append("sender", state.userInfo.id);
|
@@ -175,7 +191,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
175
191
|
} = options.file;
|
176
192
|
const data = await doUpdateFile(file);
|
177
193
|
if (!data)
|
178
|
-
return console.log(
|
194
|
+
return console.log(function() {
|
195
|
+
var _a, _b, _c;
|
196
|
+
try {
|
197
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.641")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.641")) || "\u4E0A\u4F20\u5931\u8D25";
|
198
|
+
} catch (e) {
|
199
|
+
return "\u4E0A\u4F20\u5931\u8D25";
|
200
|
+
}
|
201
|
+
}());
|
179
202
|
doSendMessage({
|
180
203
|
chatMessageType,
|
181
204
|
msg: isObject(data) ? JSON.stringify(data) : chatMessageType === MESSAGE_TYPE.FILE ? name : data,
|
@@ -183,13 +206,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
183
206
|
});
|
184
207
|
}
|
185
208
|
async function handleMsgSend() {
|
209
|
+
if (sendBtnDisabled.value)
|
210
|
+
return console.log("\u8BF7\u8F93\u5165\u5185\u5BB9");
|
211
|
+
removeSpace();
|
186
212
|
const {
|
187
213
|
innerHTML = "",
|
188
214
|
innerText = "",
|
189
215
|
outerText = ""
|
190
216
|
} = inputRef.value || {};
|
191
|
-
if (btnDisabled.value)
|
192
|
-
return console.log("\u8BF7\u8F93\u5165\u5185\u5BB9");
|
193
217
|
let chatMessageType = MESSAGE_TYPE.TEXT;
|
194
218
|
let msg = "";
|
195
219
|
if (innerHTML) {
|
@@ -251,6 +275,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
251
275
|
origin: "btn"
|
252
276
|
});
|
253
277
|
}
|
278
|
+
function removeSpace() {
|
279
|
+
if (!inputRef.value)
|
280
|
+
return;
|
281
|
+
const spaceHolders = inputRef.value.querySelectorAll('[data-space="true"]');
|
282
|
+
spaceHolders.forEach((space) => space.remove());
|
283
|
+
}
|
254
284
|
async function doSendMessage(contentInfo) {
|
255
285
|
const {
|
256
286
|
chatMessageType = MESSAGE_TYPE.TEXT,
|
@@ -280,7 +310,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
280
310
|
}
|
281
311
|
function clearInput() {
|
282
312
|
if (inputRef.value) {
|
283
|
-
inputRef.value.innerHTML =
|
313
|
+
inputRef.value.innerHTML = SPACE_PLACEHOLDER;
|
284
314
|
}
|
285
315
|
content.value = "";
|
286
316
|
}
|
@@ -315,6 +345,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
315
345
|
});
|
316
346
|
state.isForward = false;
|
317
347
|
}
|
348
|
+
onMounted(() => {
|
349
|
+
if (inputRef.value) {
|
350
|
+
inputRef.value.innerHTML = SPACE_PLACEHOLDER;
|
351
|
+
}
|
352
|
+
});
|
318
353
|
watch(() => [state.currentReferenceMsg, state.currentReEditMsg], ([currentReferenceMsg, currentReEditMsg]) => {
|
319
354
|
var _a;
|
320
355
|
if (currentReferenceMsg || currentReEditMsg) {
|
@@ -578,14 +613,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
578
613
|
}, {
|
579
614
|
trigger: withCtx(() => [createVNode(unref(NButton), {
|
580
615
|
quaternary: "",
|
581
|
-
size: "tiny"
|
616
|
+
size: "tiny",
|
617
|
+
disabled: unref(callBtnDisabled)
|
582
618
|
}, {
|
583
619
|
icon: withCtx(() => [createVNode(unref(NIcon), {
|
584
620
|
size: "18",
|
585
621
|
component: unref(CallOutline)
|
586
622
|
}, null, 8, ["component"])]),
|
587
623
|
_: 1
|
588
|
-
})]),
|
624
|
+
}, 8, ["disabled"])]),
|
589
625
|
default: withCtx(() => [createTextVNode(function() {
|
590
626
|
var _a, _b, _c;
|
591
627
|
try {
|
@@ -605,14 +641,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
605
641
|
}, {
|
606
642
|
trigger: withCtx(() => [createVNode(unref(NButton), {
|
607
643
|
quaternary: "",
|
608
|
-
size: "tiny"
|
644
|
+
size: "tiny",
|
645
|
+
disabled: unref(callBtnDisabled)
|
609
646
|
}, {
|
610
647
|
icon: withCtx(() => [createVNode(unref(NIcon), {
|
611
648
|
size: "20",
|
612
649
|
component: unref(VideocamOutline)
|
613
650
|
}, null, 8, ["component"])]),
|
614
651
|
_: 1
|
615
|
-
})]),
|
652
|
+
}, 8, ["disabled"])]),
|
616
653
|
default: withCtx(() => [createTextVNode(function() {
|
617
654
|
var _a, _b, _c;
|
618
655
|
try {
|
@@ -632,6 +669,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
632
669
|
trigger: withCtx(() => [createVNode(unref(NButton), {
|
633
670
|
quaternary: "",
|
634
671
|
size: "tiny",
|
672
|
+
disabled: unref(callBtnDisabled),
|
635
673
|
onClick: _cache[9] || (_cache[9] = () => handleCall(unref(MESSAGE_TYPE).AUDIO))
|
636
674
|
}, {
|
637
675
|
icon: withCtx(() => [createVNode(unref(NIcon), {
|
@@ -639,7 +677,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
639
677
|
component: unref(CallOutline)
|
640
678
|
}, null, 8, ["component"])]),
|
641
679
|
_: 1
|
642
|
-
})]),
|
680
|
+
}, 8, ["disabled"])]),
|
643
681
|
default: withCtx(() => [createTextVNode(function() {
|
644
682
|
var _a, _b, _c;
|
645
683
|
try {
|
@@ -655,6 +693,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
655
693
|
trigger: withCtx(() => [createVNode(unref(NButton), {
|
656
694
|
quaternary: "",
|
657
695
|
size: "tiny",
|
696
|
+
disabled: unref(callBtnDisabled),
|
658
697
|
onClick: _cache[10] || (_cache[10] = () => handleCall(unref(MESSAGE_TYPE).VIDEO))
|
659
698
|
}, {
|
660
699
|
icon: withCtx(() => [createVNode(unref(NIcon), {
|
@@ -662,7 +701,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
662
701
|
component: unref(VideocamOutline)
|
663
702
|
}, null, 8, ["component"])]),
|
664
703
|
_: 1
|
665
|
-
})]),
|
704
|
+
}, 8, ["disabled"])]),
|
666
705
|
default: withCtx(() => [createTextVNode(function() {
|
667
706
|
var _a, _b, _c;
|
668
707
|
try {
|
@@ -682,7 +721,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
682
721
|
}, null, 40, _hoisted_22), [[vShow, unref(state).id]]), createElementVNode("div", _hoisted_23, [_hoisted_24, createVNode(unref(NButton), {
|
683
722
|
type: "primary",
|
684
723
|
round: "",
|
685
|
-
disabled: unref(
|
724
|
+
disabled: unref(sendBtnDisabled),
|
686
725
|
onClick: handleMsgSend
|
687
726
|
}, {
|
688
727
|
default: withCtx(() => [createTextVNode(function() {
|
@@ -218,14 +218,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
218
218
|
}, {
|
219
219
|
trigger: withCtx(() => [createVNode(unref(NButton), {
|
220
220
|
quaternary: "",
|
221
|
-
size: "tiny"
|
221
|
+
size: "tiny",
|
222
|
+
disabled: unref(state).showVideo || unref(state).showMultipleVideo
|
222
223
|
}, {
|
223
224
|
icon: withCtx(() => [createVNode(unref(NIcon), {
|
224
225
|
size: "18",
|
225
226
|
component: unref(CloseOutline)
|
226
227
|
}, null, 8, ["component"])]),
|
227
228
|
_: 1
|
228
|
-
})]),
|
229
|
+
}, 8, ["disabled"])]),
|
229
230
|
default: withCtx(() => [createTextVNode(" \u7ED3\u675F\u804A\u5929 ")]),
|
230
231
|
_: 1
|
231
232
|
})]),
|
@@ -67,8 +67,22 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
67
67
|
handleRemoteVideoAvailable: import("../../../../shared/types").AnyFn;
|
68
68
|
}) => void;
|
69
69
|
isConnect: import("vue").Ref<boolean>;
|
70
|
+
wrapperRef: import("vue").Ref<HTMLElement | null>;
|
71
|
+
handleRef: import("vue").Ref<HTMLElement | null>;
|
72
|
+
isMaxSize: import("vue").Ref<boolean>;
|
73
|
+
miniWrapperRef: import("vue").Ref<HTMLElement | null>;
|
70
74
|
callUser: import("vue").ComputedRef<any>;
|
71
75
|
title: import("vue").ComputedRef<string>;
|
76
|
+
style: import("vue").Ref<{
|
77
|
+
left: string;
|
78
|
+
top: string;
|
79
|
+
}>;
|
80
|
+
changePosition: (position?: ("center" | "top-right") | undefined) => void;
|
81
|
+
miniStyle: import("vue").Ref<{
|
82
|
+
left: string;
|
83
|
+
top: string;
|
84
|
+
}>;
|
85
|
+
changeMiniPosition: (position?: ("center" | "top-right") | undefined) => void;
|
72
86
|
handleAddPerson: ({ checkedIds, checkedOptions }: {
|
73
87
|
checkedIds: string[];
|
74
88
|
checkedOptions: AnyObject[];
|
@@ -83,6 +97,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
83
97
|
handleRemoteUserExit: (event: any) => void;
|
84
98
|
handleError: (error: any) => void;
|
85
99
|
NButton: any;
|
100
|
+
NAvatar: any;
|
86
101
|
NIcon: any;
|
87
102
|
ChatAdd: import("vue").DefineComponent<{
|
88
103
|
title: {
|
@@ -285,5 +300,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
285
300
|
PersonAdd: 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<{}>>, {}>;
|
286
301
|
MicOff: 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<{}>>, {}>;
|
287
302
|
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<{}>>, {}>;
|
303
|
+
ResizeOutline: 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<{}>>, {}>;
|
288
304
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
289
305
|
export default _default;
|