@vunk/plus 1.12.1 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/components/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/components/agent-chat-provider/index.cjs +1 -0
- package/components/agent-chat-provider/index.mjs +113 -187
- package/components/agent-chat-provider/src/index.vue.d.ts +3 -2
- package/components/avatar/index.cjs +1 -0
- package/components/avatar/index.mjs +25 -31
- package/components/avatar/src/index.vue.d.ts +40 -39
- package/components/broadcasting-markdown/__tests__/const.test.d.ts +1 -0
- package/components/broadcasting-markdown/__tests__/utils.test.d.ts +1 -0
- package/components/broadcasting-markdown/index.cjs +5 -0
- package/components/broadcasting-markdown/index.mjs +346 -4376
- package/components/broadcasting-markdown/src/howler-speech.vue.d.ts +18 -24
- package/components/broadcasting-markdown/src/index.vue.d.ts +101 -51
- package/components/broadcasting-markdown/src/paragraph.vue.d.ts +17 -29
- package/components/broadcasting-markdown/src/speech-error.vue.d.ts +2 -59
- package/components/bubble-list/index.cjs +1 -0
- package/components/bubble-list/index.mjs +220 -302
- package/components/bubble-list/src/core/index.vue.d.ts +40 -885
- package/components/bubble-list/src/core/loading.vue.d.ts +3 -0
- package/components/bubble-list/src/index.vue.d.ts +29 -1321
- package/components/bubble-templates/index.cjs +1 -0
- package/components/bubble-templates/index.mjs +34 -49
- package/components/bubble-templates/src/index.vue.d.ts +3 -224
- package/components/chat-independent/index.cjs +1 -0
- package/components/chat-independent/index.mjs +105 -212
- package/components/chat-independent/src/index.vue.d.ts +20 -2712
- package/components/components.css +1 -0
- package/components/drawer/index.cjs +1 -0
- package/components/drawer/index.mjs +53 -94
- package/components/drawer/src/ctx.d.ts +22 -22
- package/components/drawer/src/index.vue.d.ts +84 -557
- package/components/index.cjs +1 -0
- package/components/index.d.ts +1 -0
- package/components/lottie-animation/index.cjs +1 -0
- package/components/lottie-animation/index.mjs +36 -55
- package/components/lottie-animation/src/index.vue.d.ts +3 -2
- package/components/metahuman-broadcasting/index.cjs +1 -0
- package/components/metahuman-broadcasting/index.mjs +89 -140
- package/components/metahuman-broadcasting/src/index.vue.d.ts +16 -718
- package/components/monaco-editor/index.cjs +1 -0
- package/components/monaco-editor/index.mjs +75 -73
- package/components/monaco-editor/src/ctx.d.ts +10 -4
- package/components/monaco-editor/src/index.vue.d.ts +17 -2
- package/components/monaco-environment/index.cjs +1 -0
- package/components/monaco-environment/index.mjs +23 -38
- package/components/monaco-environment/src/index.vue.d.ts +2 -1
- package/components/pixi-frame/index.cjs +1 -0
- package/components/pixi-frame/index.mjs +501 -1978
- package/components/pixi-frame/src/apng.vue.d.ts +17 -73
- package/components/pixi-frame/src/bitmap-generator.vue.d.ts +24 -66
- package/components/pixi-frame/src/bitmap.vue.d.ts +28 -80
- package/components/pixi-frame/src/buffer-image.vue.d.ts +29 -97
- package/components/pixi-frame/src/core.vue.d.ts +20 -75
- package/components/pixi-frame/src/index.vue.d.ts +302 -237
- package/components/pixi-frame/src/provider.vue.d.ts +12 -1
- package/components/pixi-frame/src/video.vue.d.ts +17 -71
- package/components/pixi-frame/src/view.vue.d.ts +4 -16
- package/components/recorder-button/index.cjs +1 -0
- package/components/recorder-button/index.mjs +140 -269
- package/components/recorder-button/src/index.vue.d.ts +67 -66
- package/components/routes-menu-content/index.cjs +1 -0
- package/components/routes-menu-content/index.mjs +150 -229
- package/components/routes-menu-content/src/index.vue.d.ts +27 -26
- package/components/routes-menu-content/src/item/core/index.vue.d.ts +27 -26
- package/components/routes-menu-content/src/item/index.vue.d.ts +27 -26
- package/components/scrollbar/index.cjs +1 -0
- package/components/scrollbar/index.mjs +288 -567
- package/components/scrollbar/src/bar.vue.d.ts +6 -133
- package/components/scrollbar/src/index.vue.d.ts +66 -337
- package/components/scrollbar/src/thumb.vue.d.ts +3 -80
- package/components/sender/index.cjs +1 -0
- package/components/sender/index.mjs +156 -285
- package/components/sender/src/SenderHeader.vue.d.ts +14 -221
- package/components/sender/src/index.vue.d.ts +16 -505
- package/components/speech-button/index.cjs +1 -0
- package/components/speech-button/index.mjs +98 -144
- package/components/speech-button/src/LoadingIcon.vue.d.ts +2 -1
- package/components/speech-button/src/RecordingIcon.vue.d.ts +2 -1
- package/components/speech-button/src/index.vue.d.ts +6 -5
- package/components/table-columns/index.cjs +1 -0
- package/components/table-columns/index.mjs +48 -78
- package/components/table-columns/src/ctx.d.ts +12 -12
- package/components/table-columns/src/el-ctx.d.ts +3 -3
- package/components/table-columns/src/index.vue.d.ts +28 -27
- package/components/tables-v1/index.cjs +1 -0
- package/components/tables-v1/index.mjs +99 -160
- package/components/tables-v1/src/ctx.d.ts +38 -38
- package/components/tables-v1/src/el-ctx.d.ts +7 -7
- package/components/tables-v1/src/index.vue.d.ts +111 -2266
- package/components/tables-v1-checkbox/index.cjs +1 -0
- package/components/tables-v1-checkbox/index.mjs +116 -4043
- package/components/tables-v1-checkbox/src/ctx.d.ts +36 -36
- package/components/tables-v1-checkbox/src/index.vue.d.ts +224 -2378
- package/components/text/index.cjs +1 -0
- package/components/text/index.mjs +70 -108
- package/components/text/src/ctx.d.ts +32 -32
- package/components/text/src/index.vue.d.ts +92 -1819
- package/components/thinking/index.cjs +1 -0
- package/components/thinking/index.mjs +127 -227
- package/components/thinking/src/index.vue.d.ts +23 -2045
- package/components/typing-markdown/index.cjs +1 -0
- package/components/typing-markdown/index.mjs +61 -201
- package/components/typing-markdown/src/index.vue.d.ts +3 -2
- package/components/vditor/index.cjs +1 -0
- package/components/vditor/index.mjs +121 -195
- package/components/vditor/src/ctx.d.ts +2 -2
- package/components/vditor/src/handle-fullscreen.vue.d.ts +3 -2
- package/components/vditor/src/handle-value.vue.d.ts +3 -2
- package/components/vditor/src/index.vue.d.ts +5 -4
- package/components/xgplayer/index.cjs +1 -0
- package/components/xgplayer/index.mjs +49 -90
- package/components/xgplayer/src/core.vue.d.ts +13 -18
- package/components/xgplayer/src/index.vue.d.ts +13 -67
- package/composables/el-breakpoints/index.cjs +1 -0
- package/composables/el-breakpoints/index.d.ts +10 -10
- package/composables/el-breakpoints/index.mjs +10 -12
- package/composables/index.cjs +1 -0
- package/composables/index.d.ts +1 -0
- package/composables/recorder/index.cjs +1 -0
- package/composables/recorder/index.mjs +9172 -14803
- package/element/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/element/bubble/index.cjs +3 -0
- package/element/bubble/index.d.ts +1 -1
- package/element/bubble/index.mjs +1 -1
- package/element/bubble/src/index.vue.d.ts +22 -22
- package/element/index.css +1 -1
- package/element/thinking/index.cjs +1 -0
- package/element/thinking/index.d.ts +1 -1
- package/element/thinking/index.mjs +1 -1
- package/element/thinking/src/index.vue.d.ts +26 -26
- package/element/thinking/src/types.d.ts +10 -0
- package/icons/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/icons/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/icons/end/index.cjs +1 -0
- package/icons/end/index.mjs +21 -26
- package/icons/end/src/index.vue.d.ts +3 -0
- package/icons/keyboard/index.cjs +1 -0
- package/icons/keyboard/index.mjs +21 -26
- package/icons/keyboard/src/index.vue.d.ts +3 -0
- package/icons/start/index.cjs +1 -0
- package/icons/start/index.mjs +21 -26
- package/icons/start/src/index.vue.d.ts +3 -0
- package/icons/voice/index.cjs +1 -0
- package/icons/voice/index.mjs +26 -44
- package/icons/voice/src/index.vue.d.ts +2 -3
- package/index.css +2 -558
- package/index.d.ts +1 -0
- package/package.json +78 -87
- package/shared/data/index.cjs +1 -0
- package/shared/data/index.mjs +16 -22
- package/shared/types/index.cjs +1 -0
- package/shared/types/index.d.ts +1 -0
- package/components/LinkOutlined.mjs +0 -1321
- package/components/_commonjsHelpers.mjs +0 -7
- package/components/_plugin-vue_export-helper.mjs +0 -9
- package/components/bubble-list/index.css +0 -70
- package/components/bubble-templates/index.css +0 -4
- package/components/chat-independent/index.css +0 -47
- package/components/drawer/index.css +0 -124
- package/components/index2.mjs +0 -78
- package/components/lottie-animation/index.css +0 -4
- package/components/monaco-editor/index.css +0 -4
- package/components/pixi-frame/index.css +0 -4
- package/components/recorder-button/index.css +0 -69
- package/components/sender/index.css +0 -22
- package/components/speech-button/index.css +0 -10
- package/components/tables-v1/index.css +0 -7
- package/components/tables-v1-checkbox/index.css +0 -8
- package/components/thinking/index.css +0 -125
- package/components/typing-markdown/index.css +0 -31
- package/components/vditor/index.css +0 -12
- package/components/xgplayer/index.css +0 -1
- package/icons/_plugin-vue_export-helper.mjs +0 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
2
|
vertical: BooleanConstructor;
|
|
3
3
|
size: StringConstructor;
|
|
4
4
|
move: NumberConstructor;
|
|
@@ -11,85 +11,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
11
11
|
type: NumberConstructor;
|
|
12
12
|
default: number;
|
|
13
13
|
};
|
|
14
|
-
}>, {
|
|
15
|
-
props: import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
-
vertical: BooleanConstructor;
|
|
17
|
-
size: StringConstructor;
|
|
18
|
-
move: NumberConstructor;
|
|
19
|
-
ratio: {
|
|
20
|
-
type: NumberConstructor;
|
|
21
|
-
required: true;
|
|
22
|
-
};
|
|
23
|
-
always: BooleanConstructor;
|
|
24
|
-
hideAfter: {
|
|
25
|
-
type: NumberConstructor;
|
|
26
|
-
default: number;
|
|
27
|
-
};
|
|
28
|
-
}>> & Readonly<{}> & {}>;
|
|
29
|
-
scrollbar: import("element-plus").ScrollbarContext;
|
|
30
|
-
ns: {
|
|
31
|
-
namespace: import("vue").ComputedRef<string>;
|
|
32
|
-
b: (blockSuffix?: string) => string;
|
|
33
|
-
e: (element?: string) => string;
|
|
34
|
-
m: (modifier?: string) => string;
|
|
35
|
-
be: (blockSuffix?: string, element?: string) => string;
|
|
36
|
-
em: (element?: string, modifier?: string) => string;
|
|
37
|
-
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
38
|
-
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
39
|
-
is: {
|
|
40
|
-
(name: string, state: boolean | undefined): string;
|
|
41
|
-
(name: string): string;
|
|
42
|
-
};
|
|
43
|
-
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
44
|
-
cssVarName: (name: string) => string;
|
|
45
|
-
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
46
|
-
cssVarBlockName: (name: string) => string;
|
|
47
|
-
};
|
|
48
|
-
instance: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
49
|
-
thumb: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
50
|
-
thumbState: import("vue").Ref<{
|
|
51
|
-
X?: number | undefined;
|
|
52
|
-
Y?: number | undefined;
|
|
53
|
-
}, Partial<Record<"X" | "Y", number>> | {
|
|
54
|
-
X?: number | undefined;
|
|
55
|
-
Y?: number | undefined;
|
|
56
|
-
}>;
|
|
57
|
-
visible: import("vue").Ref<boolean, boolean>;
|
|
58
|
-
cursorDown: boolean;
|
|
59
|
-
cursorLeave: boolean;
|
|
60
|
-
baseScrollHeight: number;
|
|
61
|
-
baseScrollWidth: number;
|
|
62
|
-
originalOnSelectStart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
63
|
-
bar: import("vue").ComputedRef<{
|
|
64
|
-
readonly offset: "offsetHeight";
|
|
65
|
-
readonly scroll: "scrollTop";
|
|
66
|
-
readonly scrollSize: "scrollHeight";
|
|
67
|
-
readonly size: "height";
|
|
68
|
-
readonly key: "vertical";
|
|
69
|
-
readonly axis: "Y";
|
|
70
|
-
readonly client: "clientY";
|
|
71
|
-
readonly direction: "top";
|
|
72
|
-
} | {
|
|
73
|
-
readonly offset: "offsetWidth";
|
|
74
|
-
readonly scroll: "scrollLeft";
|
|
75
|
-
readonly scrollSize: "scrollWidth";
|
|
76
|
-
readonly size: "width";
|
|
77
|
-
readonly key: "horizontal";
|
|
78
|
-
readonly axis: "X";
|
|
79
|
-
readonly client: "clientX";
|
|
80
|
-
readonly direction: "left";
|
|
81
|
-
}>;
|
|
82
|
-
thumbStyle: import("vue").ComputedRef<import("vue").CSSProperties>;
|
|
83
|
-
offsetRatio: import("vue").ComputedRef<number>;
|
|
84
|
-
clickThumbHandler: (e: MouseEvent) => void;
|
|
85
|
-
clickTrackHandler: (e: MouseEvent) => void;
|
|
86
|
-
startDrag: (e: MouseEvent) => void;
|
|
87
|
-
mouseMoveDocumentHandler: (e: MouseEvent) => void;
|
|
88
|
-
mouseUpDocumentHandler: () => void;
|
|
89
|
-
mouseMoveScrollbarHandler: () => void;
|
|
90
|
-
mouseLeaveScrollbarHandler: () => void;
|
|
91
|
-
restoreOnselectstart: () => void;
|
|
92
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
93
15
|
vertical: BooleanConstructor;
|
|
94
16
|
size: StringConstructor;
|
|
95
17
|
move: NumberConstructor;
|
|
@@ -107,4 +29,5 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
107
29
|
always: boolean;
|
|
108
30
|
hideAfter: number;
|
|
109
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
110
33
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("@ant-design/icons-vue"),c=require("@vunk/core/composables"),B=require("ant-design-vue"),k=require("ant-design-x-vue"),O=require("@vunk/shared/function"),q=require("element-plus"),E={fileList:{type:Array,default:void 0},action:{type:String,default:""},modelValue:{type:String,default:""},loading:{type:Boolean,default:void 0},modules:{type:Array,default:()=>[]},sendDisabled:{type:Boolean,default:!1},attachmentsVisible:{type:Boolean,default:void 0},createSendButton:{type:Function,default:void 0},createAttachmentsButton:{type:Function,default:void 0},autoSize:{type:Object,default:void 0},attachmentsProps:{type:Object,default:()=>({})},attachmentsPlaceholder:{type:String,default:"点击上传或拖拽文件到此处"}},L={"update:fileList":o=>!0,"update:modelValue":o=>!0,"update:attachmentsVisible":o=>!0,submit:o=>!0,cancel:null},R={class:"ant-sender-header-header"},z={class:"ant-sender-header-header-title"},F={class:"ant-sender-header-header-close"},b=e.defineComponent({name:"AXSenderHeader",inheritAttrs:!1,__name:"SenderHeader",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:"Sender"},contentRef:{type:Function,default:O.noop}},emits:{"update:modelValue":null},setup(o){return(r,a)=>(e.openBlock(),e.createBlock(e.unref(q.ElCollapseTransition),null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",e.mergeProps({class:"ant-sender-header"},r.$attrs),[e.createElementVNode("div",R,[e.createElementVNode("div",z,e.toDisplayString(o.title),1),e.createElementVNode("div",F,[e.createVNode(e.unref(B.Button),{type:"text",size:"small",onClick:a[0]||(a[0]=u=>r.$emit("update:modelValue",!1))},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.CloseOutlined))]),_:1})])]),e.createElementVNode("div",{ref:o.contentRef,class:"ant-sender-header-content"},[e.renderSlot(r.$slots,"default")],512)],16),[[e.vShow,o.modelValue]])]),_:3}))}}),d=e.defineComponent({name:"VkSender",__name:"index",props:E,emits:L,setup(o,{emit:r}){const a=o,u=r,m=e.useSlots(),p=e.computed(()=>a.modules.includes("Attachments")),h=c.useModelComputed({key:"loading",default:!1},a,u),s=c.useModelComputed({key:"attachmentsVisible",default:!1},a,u);function g(t={}){const{SendButton:l,LoadingButton:n}=t;return h.value?e.createVNode(n,null,null):e.createVNode(l,{disabled:a.sendDisabled},null)}function v(t){return(a.createSendButton||g)(t)}function C(){return e.createVNode(B.Button,{type:"text",onClick:()=>s.value=!s.value},{icon:()=>e.createVNode(f.LinkOutlined,null,null)})}function V(){const t=a.createAttachmentsButton||C;return p.value?t():null}const N=(t,l)=>{const{SendButton:n,LoadingButton:i}=l.components,A=v({SendButton:n,LoadingButton:i});return e.createVNode("div",{class:"vk-sender-actions"},[e.createVNode("div",{class:"vk-sender-actions__before"},[m.actions_before?.()]),e.createVNode("div",{class:"vk-sender-actions__after"},[m.actions_after?.()??A])])},_=t=>t==="drop"?{title:"请将文件拖到此处"}:{icon:e.createVNode(f.CloudUploadOutlined,null,null),title:"上传文件",description:a.attachmentsPlaceholder},y=c.useModelComputed({key:"fileList",default:[]},a,u),w=e.ref(),S=c.useDeferred(),D=S.resolve;async function $(t){s.value=!0;const l=await S.promise;await e.nextTick();const n=l.querySelector('input[type="file"]');if(n){const i=new DataTransfer;i.items.add(t),n.files=i.files,n.dispatchEvent(new Event("change",{bubbles:!0}))}}function P(t){y.value=t.fileList}return(t,l)=>(e.openBlock(),e.createBlock(e.unref(k.Sender),{class:"vk-sender",value:t.modelValue,loading:e.unref(h),"allow-speech":!0,actions:N,"on-submit":n=>{!t.sendDisabled&&t.$emit("submit",n)},"on-cancel":()=>t.$emit("cancel"),"auto-size":t.autoSize,"onUpdate:value":l[1]||(l[1]=n=>t.$emit("update:modelValue",n)),onPasteFile:$},e.createSlots({header:e.withCtx(()=>[p.value?(e.openBlock(),e.createBlock(b,{key:0,modelValue:e.unref(s),"onUpdate:modelValue":l[0]||(l[0]=n=>e.isRef(s)?s.value=n:null),title:"附件","content-ref":e.unref(D)},{default:e.withCtx(()=>[e.createVNode(e.unref(k.Attachments),e.mergeProps({ref_key:"attachmentsRef",ref:w,items:e.unref(y),placeholder:_,action:t.action,multiple:""},t.attachmentsProps,{onChange:P}),null,16,["items","action"])]),_:1},8,["modelValue","content-ref"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"header")]),prefix:e.withCtx(()=>[t.$slots.prefix?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V()),{key:0})),e.renderSlot(t.$slots,"prefix")]),_:2},[t.$slots.footer?{name:"footer",fn:e.withCtx(({info:n})=>[e.renderSlot(t.$slots,"footer",{sendButton:v(n.components),attachmentsButton:V(),info:n})]),key:"0"}:void 0]),1032,["value","loading","on-submit","on-cancel","auto-size"]))}}),M=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));d.install=o=>{o.component(d.name||"VkSender",d)};exports.VkSender=d;exports.VkSenderHeader=b;exports.__VkSender=M;exports.default=d;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { defineComponent, openBlock,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const props = {
|
|
1
|
+
import { defineComponent as C, createBlock as m, openBlock as p, unref as s, withCtx as i, withDirectives as E, createElementVNode as u, mergeProps as A, toDisplayString as H, createVNode as l, renderSlot as h, vShow as N, useSlots as U, computed as W, ref as M, createSlots as q, createCommentVNode as $, resolveDynamicComponent as I, isRef as X, nextTick as G } from "vue";
|
|
2
|
+
import { CloseOutlined as J, CloudUploadOutlined as K, LinkOutlined as Q } from "@ant-design/icons-vue";
|
|
3
|
+
import { useModelComputed as v, useDeferred as Y } from "@vunk/core/composables";
|
|
4
|
+
import { Button as D } from "ant-design-vue";
|
|
5
|
+
import { Sender as Z, Attachments as x } from "ant-design-x-vue";
|
|
6
|
+
import { noop as ee } from "@vunk/shared/function";
|
|
7
|
+
import { ElCollapseTransition as te } from "element-plus";
|
|
8
|
+
const ne = {
|
|
11
9
|
/**
|
|
12
10
|
* @description v-model 绑定文件列表
|
|
13
11
|
*/
|
|
@@ -48,7 +46,7 @@ const props = {
|
|
|
48
46
|
*/
|
|
49
47
|
sendDisabled: {
|
|
50
48
|
type: Boolean,
|
|
51
|
-
default:
|
|
49
|
+
default: !1
|
|
52
50
|
},
|
|
53
51
|
/**
|
|
54
52
|
* @description v-model attachments显隐 在 Attachments 模块存在时有效
|
|
@@ -87,27 +85,28 @@ const props = {
|
|
|
87
85
|
},
|
|
88
86
|
attachmentsPlaceholder: {
|
|
89
87
|
type: String,
|
|
90
|
-
default: "
|
|
88
|
+
default: "点击上传或拖拽文件到此处"
|
|
91
89
|
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
"update:
|
|
95
|
-
"update:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
90
|
+
}, ae = {
|
|
91
|
+
"update:fileList": (n) => !0,
|
|
92
|
+
"update:modelValue": (n) => !0,
|
|
93
|
+
"update:attachmentsVisible": (n) => !0,
|
|
94
|
+
submit: (n) => !0,
|
|
95
|
+
cancel: null
|
|
96
|
+
}, oe = {
|
|
97
|
+
class: "ant-sender-header-header"
|
|
98
|
+
}, le = {
|
|
99
|
+
class: "ant-sender-header-header-title"
|
|
100
|
+
}, se = {
|
|
101
|
+
class: "ant-sender-header-header-close"
|
|
102
|
+
}, re = /* @__PURE__ */ C({
|
|
103
|
+
name: "AXSenderHeader",
|
|
104
|
+
inheritAttrs: !1,
|
|
106
105
|
__name: "SenderHeader",
|
|
107
106
|
props: {
|
|
108
107
|
modelValue: {
|
|
109
108
|
type: Boolean,
|
|
110
|
-
default:
|
|
109
|
+
default: !1
|
|
111
110
|
},
|
|
112
111
|
title: {
|
|
113
112
|
type: String,
|
|
@@ -115,295 +114,167 @@ var _sfc_main$1 = /* @__PURE__ */defineComponent({
|
|
|
115
114
|
},
|
|
116
115
|
contentRef: {
|
|
117
116
|
type: Function,
|
|
118
|
-
default:
|
|
117
|
+
default: ee
|
|
119
118
|
}
|
|
120
119
|
},
|
|
121
120
|
emits: {
|
|
122
121
|
"update:modelValue": null
|
|
123
122
|
},
|
|
124
|
-
setup(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
value: true
|
|
142
|
-
});
|
|
143
|
-
return __returned__;
|
|
123
|
+
setup(n) {
|
|
124
|
+
return (d, a) => (p(), m(s(te), null, {
|
|
125
|
+
default: i(() => [E(u("div", A({
|
|
126
|
+
class: "ant-sender-header"
|
|
127
|
+
}, d.$attrs), [u("div", oe, [u("div", le, H(n.title), 1), u("div", se, [l(s(D), {
|
|
128
|
+
type: "text",
|
|
129
|
+
size: "small",
|
|
130
|
+
onClick: a[0] || (a[0] = (c) => d.$emit("update:modelValue", !1))
|
|
131
|
+
}, {
|
|
132
|
+
icon: i(() => [l(s(J))]),
|
|
133
|
+
_: 1
|
|
134
|
+
})])]), u("div", {
|
|
135
|
+
ref: n.contentRef,
|
|
136
|
+
class: "ant-sender-header-content"
|
|
137
|
+
}, [h(d.$slots, "default")], 512)], 16), [[N, n.modelValue]])]),
|
|
138
|
+
_: 3
|
|
139
|
+
}));
|
|
144
140
|
}
|
|
145
|
-
})
|
|
146
|
-
|
|
147
|
-
const _hoisted_1 = { class: "ant-sender-header-header" };
|
|
148
|
-
const _hoisted_2 = { class: "ant-sender-header-header-title" };
|
|
149
|
-
const _hoisted_3 = { class: "ant-sender-header-header-close" };
|
|
150
|
-
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
151
|
-
return openBlock(), createBlock($setup["ElCollapseTransition"], null, {
|
|
152
|
-
default: withCtx(() => [
|
|
153
|
-
withDirectives(createElementVNode(
|
|
154
|
-
"div",
|
|
155
|
-
mergeProps({ class: "ant-sender-header" }, _ctx.$attrs),
|
|
156
|
-
[
|
|
157
|
-
createElementVNode("div", _hoisted_1, [
|
|
158
|
-
createElementVNode(
|
|
159
|
-
"div",
|
|
160
|
-
_hoisted_2,
|
|
161
|
-
toDisplayString($props.title),
|
|
162
|
-
1
|
|
163
|
-
/* TEXT */
|
|
164
|
-
),
|
|
165
|
-
createElementVNode("div", _hoisted_3, [
|
|
166
|
-
createVNode($setup["AntButton"], {
|
|
167
|
-
type: "text",
|
|
168
|
-
size: "small",
|
|
169
|
-
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", false))
|
|
170
|
-
}, {
|
|
171
|
-
icon: withCtx(() => [
|
|
172
|
-
createVNode($setup["CloseOutlined"])
|
|
173
|
-
]),
|
|
174
|
-
_: 1
|
|
175
|
-
/* STABLE */
|
|
176
|
-
})
|
|
177
|
-
])
|
|
178
|
-
]),
|
|
179
|
-
createElementVNode(
|
|
180
|
-
"div",
|
|
181
|
-
{
|
|
182
|
-
ref: $props.contentRef,
|
|
183
|
-
class: "ant-sender-header-content"
|
|
184
|
-
},
|
|
185
|
-
[
|
|
186
|
-
renderSlot(_ctx.$slots, "default")
|
|
187
|
-
],
|
|
188
|
-
512
|
|
189
|
-
/* NEED_PATCH */
|
|
190
|
-
)
|
|
191
|
-
],
|
|
192
|
-
16
|
|
193
|
-
/* FULL_PROPS */
|
|
194
|
-
), [
|
|
195
|
-
[vShow, $props.modelValue]
|
|
196
|
-
])
|
|
197
|
-
]),
|
|
198
|
-
_: 3
|
|
199
|
-
/* FORWARDED */
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
var SenderHeader = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/sender/src/SenderHeader.vue"]]);
|
|
203
|
-
|
|
204
|
-
var _sfc_main = /* @__PURE__ */defineComponent({
|
|
205
|
-
...{
|
|
206
|
-
name: "VkSender"
|
|
207
|
-
},
|
|
141
|
+
}), y = /* @__PURE__ */ C({
|
|
142
|
+
name: "VkSender",
|
|
208
143
|
__name: "index",
|
|
209
|
-
props:
|
|
210
|
-
emits,
|
|
211
|
-
setup(
|
|
212
|
-
|
|
213
|
-
emit: __emit
|
|
144
|
+
props: ne,
|
|
145
|
+
emits: ae,
|
|
146
|
+
setup(n, {
|
|
147
|
+
emit: d
|
|
214
148
|
}) {
|
|
215
|
-
|
|
216
|
-
const props = __props;
|
|
217
|
-
const emit = __emit;
|
|
218
|
-
const slots = useSlots();
|
|
219
|
-
const hasAttachments = computed(() => props.modules.includes("Attachments"));
|
|
220
|
-
const loading = useModelComputed({
|
|
149
|
+
const a = n, c = d, S = U(), k = W(() => a.modules.includes("Attachments")), V = v({
|
|
221
150
|
key: "loading",
|
|
222
|
-
default:
|
|
223
|
-
},
|
|
224
|
-
const headerOpen = useModelComputed({
|
|
151
|
+
default: !1
|
|
152
|
+
}, a, c), r = v({
|
|
225
153
|
key: "attachmentsVisible",
|
|
226
|
-
default:
|
|
227
|
-
},
|
|
228
|
-
function
|
|
154
|
+
default: !1
|
|
155
|
+
}, a, c);
|
|
156
|
+
function P(e = {}) {
|
|
229
157
|
const {
|
|
230
|
-
SendButton,
|
|
231
|
-
LoadingButton
|
|
232
|
-
} =
|
|
233
|
-
return
|
|
234
|
-
|
|
158
|
+
SendButton: o,
|
|
159
|
+
LoadingButton: t
|
|
160
|
+
} = e;
|
|
161
|
+
return V.value ? l(t, null, null) : l(o, {
|
|
162
|
+
disabled: a.sendDisabled
|
|
235
163
|
}, null);
|
|
236
164
|
}
|
|
237
|
-
function
|
|
238
|
-
|
|
239
|
-
return fn(components);
|
|
165
|
+
function b(e) {
|
|
166
|
+
return (a.createSendButton || P)(e);
|
|
240
167
|
}
|
|
241
|
-
function
|
|
242
|
-
return
|
|
243
|
-
|
|
244
|
-
|
|
168
|
+
function w() {
|
|
169
|
+
return l(D, {
|
|
170
|
+
type: "text",
|
|
171
|
+
onClick: () => r.value = !r.value
|
|
245
172
|
}, {
|
|
246
|
-
icon: () =>
|
|
173
|
+
icon: () => l(Q, null, null)
|
|
247
174
|
});
|
|
248
175
|
}
|
|
249
|
-
function
|
|
250
|
-
const
|
|
251
|
-
return
|
|
176
|
+
function B() {
|
|
177
|
+
const e = a.createAttachmentsButton || w;
|
|
178
|
+
return k.value ? e() : null;
|
|
252
179
|
}
|
|
253
|
-
const
|
|
180
|
+
const L = (e, o) => {
|
|
254
181
|
const {
|
|
255
|
-
SendButton,
|
|
256
|
-
LoadingButton
|
|
257
|
-
} =
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
LoadingButton
|
|
182
|
+
SendButton: t,
|
|
183
|
+
LoadingButton: f
|
|
184
|
+
} = o.components, j = b({
|
|
185
|
+
SendButton: t,
|
|
186
|
+
LoadingButton: f
|
|
261
187
|
});
|
|
262
|
-
return
|
|
263
|
-
|
|
264
|
-
}, [
|
|
265
|
-
|
|
266
|
-
}, [
|
|
267
|
-
|
|
268
|
-
}, [
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
return {
|
|
277
|
-
icon: createVNode(CloudUploadOutlined, null, null),
|
|
278
|
-
title: "\u4E0A\u4F20\u6587\u4EF6",
|
|
279
|
-
description: props.attachmentsPlaceholder
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
};
|
|
283
|
-
const theFileList = useModelComputed({
|
|
188
|
+
return l("div", {
|
|
189
|
+
class: "vk-sender-actions"
|
|
190
|
+
}, [l("div", {
|
|
191
|
+
class: "vk-sender-actions__before"
|
|
192
|
+
}, [S.actions_before?.()]), l("div", {
|
|
193
|
+
class: "vk-sender-actions__after"
|
|
194
|
+
}, [S.actions_after?.() ?? j])]);
|
|
195
|
+
}, O = (e) => e === "drop" ? {
|
|
196
|
+
title: "请将文件拖到此处"
|
|
197
|
+
} : {
|
|
198
|
+
icon: l(K, null, null),
|
|
199
|
+
title: "上传文件",
|
|
200
|
+
description: a.attachmentsPlaceholder
|
|
201
|
+
}, g = v({
|
|
284
202
|
key: "fileList",
|
|
285
203
|
default: []
|
|
286
|
-
},
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
const dataTransfer = new DataTransfer();
|
|
297
|
-
dataTransfer.items.add(file);
|
|
298
|
-
fileInput.files = dataTransfer.files;
|
|
299
|
-
fileInput.dispatchEvent(new Event("change", {
|
|
300
|
-
bubbles: true
|
|
204
|
+
}, a, c), R = M(), _ = Y(), z = _.resolve;
|
|
205
|
+
async function F(e) {
|
|
206
|
+
r.value = !0;
|
|
207
|
+
const o = await _.promise;
|
|
208
|
+
await G();
|
|
209
|
+
const t = o.querySelector('input[type="file"]');
|
|
210
|
+
if (t) {
|
|
211
|
+
const f = new DataTransfer();
|
|
212
|
+
f.items.add(e), t.files = f.files, t.dispatchEvent(new Event("change", {
|
|
213
|
+
bubbles: !0
|
|
301
214
|
}));
|
|
302
215
|
}
|
|
303
216
|
}
|
|
304
|
-
function
|
|
305
|
-
|
|
217
|
+
function T(e) {
|
|
218
|
+
g.value = e.fileList;
|
|
306
219
|
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
createSendButton,
|
|
316
|
-
createAttachmentsButtonDefault,
|
|
317
|
-
createAttachmentsButton,
|
|
318
|
-
actionsRender,
|
|
319
|
-
attachmentsPlaceholder,
|
|
320
|
-
theFileList,
|
|
321
|
-
attachmentsRef,
|
|
322
|
-
attachmentWrapDef,
|
|
323
|
-
attachmentWrapResolve,
|
|
324
|
-
handlePasteFile,
|
|
325
|
-
handleChange,
|
|
326
|
-
get Attachments() {
|
|
327
|
-
return Attachments;
|
|
328
|
-
},
|
|
329
|
-
get Sender() {
|
|
330
|
-
return Sender;
|
|
220
|
+
return (e, o) => (p(), m(s(Z), {
|
|
221
|
+
class: "vk-sender",
|
|
222
|
+
value: e.modelValue,
|
|
223
|
+
loading: s(V),
|
|
224
|
+
"allow-speech": !0,
|
|
225
|
+
actions: L,
|
|
226
|
+
"on-submit": (t) => {
|
|
227
|
+
!e.sendDisabled && e.$emit("submit", t);
|
|
331
228
|
},
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
return __returned__;
|
|
339
|
-
}
|
|
340
|
-
});
|
|
341
|
-
|
|
342
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
343
|
-
return openBlock(), createBlock($setup["Sender"], {
|
|
344
|
-
class: "vk-sender",
|
|
345
|
-
value: _ctx.modelValue,
|
|
346
|
-
loading: $setup.loading,
|
|
347
|
-
"allow-speech": true,
|
|
348
|
-
actions: $setup.actionsRender,
|
|
349
|
-
"on-submit": (e) => {
|
|
350
|
-
!_ctx.sendDisabled && _ctx.$emit("submit", e);
|
|
351
|
-
},
|
|
352
|
-
"on-cancel": () => _ctx.$emit("cancel"),
|
|
353
|
-
"auto-size": _ctx.autoSize,
|
|
354
|
-
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:modelValue", $event)),
|
|
355
|
-
onPasteFile: $setup.handlePasteFile
|
|
356
|
-
}, createSlots({
|
|
357
|
-
header: withCtx(() => [
|
|
358
|
-
$setup.hasAttachments ? (openBlock(), createBlock($setup["SenderHeader"], {
|
|
229
|
+
"on-cancel": () => e.$emit("cancel"),
|
|
230
|
+
"auto-size": e.autoSize,
|
|
231
|
+
"onUpdate:value": o[1] || (o[1] = (t) => e.$emit("update:modelValue", t)),
|
|
232
|
+
onPasteFile: F
|
|
233
|
+
}, q({
|
|
234
|
+
header: i(() => [k.value ? (p(), m(re, {
|
|
359
235
|
key: 0,
|
|
360
|
-
modelValue:
|
|
361
|
-
"onUpdate:modelValue":
|
|
362
|
-
title: "
|
|
363
|
-
"content-ref":
|
|
236
|
+
modelValue: s(r),
|
|
237
|
+
"onUpdate:modelValue": o[0] || (o[0] = (t) => X(r) ? r.value = t : null),
|
|
238
|
+
title: "附件",
|
|
239
|
+
"content-ref": s(z)
|
|
364
240
|
}, {
|
|
365
|
-
default:
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
241
|
+
default: i(() => [l(s(x), A({
|
|
242
|
+
ref_key: "attachmentsRef",
|
|
243
|
+
ref: R,
|
|
244
|
+
items: s(g),
|
|
245
|
+
placeholder: O,
|
|
246
|
+
action: e.action,
|
|
247
|
+
multiple: ""
|
|
248
|
+
}, e.attachmentsProps, {
|
|
249
|
+
onChange: T
|
|
250
|
+
}), null, 16, ["items", "action"])]),
|
|
374
251
|
_: 1
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
renderSlot(_ctx.$slots, "prefix")
|
|
382
|
-
]),
|
|
383
|
-
_: 2
|
|
384
|
-
/* DYNAMIC */
|
|
385
|
-
}, [
|
|
386
|
-
_ctx.$slots.footer ? {
|
|
252
|
+
}, 8, ["modelValue", "content-ref"])) : $("", !0), h(e.$slots, "header")]),
|
|
253
|
+
prefix: i(() => [e.$slots.prefix ? $("", !0) : (p(), m(I(B()), {
|
|
254
|
+
key: 0
|
|
255
|
+
})), h(e.$slots, "prefix")]),
|
|
256
|
+
_: 2
|
|
257
|
+
}, [e.$slots.footer ? {
|
|
387
258
|
name: "footer",
|
|
388
|
-
fn:
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
]),
|
|
259
|
+
fn: i(({
|
|
260
|
+
info: t
|
|
261
|
+
}) => [h(e.$slots, "footer", {
|
|
262
|
+
sendButton: b(t.components),
|
|
263
|
+
attachmentsButton: B(),
|
|
264
|
+
info: t
|
|
265
|
+
})]),
|
|
395
266
|
key: "0"
|
|
396
|
-
} : void 0
|
|
397
|
-
|
|
398
|
-
}
|
|
399
|
-
var VkSender = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/sender/src/index.vue"]]);
|
|
400
|
-
|
|
401
|
-
var types = /*#__PURE__*/Object.freeze({
|
|
267
|
+
} : void 0]), 1032, ["value", "loading", "on-submit", "on-cancel", "auto-size"]));
|
|
268
|
+
}
|
|
269
|
+
}), he = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
402
270
|
__proto__: null
|
|
403
|
-
});
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
271
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
272
|
+
y.install = (n) => {
|
|
273
|
+
n.component(y.name || "VkSender", y);
|
|
274
|
+
};
|
|
275
|
+
export {
|
|
276
|
+
y as VkSender,
|
|
277
|
+
re as VkSenderHeader,
|
|
278
|
+
he as __VkSender,
|
|
279
|
+
y as default
|
|
407
280
|
};
|
|
408
|
-
|
|
409
|
-
export { VkSender, SenderHeader as VkSenderHeader, types as __VkSender, VkSender as default };
|